Community
Fusion Design, Validate & Document
Stuck on a workflow? Have a tricky question about a Fusion (formerly Fusion 360) feature? Share your project, tips and tricks, ask questions, and get advice from the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pasta Magic: Designing the perfect pasta using Fusion, API & Python!

0 REPLIES 0
Reply
Message 1 of 1
dinocoglitore
1003 Views, 0 Replies

Pasta Magic: Designing the perfect pasta using Fusion, API & Python!

 A Delectable Fusion Project using API and Python!

Header 2.pngMy ability to observe the world around me has radically changed since I approached 3D modeling. All reality, from the most complex to the simplest, from the farthest to the nearest, is subject to possible modeling.

 

In addition to that my real intention is not only to use Fusion with its user interface, but mainly to work with the potentiality of API and Python programming. So the vision of reality enormously widens. The world of design is my Oyster... or...

 

I am an Italian and Italians are known for 'pizza' and 'pasta'. I very often cook 'pasta' and it is inevitable that this becomes an object of 3D modelling. The simplest stuff, of daily use, can become object of observation and study. I believe it is not necessary for a 3D model observation object to be a complex one !

 

Here is the reason why I started the 3D modelling of a simple Fusillo.Fusili 3D.jpgIt seems trivial but its shape is attractive (and not only from a culinary point of view):

Three helixes at a 120° angle distance from each other that coil around an axis in a clockwise direction. The axis is slightly crooked ! 

I have used a spline to define its axis.

 

2 Spline.png

That alone is a reason for observation because the Coil command does not allow to have a curved axis.

 

Each radius that goes from the axis to the periphery seems to be a logarithm spiral. All this is an excellent test for the add-in I have previously developed for the creation of helixes.
The article is readable at the following link: http://autode.sk/2mp9MLD

 

The observation of a real Fusillo and a simple measurement result in the following values :

3 Fusili.png

 

Real dimensions:

Height: 35 mm
Width: 10 mm
Wing thickness: 1.5 mm
Number of helixes: 3
Number of cycles: 2
Hollow at the top and the bottom: 2 mm

 

It's obvious that Fusion has, in its user interface, all the instruments to make the 3D model of this 'simple' object. But my target is to acquire skills on the use of API and to test my add-in developed in Python. To do this, it will be necessary to review the code which will allow to correct any bug still present.

 

Maintaining the previous add-in facility, I only have to insert a sketch that contains the Fusilli radius shape in every construction plane of the helix. I would like the script to directly create the solid model through a Loft feature.
This is an occasion to use the new feature of the Fusion API related to the Loft operation.

 

If required, I can stop the script execution blocking the loft operation and displaying the construction planes (and the single sketches of the radiuses) so that I can manually execute the loft.

 

The only trouble is to mathematically construct the shape of the radius so that it can be inserted in the script to create the helix. For its dimensions and for simplicity I did not consider it as a spiral arc but as a circle arc.
I will mathematically create also the external rounding of the radius, even if this could be realized with the fillet operation.

4 Fusili measurements.png

The mathematical construction has been done applying simple concepts of analitical geometry and trigonometry to calculate the coordinates of the R and S points, the V and W points. I neglected the detailed description of all the steps that can be however found in the following pictures.

5 Construction.png

 

Every construction of the radius must be rotated to the reference angle used for the construction of the helix. For a detailed construction of the Helix add-in you can see the above-mentioned link.

 

In general you can use the following formulas:

 

7 Helix.png

 

This is the result of a single pattern of the helix radius. I used a negative angle to the reference axis (-45°). The names of the points are in the sketch. They are the same I used inside the code. 


8 Helix 2.png

If I embed the construction in each sketch created on the construction planes of the helix, the result is:9 Helix 3.png

 

I used the Helix add-in to create the three helixes and I used these parameters:

Select = the axis spline
Division number: 12
Radius = 0.5
Cycles Number = 2
Start angle = 0, 120, 240
Counterclockwise = True
Delete Construction = False

 

The construction planes need to be active to let the Loft command work both within the script or manually.

The Loft operation applied to each helix creates a component that results in a partial model as in the pictures.10 Helix 4.png

Applying the Helix add-in with a different starting angle for three times creates the complete model.

11 Helix Add-in.png

The completion of the model can be realized with a cut operation of the three components with a sphere created at the top and at the bottom of the model.12 Helix model.pngEventually it can be useful to attribute an appearance that reminds that of the 'pasta' to give a more realistic effect. Also different colors (red and green) can be used to simulate the spinach and tomato effect or to give a golden appearance.

13 Fusili.png

We can imagine a group effect if we spread several Fusilli on a table.

 

To better understand the creation process I made a set of screencast into a video posted on Youtube link below.
Click on the image or copy and paste the YouTube link into your browser to watch the video (https://youtu.be/CqKzOhheevo). 

 

 

 

 

Feel free to ask me any questions you might have about the script development. I hope my experience will be useful for the community. Suggestions, criticisms and proposals are welcome. You can PM me @dinocoglitore or email me at dinocoglitore@tin.it. I look forward to your feedback!

 

THANK YOU & ABOUT ME
I would like to thank my son Nyem who helped me to edit the video and Claudia who helped me in the translation of this article.

Bon appetit. Buon appetito.

 

My name is Dino Coglitore. I am a teacher of ICT at a secondary technical school in Palermo (Sicily-Italy) - ITI Vittorio Emanuele III
I started working with Fusion some months ago with the help of Dario Passariello of Digital3D (Autodesk Academic Partner e Certified Instructor, Autodesk Expert Elite). I did the work of solid modelling. My passion for programming and graphics convinced me to use Python and the Fusion API to try and express my creativity.

 

dino_maredelnord.jpg


Dino, February.2017

Labels (1)
0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report