Patterning by translation and rotation

Patterning by translation and rotation

casey.rogers
Alumni Alumni
14,907 Views
38 Replies
Message 1 of 39

Patterning by translation and rotation

casey.rogers
Alumni
Alumni

I'm trying to make a spiral staircase based off a design I previously made in Inventor.  It appears I cannot use one of the strategies I used in inventor so I'll have to do it a different way. Basically I have one step already:

And need to copy it upward <distance> <quantity> times while also rotating each copy about the y axis relative to the previous copy by <degrees> in order to create a full staircase. It'd be sort of similar to a rectangular pattern where the first direction is distance along the y axis and the second direction is rotation about the y axis.
Here is a picture of the step patterned upward. I manually rotated the bottom step using the move tool and could manually rotate the rest of the pieces but I am designing the staircase to be parametric where one of the parameters is the number of the steps so that's not an option.

In Inventor I used a rectangular pattern with only one direction-a helix curve that matched the above rotation and translation. In my Fusion shots, I'm using a triangular coil to generate a helix curve because, AFAIK, Fusion doesn't yet have a helix tool. Fusion's rectangular pattern does not appear to accept helix curves as directions and pattern along a path does not give the desired result-it tilts the stairs and does not rotate perfectly around the y axis.

As is I can't seem to figure out how to accomplish this with Fusion's toolset, anyone have any ideas? Is using non-striaght lines for rectangular pattern directions (like you can in Inventor) in the works for Fusion?

Accepted solutions (2)
14,908 Views
38 Replies
Replies (38)
Message 21 of 39

JYZMT
Advocate
Advocate

Hello,

 

I just tried this. does any one know if its still working? the dialogue box does not appear. When I look at the mp4 movie (in the first attachment post), the script is run, then the dialogue is pulled across from the right? (17 seconds in to the mp4). I assume this is coming in from another screen? is it possible the dialogue is working, but just off my screen somewhere?

 

Second question... is there any update on the native pattern feature? Any better way to pattern a component with a translation and rotation? 

 

If this does not work, my next thought was to do a vertical pattern, then make a rotation joint to each component, driven by multiple of a rotation parameter? but it means re applying every time a component is added or subtracted. 

 

Any other ideas???

0 Likes
Message 22 of 39

a_antonov
Explorer
Explorer
Thank you, the script works well.
 
 
 
 
 
Is it possible to use parameters for the Occurences Number? All other inputs work with parameters but not this one.
 
Best wishes,
 Alex Antonov, Moscow
0 Likes
Message 23 of 39

bvarner86
Contributor
Contributor

Anyone got this working recently?  It gives an error when trying to add the script.

0 Likes
Message 24 of 39

Pavel_Holecek
Autodesk
Autodesk

Hello,

 

I have rewritten the script to C++ because JavaScript is not available for scripting in Fusion now.

Let me know if you see any issue with the new script.

 

BTW: this script is currently working for Windows only!

 

Regards Pavel 

 

the script  is located here: https://forums.autodesk.com/t5/fusion-360-design-validate/patterning-by-translation-and-rotation/m-p...

Pavel Holecek
Autodesk QA team
Message 25 of 39

bvarner86
Contributor
Contributor
thank you! will try it out today
0 Likes
Message 26 of 39

bvarner86
Contributor
Contributor

Tried it out.  Doesn't seem to do anything.

 

Script is installed and added into C:\Users\USERNAME\AppData\Roaming\Autodesk\Autodesk Fusion 360\API\Scripts\SpiralPattern

Sketched first tread/stair

Extruded first tread/stair as a COMPONENT

Sketches center cylinder

Extruded cylinder as a COMPONENT

Selected Component1:1 (tread)

Run Utilities->Scripts->SpiralPattern->RUN

 

Nothing happens and no error.

 

bvarner86_0-1679429041154.png

 

0 Likes
Message 27 of 39

Pavel_Holecek
Autodesk
Autodesk

Hello,

 

I am sending you a screen capture how the Spiral Pattern command works. 
It looks like that you do not see command dialog for Spiral Pattern at all or do you?

 

Do you see any message in the text Command Window? (File->View->Show Text Command)

 

Regards Pavel

Pavel Holecek
Autodesk QA team
0 Likes
Message 28 of 39

bvarner86
Contributor
Contributor

Correct.  The user interface prompt does not come up and no text commands show after running the script.

 

I'm using Windows 11 64bit, up to date.  F360 is running the latest version.

 

Screencast of nothing happening 🙂

0 Likes
Message 29 of 39

Pavel_Holecek
Autodesk
Autodesk
Accepted solution

Hello,

 

I have updated the script and I hope it will help. I have tried it on several machines and it works fine.

 

Let me know if you still have a problem.

 

Regards Pavel

Pavel Holecek
Autodesk QA team
Message 30 of 39

bvarner86
Contributor
Contributor

worked perfect.  thanks!

 

bvarner86_0-1679583911166.png

 

0 Likes
Message 31 of 39

jaylaudeman
Contributor
Contributor

I've been trying to use this but I cannot figure out what what all the inputs are referring to.  From what I've tried it seems the "Occurrences Distance" would be the rise of the steps, the vertical distance from the tops of one stair tread to the next.  Am I correct in that the "Occurrence  Angle" is the only way to define the run distance of the steps?

0 Likes
Message 32 of 39

Pavel_Holecek
Autodesk
Autodesk

Define parameters

There are two ways how to define the pattern

1. Define 'Number of Occurrences' (steps) and then define 'Height Total' -> 'Occurrence Distance' will automatically recalculated

2. Define 'Number of Occurrences' (steps) and then define 'Occurrence Distance' -> 'Height Total' will automatically recalculated

'Occurrence Angle' sets just rotation

 

Workflow

  • Select an axis (Work axis/Cylinder face/Circle edge)
  • Select objects you want to copy with rotation and distance
  • Define parameters
  • Press OK
    Hint: in case that pater is rotating or building got opposite direction then you can use negative angle and distance values

Result in Fusion 360

The workflow above creates copies of selected occurrence(component) and move it to position according to specified parameters. This script do not create feature which you can edit.

 

here is a video: https://forums.autodesk.com/t5/fusion-360-design-validate/patterning-by-translation-and-rotation/m-p...

 

Pavel Holecek
Autodesk QA team
Message 33 of 39

bvarner86
Contributor
Contributor

why would the script not work for a non circle shape?  Like an oval?  Below example it works going around a circle but it wouldn't work going around an oval/ellipse.

 

bvarner86_0-1679869780883.png

 

0 Likes
Message 34 of 39

Pavel_Holecek
Autodesk
Autodesk

Hello,

 

Unfortunately it is not possible because this script  needs for rotation an axis geometry and specify angle of rotation. These two parameters are for circular shape only.

 

Your oval shape (elliptic shape) is more complicated for translation and rotation. It should be driven by a curve (section of a shape).

 

Regards

Pavel Holecek
Autodesk QA team
0 Likes
Message 35 of 39

bvarner86
Contributor
Contributor

makes sense.

 

is there any a chance that in the future there will be a pattern a path with multiple axis user input for achieving essentially this same thing that the script does?

Message 36 of 39

jakedbirk
Enthusiast
Enthusiast

Assuming this is parametric, is there a way to import this after the update which removed javascript scripts? I attempted to use the green + button in the scripts an addins folder and continuously got a 

"A single script or add-in cannot be identified in the selected folder. Please organize your programs so each script or add-in is in its own folder." error. 

If this script is not parametric, it would not be very useful, but if it is: it would be EXTREMELY useful to me!

Thanks for the help!

0 Likes
Message 37 of 39

BrianEkins
Mentor
Mentor

Attached is the original JavaScript code ported over to Python.

And here's having some fun with a test result.

image.png

 

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 38 of 39

davebYYPCU
Consultant
Consultant

Many Thanks!

0 Likes
Message 39 of 39

jakedbirk
Enthusiast
Enthusiast

Thank you @BrianEkins 

0 Likes