Community
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.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Timing Belt Pulley Script and Bug Report.... Probably Not a Bug

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
marc.a.grossman
839 Views, 3 Replies

Timing Belt Pulley Script and Bug Report.... Probably Not a Bug

I'm having some trouble with my first Fusion 360 python script. Basically, I'd like to create a script to automatically generate timing belt pulleys. I'm going to make them according to the shapes defined in this catalog.

 

Here is the screencast. The insert screencast url is not working: http://autode.sk/2oKWiwu

 

I've got a basic script that just executes. Eventually, I'll add a dialog and options for many different tooth profiles, but I'm stuck at square one for now. Please have a look at the screencast.

 

The couple relevant lines of code are:

# a few parameters

toothPitch = 0.080
toothWidth = 0.030
troughDepth = 0.018

 

#insert the line that will be the bottom of the tooth in the pulley

toothSketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(-0.5*toothWidth, pulleyOD/2.0-troughDepth,0), adsk.core.Point3D.create(0.5*toothWidth, pulleyOD/2.0-troughDepth, 0))

 

What's strange is that the points should clearly be at an x position of -0.015" and +0.015", but they're coming in at -0.006" and +0.006" and I'm not sure why.

 

What's strange too is that when I do a print of the x coord of one of the points it's calculated correctly as this:

print(-0.5*toothWidth)

prints out to the "terminal" -0.015"

 

as you'll see in my demo.

 

Thanks in advance to anyone that has a look and helps me solve this.

3 REPLIES 3
Message 2 of 4

Ok. I was able to insert the screencast now. Not sure why it wasn't appearing earlier. Maybe it just takes time to become "active".

 

Any help would be greatly appreciated.

-Marc

 

 

Screencast will be displayed here after you click Post.

9efd3fb9-c318-4d44-ae65-02f77efbd876

 

Message 3 of 4

Now can someone  tell me why it's appearing like this:

 

It says "Screencast will be displayed here after you click Post."

 

but I see no screencast. There are a few bugs to talk about I guess

-Marc

 

 

Message 4 of 4

Ok everyone here's the deal. I kinda thought it was something like this because my stuff was off by 2.5 (very close to 2.54). All units are in cm. You have to convert. Here's a great article on the subject. Glad I managed to stumble across it.

 

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-A81B295F-984A-4039-B1CF-B449BEE893D7

 

-Marc

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