CN117094049A - Batch plotting method and system based on CATIA - Google Patents

Batch plotting method and system based on CATIA Download PDF

Info

Publication number
CN117094049A
CN117094049A CN202311317344.0A CN202311317344A CN117094049A CN 117094049 A CN117094049 A CN 117094049A CN 202311317344 A CN202311317344 A CN 202311317344A CN 117094049 A CN117094049 A CN 117094049A
Authority
CN
China
Prior art keywords
target
target unit
frame
catia
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311317344.0A
Other languages
Chinese (zh)
Other versions
CN117094049B (en
Inventor
刘长盛
黄冬冬
方志鹏
刘远辉
何梓琦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongshe Robotics Technology Guangdong Co ltd
Guangzhou Zsrobot Intelligent Equipment Co ltd
Original Assignee
Zhongshe Robotics Technology Guangdong Co ltd
Guangzhou Zsrobot Intelligent Equipment Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongshe Robotics Technology Guangdong Co ltd, Guangzhou Zsrobot Intelligent Equipment Co ltd filed Critical Zhongshe Robotics Technology Guangdong Co ltd
Priority to CN202311317344.0A priority Critical patent/CN117094049B/en
Publication of CN117094049A publication Critical patent/CN117094049A/en
Application granted granted Critical
Publication of CN117094049B publication Critical patent/CN117094049B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/12Geometric CAD characterised by design entry means specially adapted for CAD, e.g. graphical user interfaces [GUI] specially adapted for CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Human Computer Interaction (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Architecture (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the application relates to the technical field of engineering drawing, and particularly discloses a batch drawing method and system based on CATIA, comprising the following steps: when a drawing command aiming at a model component is received, a drawing window is displayed, a target unit and a main view direction are determined in response to the operation of a user acting on a unit selection control and a main view selection control in the drawing window, a target frame, a drawing mode and the number of parts are determined in response to the operation of a user acting on a frame option, a drawing mode option and a number input frame in the drawing window, drawings of the target unit are generated based on the drawing mode, the target frame and the main view direction, the parts of the target unit are traversed, and drawings of the parts are generated based on the drawing mode, the target frame and the main view direction, so that automatic batch generation of the drawings of the target unit and the parts is realized, independent drawing and frame modification of each unit and each part are not required, the labor intensity of the user is reduced, the drawing efficiency is improved, and the drawing quality is ensured.

Description

Batch plotting method and system based on CATIA
Technical Field
The application belongs to the technical field of engineering drawing and particularly relates to a batch drawing method and system based on CATIA.
Background
CATIA is a piece of computer-aided design software that is widely used in automotive, aerospace, marine manufacturing, factory building design, construction, electrical and electronic, consumer goods, and general-purpose machinery manufacturing.
The most commonly used function of the CATIA is to design a 3D model and then convert the 3D model into a 2D drawing, at present, an engineering drawing is required to be built firstly for the 2D drawing in the CATIA, then a plane of the 3D model is selected as a drawing plane for drawing, a drawing obtained by drawing is displayed in the engineering drawing, when the 3D model has more parts, a great deal of time is required for drawing each part, a proper frame proportion is required to be selected according to the size of the drawing, and the frame information is required to be modified for different parts, finally, the 2D drawing obtained by drawing is required to be converted into a format which can be opened by CAD drawing software, a great deal of manpower is required to be spent for completing repetitive operation in the drawing process, the labor intensity of a designer is increased, the drawing efficiency is reduced, and the drawing quality is difficult to ensure.
Disclosure of Invention
The embodiment of the application aims to provide a batch plotting method and system based on CATIA, which aims to solve the problems that the automatic batch plotting cannot be realized by CATIA at present, so that the labor intensity of designers is high, the plotting efficiency is low and the quality of drawings is difficult to ensure.
In order to achieve the above object, the embodiment of the present application provides the following technical solutions:
a batch plotting method based on CATIA specifically comprises the following steps:
initializing a drawing window and displaying the drawing window when a drawing instruction aiming at a model component is received, wherein the drawing window comprises a drawing frame option, a drawing mode option, a quantity input box, a main view selection control and a unit selection control;
determining a target unit and a main view direction in response to the operation of a user on the unit selection control and the main view selection control;
responding to the operations of the user on the picture frame options, the picture throwing mode options and the number input boxes, and determining the total number of the target picture frames, the picture throwing modes and the parts contained in the target unit;
generating a 2D drawing of the target unit based on the drawing mode, the target drawing frame and the main view direction;
traversing the parts of the target unit, and generating a 2D drawing of the parts based on the drawing mode, the target drawing frame and the main view direction.
As a further limitation of embodiments of the present application, initializing and displaying a graphical window upon receipt of an accept graphical instruction for a model component specifically comprises the steps of:
creating a component object model object through CATIA macro commands when a drawing instruction for a model component is received;
an application object of CATIA is transmitted into the component object model object, wherein the application object is an object used for converting a 3D model into a 2D drawing in the CATIA;
the component object model object is invoked to display a graphical window comprising a frame option, a throw mode option, a quantity input box, a main view selection control, and a unit selection control.
As a further limitation of the embodiment of the present application, in response to the operation of the unit selection control and the main view selection control by the user, determining the target unit and the main view direction specifically includes the following steps:
determining an assembly selected by a user on the model component in response to the operation of the user on the unit selection control and the selection operation of the user on the model component;
determining the assembly as a target unit when the unit number of the assembly is legal, and displaying the target unit;
and determining the direction of the main view in response to the operation of the main view selection control acted by the user and the main view selection operation in the displayed target unit.
As a further limitation of the embodiment of the present application, the generating the 2D drawing of the target unit based on the projection mode, the target frame and the main view direction specifically includes the following steps:
calling an Introp.INFITF.selection interface of CATIA to generate a 2D drawing of the target unit according to the main view direction;
calling an Introp.DRATITNGITF interface of CATIA to generate a front view of the target unit in a 2D drawing of the target unit according to the front view direction;
generating a three-view and an axial side view of the target unit in the 2D drawing of the target unit according to the drawing mode;
invoking a frame macro of the CATIA to generate a target frame in a 2D drawing of the target unit;
and acquiring attribute information of the target unit, and filling the attribute information into the target frame to obtain a final 2D drawing of the target unit.
As a further limitation of the embodiment of the present application, the generating the 2D drawing of the target unit based on the projection mode, the target frame and the main view direction specifically further includes the following steps:
and responding to the adjustment operation of the user for the views in the 2D drawing of the target unit, and adjusting the positions of all views in the 2D drawing of the target unit.
As a further limitation of the embodiment of the present application, the traversing the part of the target unit and generating a 2D drawing of the part based on the projection mode, the target frame and the main view direction specifically includes the following steps:
acquiring a part name list of the target unit according to the unit number of the target unit;
traversing the part name list, generating a 2D drawing of the part according to the drawing mode, the target frame and the main view direction when traversing to one part, and accumulating the number of traversed parts by 1;
judging whether the number of traversed parts is equal to the total number of parts contained in the target unit;
if yes, determining that a 2D drawing of the part contained in the target unit is generated;
and if not, returning to traverse the part name list, generating a 2D drawing of the part according to the drawing mode, the target frame and the main view direction when one part is traversed, and accumulating the number of the traversed parts by 1.
As a further limitation of the embodiment of the present application, the generating a 2D drawing of a part according to the drawing mode, the target frame and the main view direction when traversing to the part specifically includes the following steps:
calling an Introp.INFITF.selection interface of CATIA to generate a 2D drawing of the part according to the main view direction;
calling an Introp.DRATINNGITF interface of CATIA to generate a front view of the part in a 2D drawing of the part according to the front view direction;
generating three views and an axial side view of the part in a 2D drawing of the part according to the drawing mode;
invoking a frame macro of the CATIA to generate a target frame in a 2D drawing of the part;
and acquiring attribute information of the part, and filling the attribute information into the target frame to obtain a final 2D drawing of the part.
As a further definition of an embodiment of the present application, it further comprises:
and converting the 2D drawing of the target unit and the 2D drawing of the part into a drawing in a CAD format.
A batch plotting system based on CATIA specifically comprises the following modules:
the system comprises a drawing window display module, a drawing module and a unit selection control, wherein the drawing window display module is used for initializing a drawing window and displaying the drawing window when a drawing instruction aiming at a model component is received, and the drawing window comprises a drawing frame option, a drawing mode option, a quantity input frame, a main view selection control and a unit selection control;
the target unit and the main view determining module are used for determining the target unit and the main view direction in response to the operation of a user on the unit selection control and the main view selection control;
the drawing information response module is used for responding to the operation of a user on the drawing frame options, the drawing mode options and the number input frames and determining the total number of the target drawing frames, the drawing modes and the parts contained in the target unit;
the target unit drawing module is used for generating a 2D drawing of the target unit based on the drawing mode, the target drawing frame and the main view direction;
and the part drawing module is used for traversing the part of the target unit and generating a 2D drawing of the part based on the drawing mode, the target drawing frame and the front view direction.
As a further limitation of the embodiment of the present application, the graphical window display module specifically includes the following submodules:
the component object model object creation sub-module is used for creating a component object model object through CATIA macro commands when a drawing instruction for a model component is received;
an object input submodule, configured to input an application object of the CATIA in the component object model object, where the application object is an object in the CATIA that is used to convert a 3D model into a 2D drawing;
and the object calling sub-module is used for calling the component object model object to display a drawing window, wherein the drawing window comprises a drawing frame option, a drawing mode option, a quantity input frame, a main view selection control and a unit selection control.
Compared with the prior art, the application has the beneficial effects that:
according to the embodiment of the application, when the drawing command for the model component is received, the drawing window is initialized and displayed, the target unit, the front view direction, the target frame, the drawing mode and the total number of parts contained in the target unit are determined in response to the operation of a user in the drawing window, the 2D drawing of the target unit is generated based on the drawing mode, the target frame and the front view direction, and the 2D drawing of the parts is traversed, so that the purpose of providing the drawing window for the user to select the total number of the target unit, the front view direction, the target frame, the drawing mode and the parts contained in the target unit is achieved, the 2D drawing of the target unit and the parts of the target unit is automatically generated in batches according to the front view direction, the target frame and the drawing mode, the user does not need to singly draw and modify the drawing frame for each unit and the parts, the labor intensity of the user is reduced, the efficiency is improved, and the drawing quality is ensured by adopting the unified drawing mode and the drawing frame.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly introduce the drawings that are needed in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the present application.
Fig. 1 shows a flowchart of a CATIA-based batch plotting method according to an embodiment of the present application.
Fig. 2 shows a schematic view of the graphical window.
FIG. 3 is a schematic diagram of a CATIA-based batch mapping process in this embodiment;
fig. 4 shows an application architecture diagram of a CATIA-based batch mapping system provided in an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Fig. 1 shows a flowchart of a CATIA-based batch plotting method according to an embodiment of the present application. Specifically, the batch plotting method based on CATIA in the embodiment of the application specifically comprises the following steps:
step S101, initializing a drawing window and displaying the drawing window when a drawing instruction for the model component is received, wherein the drawing window comprises a drawing frame option, a drawing mode option, a quantity input box, a main view selection control and a unit selection control.
In this embodiment, CATIA is an engineering design software providing 3D design and simulation solution, and is converted into a 2D drawing after 3D model setting by CATIA, so as to manufacture a product by processing the 2D drawing. The model component may be a 3D model component designed by CATIA, where the model component includes a plurality of units, each unit is assembled from a plurality of parts, and when a certain unit and a part of the unit need to be manufactured, a 2D drawing of the unit and the part of the unit needs to be generated.
In one embodiment, receiving the drawing instruction for the model component may mean that when the CATIA displays the model component in the current active window, the user triggers the drawing control in the CATIA, and when the user clicks the newly-built drawing control, the drawing window may be initialized and displayed as the instruction for drawing the model component displayed in the current active window is received.
Specifically, when a drawing command for a model component is received, a component object model object (The Component Object Model, COM) is triggered to be created through a CATIA macro command, then an application object of the CATIA is transmitted into the component object model object, the application object can be an object used for converting a 3D model into a 2D drawing in the CATIA, and is a set of related components for realizing a 3D model to 2D drawing function in the CATIA, after the application object of the CATIA is transmitted into the component object model object, the component object model object is called through a COM call interface in the CATIA to display a drawing window, and the drawing window comprises a drawing frame option, a drawing mode option, a number input frame, a main view selection control and a unit selection control.
Fig. 2 is a schematic diagram of a displayed drawing window, where the drawing window includes a frame option, a drawing mode option, a number input frame, a main view selection control and a unit selection control, where the frame option may be an option for a user to select a frame of a 2D drawing, the drawing mode may be a first perspective method or a third perspective method commonly used in the 2D drawing, the number input frame may be an input frame for inputting the number of parts of a drawing unit after the drawing unit is selected, the main view selection control is triggered and then enters an interface for selecting a main view direction, so as to select the main view direction in the interface, and the unit selection control is triggered and then is used to enter a unit for selecting the 2D drawing in the model component.
Initializing the picture window can be initializing information of a selectable picture frame, a selectable picture throwing mode, a selectable main view direction, a unit and the like.
Step S102, the target unit and the main view direction are determined in response to the operation of the unit selection control and the main view selection control acted by the user.
In one embodiment, an assembly selected by a user on the model component can be determined in response to a user operation on a unit selection control in the graphical window and a user selection operation on the model component, the assembly is determined to be a target unit when the unit number of the assembly is legal, the target unit is displayed, and the main view direction is determined in response to a user operation on the main view selection control and a main view direction selection operation in the displayed target unit.
For example, when the user clicks the unit selection control in the drawing window, for example, clicks the "select drawing unit" button in fig. 2, a unit number input box may be displayed, so that the user inputs the unit number of the unit to be drawn in the input box, and further detects whether the unit number is legal, for example, whether the unit number meets the standard format, or whether the user selects an assembly as the target unit for drawing on the model component displayed in the CATIA current active window, and then detects whether the unit number of the target unit is legal, if yes, the target unit is separately displayed in the new window, and is used for selecting the main view direction from the displayed target units.
In one example, a plurality of reference planes are included in the displayed target unit, and the user can select the forward direction or the reverse direction of the reference planes as the main view direction.
In another example, the user may also select the forward or reverse direction of one feature plane of the target unit as the main view direction.
In yet another example, the user may also draw a reference surface and select the forward or reverse direction of the reference surface as the main view direction.
In step S103, in response to the user' S operations on the frame option, the drawing mode option, and the number input frame, the total number of parts included in the target frame, the drawing mode, and the target unit is determined.
As shown in fig. 2, the user may click on the drop-down control of the selection frame in fig. 2 to display various frames, which may be pre-established for various types of engineering applications, from which the user may select a target frame.
The drawing mode may include a first view method and a third view method, and after the user clicks the drop-down control of the drawing mode in fig. 2, one drawing mode is selected from the displayed first view method and third view method, and at the same time, the user may input the total number of parts of the target unit in the input box of the unit number.
Step S104, generating a 2D drawing of the target unit based on the drawing mode, the target frame and the main view direction.
Specifically, after setting the projection mode, the target frame and the main view direction, an inter.INFITF.selection interface of CATIA can be called to generate a 2D drawing of the target unit according to the main view direction, an inter.DRATINNGITF interface of CATIA is called to generate a main view of the target unit in the 2D drawing of the target unit according to the main view direction, a three-view and an axial side view of the target unit are generated in the 2D drawing of the target unit according to the projection mode, a frame macro of CATIA is called to generate the target frame in the 2D drawing of the target unit, and the positions of all views in the 2D drawing of the target unit can be adjusted in response to the adjustment operation of a user for the views in the 2D drawing of the target unit, and attribute information of the target unit is acquired and filled in the target frame to obtain the final 2D drawing of the target unit.
The user may click on the main view Selection control in fig. 2, call the intelopo. INFITF. Selection interface to generate a blank 2D drawing, generate a main view of the target unit according to the main view direction in the 2D drawing, call the view generation interface to generate three views and an axonometric view of the target unit in the 2D drawing according to the main view mode after the user confirms the main view, adjust the position of each view according to the size of each view, determine the size of the frame, and call the frame macro of the CATIA to generate the target frame, obtain attribute information of the target unit, and fill the attribute information of the target unit into the target frame, wherein the attribute information of the target unit may include the name of the target unit, the names of the included parts, the number of the parts, the materials and the like, thereby realizing automatic generation of 2D of the target unit, and attribute information of the target unit in the frame.
The view generation interface may be a set of components in the CATIA that generate three views and an axonometric view according to a mechanical drawing rule, where the mechanical drawing rule may be a view projection rule in the mechanical drawing, for example, the view-to-view rule should keep the length equal between the front view and the top view, the height equal between the front view and the left view, and the width equal between the top view and the left view.
Step S105, traversing the parts of the target unit, and generating a 2D drawing of the parts based on the projection mode, the target frame and the front view direction.
After generating the 2D drawing of the target unit, when the user clicks the generated part view in fig. 2, the part name list of the target unit can be obtained according to the unit number of the target unit, the part name list is traversed, the 2D drawing of the part is generated according to the projection mode, the target frame and the main view direction when one part is traversed, the number of the traversed parts is accumulated by 1, whether the number of the traversed parts is equal to the total number of the parts contained in the target unit is judged, if yes, the 2D drawing of the part contained in the generated target unit is determined, if not, the part name list is returned, the 2D drawing of the part is generated according to the projection mode, the target frame and the main view direction when one part is traversed, and the number of the traversed parts is accumulated by 1, so that the 2D drawing of the part of the target unit is continuously generated.
Specifically, the parts contained in the target unit may be determined through a model tree of the target unit in the CATIA, and the names of the parts may be obtained to generate a part name list of the target unit, and in yet another embodiment, the part name list of the parts contained in the target unit in the BOM may be obtained by directly matching the unit number of the target unit with the BOM (Bill of materials) of the target unit.
When traversing to a part, the 2D drawing of the part can be generated by calling the Intrap.INFITF.Select interface of CATIA according to the main view direction, the main view of the part can be generated in the 2D drawing of the part by calling the Intrap.DRATINTITF interface of CATIA according to the main view direction, the three-view and the axial side view of the part can be generated in the 2D drawing of the part according to the projection mode, the target drawing frame can be generated in the 2D drawing of the part by calling the drawing frame macro of CATIA, the attribute information of the part can be obtained and filled in the target drawing frame, and the final 2D drawing of the part can be obtained, and the 2D drawing of the target unit can be generated in the step S104 specifically, which is not described in detail.
In an alternative embodiment, after the 2D drawing of the target unit and the 2D drawing of the part are generated, the 2D drawing of the target unit and the 2D drawing of the part may be converted into a CAD format drawing, such as a dxf format drawing, or a low version (e.g., low version of R14, 2000, 2004, etc.) dwg format drawing, so that a high version of CAD may open the 2D drawing.
In order to enable those skilled in the art to more clearly understand the CATIA-based batch plotting method according to the embodiment of the present application, the CATIA-based batch plotting process according to the present embodiment will be described below with reference to fig. 3 by way of example, and as shown in fig. 3, the method specifically includes the following step flow:
s1, calling a COM interface from CATIA and initializing a drawing window according to a preset attribute table;
s2, a user selects a picture frame, a picture throwing mode, input quantity and other information from a picture window;
s3, after the user clicks a button for selecting the drawing unit to select the target unit, detecting whether the unit number of the target unit is legal, if so, executing S4, and if not, ending the drawing flow;
s4, after clicking a button for selecting the main view, selecting the main view projection direction, and clicking a blank of the newly-built 2D drawing to generate a main view of the target unit;
s5, calling a view generation method to generate a three-view and an axonometric view of the target unit according to a projection mode;
and S6, adjusting the view position and determining the frame size according to the size of each view to generate a target frame, and filling the attribute information of the target unit into the frame to obtain a 2D drawing of the target unit.
S7, determining a part list according to the unit number of the target unit;
s8, traversing the part list;
s9, traversing to one part each time, generating a 2D drawing of the part, generating a front view of the part in the 2D drawing of the part, and calling a view generation method to generate a three-view and an axial side view of the part;
s10, adjusting the view position and determining the frame size according to the size of each view to generate a target frame, and filling attribute information of the part into the frame to obtain a 2D drawing of the part;
and S11, judging whether all the parts are traversed, if so, ending the drawing, and if not, returning to S8 to continuously generate the 2D drawing of the parts.
According to the CATIA-based batch drawing method, after a drawing mode, a drawing frame, a front view direction and the total number of parts are selected, a target unit needing drawing is selected from a model assembly, and a 2D drawing of the target unit and a 2D drawing of the parts contained in the target unit can be automatically generated in batches.
Fig. 4 shows an application architecture diagram of a CATIA-based batch plotting system according to an embodiment of the present application, where the CATIA-based batch plotting system according to the embodiment specifically includes the following modules:
the drawing window display module 401 is configured to initialize a drawing window and display the drawing window when receiving a drawing instruction for a model component, where the drawing window includes a drawing frame option, a drawing mode option, a number input frame, a main view selection control, and a unit selection control;
a target unit and front view determination module 402, configured to determine a target unit and front view direction in response to an operation of a user on the unit selection control and the front view selection control;
the drawing information response module 403 is configured to determine a total number of parts included in the target frame, the drawing mode, and the target unit in response to an operation of the user on the frame option, the drawing mode option, and the number input frame;
a target unit drawing module 404, configured to generate a 2D drawing of the target unit based on the drawing mode, the target drawing frame, and the main view direction;
the part drawing module 405 is configured to traverse the part of the target unit, and generate a 2D drawing of the part based on the projection mode, the target frame, and the front view direction.
As a further limitation of embodiments of the present application, the graphical window display module 401 specifically includes the following sub-modules:
the component object model object creation sub-module is used for creating a component object model object through CATIA macro commands when a drawing instruction for a model component is received;
the object input submodule is used for inputting an application object of the CATIA in the component object model object, wherein the application object is an object used for converting the 3D model into a 2D drawing in the CATIA;
the object calling sub-module is used for calling the component object model object to display a drawing window, wherein the drawing window comprises a drawing frame option, a drawing mode option, a number input frame, a main view selection control and a unit selection control.
As a further limitation of embodiments of the present application, the target unit and front view determination module 402 specifically includes the following sub-modules:
the assembly body selection sub-module is used for responding to the operation of a user acting on the unit selection control and the selection operation of the user on the model component and determining the assembly body selected by the user on the model component;
the target unit display sub-module is used for determining the assembly body as a target unit when the unit number of the assembly body is legal and displaying the target unit;
and the main view direction determining sub-module is used for determining the main view direction in response to the operation of a user on the main view selection control and the main view selection operation in the displayed target unit.
As a further limitation of embodiments of the present application, the target unit graph module 404 specifically includes the following sub-modules:
the target unit 2D drawing generation sub-module is used for calling an Introp.INFITF.selection interface of CATIA to generate a 2D drawing of the target unit according to the direction of the main view;
the target unit front view generation sub-module is used for calling an Introp.DRATITNGITF interface of CATIA to generate a front view of the target unit in a 2D drawing of the target unit according to the front view direction;
the target unit three-view and axonometric drawing generation sub-module is used for generating a target unit three-view and an axonometric drawing in a 2D drawing of the target unit in a projection mode;
the target unit frame generation sub-module is used for calling a frame macro of the CATIA to generate a target frame in a 2D drawing of the target unit;
and the target unit attribute information filling sub-module is used for acquiring the attribute information of the target unit and filling the attribute information into the target frame to obtain the final 2D drawing of the target unit.
As a further limitation of embodiments of the present application, the target unit graph module 404 specifically includes the following sub-modules:
the target unit view adjusting sub-module is used for responding to the view adjusting operation of a user in the 2D drawing of the target unit and adjusting the positions of all views in the 2D drawing of the target unit.
As a further limitation of embodiments of the present application, part map module 405 specifically includes the following sub-modules:
the part name list generation sub-module is used for acquiring a part name list of the target unit according to the unit number of the target unit;
the part drawing sub-module is used for traversing the part name list, generating a 2D drawing of the part according to a drawing mode, a target drawing frame and a main view direction when traversing to one part, and accumulating the number of the traversed parts by 1;
the part number judging sub-module is used for judging whether the number of the traversed parts is equal to the total number of the parts contained in the target unit;
the determining submodule is used for determining a 2D drawing of the part contained in the generated target unit;
and the return sub-module is used for returning the part drawing sub-module.
As a further limitation of embodiments of the present application, the part drawing sub-module specifically includes the following units:
the part 2D drawing generation unit is used for calling an Interop.INFITF.selection interface of CATIA to generate a 2D drawing of the part according to the direction of the front view;
calling an Introp.DRATITNGITF interface of CATIA to generate a front view of the part in a 2D drawing of the part according to the front view direction;
the part front view generation unit is used for generating three views and an axial side view of the part in a 2D drawing of the part in a projection mode;
the part frame generation unit is used for calling a frame macro of the CATIA to generate a target frame in a 2D drawing of the part;
and the part attribute information filling unit is used for acquiring the attribute information of the part and filling the attribute information into the target frame to obtain a final 2D drawing of the part.
As a further definition of an embodiment of the present application, it further comprises:
the drawing format conversion module is used for converting the 2D drawing of the target unit and the 2D drawing of the part into a CAD format drawing.
It should be understood that, although the steps in the flowcharts of the embodiments of the present application are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in various embodiments may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
Those skilled in the art will appreciate that the processes implementing all or part of the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, and the program may be stored in a non-volatile computer readable storage medium, and the program may include the processes of the embodiments of the methods as above when executed. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.
The foregoing description of the preferred embodiments of the application is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the application.

Claims (10)

1. The batch plotting method based on CATIA is characterized by comprising the following steps:
initializing a drawing window and displaying the drawing window when a drawing instruction aiming at a model component is received, wherein the drawing window comprises a drawing frame option, a drawing mode option, a quantity input box, a main view selection control and a unit selection control;
determining a target unit and a main view direction in response to the operation of a user on the unit selection control and the main view selection control;
responding to the operations of the user on the picture frame options, the picture throwing mode options and the number input boxes, and determining the total number of the target picture frames, the picture throwing modes and the parts contained in the target unit;
generating a 2D drawing of the target unit based on the drawing mode, the target drawing frame and the main view direction;
traversing the parts of the target unit, and generating a 2D drawing of the parts based on the drawing mode, the target drawing frame and the main view direction.
2. The CATIA-based batch diagramming method according to claim 1, wherein initializing a diagramming window and displaying the diagramming window upon receiving a connect diagramming instruction for a model component, comprises the steps of:
creating a component object model object through CATIA macro commands when a drawing instruction for a model component is received;
an application object of CATIA is transmitted into the component object model object, wherein the application object is an object used for converting a 3D model into a 2D drawing in the CATIA;
the component object model object is invoked to display a graphical window comprising a frame option, a throw mode option, a quantity input box, a main view selection control, and a unit selection control.
3. The CATIA-based batch mapping method of claim 1, wherein determining target units and main view directions in response to user actions on the unit selection control and the main view selection control comprises the steps of:
determining an assembly selected by a user on the model component in response to the operation of the user on the unit selection control and the selection operation of the user on the model component;
determining the assembly as a target unit when the unit number of the assembly is legal, and displaying the target unit;
and determining the direction of the main view in response to the operation of the main view selection control acted by the user and the main view selection operation in the displayed target unit.
4. The CATIA-based batch mapping method according to claim 1, wherein the generating the 2D drawing of the target unit based on the mapping manner, the target frame and the main view direction specifically comprises the following steps:
calling an Introp.INFITF.selection interface of CATIA to generate a 2D drawing of the target unit according to the main view direction;
calling an Introp.DRATITNGITF interface of CATIA to generate a front view of the target unit in a 2D drawing of the target unit according to the front view direction;
generating a three-view and an axial side view of the target unit in the 2D drawing of the target unit according to the drawing mode;
invoking a frame macro of the CATIA to generate a target frame in a 2D drawing of the target unit;
and acquiring attribute information of the target unit, and filling the attribute information into the target frame to obtain a final 2D drawing of the target unit.
5. The CATIA-based batch mapping method according to claim 4, wherein the generating the 2D drawing of the target unit based on the mapping manner, the target frame and the main view direction specifically further comprises the following steps:
and responding to the adjustment operation of the user for the views in the 2D drawing of the target unit, and adjusting the positions of all views in the 2D drawing of the target unit.
6. The CATIA based batch mapping method according to any of claims 1-5, wherein the traversing the parts of the target unit and generating 2D drawings of the parts based on the mapping mode, the target frame and the main view direction specifically comprises the following steps:
acquiring a part name list of the target unit according to the unit number of the target unit;
traversing the part name list, generating a 2D drawing of the part according to the drawing mode, the target frame and the main view direction when traversing to one part, and accumulating the number of traversed parts by 1;
judging whether the number of traversed parts is equal to the total number of parts contained in the target unit;
if yes, determining that a 2D drawing of the part contained in the target unit is generated;
and if not, returning to traverse the part name list, generating a 2D drawing of the part according to the drawing mode, the target frame and the main view direction when one part is traversed, and accumulating the number of the traversed parts by 1.
7. The CATIA-based batch drawing method according to claim 6, wherein the step of generating the 2D drawing of the part according to the drawing mode, the target frame and the main view direction each time a part is traversed comprises the following steps:
calling an Introp.INFITF.selection interface of CATIA to generate a 2D drawing of the part according to the main view direction;
calling an Introp.DRATINNGITF interface of CATIA to generate a front view of the part in a 2D drawing of the part according to the front view direction;
generating three views and an axial side view of the part in a 2D drawing of the part according to the drawing mode;
invoking a frame macro of the CATIA to generate a target frame in a 2D drawing of the part;
and acquiring attribute information of the part, and filling the attribute information into the target frame to obtain a final 2D drawing of the part.
8. The CATIA-based batch patterning method according to any one of claims 1 to 5, further comprising:
and converting the 2D drawing of the target unit and the 2D drawing of the part into a drawing in a CAD format.
9. A CATIA-based batch mapping system, comprising the following modules:
the system comprises a drawing window display module, a drawing module and a unit selection control, wherein the drawing window display module is used for initializing a drawing window and displaying the drawing window when a drawing instruction aiming at a model component is received, and the drawing window comprises a drawing frame option, a drawing mode option, a quantity input frame, a main view selection control and a unit selection control;
the target unit and the main view determining module are used for determining the target unit and the main view direction in response to the operation of a user on the unit selection control and the main view selection control;
the drawing information response module is used for responding to the operation of a user on the drawing frame options, the drawing mode options and the number input frames and determining the total number of the target drawing frames, the drawing modes and the parts contained in the target unit;
the target unit drawing module is used for generating a 2D drawing of the target unit based on the drawing mode, the target drawing frame and the main view direction;
and the part drawing module is used for traversing the part of the target unit and generating a 2D drawing of the part based on the drawing mode, the target drawing frame and the front view direction.
10. The CATIA-based batch mapping system of claim 9, wherein the mapping window display module specifically comprises the following sub-modules:
the component object model object creation sub-module is used for creating a component object model object through CATIA macro commands when a drawing instruction for a model component is received;
an object input submodule, configured to input an application object of the CATIA in the component object model object, where the application object is an object in the CATIA that is used to convert a 3D model into a 2D drawing;
and the object calling sub-module is used for calling the component object model object to display a drawing window, wherein the drawing window comprises a drawing frame option, a drawing mode option, a quantity input frame, a main view selection control and a unit selection control.
CN202311317344.0A 2023-10-12 2023-10-12 Batch plotting method and system based on CATIA Active CN117094049B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311317344.0A CN117094049B (en) 2023-10-12 2023-10-12 Batch plotting method and system based on CATIA

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311317344.0A CN117094049B (en) 2023-10-12 2023-10-12 Batch plotting method and system based on CATIA

Publications (2)

Publication Number Publication Date
CN117094049A true CN117094049A (en) 2023-11-21
CN117094049B CN117094049B (en) 2024-03-19

Family

ID=88770071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311317344.0A Active CN117094049B (en) 2023-10-12 2023-10-12 Batch plotting method and system based on CATIA

Country Status (1)

Country Link
CN (1) CN117094049B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106021718A (en) * 2016-05-19 2016-10-12 重庆阿泰可科技股份有限公司 Drawing method and device used for engineering drawing in CATIA (Computer-graphics Aided Three-dimensional Interactive Application)
CN112380629A (en) * 2020-11-26 2021-02-19 长春富维安道拓汽车饰件系统有限公司 Key parameter-based seat protective surface card strip generation system and operation method thereof
CN113901587A (en) * 2021-10-27 2022-01-07 上海设序科技有限公司 Rapid design method and system for automobile welding fixture
CN113901615A (en) * 2021-10-27 2022-01-07 上海设序科技有限公司 Automatic marking method and device for two-dimensional drawing and electronic equipment
CN113971630A (en) * 2021-10-27 2022-01-25 上海设序科技有限公司 Projection posture recommendation method and device for converting three-dimensional structure diagram into two-dimensional three-view diagram
CN114218731A (en) * 2021-12-20 2022-03-22 中冶南方工程技术有限公司 Method and tool for drawing pipeline three-dimensional information model
CN116842915A (en) * 2023-07-04 2023-10-03 中国电建集团西北勘测设计研究院有限公司 CATIAV 6-based batch labeling method for hydraulic and hydroelectric engineering drawings

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106021718A (en) * 2016-05-19 2016-10-12 重庆阿泰可科技股份有限公司 Drawing method and device used for engineering drawing in CATIA (Computer-graphics Aided Three-dimensional Interactive Application)
CN112380629A (en) * 2020-11-26 2021-02-19 长春富维安道拓汽车饰件系统有限公司 Key parameter-based seat protective surface card strip generation system and operation method thereof
CN113901587A (en) * 2021-10-27 2022-01-07 上海设序科技有限公司 Rapid design method and system for automobile welding fixture
CN113901615A (en) * 2021-10-27 2022-01-07 上海设序科技有限公司 Automatic marking method and device for two-dimensional drawing and electronic equipment
CN113971630A (en) * 2021-10-27 2022-01-25 上海设序科技有限公司 Projection posture recommendation method and device for converting three-dimensional structure diagram into two-dimensional three-view diagram
CN114218731A (en) * 2021-12-20 2022-03-22 中冶南方工程技术有限公司 Method and tool for drawing pipeline three-dimensional information model
CN116842915A (en) * 2023-07-04 2023-10-03 中国电建集团西北勘测设计研究院有限公司 CATIAV 6-based batch labeling method for hydraulic and hydroelectric engineering drawings

Also Published As

Publication number Publication date
CN117094049B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
US8458614B1 (en) Rendition-based graphical layout management
CN102193786B (en) Device and method for constructing self-adaptive graphic user interface (GUI)
CN110335345A (en) Curtain wall joint rendering method, device, computer equipment and storage medium
CN113094770B (en) Drawing generation method and device, computer equipment and storage medium
CN112346725B (en) Page design method, device, equipment and storage medium
CN117094049B (en) Batch plotting method and system based on CATIA
US8203556B2 (en) System and method for generating parts catalog, and computer program product
CN112164141A (en) BIM technology-based machine room management method, device, equipment and storage medium
CN110887490A (en) Key frame selection method, medium, terminal and device for laser positioning navigation
CN111179175B (en) Image processing method and device based on convolutional neural network and storage medium
CN115346005A (en) Data structure construction method for object plane grid based on nested bounding box concept
CN112150611B (en) Method and device for calibrating problematic component, computer equipment and storage medium
CN113436330A (en) Area object generation method and device, electronic equipment and readable storage medium
CN109753721B (en) FPGA device layout and wiring display method, device, equipment and storage medium
KR20210121574A (en) Data set management device and method for displaying relationship between machine learning model and data set using the same
CN111640170A (en) Skeleton animation generation method and device, computer equipment and storage medium
CN112991492B (en) Curved surface curtain wall generation method and device, computer equipment and readable storage medium
CN114520770B (en) Topology diagram generation method, device, equipment and medium of network equipment
US11822311B2 (en) Generation of representations of three-dimensional objects using Boolean operations
CN117473938A (en) Automatic drawing method and system for automobile system schematic diagram
CN115761198A (en) Data model lightweight method, device, equipment and storage medium
CN116301519B (en) Local information pickup method, device and equipment of rendering entity and storage medium
CN116309934A (en) Drawing method and device based on primitive prediction, electronic equipment and storage medium
CN114677302A (en) Green belt processing method and device for high-precision map, electronic equipment and storage medium
CN118314282A (en) Primitive control method, system, equipment and storage medium of three-dimensional model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant