CN112256896A - CAD (computer-aided design) primitive automatic identification and replacement method - Google Patents

CAD (computer-aided design) primitive automatic identification and replacement method Download PDF

Info

Publication number
CN112256896A
CN112256896A CN202011205880.8A CN202011205880A CN112256896A CN 112256896 A CN112256896 A CN 112256896A CN 202011205880 A CN202011205880 A CN 202011205880A CN 112256896 A CN112256896 A CN 112256896A
Authority
CN
China
Prior art keywords
template
module
primitive
replacement
primitives
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.)
Withdrawn
Application number
CN202011205880.8A
Other languages
Chinese (zh)
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.)
Shanghai Yidi Information Technology Co ltd
Original Assignee
Shanghai Yidi Information Technology 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 Shanghai Yidi Information Technology Co ltd filed Critical Shanghai Yidi Information Technology Co ltd
Priority to CN202011205880.8A priority Critical patent/CN112256896A/en
Publication of CN112256896A publication Critical patent/CN112256896A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/56Information retrieval; Database structures therefor; File system structures therefor of still image data having vectorial format
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5854Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using shape and object relationship
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/5866Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, manually generated location and time information
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/20Configuration CAD, e.g. designing by assembling or positioning modules selected from libraries of predesigned modules

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Library & Information Science (AREA)
  • Geometry (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a CAD graphic primitive automatic identification and replacement method, belonging to the technical field of CAD graphic primitive automatic identification and replacement, comprising an element sample template library, an element template, a key attribute module, an identification and replacement system, a key value graphic primitive module and a position coordinate system module, wherein the identification and replacement system is bidirectionally connected with the element sample template library, the template data in the element sample template library is based on basic graphic primitives, graphic block graphic primitives are updated in the using process, the identification and replacement system establishes the position coordinate system module according to the element template, and the element template comprises the key value graphic primitive module. After the element sample template library is gradually improved, the whole volume is carried out, the whole engineering drawing is identified and replaced in batches, the drawing can be designed before follow-up application, advanced design experience is absorbed, workload is reduced, and design efficiency is improved.

Description

CAD (computer-aided design) primitive automatic identification and replacement method
Technical Field
The invention relates to the technical field of CAD graphic primitive automatic identification and replacement, in particular to a CAD graphic primitive automatic identification and replacement method.
Background
CAD is an english abbreviation of computer aided Design (CAD-computer aided Design), and refers to a process of manufacturing and simulating physical Design by using computer software, and showing features such as appearance, structure, color, texture and the like of newly developed commodities.
The earliest applications of CAD were in automotive manufacturing, aerospace, and electronics industry production for large companies. Later, along with the evolution of CAD realization technology and the change of computer price, the application range of the CAD realization technology is gradually widened, in the engineering field, the CAD is undoubtedly the design software which is most frequently used by each design unit, the project is finally stored in the form of an electronic edition, the project adopts self-defined drawing frames to indicate the design unit, the design project and the like due to different projects, all drawings are arranged by using drawing numbers and page numbers, and are finally printed and published, at present, various professional software which is secondarily developed by the CAD is popularized in each design unit, but most of the programs adopt the process of firstly establishing a drawing base of graphic elements, then utilizing the graphic elements of the drawing base to carry out CAD drawing, and finally extracting data or storing the data in real time in the drawing process, but before using the professional software, the CAD which is filed needs the identification and extraction of the software to achieve the purpose of applying the previous design drawings, the method has the advantages that advanced design experience is absorbed, workload is reduced, and design efficiency is improved, a CAD graphic primitive automatic identification and replacement technology is provided, drawings built by basic graphic primitives such as picture blocks, straight lines, multi-segment lines, circles and characters in the original automatic CAD or other CAD environments can be identified and replaced into template graphic primitives with attributes, and identification and extraction of professional CAD software are facilitated.
Disclosure of Invention
The invention aims to provide a CAD graphic primitive automatic identification and replacement method to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme: a CAD graphic element automatic identification and replacement method comprises an element sample template library, an element template, a key attribute module, an identification and replacement system, a key value graphic element module and a position coordinate system module, wherein the identification and replacement system is connected with the element sample template library in a bidirectional mode, the identification and replacement system establishes the position coordinate system module according to the element template, the element template comprises the key value graphic element module, and the method comprises the following steps:
s101: picking up an element template and storing the appointed attribute characters in an element sample template library to obtain the composition of the graphic elements of the element template;
s102: taking any one of the elements in the element template elements as a key value element module and taking a key attribute module of the key value element module;
s103: identifying and replacing the element templates, identifying that the element templates in the replaced drawing are all in a pattern block format with attributes, traversing the drawing, searching and obtaining a matched primitive according to a key value primitive module, and establishing a position coordinate system module;
s104: sequentially obtaining other primitives from the primitive of the element template, and moving the coordinates of the primitive of the template to the position coordinates in the graph according to the relative coordinates of the primitive module of the key value and the matched primitives in the graph;
s105: and (3) primitive comparison: as shown in step S102, comparing whether the key attribute modules are consistent;
s106: until all the primitives in the element template are compared and matched consistently, the primitives matched in the drawing can be converged into a block, and corresponding attributes (matched according to the positions of characters) are added;
s107: identifying the replacement component is complete.
Further, the template data in the component sample template library is based on the basic primitive, and the tile primitives are updated during the using process.
Furthermore, the element template comprises a plurality of primitives, and any one primitive can be used as a key value primitive module.
Further, the key attribute module of the key-value primitive module comprises a picture block, a straight line, a plurality of lines, a circle and characters.
Further, the identification and replacement system identifies key attribute modules of the key-value primitive modules, establishes a position coordinate system module, and coordinates other key-value primitive modules in the element template onto the position coordinate system module.
Further, the identification and replacement system transmits the new image metadata back to the component sample template library after the identification and replacement are completed based on the template data in the component sample template library.
Further, the component sample template library updates the template data according to the new graph metadata.
Furthermore, after the element sample template library is gradually improved, the whole volume is carried out, the whole engineering drawing is subjected to batch identification and replacement, and the block primitives with the attributes are replaced for rapid identification and use of professional software.
Compared with the prior art, the invention has the beneficial effects that: the invention provides a CAD graphic primitive automatic identification and replacement method, firstly establishing an element sample template library, then using the element sample template library to carry out CAD drawing, finally extracting data or storing the data in real time in the drawing process, before using professional software, using an identification and replacement system to identify and extract the archived CAD drawing so as to achieve the purposes of mechanically applying the previous design drawing, absorbing advanced design experience, reducing workload and improving design efficiency, after identifying and replacing elements, comparing whether each key attribute module is consistent or not, further reducing the distortion probability in the replacement process, updating the template data according to new image metadata by the element sample template library, after the element sample template library is gradually finished, carrying out the whole volume, identifying and replacing the batch quantity of the whole engineering drawing, replacing the graphic blocks with attributes for the professional software to rapidly identify and use, the drawing built by basic primitives such as picture blocks, straight lines, multi-segment lines, circles, characters and the like is used for identifying and replacing the template primitives with attributes, so that the identification and extraction of professional CAD software are facilitated.
Drawings
FIG. 1 is a business flow diagram of the present invention;
FIG. 2 is a working diagram of an identification and replacement system and a library of component sample templates in accordance with the present invention;
FIG. 3 is a schematic diagram of the operation of the present invention;
FIG. 4 is a flow chart of element screening according to the present invention;
fig. 5 is a block diagram of the process of the present invention.
In the figure: 1. a library of component sample templates; 2. an element template; 3. a key attribute module; 4. identifying a replacement system; 5. a key value primitive module; 6. a position coordinate system module.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-5, a CAD primitive automatic identification and replacement method includes a component sample template library 1, a component template 2, a key attribute module 3, an identification and replacement system 4, a key value primitive module 5, and a position coordinate system module 6, where the identification and replacement system 4 connects the component sample template library 1 bidirectionally, the identification and replacement system 4 establishes the position coordinate system module 6 according to the component template 2, and the component template 2 includes the key value primitive module 5. The method comprises the following steps:
s101: picking up the element template 2 and storing the designated attribute characters into the element sample template library 1 to obtain the primitive composition of the element template 2, wherein the template data in the element sample template library 1 is based on the basic primitives, the primitives of the block are updated in the using process, and the element template 2 is disassembled into the basic primitives, so that the identification is convenient;
s102: the element template 2 comprises a plurality of primitives, any one primitive can be used as a key value primitive module 5, any one primitive in the primitives of the element template 2 is used as the key value primitive module 5, and a key attribute module 3 of the key value primitive module 5 is obtained, the key attribute module 3 of the key value primitive module 5 comprises basic primitive attributes such as blocks, straight lines, multi-segment lines, circles, characters and the like, and the key information of the primitives can be retained to the maximum extent by utilizing the key attribute module 3 of the primitives, so that the key information of the primitives can be stored when the recognition and replacement system 4 carries out recognition and replacement on the primitives, and the probability of replacement distortion is reduced;
s103: identifying the replacement element template 2, identifying the replacement system 4 based on the template data in the element sample template library 1, transmitting the new image metadata to the element sample template library 1 by the identification replacement system 4 after the identification replacement is finished, identifying the element templates 2 in the replaced drawing in the image with the pattern block format with the attribute, traversing the image, searching to obtain the matched pixels according to the key value pixel module 5, establishing a position coordinate system module 6,
s104: then, other primitives are sequentially obtained from the primitives of the element template 2, and the coordinates of the element template 2 are moved to the position coordinates in the drawing according to the relative coordinates of the key value primitive module 5 and the matched primitives in the drawing, so that the authenticity of the information of the element template 2 can be maintained;
s105: and (3) primitive comparison: as shown in step S102, comparing whether the key attribute modules 3 are consistent, so as to further reduce the probability of distortion in the replacement process;
s106: until all the primitives in the element template 2 are compared and matched consistently, the primitives matched in the drawing can be converged into a block, and corresponding attributes are added for matching according to the positions of characters;
s107: the method comprises the steps that identification and replacement of elements are completed, the element sample template library 1 updates template data according to new image metadata, after the element sample template library 1 is gradually completed, the whole volume is rolled, batch identification and replacement of the whole engineering drawing are performed, the replaced image block primitives with the attributes are used for rapid identification of professional software, drawings built by basic primitives such as image blocks, straight lines, multi-segment lines, circles, characters and the like in the original AutoCAD or other CAD environments are used for identification and replacement of the template primitives with the attributes, and identification and extraction of the professional CAD software are facilitated.
In summary, the following steps: the invention provides a CAD graphic element automatic identification and replacement method, which comprises an element sample template library 1, an element template 2, a key attribute module 3, an identification and replacement system 4, a key value graphic element module 5 and a position coordinate system module 6, wherein the identification and replacement system 4 is connected with the element sample template library 1 in a two-way manner, the identification and replacement system 4 establishes the position coordinate system module 6 according to the element template 2, the element template 2 comprises the key value graphic element module 5, the element template 2 is picked up and designated attribute characters are stored in the element sample template library 1 to obtain the graphic element composition of the element template 2, the template data in the element sample template library 1 is based on the basic graphic elements, the graphic element blocks are updated in the using process, the element template 2 is disassembled into the basic graphic elements, and the identification is convenient; the element template 2 comprises a plurality of primitives, any one primitive can be used as a key value primitive module 5, any one primitive in the primitives of the element template 2 is used as the key value primitive module 5, and a key attribute module 3 of the key value primitive module 5 is obtained, the key attribute module 3 of the key value primitive module 5 comprises basic primitive attributes such as blocks, straight lines, multi-segment lines, circles, characters and the like, and the key information of the primitives can be retained to the maximum extent by utilizing the key attribute module 3 of the primitives, so that the key information of the primitives can be stored when the recognition and replacement system 4 carries out recognition and replacement on the primitives, and the probability of replacement distortion is reduced; identifying a replacement element template 2, identifying the replacement system 4 based on template data in the element sample template library 1, transmitting new image metadata to the element sample template library 1 by the identification replacement system 4 after the identification replacement is finished, identifying the element templates 2 in the replaced drawing in the block format with attributes, traversing the drawing, searching to obtain a matched primitive according to a key value primitive module 5, establishing a position coordinate system module 6, sequentially obtaining other primitives from the elements of the element template 2, and moving the coordinates of the element template 2 to the position coordinates in the drawing according to the relative coordinates of the key value primitive module 5 and the matched primitives in the drawing; comparing the primitives, namely comparing whether the key attribute modules 3 are consistent or not, further reducing the probability of distortion in the replacement process until all the primitives in the element template 2 are completely compared and matched consistently, converging the primitives matched in the drawing into a block, and adding corresponding attributes to match according to the positions of characters; and identifying and replacing elements, updating template data according to the new image metadata by the element sample template library 1, gradually completing the element sample template library 1, carrying out the whole volume, carrying out batch identification and replacement on the whole engineering drawing, and replacing the image block primitives with the attributes after replacement for quick identification and use by professional software.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be able to cover the technical solutions and the inventive concepts of the present invention within the technical scope of the present invention.

Claims (8)

1. A CAD graphic primitive automatic identification and replacement method is characterized in that: including component example template storehouse (1), component template (2), key attribute module (3), discernment substitution system (4), key value primitive module (5) and position coordinate system module (6), discernment substitution system (4) two-way connection component example template storehouse (1), discernment substitution system (4) establish position coordinate system module (6) according to component template (2), component template (2) contain key value primitive module (5), and it includes following step:
s101: picking up an element template (2) and storing specified attribute characters into an element sample template library (1) to obtain a graphic element composition of the element template (2);
s102: taking any one of the primitives of the element template (2) as a key value primitive module (5) and taking a key attribute module (3) of the key value primitive module;
s103: identifying and replacing the element templates (2), identifying that the element templates (2) in the replaced drawing are all in a pattern block format with attributes, traversing the drawing, searching according to a key value primitive module (5) to obtain a matched primitive, and establishing a position coordinate system module (6);
s104: sequentially obtaining other primitives from the primitives of the element template (2), and moving the coordinates of the primitives of the template to position coordinates in the graph according to the relative coordinates of the key value primitive module (5) and the matched primitives in the graph;
s105: and (3) primitive comparison: as shown in step S102, comparing whether the key attribute modules (3) are consistent;
s106: until all the primitives in the element template (2) are compared and matched consistently, the matched primitives in the drawing can be converged into a block, and corresponding attributes are added;
s107: identifying the replacement component is complete.
2. A CAD primitive automatic identification and replacement method according to claim 1, characterized in that the template data in the component sample template library (1) is based on basic primitives, and the tile primitives are updated during use.
3. A CAD primitive automatic identification and replacement method according to claim 1, characterized in that the element template (2) comprises a plurality of primitives, any one of which can be used as a key-value primitive module (5).
4. The CAD graphic element automatic identification and replacement method as claimed in claim 1, wherein the key attribute module (3) of the key value graphic element module (5) comprises a picture block, a straight line, a multi-segment line, a circle and a character.
5. A CAD primitive automatic identification and replacement method according to claim 1, characterized in that the identification and replacement system (4) identifies the key attribute module (3) of the key-value primitive module (5) and then establishes the position coordinate system module (6), and coordinates other key-value primitive modules (5) in the element template (2) onto the position coordinate system module (6).
6. A CAD primitive automatic identification and replacement method according to claim 5, characterized in that said identification and replacement system (4) transmits new image metadata back to the component sample template library (1) after the identification and replacement is completed based on the template data in the component sample template library (1).
7. A method for automatic CAD primitive recognition and replacement according to claim 1, characterized in that the component sample template library (1) updates the template data according to the new drawing metadata.
8. The CAD graphic primitive automatic identification and replacement method according to claim 1, characterized in that after the component sample template library (1) is gradually completed, the whole volume is performed, the whole engineering drawing is subjected to batch identification and replacement, and the replaced graphic primitive with the attribute is used for rapid identification by professional software.
CN202011205880.8A 2020-11-02 2020-11-02 CAD (computer-aided design) primitive automatic identification and replacement method Withdrawn CN112256896A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011205880.8A CN112256896A (en) 2020-11-02 2020-11-02 CAD (computer-aided design) primitive automatic identification and replacement method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011205880.8A CN112256896A (en) 2020-11-02 2020-11-02 CAD (computer-aided design) primitive automatic identification and replacement method

Publications (1)

Publication Number Publication Date
CN112256896A true CN112256896A (en) 2021-01-22

Family

ID=74268571

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011205880.8A Withdrawn CN112256896A (en) 2020-11-02 2020-11-02 CAD (computer-aided design) primitive automatic identification and replacement method

Country Status (1)

Country Link
CN (1) CN112256896A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117473941A (en) * 2023-12-28 2024-01-30 广东美创希科技有限公司 Drawing processing method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117473941A (en) * 2023-12-28 2024-01-30 广东美创希科技有限公司 Drawing processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111612880B (en) Three-dimensional model construction method based on two-dimensional drawing, electronic equipment and storage medium
CN112000314B (en) BIM model light weight method
CN108805519B (en) Electronic generation method and device for paper schedule and electronic schedule generation method
CN108765584A (en) Laser point cloud data collection augmentation method, apparatus and readable storage medium storing program for executing
WO2021093344A1 (en) Semi-automatic image data labeling method, electronic apparatus, and storage medium
CN109886257B (en) Method for correcting invoice image segmentation result by adopting deep learning in OCR system
CN110634131A (en) Crack image identification and modeling method
CN112256896A (en) CAD (computer-aided design) primitive automatic identification and replacement method
CN109166172B (en) Clothing model construction method and device, server and storage medium
CN117173223A (en) Standard template generation method, device, equipment and medium for ammeter code-breaking screen
CN112101336A (en) Intelligent data acquisition mode based on computer vision
CN111107264A (en) Image processing method, image processing device, storage medium and terminal
EP4002185A1 (en) Computer aided drawing drafting automation from markups using machine learning
CN111199086A (en) Three-dimensional geometric discretization processing system
CN106780412B (en) Method for generating machining path by utilizing handwritten body skeleton line
CN115035032A (en) Neural network training method, related method, device, terminal and storage medium
CN113766147B (en) Method for embedding image in video, and method and device for acquiring plane prediction model
CN114529936A (en) Method for scanning and converting paper power engineering drawing into electronic CAD drawing
CN113947529A (en) Image enhancement method, model training method, component identification method and related equipment
CN111598835A (en) Matching method, system and matching device for colors of clothing pictures
CN117253231B (en) Oil-gas station image processing method and device, electronic equipment and storage medium
CN111243058A (en) Object simulation image generation method and computer-readable storage medium
CN113255499B (en) Digital automatic modeling method for secondary loop of transformer substation cable
CN115311296B (en) Data generation method, image recognition method, computer storage medium and terminal device
CN113222905B (en) Opennsfm and thread.js-based structural damage information updating three-dimensional display method

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20210122