3D animation simulation of the hottest gear machin

2022-10-20
  • Detail

This paper combines the advantages of VB in calculation and data processing with the advantages of AutoCAD in accurate drawing, and uses visual Basic6.0 to drive AutoCAD 2000 to realize the three-dimensional animation simulation of gear machining, which has strong practicability. This paper introduces the implementation steps of 3D parametric modeling and 3D animation simulation, which is representative

I. Introduction

gear machining animation simulation is an important part of gear design, and there are several literatures on this subject. Guo Xiaodong used ObjectARX software package based on AutoCAD environment to realize the simulation of bevel gear cutting process with c++ language in AutoCAD environment; Luo Qingsheng developed the working animation of gear mechanism in 3dsmax environment; Feng Juan established a simulation demonstration program of gear machining by generating method with AutoLISP language in CAD environment

all the above methods have their own characteristics. This paper uses VB to redevelop AutoCAD to realize the three-dimensional animation simulation of gear machining, because VB is the simplest windows software development tool and programming language at present. It can redevelop AutoCAD to realize the closed-loop control of experimental force, displacement, etc. AutoCAD can be used as a graphics window in its own program to open, draw, etc, It is very convenient to realize the animation simulation of gear machining

2. Flow chart and form design of simulation program

common gear processing methods include profiling method and generation method, which also includes gear slotting method, rack slotting method and gear hob processing method. The simulation program flow of machining spur gears is shown in Figure 1

Figure 1 flow chart of simulation program

this program uses only one form and uses four text boxes to receive input parameters: tooth number Z, modulus m, pressure angle α And the displacement coefficient X, four command boxes are used to control the subroutine, and one command box cancels the running program. The running result of this form is shown in Figure 2

Figure 2 simulation window automotive polyurethane products will focus on six directions

III. simulation method

1 Connecting AutoCAD in VB

using VB to control AutoCAD is to control the objects, methods and attributes of AutoCAD through the object technology of VB. When calling AutoCAD 2000 objects, VB6.0 must first reference the object library in VB by selecting "autocadobjectlibrary" in the "projects/preferences" menu of VB

at the beginning of program design, it is necessary to define an AutoCAD object variable gearcad, through which you can access AutoCAD's subordinate objects. The definition method is: dim gearcad as acadapplication. Then add the following code to the form code of VB, You can start AutoCAD when the program is running:

private sub form load()

on error resume next

set gearcad=creatobject ("autocadapplica (1) stretching: maximum force, tensile strength, elongation at break, modulus of elasticity")

gear has become the first country in the world to realize the industrialization of trans isoprene rubber. Sible=true (display AutoCAD form)

End Sub

make sure AutoCAD 2000 is installed in the hard disk when running

2. Set viewpoint and shading mode

3D animation demonstration needs to set 3D viewpoint, which is realized with the following statement:

tivedocument Correction=newdirection tiveviewport = tive viewport

where newdirection (0 to 2) is a double precision one-dimensional array variable that stores the three-dimensional coordinates of the viewpoint

use sendcommand method to realize graphic coloring. Gouraud coloring method is used in this program, which can make the surface of 3D model smooth and full of realistic texture. The code is as follows:

nd command "u shademode" +vbcr+ "u g" +vbcr

3. Generation of gear blank

in the program, the root circle radius RF, addendum circle radius RA, indexing circle radius r, base circle radius Rb, blank thickness height and shaft hole radius r of the gear are calculated according to the input parameters. Then, a cylindrical gear3d with RA as the radius and a cylindrical hole with R as the radius are generated by using the addcylinder method, and the shaft hole in the middle of the gear is generated by using the Boolean acsubtraction method

4. Tool generation

take the rack tool as an example. When the tool model shape and tool entity are created, they are shown in Figure 3 and Figure 4 respectively

Figure 3 rack tool model

Figure 4 Simulation of wheel blank and rack tool

the specific creation steps are as follows:

(1) after 0~5 points, use addlight weightpolyline method to create a lightweight polyline curve (0)

(2) mirror the left polyline curve (0) of the tool to obtain the right segment curve (1)

(3) use the addition method to get the tool cross-section area tool

(4) use the addextrudedsolid method to stretch the tool area to obtain a three-dimensional tool solid tool3d

(5) arrayrectangular the single tooth tool entity tool3d to obtain multiple tooth tools; Then, the rack tool tool3d is obtained by Boolean acunion of multiple tooth tools

(6) translate one end of the rack tool tool3d to just meet the wheel blank, and prepare for gear cutting. The translation dimension is calculated according to the parameters such as displacement coefficient X and modulus M

5. Gear processing 3D animation production

still takes the rack cutter as an example, and the main steps and codes of animation production are as follows:

(1) copy the tool tool3d to get the tool3dcopy, and use the wheel blank gear3d and the Boolean acsubtraction of the copied tool tool3dcopy to complete the cutting of the gear blank by the tool

(2) the tool moves forward horizontally, and the distance of each movement is (π m/n) mm, and N is a positive integer; The cutter moves up and down along the gear blank (realized by the move method) to cut the tooth shape in the thickness direction of the gear

(3) the wheel blank gear3d rotates around its own axis, rotating [2 π/(NZ)] radians each time

Figure 5 and Figure 6 respectively show the animation simulation of rack slotting and profiling milling

Figure 5 rack slotting tool animation simulation

Figure 6 profiling milling gear animation simulation

IV. application example

when running this program, as long as the number of teeth Z and other parameters are input, various gear machining processes can be simulated. For example, changing the number of teeth Z or the modification coefficient X can observe the undercutting process and the machining of the modified gear. Table 1 shows the comparison of the standard gear, undercut gear and positive displacement gear obtained from the simulation

v. conclusion

the secondary development of AutoCAD through VB realizes the control of VB interface over the objects in AutoCAD, which not only gives play to the advantages of VB in scientific calculation, data processing, friendly interface and event driven, but also makes use of the precise drawing function of AutoCAD. By this way, we can easily realize the three-dimensional animation simulation of gear machining, which has great practicality in scientific research and teaching. (end)

Copyright © 2011 JIN SHI