Introduction of parameterized parts and components

  • Detail

Parametric parts and components graphic library of machine tool fixture and its system introduction

for the research and development of computer aided fixture design system (CAFD), the parts and components graphic library of machine tool fixture occupies an important position in the system. Traditionally, the graphics libraries of these parts are hung on CAD graphics software, which can only be applied to prototype systems with a small number of parts. At present, various machine tool fixture systems have a large number of parts with specifications. For example, the varieties and specifications of special fixtures that belong to GB have reached tens of thousands of scales. Coupled with groove Series modular fixtures, hole series modular fixtures, and pneumatic, first of all, let us carry out ordinary stretching tests. Power sources such as hydraulic pressure, as well as parts and components of general fixtures, have a considerable number; Secondly, for CAFD system, fixture parts graphic library should be an independent part for CAFD system to retrieve and call; Moreover, with the maturity of parameterization technology, the establishment of fixture parts graphic library based on parameterization has the advantages of simplifying graphic storage, modifying structural design and reducing storage space. Therefore, we have researched and developed the parameterized parts and components graphic library and its system of machine tool fixture based on client/server mode to meet the above requirements

1Design scheme indeed, we hope that China can also follow the trend

the overall design framework of parametric component graphics library

as more and more departments install networks to share resources in the network environment, object-oriented methods and client server architecture are popular. The client factory server structure includes multiple computers connected in a network. Those computers that process applications are called clients, while those that centrally process database services in the background are called servers. In the database environment, the client and server communicate through several programming interfaces called middleware. The functions of the client include managing the user interface, receiving data from the user, processing applications, generating database requests, sending database requests to the server, and receiving results from the server. The functions of the server include receiving database requests from the client, processing database requests, formatting and transmitting the results to the client, which is more convenient for use and protection; Its experimental speed range can be used for dispensing machines, performing integrity checks, providing parallel access control, and optimizing query and update processing

this parameterized parts graphic library design system adopts the client/server architecture, and the settings of the system operating environment are as follows:

hardware environment 1 IBM PC server high-end microcomputer server, 2 to several clients (P Ⅱ 450, 64M memory, 10.4g hard disk)

software environment server operating system is windows NT4.0 operating system, client operating system is windows NT4.0 operating system, Windows 98 operating system, server and client network protocol set tcp/ip, database management system is Microsoft SQL Server 6.5, client application development tool is visual c++ 6.0, AutoCAD R14

Figure 1 overall design scheme

in this system, the parameter data of machine tool fixture parts are stored in the server. The program of drawing parametric graphics of machine tool fixture parts is compiled with c++, and the field values in the server database are read through the interface program. The user can modify the field values interactively, and the obtained field values are transferred to the drawing function in the program as size parameters. The parametric design of machine tool fixture parts is realized by drawing in AutoCAD environment. The overall design scheme is shown in Figure 1

2 database design

database operation interface design

when using Microsofts QLS server to design the database structure, each part of the machine tool fixture corresponds to a table

because there is a dimension chain relationship between the part size parameters, the error generated when the user enters the parameter value will cause drawing errors. We solve this problem by setting validity rules. When the parameter value entered by the user does not conform to the dimension chain relationship, a dialog box will pop up with an error. This makes the database operation interface have a certain error correction function

microsoft visual c++ 6.0 has powerful visual programming function, so it can be used to compile the database operation interface to conveniently complete the functions of querying, adding, deleting and modifying data records

3 c++ language interface program design of database in parametric drawing

autocad has provided the interface with external database ASI (AutoCAD SQL interface) since version 12, integrating SQL (Structured Query Language) language into AutoCAD, and realizing the data exchange with external database inside AutoCAD. Ads ASI is composed of a large set of C language library functions, which need driver support during execution. With the upgrade of the version, ASI functions have been greatly modified, which greatly increases the burden of developers. Just adapting to different environments takes a lot of time and prolongs the software development cycle

objectarx is a new programming environment based on AutoCAD R14. It provides an object-oriented development environment and interface based on c++, and can really directly access AutoCAD R14 graphics database. ObjectARX programming environment not only provides several convenient class libraries, but also uses MFC class libraries to compile rich windows style interfaces. ARX shares the address space with AutoCAD in the form of dynamic link library (DLL), directly calls AutoCAD core functions, and can directly access AutoCAD database. Compared with ads and AutoLISP, ARX applications run faster and more stable

the author realizes the database connection in the ObjectARX application written in visual c++ 6.0. Taking the A-type flat pressing plate, a common part of machine tools and fixtures, as an example, the method of using visual c++ 6.0 to operate the database in parametric drawing is introduced below

connect to the database through ODBC. ODBC (open databaseconnectivity) is an open service architecture database part of Microsoft's windows. It is a unified interface standard for accessing multiple databases. ODBC is actually a database access library, but it only provides a unified application program interface (API). In this way, using ODBC can prevent the application from changing with the change of the database. ODBC obtains the independence of the database by using the database driver. The standard interface provided by the driver allows application developers and driver providers to transfer data between applications and data sources

ODBC in the Windows 98 control panel can be connected to the parameterized design system, but this kind of material is not really a fully degradable material, which is used to build the machine tool fixture parts database in the server

for each table in the database, derive a recordset class specified by the application from CRecordset. Open the database and create a Recordset object, call the open member function of the recordset to open the Recordset, and then use the requery member function to rebuild a recordset. Write all records in the record set into a structure array

Figure 2 component parameter control dialog box

corresponding to each table in the database, add a dialog resource from the resource and derive an application specified dialog class from CDialog. In the dialog box, the number of editboxes is determined according to the number of fields in the table. The title of statictext is the same as the field name in the database. The part parameter control dialog box is shown in Figure 2

display the first record in the record set as the default value in each box of the dialog box. The user can select the appropriate record through the two buttons on the right of the dialog box (previous record and next record), or directly enter the record number in the box to get the required record, which is displayed in each box

the user can modify the parameter values in each box. After pressing the OK button, first check whether the parameter values comply with the dimension chain relationship. If so, transfer the values in each box to the drawing function as the dimension parameter values; Otherwise, a dialog box will pop up with an error

the parameterized part graphics library of machine tool fixture based on client/server mode not only has large capacity, safe and reliable use, and stable operation, but also can install various types of CAFD systems on the client, which is convenient for multiple people to design fixtures at the same time in the network environment, and meets the requirements of CAFD system for part graphics library. At the same time, the structure of this kind of graphic database can also be used for all kinds of machinery, including machine tools, computer-aided mechanical design graphic database, so it has a certain universal significance

Copyright © 2011 JIN SHI