1 Introduction With the advancement of science and technology, the modern manufacturing industry is developing in the direction of high speed, high efficiency, and high precision, and increasingly higher requirements are placed on the structure and performance of machine tools. Therefore, how to adapt to market demand, in the complex and ever-changing market economy, the rapid and high-quality design and manufacture of cutting processing equipment required by the market is the focus of competition in the manufacturing industry. Therefore, applying computer-aided design (CAD) technology to machine tool design has always been the wish of many manufacturers. Most of the previous CAD software was programmed using a process-oriented design method. Inevitably, there were defects such as slow system development, long cycle, high cost, poor software quality, poor readability, reliability, and poor maintainability. With the development and wide application of computer technology, the design methods and methods have also been continuously improved and perfected. Object-oriented methods are attracting people's attention and attention. The object is an abstraction of the basic components of the real world. Each object has its own operating rules (behavior) and internal states (attributes). By analogy, objects with the same or similar attributes and behaviors are abstracted into object classes (generalized). Object classes can also inherit the inheritance mechanism, so that the child object class has the attributes and behaviors of some parent object class, forming a hierarchical structure. ), The combination and interaction of different object classes (implemented by messages) constitute the objective system that we want to study and analyze. The key to object-oriented software development is to establish a unified model—object model, to fully analyze the relationship between objects and objects, and to refine and adjust the analysis model to realize the object-oriented transformation from the conceptual model to the computer model. Finally, the model is implemented in an object-oriented language.
{
Private:
Float modula: // modulus int numberofchishu: // tooth number int innerdiameter: // aperture int jianhigh: // key height ......
Public:
CMainAxisPart(): //Construction function ~CMainAxisPart(): //Destructor void GetXXX(): //Get function of current gear state .....................
Void SetXXX(XXXxxx): //Set the gear status function .....................
Fload CalTouch(): // Calculate the modulus of contact by fatigue strength fLoad CalBend(): // Calculate the modulus of bending fatigue strength int JiaoHe(floadm,intz): //Check the gear void OnDraw(CDCpDC,CPointpoint):/ /Draw gears in display device........................
} The coordination and transfer of data between various classes is achieved through the message mechanism and the structure of Visual C++'s unique document class view class, as shown in Figure 2. From the picture, through these connections, all the object classes that are independent of each other can be organically combined. This structure is low in coupling degree and high in degree of polymerization. The change in one kind of class has little effect on other classes, and only the message changes. The corresponding object has the corresponding response and shows the corresponding form.
Figure 1 The main drive system object model
{
Private:
Float modula: // modulus int numberofchishu: // tooth number int innerdiameter: // aperture int jianhigh: // key height ......
Public:
CMainAxisPart(): //Construction function ~CMainAxisPart(): //Destructor void GetXXX(): //Get function of current gear state .....................
Void SetXXX(XXXxxx): //Set the gear status function .....................
Fload CalTouch(): // Calculate the modulus of contact by fatigue strength fLoad CalBend(): // Calculate the modulus of bending fatigue strength int JiaoHe(floadm,intz): //Check the gear void OnDraw(CDCpDC,CPointpoint):/ /Draw gears in display device........................
} The coordination and transfer of data between various classes is achieved through the message mechanism and the structure of Visual C++'s unique document class view class, as shown in Figure 2. From the picture, through these connections, all the object classes that are independent of each other can be organically combined. This structure is low in coupling degree and high in degree of polymerization. The change in one kind of class has little effect on other classes, and only the message changes. The corresponding object has the corresponding response and shows the corresponding form.
Figure 2 Relationship between various types of connections