The hottest engineering drawing automatic generati

2022-10-12
  • Detail

Development of engineering drawing automatic generation software based on pro/e platform

1. Preface

pro/engineer is a three-dimensional cad/cam software developed by American Parameter Technology Corporation (PTC), and toolkit is a secondary development tool specially provided by PTC. In toolkit, PTC provides users with a large c language function library. By calling these underlying functions, users can easily and safely access the database and internal applications of pro/engineer, carry out secondary development, and expand some specific functions

as a successful 3D cad/cam software, pro/engineer has included a relatively efficient drawing module, which can be applied to the drawing task of parts of any shape. However, for the drawing requirements of some parts that are relatively similar and have similar geometric shapes, it is not worth the loss to spend a lot of time on repeatedly arranging views and marking dimensions. It is more suitable for this kind of situation to carry out secondary development on the basis of the existing drawing module of pro/engineer

at present, the products designed in many design departments have certain relevance, which makes many design processes have the problem of repeated labor. For this reason, on the basis of pro/engineer2000i2, the author participated in the development of a relatively complete shaft part design (three-dimensional model), part drawing, part processing (machining tool path code generation) system in Shanxi system with high coal output, so that some general design processes can be processed automatically to reduce the workload of designers (this paper only focuses on the part of part drawing). For part design, the system adopts a relatively simple family table method (that is, manually build the product model in advance, take it as a generic part of the family table, then define various control parameters in the family table to control the shape and size of the model, and obtain the required derivative parts by changing the values of various parameters in the program). For the program design of part drawing part, it is very convenient to obtain the corresponding shape and size information of shaft parts according to the parameter names defined in the previous part design

II. Analysis of view generation method

1. Drawing area division

in order to avoid interference between views, size overlap and other phenomena in the process of automatic drawing generation, the drawing can be divided into specific areas in advance as required. For shaft parts with similar structure and less complex geometric shape, the whole drawing can be divided into main view area, section area, table area and annotation area. Then adjust the view scale according to the determined area size and position to generate a more reasonable view. In this way, the position conflict between views and dimensions on the drawing can be avoided

2. Generate the main view and section view

the key to generate the view is to determine the view direction and the scale of the view. For the view direction, if the direction is selected incorrectly, the shape of the part cannot be correctly expressed. In the function of generating the general view provided by toolkit, you can adjust the view direction by entering different orientation matrices. For the view scale, selecting the appropriate scale coefficient can make the view as clear as possible without crossing the boundary and causing regional interference

for shaft parts, due to specific shape characteristics, when generating drawings, it is necessary to generate sectional views at each keyway in addition to the main view. By calling the view generation function prodrawinggeneral

viewcreate() provided by toolkit, the required view can be easily generated (Note: the appropriate default reference plane is determined in the part model design stage, so the problem of considering the direction can be ignored in the drawing stage, that is, the direction matrix can be replaced by the unit matrix; the view scale is first defaulted to 1:1). On this basis, call the view contour extraction function prodrawingviewoutlineget() provided by toolkit 8.0 to calculate the contour size of this view, and then reset the view scale according to the size of the previously divided area to automatically generate a view with appropriate size

3. view generation example and program

in this example, according to the generated axis model entity (RT), C language programming is adopted, and the view generation and adjustment functions provided by toolkit are called to generate drawings that meet the requirements, on which views are generated. The procedure is as follows:

prosolid solid

int sheet;

ProMdlCurrentGet( solid);//Get the axis model opened in memory

prostringtowstring (wroot, "drawing")

ProObjectwindowCreate(wroot,PRO_DRAWING, w_id);//Open the empty view window named drawing

prodrawingcurrentsheetset (drawing, sheet)//Set the current layer

prodrawingsolidadd (drawing, solid)//Add the obtained axis model to the current window

prowindowactivate (w_id)//Activate the current window

prodrawinggeneralviewcreate (drawing, solid, sheet, 0, POS, scale, matrix, view)//Generate a view on the current layer, where the scale size is scale=1.0, and the directional moment. In addition, the matrix is 3 Χ 3 identity matrix

prodrawingviewoutlinget (drawing, view, outline)//Get the view outline size

//adjust the scale size

prodrawingviewdelete (drawing, view, 1)//Delete unreasonable views

prodrawinggeneralviewcreate (drawing, solid, sheet, 0, POS, scale, matrix, view)//Regenerate the view according to the adjusted scale

prodwgsheetregenerate (drawing, sheet)//Refresh the window and redisplay the generated view

III. analysis of display size method

in pro/engineer, the size stored in part mode and the size created in drawing are different concepts. Therefore, to display the size of parts, there are the following two methods can be achieved

1. generate new dimensions in the drawing mode

operation steps in the to

Copyright © 2011 JIN SHI