CN101645099A - Graphics primitive conversion system and graphics primitive conversion method - Google Patents
Graphics primitive conversion system and graphics primitive conversion method Download PDFInfo
- Publication number
- CN101645099A CN101645099A CN200810303594A CN200810303594A CN101645099A CN 101645099 A CN101645099 A CN 101645099A CN 200810303594 A CN200810303594 A CN 200810303594A CN 200810303594 A CN200810303594 A CN 200810303594A CN 101645099 A CN101645099 A CN 101645099A
- Authority
- CN
- China
- Prior art keywords
- pel
- general
- line
- circular arc
- module
- 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.)
- Pending
Links
Images
Landscapes
- Image Processing (AREA)
Abstract
The invention provides a graphics primitive conversion system which comprises a setting module, a receiving module, a screening module, a judging module and a conversion module, wherein the setting module is used for setting cutting methods of various types of non-universal graphics primitives; the receiving module is used for receiving a mould design figure file from a database and obtaining thegraphics primitives from the mould design figure file; the screening module is used for filtering out universal graphics primitives and text graphics primitives from the obtained graphics primitives according to the property information of each graphics primitive so as to obtain the non-universal graphics primitives required to be converted; the judging module is used for determining the types ofeach non-universal graphics primitive; the conversion module is used for cutting the non-universal graphics primitives into a plurality of sub graphics primitives according to corresponding cutting methods and cutting precisions, respectively solving approximation arcs of each arc in the obtained sub graphics primitives and replacing corresponding arcs in the sub graphics primitives with the approximation arcs so as to obtain the universal graphics primitives corresponding to each non-universal graphics primitive. The invention can quickly convert the non-universal graphics primitives into theuniversal graphics primitives according to the cutting methods and the cutting precisions set by a user.
Description
Technical field
The present invention relates to a kind of CAD aided design system and method, especially about a kind of pel converting system and method.
Background technology
Element figure among the AutoCAD mainly comprises graph primitive and literal pel.Graph primitive comprises: line segment, polyline, circle, circular arc, cloud line, SPL, ellipse, elliptic arc etc.The literal pel comprises literal.Graph primitive can be divided into two classes again: general pel and non-general pel.General pel refers to and can directly be converted to the pel that other machine can be discerned and use, for example line segment, circle, circular arc.Non-general pel refers to and can not directly be converted to the pel that other machine can be discerned and use, for example polyline, cloud line, SPL, ellipse, elliptic arc.
When relating to the graph data transplanting, such as figure is converted to numerical control (Numerical Control, NC) code inputs to board, when making board directly cut out position, needed hole, just need earlier non-general pel is converted to general pel according to the NC code of importing.At present, non-general pel is converted to general pel neither one unified method,, usually depends on mould designer's artificial judgement particularly for SPL, ellipse, elliptic arc in the non-general pel.
Summary of the invention
In view of above content, be necessary to provide a kind of pel converting system, non-general pel can be converted to general pel.
In addition, also be necessary to provide a kind of pel conversion method, non-general pel can be converted to general pel.
The invention provides a kind of pel converting system, run on main frame.This system comprises: module is set, is used to be provided with the dividing method of the non-general pel of all kinds, or dividing method and segmentation precision; Receiver module is used for receiving mould design figure file from database, and obtains the pel in this mould design figure file; Screen module, be used for filtering out the general pel and the literal pel of the pel that gets access to, needing to obtain the non-general pel of conversion according to the attribute information of each pel; Judge module is used for determining the type of each non-general pel; And modular converter, be used for each non-general pel being divided into a plurality of subgraph unit respectively according to corresponding dividing method and segmentation precision, and ask for respectively and approach circular arc cutting apart each camber line in the subgraph unit that obtains, to approach the corresponding camber line in the circular arc replacement subgraph unit, to obtain general pel corresponding to each non-general pel.
The present invention also provides a kind of pel conversion method, runs on main frame.This method comprises: the dividing method of the non-general pel of all kinds (A) is set, or dividing method and segmentation precision; (B) receive mould design figure file from database, and obtain the pel in this mould design figure file; (C) filter out general pel and literal pel in the pel that gets access to according to the attribute information of each pel, needing to obtain the non-general pel of conversion; (D) determine the type of each non-general pel; And (E) each non-general pel is divided into a plurality of subgraph unit respectively according to corresponding dividing method and segmentation precision, and ask for respectively and approach circular arc cutting apart each camber line in the subgraph unit that obtains, to approach the corresponding camber line in the circular arc replacement subgraph unit, to obtain general pel corresponding to each non-general pel.
Compared to prior art, pel converting system provided by the invention and method can be converted to general pel with non-general pel apace according to dividing method and the segmentation precision that the user is provided with.
Description of drawings
Fig. 1 is the hardware structure figure of pel converting system of the present invention preferred embodiment.
Fig. 2 is the functional block diagram of the pel converting system in Fig. 1 main frame.
Fig. 3 is the process flow diagram of pel conversion method of the present invention preferred embodiment.
The synoptic diagram of the general pel of Fig. 4 right and wrong.
Embodiment
Understand for convenient, the term that occurs herein be defined as follows:
Polyline: by at least two line segments (as pel A among Fig. 4), or the pel of forming by at least one line segment and at least one circular arc.
Cloud line: by the be connected pel (as pel B among Fig. 4) of the cloud form formed of plurality of sections camber line.
SPL: SPL is meant given one group of reference mark and obtains a curve that the general shape of curve is controlled by these points.
As shown in Figure 1, be the hardware structure figure of pel converting system of the present invention preferred embodiment.This system comprises: main frame 1, display 2, keyboard 3, mouse 4 and database 5.Display 2, keyboard 3, mouse 4 and database 5 link to each other with main frame 1 respectively.This main frame 1 comprises pel converting system 10, is used for the non-general pel of mould design figure file is converted to general pel.
Database 5 is used to store original mould designed graphic document and relevant information thereof, the attribute information that comprises each pel of mould design figure file, and each non-general pel is converted to mould design figure file and the relevant information thereof that obtains behind the general pel in the storage original mould designed graphic document.Database 5 can be built in main frame 1, also can be external in main frame 1.In the present embodiment, being external in main frame 1 with database 5 is that example describes.
As shown in Figure 2, be the functional block diagram of the pel converting system 10 in Fig. 1 main frame 1.This pel converting system 10 comprises module 100, receiver module 110, screening module 120, judge module 130, modular converter 140 and storage module 150 is set.Described each module is one section main frame program of finishing specific function.
Dividing method and segmentation precision that module 100 is used to be provided with the non-general pel of all kinds are set.Described dividing method can be the mathematical method of end points split plot design, average split plot design, recurrence split plot design or other any adaptation.Described segmentation precision is meant the length of the minimum camber line that will obtain after this non-general figure element dividing.Described cloud line and polyline have some connection end points respectively, so the suitable end points split plot design of both, and wherein, the end points split plot design is to cut apart at each connection end point place, so do not need to be provided with segmentation precision at the operation of cutting apart of cloud line and polyline.To elliptic arc, ellipse and SPL identical or different dividing methods and segmentation precision can be set, wherein, elliptic arc, ellipse and SPL do not have connection end point, therefore, so the inapplicable end points split plot design of three is cutting apart operation segmentation precision need be set at elliptic arc, ellipse and SPL.Segmentation precision is more little, and it is many more to obtain camber line after cutting apart, and transformation result is accurate more, but slewing rate is slow relatively more.
Judge module 130 is used for determining the type of each non-general pel, and non-general pel comprises polyline, cloud line, ellipse, elliptic arc, and type such as SPL.
As shown in Figure 3, be the process flow diagram of pel conversion method of the present invention preferred embodiment.
Step S10 is provided with dividing method and segmentation precision that module 100 is provided with the non-general pel of all kinds.Described dividing method can be the mathematical method of end points split plot design, average split plot design, recurrence split plot design or other any adaptation.Described segmentation precision is meant the length of the minimum camber line that will obtain after this non-general figure element dividing.Described cloud line and polyline have some connection end points respectively, so the suitable end points split plot design of both, and wherein, the end points split plot design is to cut apart at each connection end point place, so do not need to be provided with segmentation precision at the operation of cutting apart of cloud line and polyline.To elliptic arc, ellipse and SPL identical or different dividing methods and segmentation precision can be set, wherein, elliptic arc, ellipse and SPL do not have connection end point, therefore, so the inapplicable end points split plot design of three is cutting apart operation segmentation precision need be set at elliptic arc, ellipse and SPL.
Step S12, receiver module 110 receives mould design figure file from database 5, and obtains the pel in this mould design figure file.
Step S14, screening module 120 filters out general pel in the pel that receives according to the attribute information of each pel, as line segment, circle, circular arc, and the literal pel, needing to obtain the non-general pel of conversion, comprise polyline, cloud line, ellipse, elliptic arc, SPL etc.
Step S16, judge module 130 is determined the type of each non-general pel, is to be polyline, or the cloud line, or oval, or elliptic arc, still is SPL.When this non-general pel is polyline, enter step S18; When this non-general pel is ellipse or elliptic arc, enter step S20; When this non-general pel is the cloud line, enter step S22; When this non-general pel is SPL, enter step S24.
Step S18, modular converter 140 is divided into some line segments or line segment and circular arc according to each connection end point of this polyline with it.Afterwards, enter step S28.
Step S20, modular converter 140 should ellipse according to the dividing method that is provided with and segmentation precision or elliptic arc be divided into the plurality of sections camber line.Afterwards, enter step S26.
Step S22, modular converter 140 is divided into the plurality of sections camber line according to each connection end point with this cloud line.Afterwards, enter step S26.
Step S24, modular converter 140 is divided into the plurality of sections camber line according to the dividing method and the segmentation precision that are provided with this SPL.Afterwards, enter step S26.
Step S26, modular converter 140 ask for the circular arc that approaches of each camber line that obtains after this non-general figure element dividing, and approach the general pel of circular arc for this non-general pel correspondence with all that obtain.
Step S28, the general pel that obtains after each non-general pel conversion of storage module 150 storages is to database 5.
Claims (10)
1. a pel converting system runs on main frame, it is characterized in that, this pel converting system comprises:
Module is set, is used to be provided with the dividing method and the segmentation precision of the non-general pel of all kinds;
Receiver module is used for receiving mould design figure file from database, and obtains the pel in this mould design figure file;
Screen module, be used for filtering out the general pel and the literal pel of the pel that gets access to, needing to obtain the non-general pel of conversion according to the attribute information of each pel;
Judge module is used for determining the type of each non-general pel; And
Modular converter, be used for each non-general pel being divided into a plurality of subgraph unit respectively according to corresponding dividing method and segmentation precision, and ask for respectively and approach circular arc cutting apart each camber line in the subgraph unit that obtains, to approach the corresponding camber line in the circular arc replacement subgraph unit, to obtain general pel corresponding to each non-general pel.
2. pel converting system as claimed in claim 1 is characterized in that, described general pel comprises line segment, circle and circular arc, and described non-general pel comprises polyline, cloud line, ellipse, elliptic arc and SPL.
3. pel converting system as claimed in claim 2 is characterized in that, when described non-general pel was polyline, this modular converter was divided into many line segments according to each connection end point of this polyline with this polyline, or many line segments and circular arc.
4. pel converting system as claimed in claim 2 is characterized in that, when described non-general pel was the cloud line, this modular converter was divided into the multistage camber line according to this each connection end point of cloud line with this cloud line, and asked for the circular arc that approaches of each camber line.
5. pel converting system as claimed in claim 2, it is characterized in that, when described non-general pel is ellipse, elliptic arc or SPL, this modular converter according to the dividing method that is provided with and segmentation precision should ellipse, elliptic arc or SPL be divided into the multistage camber line, and ask for the circular arc that approaches of each camber line.
6. a pel conversion method runs on main frame, it is characterized in that, this method comprises:
The dividing method and the segmentation precision of the non-general pel of all kinds are set;
Receive mould design figure file from database, obtain the pel in this mould design figure file;
Filter out general pel and literal pel in the pel that gets access to according to the attribute information of each pel, needing to obtain the non-general pel of conversion;
Determine the type of each non-general pel; And
According to corresponding dividing method and segmentation precision each non-general pel is divided into a plurality of subgraph unit respectively, and ask for respectively and approach circular arc cutting apart each camber line in the subgraph unit that obtains, to approach the corresponding camber line in the circular arc replacement subgraph unit, to obtain general pel corresponding to each non-general pel.
7. pel conversion method as claimed in claim 6 is characterized in that, described general pel comprises line segment, circle and circular arc, and described non-general pel comprises polyline, cloud line, ellipse, elliptic arc and SPL.
8. pel conversion method as claimed in claim 7 is characterized in that, when described non-general pel is polyline, according to each connection end point of this polyline it is divided into many line segments, or many line segments and circular arc.
9. pel conversion method as claimed in claim 7 is characterized in that, when described non-general pel is the cloud line, according to each connection end point this cloud line is divided into the multistage camber line, and asks for the circular arc that approaches of each camber line.
10. pel conversion method as claimed in claim 7, it is characterized in that, when described non-general pel is oval, elliptic arc or SPL, according to the dividing method that is provided with and segmentation precision should ellipse, elliptic arc or SPL be divided into the multistage camber line, and ask for the circular arc that approaches of each camber line.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810303594A CN101645099A (en) | 2008-08-08 | 2008-08-08 | Graphics primitive conversion system and graphics primitive conversion method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810303594A CN101645099A (en) | 2008-08-08 | 2008-08-08 | Graphics primitive conversion system and graphics primitive conversion method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101645099A true CN101645099A (en) | 2010-02-10 |
Family
ID=41656985
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200810303594A Pending CN101645099A (en) | 2008-08-08 | 2008-08-08 | Graphics primitive conversion system and graphics primitive conversion method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101645099A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112214809A (en) * | 2020-10-16 | 2021-01-12 | 安徽工程大学 | Method and device for randomly arranging graphics primitives |
-
2008
- 2008-08-08 CN CN200810303594A patent/CN101645099A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112214809A (en) * | 2020-10-16 | 2021-01-12 | 安徽工程大学 | Method and device for randomly arranging graphics primitives |
CN112214809B (en) * | 2020-10-16 | 2023-11-17 | 安徽工程大学 | Random primitive arrangement method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107924180B (en) | Method, apparatus, and non-transitory computer-readable medium for converting a graph into an application engineering element | |
EP3149551B1 (en) | A method and system for configuration of devices of a control system | |
CN103197604B (en) | Digital control system and the control method of cutter path Automatic Optimal is realized based on DBF | |
CN111310278B (en) | Ship automatic modeling method based on simulation | |
Hanafy et al. | A modular product multi-platform configuration model | |
EP1880315A1 (en) | Generating a unique representation of physical assets | |
KR19990023526A (en) | Modeling method and apparatus of material processing system | |
EP2483110A1 (en) | Method and system for preparing sensor output data of a sensor assembly for further processing in at least one application and/or by at least one algorithm | |
CN112182406B (en) | Mechanical design scheme recommendation method and device | |
CN114880337B (en) | Map data integrated updating method, device, equipment and storage medium | |
CN101556471A (en) | CAM system of space pipe frame | |
US7496420B2 (en) | Systems and methods for efficiently implementing an N-step manufacturing process for producing a mechanical part | |
CN101645099A (en) | Graphics primitive conversion system and graphics primitive conversion method | |
CN110175047B (en) | Automatic generation method and device of processor instruction codes | |
CN115543927B (en) | Method and device for extracting field information of cost file, equipment and storage medium | |
KR100491723B1 (en) | Method of rendering a digital terrain model in geographic information system | |
CN115587579A (en) | Digital processing system, production system and production method | |
CN113065204B (en) | Hydraulic support cylinder parameterization design method and system | |
CN104850621A (en) | Road-network model automatic generation method | |
CN115239520A (en) | Method and device for eliminating errors of model component, electronic device and storage medium | |
CN105093937A (en) | Building control system design device and method | |
CN104715122A (en) | Method and device for operating meta model example constructed based on train technology demand | |
CN216118443U (en) | SCADA system | |
US20210034711A1 (en) | Method and system with mesh data conversion for stamping dies | |
CN100390732C (en) | Computer system for configuring firmware for an automation device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Open date: 20100210 |