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

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

marc.a.grossman
Enthusiast Enthusiast
1,574 Views
3 Replies
Message 1 of 4

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

marc.a.grossman
Enthusiast
Enthusiast

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.

0 Likes
Accepted solutions (1)
1,575 Views
3 Replies
Replies (3)
Message 2 of 4

marc.a.grossman
Enthusiast
Enthusiast

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

 

0 Likes
Message 3 of 4

marc.a.grossman
Enthusiast
Enthusiast

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

 

 

0 Likes
Message 4 of 4

marc.a.grossman
Enthusiast
Enthusiast
Accepted solution

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

0 Likes