Simple Python Example Request

Simple Python Example Request

Anonymous
Not applicable
2,163 Views
5 Replies
Message 1 of 6

Simple Python Example Request

Anonymous
Not applicable

I would like to learn how to use Python with Fusion 360 but I find the gap between the Test Script and the other script examples too large. Would someone post a simpler example, perhaps creating a cube or a pattern of cubes? I have experience with OpenSCAD but find it too limited for organic modeling. It would be great to explore the programmability of organic shapes using Python and Fusion but I need some help getting started.

 

Thanks in advance,

Steve Medwin

http://www.thingiverse.com/stevemedwin/designs

 

0 Likes
Accepted solutions (1)
2,164 Views
5 Replies
Replies (5)
Message 2 of 6

ekinsb
Alumni
Alumni
Accepted solution

Hi Steve,

 

Please take a look at the Fusion help.  There's a "Programming Interface" topic in the main table of contents.  Undeer that you'll find a "Sample Programs" topic with several simple samples.  Expect this list of samples to grow significantly over the next few releases.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes
Message 3 of 6

Anonymous
Not applicable

Thanks! That should help me get started.

 

Steve

0 Likes
Message 4 of 6

prainsberry
Autodesk
Autodesk

Hey you may already be past this, but here is a script to create a cube.  I used this in a class I did at AU a couple weeks ago.  Sorry I missed this topic earlier.

 

PYdrawCube is very verbose and doesn't do any looping on purpose so you can just follow the steps the API takes.

 

PYdrawProfile uses a little better programming techniques and lets you just start with a generic array of points.  I have another version that imports from a file if you are interested.



Patrick Rainsberry
Developer Advocate, Fusion 360
0 Likes
Message 5 of 6

Anonymous
Not applicable

Thanks for these examples. These will be good to study. Can you post the other one you mentioned? 

 

Any chance that your class at AU was recorded?

 

Thanks,

Steve

0 Likes
Message 6 of 6

prainsberry
Autodesk
Autodesk

No problem.  I had to translate it from javascript.  I am just trying to learn some Python myself.  Here you go.  This shows some file input stuff.  I am not sure if the session was recorded.  I'll get back to you.



Patrick Rainsberry
Developer Advocate, Fusion 360