Multiple development tools applied to the drawing of the involute gear frame


INTRODUCTION The involute gear is an important transmission component, which has the characteristics of smooth transmission and low noise. However, the hand-drawn involute profile is usually drawn one by one according to the gear meshing principle, which is troublesome and has a large error. Here the VBA secondary development tool is used to draw the involute gear profile.
VBA (VisualBasicforApplication) is an integrated object-based programming environment embedded in AutoCAD.
In VBA, AutoCAD provides a mechanism for communicating with the outside world through AetiveX, enabling AutoCAD to be redeveloped through different programming languages ​​and environments, providing a powerful tool for designing and drawing complex contours.
1 guiding idea first define a tile, then draw a complete tooth in the tile, and then calculate the angle between each tooth according to the given number of teeth, and finally insert it sequentially by InsertBlock method Go to the model space.
A complete gear tooth is divided into several parts, the right tooth profile is a spline Spline, and 3 points are selected to draw the spline curve: the intersection of the top circle, the intersection of the division circle and the intersection of the base circle . The transition arc is realized by the lightweight polyline AcadLWPolyline, and then the SetBulge method is used to set a portable polyline as a circular segment. The tip circle and the root circle are respectively found for their radius, starting angle and ending angle, and then given by the AddArc method.
2 Calculating the feature points To accurately draw the gear teeth of a gear, the coordinates of the tooth profile and the top circle, the index circle, the base circle, and the root circle of the gear should be calculated first, as shown in Figure 2. The calculation process and coordinate values ​​are programmed into the source program. The calculation process of the coordinate values ​​of each feature point is omitted.
Θaθ3 writing source code 3.1 Parameter input program In operation, only input 8 parameters, namely modulus, number of teeth, pressure angle, top height coefficient, headspace coefficient, can draw the involute profile more accurately. As shown in Figure 3. These parameters will be entered via the UserForm1 form, as shown in Figure 4.
Prepare to draw the tooth profile DimsTan(0To2)AsDoubleDimeTan(0To2)AsDoubleDimfitPnts(0To8)AsDoubleDimsplineLAsAcadSplineDimsplineRAsAcadSplinesTan(0) = 0: sTan(1) = 0: sTan(2) = 0' The direction cosine of the starting point and the ending point eTan(0)= 0: eTan(1)=0: eTan(2)=0fitPnts(0)=Xb1:fitPnts(1)=Yb1:fitPnts(2)=0 'left tooth contour fitting point coordinate fitPnts(3)=X1:fitPnts (4)=Y1:fitPnts(5)=0fitPnts(6)=Xa1:fitPnts(7)=Ya1:fitPnts(8)=0'In the block, insert the left tooth profile Set splineL=blockObj.AddSpline(fitPnts,sTan, eTan)fitPnts(0)=Xb2:fitPnts(1)=Yb2:fitPnts(2)=0 'Coordinates of the right tooth contour fitting point fitPnts(3)=X2:fitPnts(4)=Y2:fitPnts(5)= 0fitPnts(6)=Xa2:fitPnts(7)=Ya2:fitPnts(8)=0'In the block, insert the right tooth profile SetsplineR= blockObj.AddSpline(fitPnts,sTan,eTan)'Draw a circle arc DimRaAsDoubleDimsAngAsDouble,eAngAsDoubleDimarcObjAsAcadArc' Find the radius of the top circle Ra=(zNumber 2*ha)*mNumber/2sAng=Pi/2-baAngleeAng=Pi/2 baAngle' The center of the circle is to use the block's insertion point SetarcObj=blockObj.AddArc(insPnt,Ra,sAng,eAng)......
4 Conclusion Using VBA secondary development tools to draw involute tooth profile tooth shape error is small. If the processing code is outputted by the method for numerical control machining, the manufacturing precision of the tooth profile can be greatly improved, and the gear transmission can be made more stable. At the same time, it can be seen that the VBA secondary development tool provides a powerful tool for designing and drawing complex contours. Compared with other secondary development tools, it has obvious features of easy learning and high development efficiency.

Rod Wiper

Rod Wiper,Rod Wiper,Rod Wiper Seal Sizes,Rod Wiper Dimensions

Piston Seals, Oil Seal Co., Ltd. , http://www.nbsealrings.com