非圆齿轮二次开发
画齿廓,为什么最高点不在齿顶高那里。感觉不对。大家能看看我的程序吗?Dim i As IntegerReDim x0(18)
ReDim y0(18)
Dim k0 As Integer
ReDim p0(18)
ReDim q0(18)
Dim h0 As Integer
ReDim p00(18)
ReDim q00(18)
u = Sqr((Da / Db) ^ 2 - 1)
g = u / 14
xx = 0.5 * Da * Sin(Tan(f) - f)
yy = 0.5 * Da * Cos(Tan(f) - f)
s = pi * m / 2
inva = Tan(a) - a
sb = Cos(a) * (s + m * z * inva)
j = 2 * sb / Db
t = 0
For i = 1 To 14
If t <= u Then
x0(i) = 0.5 * Db * Sin(t) - Db / 2 * t * Cos(t)
y0(i) = 0.5 * Db * Cos(t) + Db / 2 * t * Sin(t)
p00(i) = -0.5 * Db * Sin(t) + 0.5 * Db * t * Cos(t)
q00(i) = 0.5 * Db * Cos(t) + 0.5 * Db * t * Sin(t)
t = t + g
p0(i) = p00(i) * Cos(j) + q00(i) * Sin(j)
q0(i) = -p00(i) * Sin(j) + q00(i) * Cos(j)
End If
Next i
Part.SetPickMode
xx = 0
yy = 0.5 * Df
Xx1 = xx * Cos(j) + yy * Sin(j)
Yy1 = xx * Sin(j) + yy * Cos(j)
p000 = -0.5 * Db * Sin(0) + 0.5 * Db * 0 * Cos(0)
q000 = 0.5 * Db * Cos(0) + 0.5 * Db * 0 * Sin(0)
Part.SketchSpline 13, 0.001 * x0(1), 0.001 * y0(1), 0
Part.SketchSpline 12, 0.001 * x0(2), 0.001 * y0(2), 0
Part.SketchSpline 11, 0.001 * x0(3), 0.001 * y0(3), 0
Part.SketchSpline 10, 0.001 * x0(4), 0.001 * y0(4), 0
Part.SketchSpline 9, 0.001 * x0(5), 0.001 * y0(5), 0
Part.SketchSpline 8, 0.001 * x0(6), 0.001 * y0(6), 0
Part.SketchSpline 7, 0.001 * x0(7), 0.001 * y0(7), 0
Part.SketchSpline 6, 0.001 * x0(8), 0.001 * y0(8), 0
Part.SketchSpline 5, 0.001 * x0(9), 0.001 * y0(9), 0
Part.SketchSpline 4, 0.001 * x0(10), 0.001 * y0(10), 0
Part.SketchSpline 3, 0.001 * x0(11), 0.001 * y0(11), 0
Part.SketchSpline 2, 0.001 * x0(12), 0.001 * y0(12), 0
Part.SketchSpline 1, 0.001 * x0(13), 0.001 * y0(13), 0
Part.SketchSpline 0, 0.001 * x0(14), 0.001 * y0(14), 0
Part.SketchSpline 13, 0.001 * p0(1), 0.001 * q0(1), 0
Part.SketchSpline 12, 0.001 * p0(2), 0.001 * q0(2), 0
Part.SketchSpline 11, 0.001 * p0(3), 0.001 * q0(3), 0
Part.SketchSpline 10, 0.001 * p0(4), 0.001 * q0(4), 0
Part.SketchSpline 9, 0.001 * p0(5), 0.001 * q0(5), 0
Part.SketchSpline 8, 0.001 * p0(6), 0.001 * q0(6), 0
Part.SketchSpline 7, 0.001 * p0(7), 0.001 * q0(7), 0
Part.SketchSpline 6, 0.001 * p0(8), 0.001 * q0(8), 0
Part.SketchSpline 5, 0.001 * p0(9), 0.001 * q0(9), 0
Part.SketchSpline 4, 0.001 * p0(10), 0.001 * q0(10), 0
Part.SketchSpline 3, 0.001 * p0(11), 0.001 * q0(11), 0
Part.SketchSpline 2, 0.001 * p0(12), 0.001 * q0(12), 0
Part.SketchSpline 1, 0.001 * p0(13), 0.001 * q0(13), 0
Part.SketchSpline 0, 0.001 * p0(14), 0.001 * q0(14), 0
是solidworks的二开吗,真费劲哥都比较摈弃,这是最近做的一个单边连续,单边步进机构的其中一对非圆齿轮,在家里所以图不多,有空再更新,欢迎交流
页:
[1]