I'm trying to model hypoid gearsHypoid Gears for a model that I'm making. I'm doing the model in AutoCAD/InventorAutoCAD/Inventor, but the only decent free tutorial that I've found for modeling hypoid gearsHypoid Gears is meant for blenderBlender. Most of the steps from the tutorial can be done in AutoCAD, but there's this one part where they use a pythonPython script to transform a flat gear pattern into a cone shape for the gear, and i'm. I'm having difficulty understanding how the script works since I don't know pythonPython. Would someone be able to explain how the script is transforming the gear sketch so I can try and recreate it in CAD. Thanks.
TheThis calculator made the following script:
import bpy
from math import *
obj=bpy.context.object
mesh=obj.data
for i in range(0, len(mesh.vertices)):
vert=mesh.vertices[i]
x=vert.co[0]
y=vert.co[1]
z=vert.co[2]
R=3.970
alpha=14.031*pi/180
r=sqrt(x*x+y*y)
teta=atan2(y, x)
rnew=R+(r-R)*cos(alpha)
xnew=rnew*cos(teta)
ynew=rnew*sin(teta)
znew=(r-R)*sin(alpha)
vert.co[0]=xnew
vert.co[1]=ynew
vert.co[2]=znew
The calculator that made the script: http://www.otvinta.com/hypoid.html
The tutorial I'm using: https://www.youtube.com/watch?v=wWn9gYwnONk&ab_channel=O.T.VintaThis is the YouTube Tutorial I'm using.