change origin of component based on a face

change origin of component based on a face

hartk1212
Explorer Explorer
606 Views
4 Replies
Message 1 of 5

change origin of component based on a face

hartk1212
Explorer
Explorer

ive got a 3d printer assembly that i am designing, currently i export the files as mesh , save them as STL, load them in the slicer, orient it to the correct printing orientation and then resave the stl from the slicer so the files are in the correct printing orientation for when users who are building the printer download the files dont have to worry about orienting it correctly. 

 

now ive figured out how to do this manually by moving the body vs moving the component to alter the components origin, but im trying to do this with a script so i can just click a face on the body and it will move the origin of the component so that is on the bottom but also keep the part where it is in the assembly if that makes sense. so far i have a simple script that moves the body based on the face i selected but i want to be able to move it back by moving the component to where it was before it moved the body 

 

if this sounds confusing let me know

 

here is a simple example 
before moving the body, XYZ for the component origin is the same as the documents origin 

 before the movebefore the move

after moving the body to be in printing orientation relative to the component origin, then moving the component back to make the body in the same location relative to the document origin , notice how the 2 origins are now different 

after moving the body and then moving the component backafter moving the body and then moving the component back

0 Likes
607 Views
4 Replies
Replies (4)
Message 2 of 5

kandennti
Mentor
Mentor

Hi @hartk1212 .

 

I have no idea what you are moving components based on.
Without at least an f3d file before and after the change, I don't think anyone would understand.

 

Unfortunately, no one will work on something that takes so much time and effort to reproduce.

0 Likes
Message 3 of 5

JeromeBriot
Mentor
Mentor

Hello,

 

The 3D Print Plus add-in supports custom orientation: https://apps.autodesk.com/FUSION/en/Detail/Index?id=2942207745179825936&appLang=en&os=Win64

 

Its source code is available if you want to see how the orientation and the export are done.

 

 

Message 4 of 5

hartk1212
Explorer
Explorer

not asking anyone to do it for me, just basically place to look in the right direction 

im moving the BODY 

 

 

 

hartk1212_0-1678799892317.png

so the FACE

hartk1212_2-1678799959547.png

 

i click on ends up being the face that gets exported as the bottom face 
but since that ends up moving the BODY with in the Component1 i need to move Component1 back to where it was relative to the Documents origin 

 

0 Likes
Message 5 of 5

hartk1212
Explorer
Explorer

awesome that looks to be KINDA what im looking for, it does change it on export but my end goal is to be able to set the orientation once, and have it update the component then run a script to export ALL the bodies of the document of a specific type into a folder structure based on the components i.e.

  • MainAssembly 
    • Parent_Component
      • Child_Component-1
        • child_component_1.stl
      • Child_Component-2
        • child_component_2.stl


here is a better example of what im trying to do , here is a simple assembly with 2 components that are NOT currently in the proper orientation for printing 

hartk1212_1-1678802062734.png

Component 1 with the face selected that would be on the bed of the printer 

hartk1212_3-1678802495986.png

 

 so then what im currently doing manually is this

Step 1. Aligning the the face that i want on the bed (shown above) of the BODY of each component to the XY plane of the Component origin

hartk1212_5-1678802682909.png

 

Step 2. Then im aligning the Component back to where it was before the BODY was aligned in the previous step as you can see its now in the correct location to complete the assembly, and its Component origin has now essentially been moved (when in reality the body was moved with respect to its origin but since its back where it belongs the only notable difference is the component origin looks like it moved)

hartk1212_6-1678802965874.png

 

 

now here is after i have correctly oriented the parts BODY of each component for printing and also moved the COMPOENTS back to where they should be for the main ASSEMBLY 

if you notice, the Z Axes for each COMPONENT is now different BUT they are all in the same location with respect to each other so for someone loading up this main assembly.f3d file the assembly looks correct

 

hartk1212_8-1678803536473.png

I tried to be a bit more thorough with my explanation of what im looking to do. what I have found to be a nice process is 

  1. Copy / Paste as New of the Component you want to fix
  2. do the move on the ORIGINAL component to orient how you want
  3. then use the ALIGN tool to align the moved ORIGINAL component back into the correct location using the NEW  copy of the component
  4. delete the COPY

those are the basic steps im trying to accomplish


also thank you for taking the time to answer originally and your tool is great 

 

 

0 Likes