With the development of computer technology, the application of computers in casting has become more and more extensive. The computer aided design CAD of the casting process is the use of computer systems in the casting process design to optimally design the castings to be designed, including data retrieval, parameters and Design information inquiry, process plan determination, calculation, automatic drawing and so on. The casting process CAD combines the casting process design with the computer technology to replace the manual and personal experience for the casting process design in a convenient, quick and accurate manner. The computer database technology and computer graphics technology are fully utilized during the development process. 1 System Structure of Casting Process CAD The development and design of the casting process CAD software not only requires the system to be able to perform complex 2D drawing, dimensioning, filling in the title bar and editing functions for graphics and text, but also has a complete process design database and a parametric graphic library. As well as the collection and sorting functions of various characters, data, and graphics generated during the design process, the related data and graphic classification management after the design is completed can be supplemented, expanded, and enriched with database resources. The casting process CAD refers to all the process design work that should be completed between the input of the part drawing and the output of the casting process drawing. Including the casting parting surface, processing allowance, draft angle, core, pouring system, riser and various process symbols design. 2 Casting process CAD database establishment and management A database of casting process parameters was established to store and manage the design information required for the design of the foundry process. The database is the core of the CAD system for the foundry process. All design and drawing work is based on this public database. Its function is to provide design process. Process parameters required for all design content, such as metal density, shrinkage, negative typing, gating system parameters, feeder system parameters, etc. The mathematical model and structure used for the riser design module and the gating system design module are fixed, but the only difference is the specific size of the casting. Therefore, this type of module first uses Miscrosoft Access to establish a standard parts database based on the type, shape, modulus, and size of the casting. Before the drawing, the machine calculates the casting process parameters first, and then automatically queries the standard parts based on the calculation results. In the database, when the standard part cannot meet the design requirements, the custom data program module automatically converts the calculation result into a graph on the screen through interactive data transfer. In order to effectively manage the casting process parameter database, the software provides a database management program in which various operations can be performed on the data (including data browsing, adding, deleting, and querying). Database Programming This software uses the advantages of various database operations according to actual needs and uses them separately. DBC (Open Database Connectivity open database connection), DAO (DataAccess Objects data access object) and other database processing methods, so that the data can be managed conveniently and securely, ensuring the use and storage of data. 3 Graphics Library of Casting Process CAD Software 3.1 AutoCAD2000 graphics system The main purpose of the casting process CAD is to output the process and tooling design drawings in the form of human-machine dialogue. Therefore, the graphic system is an important part of the casting process CAD. Fundamentally, a CAD graphics system consists of a graphics core system (drawing software) and a series of graphics input and output functions and subroutines nested in a high-level language. In recent years, the development of microcomputer graphics systems has been very rapid. The AutoCAD software introduced by the US Autodesk Corporation is the most popular. AutoCAD's powerful drawing functions, rich editing subsections, and good man-machine interface make AutoCAD play an important role in all walks of life. At the same time, it also provides an open platform for the development of all walks of life. An ideal environment for AutoCAD software vendors. The secondary development application software on the AutoAD platform has been widely used in various engineering fields, and methods and environments for the secondary development of AutoCAD are also continuously developed and improved. 3.2 Secondary Development Environment of AutoCAD2000 The reason why AutoCAD is widely used is inseparable from its open system, rich development tools and development methods. From the first-generation programming languages ​​Autolisp to ADS, ARX, Objec team RX, VBA, and the latest release of Java, it demonstrates the open application development architecture of AutoCAD and truly expands the capabilities of AutoCAD systems. The secondary development environment of AutoCAD has also gradually shifted from a structured, process-based programming environment to an object-oriented development platform. ARX ​​is a brand new object-oriented development environment introduced after R13. It is also the first time that AutoCAD directly provides object-oriented secondary development tools. ARX ​​is more focused on the intelligence of the application. The ARX program differs from the ADS and Autolsp programs in many ways. The ARX program is a dynamic link library. It shares the same address space as AutoCAD and communicates directly with AutoCAD. ARX ​​accesses AutoCAD databases faster, and ARX programs can create new classes that can be shared by other programs to take advantage of the benefits of object-oriented programming. The ARX program creates an entity that is almost identical to the AutoCAD intrinsic entity. ARX ​​provides six main libraries for accessing and controlling AutoCAD and handling common things in CAD. They are: (1) AcRx AutoCAD Run Extensions Library (2) AcEd AutoCAD Command Extensions Library. (3) AcDb AutoCAD database access library. (4) AcGe general geometry library. (5) AcGi AutoCAD graphical interface library. (6) AcBr boundary description library. 4 Graphical Parameterized Programming Mechanism Graphical parametric programming is primarily a combination of a process parameter database and an Auto CAD graphics library. As a parameterized library system, it mainly includes three parts: database, user interface and parameterized drawing program. Among them, the database is mainly used to store a series of graphics size data and performance parameters; parametric drawing program is used to achieve the graphic drawing program; user interface is used to implement the connection of the database and parameterized drawing program, designed in the form of a dialog box Implementation; in the flow of data design, the use of custom drawing class approach, which fully considered the object-oriented design method, completely realized the variable and method of packaging. The custom drawing class, whose member variables are the size parameters of the graph, its member function is a function function for drawing graphics, and the object class pointer of the drawing class is defined in the dialog class. Class cjming_dinlLmaokou II Mingding Appetite 5 Conclusion (1) The casting process CAD establishes the casting process parameter library according to the actual needs of the plant, combines the experience, and uses the parameterized drawing book mechanism to establish a library of required filling systems, a core library, and a process symbol library, which can be quickly and accurately implemented. Process design. (2) Combining the powerful drawing function of AutoCAD with the secondary development technology ObjectARX and Visual C++ MFC (Microsoft Basic Library) to make the software interface friendly and easy to operate. The openness of the software is very good. The designer can add, delete, modify, and other operations on the database and the parameterized graphics library. (3) The software provides a high degree of automation of design functions and is suitable for designers of all levels. Solar Carport,Solar Panel Carport,Solar Power Carport,Commercial Solar Carport Jiangyin Theone Industrial Tech Co.,Ltd , https://www.to-solar.com
Figure 1 is a parametric drawing interface for the realization of "Diesel Engine - Gray cast iron appendix appetite". In the interface of "New Riser", the right is the drawing parameter of the feeder, and the left is the schematic of the feeder. Select drawing parameters according to the weight of the feeder to the upper left edit box, and then click the "Draw" button to draw the riser. . Also in the "Modify Riser" tab interface, you can modify the appetite already drawn. The construction code for the Mingding Riser drawing class is as follows:
Protected: II drawing parameters
Double T; II section size
Double DR;
Double HR;
Doubleh;
Double R;
Double d;
Public : //operation function
Cjming_ding_maokou (data, double bpoint, CString);// Constructor
Cjming_ding_maokou();
Virtual BOOL draw(); //Rapid drawing function
Virtual BOOL dim (); / / purported to mark function