Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Rotating a component

Message 1 of 1
304 Views, 0 Replies

Rotating a component

I am trying create a Python script that will create a basic framing model of a shed or small house based on entering some dimensions for the walls and positions of doors and windows.


So far I have created a component named "wall" as a child of the rootComponent. Using that object I call a "createWall" routine with some dimensions. The "createWall" routine then calls a "createBoard" routine which creates a 2x4 or 2x6 and returns the board component. The "createWall" routine then rotates the board's body as needed and moves it to the proper position. Finally the "createWall" routine returns the "wall" component.


Everything up to this point is working okay. My problem now, is that when I create my second wall I need to rotate it 90 degrees to the first wall and move it so that the corners are positioned together. What I don't understand is what exactly I need to rotate in reference to my "wall" component that is composed of several "board" components to get it to move. The rotate routine I am using to rotate my individual boards does not work because it rotates the body and the "bRepBodies.count" for the wall component is zero. Can anyone point me to what direction I need to take to rotate my wall?


Thank You


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th

Autodesk Design & Make Report