Design of the spline broach CAD system (2)

3 Integration of design and drawing

The usual tool CAD software divides the tool design calculation and drawing into two parts, and completes the design and drawing work on two working platforms. For example, the calculation part of the tool design is written in VB or VC language and used as the working platform, while the tool drawing software uses AutoLISP or ADS language programming to use AutoCAD as the working platform. Therefore, complicated data transfer is required between the two, which is inconvenient to use. AutoCAD provides objectARX programming technology from R14 version, providing powerful development tools for developing various CAD application software based on AutoCAD working platform. Its speed, performance and function are much higher than ADS and AutoLISP languages. ObjectARX uses C++ as the basic development language and Visual C++ as the development environment. It has the characteristics of data encapsulation, inheritability and polymorphism. The CAD software developed by it has good modularity, strong independence, simple connection and users. The interface is friendly and easy to use. The spline broach CAD software developed by the objectARX and MFC basic library resources can use the main interface of the system to call the design module and the drawing module respectively in the AutoCAD 2000 environment, thereby realizing the integration of design and drawing.

In the spline broach CAD system, the data transfer between the design module and the drawing module adopts the following three methods:

Called directly from the database. The connection between MFC and ODBC can provide interface with the database for objectARX3.0 FOR AutoCAD 2000, so the drawing module can directly call the structure size of the spline broach from the database. There are three ways to design a database interface program:

Corresponding to the data table in the database, an application-specified recordset is derived from the CRecordset class, and the OPEN member function of the call set is called to open the recordset, and all the records in it are written into a structure data.

Corresponding to the data table in the database, add a dialog resource and derive an application-specific dialog from the CDialog class. In the dialog box, determine the type and number of edit box controls and the title of the static text box, and bind each edit box control to the corresponding field member variable in the recordset object.


Figure 2 Spline broach data query dialog
The user can select the appropriate record by entering the query condition in the dialog box, and the recorded record will be displayed in the corresponding edit box control of the dialog box (as shown in Figure 2). If necessary, press the save button to save the queried data to the data file for other modules to call; if the query result is correct, press the OK button and exit. If the query result is wrong, press the Abandon button to re-query.

With the aid of data files. Using the Write member function in the CFile class provided by the MFC resource library of Visual C++, the result calculated in the design module is stored in a data file, and then the calculation result is calculated from the drawing module using the Read member function in the CFile class. Read out in the data file. If the spline broach has more tooth profile data for each tooth, in order to reduce the memory space, the data file can be used for parameter transfer.

Use global variables. For the data used by several modules in the spline broach design, you can define it as public data, making it a global variable. This can be easily called by other modules to improve the speed of data transfer.

4 Conclusion

The spline broach CAD software with AutoCAD 2000 as the working platform developed by the hybrid programming technology of objectARX and Visual C++ has the following characteristics:

Using the MFC resource library in the ARX application, the designed spline broach CAD software has a friendly visual interface for human-computer interactive design.

According to the different processing requirements of the workpiece, the software can design the broach for processing spline, the composite broach for processing round hole-spline, the composite broach for machining chamfer-round hole-spline and the group of spline pull Knife.

Using the database technology and the CFile class of the MFC resource library, data can be transferred between different modules of the CAD software, thereby realizing the integration of the design and drawing of the spline broach, shortening the design cycle and improving the design efficiency and quality.

Previous page

Motorcycle Tire&Tube

Motorcycle Tyre,Heavy Truck Inner Tube,Truck Inner Tube,Butyl Truck Tube

Shengtang Metal Products Co., Ltd. , http://www.pneumatic-wheel-china.com