CN114626157A - Entity contour curve extraction method based on digital model - Google Patents
Entity contour curve extraction method based on digital model Download PDFInfo
- Publication number
- CN114626157A CN114626157A CN202210257628.4A CN202210257628A CN114626157A CN 114626157 A CN114626157 A CN 114626157A CN 202210257628 A CN202210257628 A CN 202210257628A CN 114626157 A CN114626157 A CN 114626157A
- Authority
- CN
- China
- Prior art keywords
- contour
- straight line
- fitting
- entity
- curve
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/10—Geometric CAD
- G06F30/17—Mechanical parametric or variational design
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Geometry (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Analysis (AREA)
- Software Systems (AREA)
- Computational Mathematics (AREA)
- Computer Graphics (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Computer Hardware Design (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Generation (AREA)
Abstract
The invention provides a digital model-based entity contour curve extraction method, which comprises the steps of obtaining curve information by reading a curve of an entity, then carrying out surface subdivision, selecting a target plane in any direction after subdividing the curve information into small triangular patches, and projecting all the small triangular patches onto the selected plane; combining all the triangular surfaces into a polygonal contour by adopting a polygonal contour combining algorithm, excluding all the inner contours and reserving the outer contour; a plurality of point sets which are on the same straight line or have a distance from the straight line smaller than the tolerance appear on the outer contour, the points are fitted into a straight line, the start is reserved, and two end points are ended; performing circular arc fitting on the outline subjected to linear fitting to enable the outline to be smooth; inputting the fitted data, and designating a selection plane to generate a solid profile curve characteristic. The method adopts subdivision surfaces and then combines and fits, is suitable for extracting contour curves of entities of any shape, and particularly extracts and processes contour curves of splines or arc surfaces on the maximum contour.
Description
Technical Field
The invention relates to the field of three-dimensional modeling, in particular to a method for extracting an entity contour curve based on a digital model.
Background
When the tooling design or other reference design is carried out, the maximum projection profile curve of the solid part is often required to be obtained, then the cavity can be cut out on the corresponding tooling part to achieve the purpose of matching or proper clearance avoidance, and if the surfaces around the solid part are fewer and simple planes, the maximum profile can be formed by selecting edges one by one. However, in actual design, the surface where the maximum outline of the entity is often encountered is an arc or other spline surface, and the maximum outline edge with the appearance is not available, so that a designer can only complete the process segment by looking at the surface and performing sketch and edge tracing approximation, and the efficiency is very low, the error is large, and the effect is very undesirable. By the method, a maximum outer contour curve with controllable precision can be automatically and quickly generated by selecting the projection plane for other feature designs. Meanwhile, the maximum space profile of the arc shape of the workpiece can be automatically and quickly generated, and the labor intensity of designers is reduced.
Disclosure of Invention
The invention aims to solve the defects in the prior art, and provides a method for extracting a solid contour curve based on a digital model.
In order to achieve the purpose, the invention adopts the following technical scheme:
s1: reading entity curved surface information:
the entity is a three-dimensional part designed by three-dimensional design software and is a part digital model diagram; the curved surface is a track formed by continuous motion of the moving line in space;
reading a required entity and all curved surfaces and curved surface information in the entity on three-dimensional design software by utilizing a design software API;
the curved surface information is the outline of each surface of the curved surface;
the design software API is an application program interface of the design software.
S2: subdividing the curved surface:
subdividing the contour of the processed surface obtained in step S1 into a plurality of small triangular patches;
adopting a design software API, inputting the contour accuracy, subdividing the contour of each surface of the curved surface into a plurality of small triangular patches by the design software API, and subdividing to obtain the number of the small triangular patches reaching the subdivision accuracy requirement;
the profile precision is controlled within a desired precision range in an input mode; the higher the precision is, the more patches are subdivided, the longer the subdivision time is, and the method can be determined according to the actual service condition; the method adopts the design software API to set the contour accuracy, is the prior art, only adopts the software, does not create innovation on the technology, and does not reiterate the technical scheme of how the design software API realizes the contour accuracy and the technical scheme of how the design software API realizes the subdivision of the surface slice.
S3: setting a projected target plane:
one plane in an arbitrary direction is selected as a target plane for setting the projection.
S4: projecting all the small triangular patches to a target plane:
projecting all the small triangular patches obtained in step S2 onto the target plane of step S3;
when each small triangular patch is projected on the target plane, a small projected triangular patch is obtained.
S5: merging small triangular patches:
step S4, when all the small triangular patches are projected to a target plane, the appearance interference phenomenon occurs, and the projections of the small triangular patches are overlapped in a crossed manner;
each small triangular patch consists of 3 points, the coordinates of each point are projected onto a selected plane, and at the moment, the number of the triangular patches projected onto a target plane is large, and appearance interference occurs between every two triangular patches;
and (3) combining all the small projected triangular patches in the step S4 into one or more polygonal contours by adopting a polygonal contour combination algorithm and an open source library clipper, excluding all inner contours and only keeping outer contours.
S6: and (3) straight line fitting:
performing straight line fitting on partial contours which can be fitted in the one or more polygonal outer contours obtained in the step S5 to obtain polygonal contours with straight lines;
the following method was used to determine the partial contour that could be fitted
S61: randomly selecting any point in the outline as a starting point, and carrying out iterative connection on the point and all points on the outline one by one;
s62: comparing from back to front from the counterclockwise direction;
s63: when a point smaller than the tolerance appears in the comparison process, determining the point as an end point;
a plurality of point sets which are in the same straight line or have a distance from the straight line smaller than the tolerance randomly appear on the outer contour after the small triangular surfaces are combined, the point sets are fitted into a straight line, and only two starting and ending end points are reserved;
adjusting the point set of the tolerance according to the subdivision accuracy set in the step S2; the higher the subdivision accuracy selected, the smaller the tolerance range and the fewer the point sets of the tolerance.
S7: arc fitting:
and the contour subjected to straight line fitting is further simplified, in order to enable the contour to be smooth, circular arc fitting needs to be performed again, circular arc fitting is performed on the points which cannot be subjected to straight line fitting in the step S6, circle center coordinates and radiuses which are fitted in a tolerance range are controlled to replace discrete points, and the fitted contour is a smooth curve formed by straight lines and circular arcs.
S8: generating a contour sketch curve:
calling a curve feature generating API of design software, inputting the fitted contour data, and designating the target plane of the projection selected in the step S3 to generate an entity contour curve feature for reference in subsequent processes such as tool cavity cutting or other feature generation.
Preferably, in step S2, the small triangular patch may be further subdivided with precision and chord height of the small triangular patch.
Preferably, the steps S2, S6 and S7 may be subdivided or fitted by adjusting according to the required precision.
Preferably, in step S7, a circle may be fitted by calculating a simulation; the calculation simulation adopts a least square method, so that the radius of a fitting circle can be obtained;
the formula for the calculation is as follows: a series of discrete points are fitted within a tolerance range,
there is a series of projected data points { x }
i
, y
i
}
R2=∑((xi−xc)^2+(yi−yc)^2)/N
Wherein the content of the first and second substances,{ x i , y i }coordinates of the projection points;{ x c , y c }coordinates of the dots; n is the number of discrete points; r is2Is the radius of the fitted circle.
Compared with the prior art, the invention has the following beneficial effects:
1) the method adopts a method of subdividing the surface and then combining and fitting, and is suitable for extracting the contour curve of an entity in any shape, particularly for extracting the contour curve of a spline or a circular arc surface on the maximum contour.
2) The method performs linear and circular fitting on the outer contour after projection combination again to ensure that the generated contour becomes smooth, characteristics such as a boss or a cavity and the like can be generated by subsequently referring to the contour curve, the manufacturability of the generated contour is better, and the diameter of the fitting circular arc can be set to meet the manufacturing equipment with requirements on manufacturing a fillet during fitting.
3) The precision value can be adjusted from subdivision to fitting, and different service requirements with priority on speed or precision can be met.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a schematic view of a subdivision surface;
FIG. 3 is a schematic diagram of a projection patch;
FIG. 4 is a schematic of a line fit;
FIG. 5 is a schematic view of a circular arc fit;
FIG. 6 is a schematic sketch of a contour plot.
Detailed Description
In order to further understand the objects, structures, features, and functions of the present invention, the following embodiments are described in detail.
Referring to fig. 1 to 6, the present invention provides a method for extracting an entity contour curve based on a digital model, which includes the steps of obtaining curved surface information by reading an entity curved surface, subdividing the curved surface into small triangular patches, selecting a projected target plane in any direction, and projecting all the small triangular patches onto the selected plane; combining all the triangular surfaces into one or more polygonal contours by adopting a polygonal contour combining algorithm, and eliminating all the inner contours as long as the outer contours are reserved; a plurality of point sets which are on the same straight line or have a distance from the straight line smaller than the tolerance can randomly appear on the reserved outer contour, the points can be fitted into a straight line, only the initial point is reserved, and the two end points are ended; and then carrying out circular arc fitting on the outline subjected to straight line fitting to enable the outline to be smooth, finally inputting the fitted outline data, and appointing the selected plane to generate an entity outline curve characteristic. The method performs linear and circular fitting on the outer contour after projection combination again to ensure that the generated contour becomes smooth, characteristics such as a boss or a cavity and the like can be generated by subsequently referring to the contour curve, the manufacturability of the generated contour is better, and the diameter of the fitting circular arc can be set to meet the manufacturing equipment with requirements on manufacturing a fillet during fitting.
The present invention has been described in relation to the above embodiments, which are only examples of the implementation of the present invention. It should be noted that the disclosed embodiments do not limit the scope of the invention. Rather, it is intended that all such modifications and variations be included within the spirit and scope of this invention.
Claims (4)
1. A method for extracting an entity contour curve based on a digital model is characterized by comprising the following steps: the steps are as follows:
s1: reading entity curved surface information:
reading required entity and all curved surfaces in the entity and curved surface information on three-dimensional design software by utilizing design software API
S2: subdividing the curved surface:
subdividing the contour of the processing surface in step S1 into a plurality of small triangular patches;
s3: selecting a projection plane:
selecting a plane in any direction, wherein the selected plane is a target plane projected by the subdivided small triangular patch;
s4: projecting all patches to a projection plane:
projecting all the small triangular patches of step S2 onto the target plane of step S3;
s5: merging small triangular patches:
merging all the small triangular faces in the step S4 into one or more polygonal contours;
s6: and (3) straight line fitting:
in step S5, a plurality of point sets which are on the same straight line or have a distance from a straight line smaller than a tolerance randomly appear on the outer contour after the small triangular surfaces are combined, the points can be fitted into a straight line, only the start is reserved, and two end points are ended;
s7: arc fitting:
performing arc fitting on the points which cannot be subjected to the straight line fitting in the step S6 on the outer contour subjected to the straight line fitting in the step S6, and fitting a circle by calculating and simulating, wherein the outer contour subjected to the fitting is a smooth curve formed by a straight line and an arc;
s8: generating a contour sketch curve:
calling a curve feature generating API of design software, inputting the fitted contour data, and designating the selected plane to generate an entity contour curve feature.
2. The method for extracting a solid contour curve based on a digital model as claimed in claim 1, wherein: in step S2, the subdivision accuracy and the chord height of the small triangle patch may be further performed on the small triangle patch.
3. The method for extracting a solid contour curve based on a digital model as claimed in claim 1, wherein: the steps S2, S6, and S7 may be subdivided or fitted by adjusting the precision.
4. The method for extracting a solid contour curve based on a digital model as claimed in claim 1, wherein: the circle may be fitted by calculating a simulation in step S7; the calculation simulation adopts a least square method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210257628.4A CN114626157A (en) | 2022-03-16 | 2022-03-16 | Entity contour curve extraction method based on digital model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210257628.4A CN114626157A (en) | 2022-03-16 | 2022-03-16 | Entity contour curve extraction method based on digital model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114626157A true CN114626157A (en) | 2022-06-14 |
Family
ID=81901618
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210257628.4A Pending CN114626157A (en) | 2022-03-16 | 2022-03-16 | Entity contour curve extraction method based on digital model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114626157A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109271654A (en) * | 2018-07-19 | 2019-01-25 | 平安科技(深圳)有限公司 | The cutting method and device of model silhouette, storage medium, terminal |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104966317A (en) * | 2015-06-04 | 2015-10-07 | 中南大学 | Automatic three-dimensional modeling method based on contour line of ore body |
CN109522635A (en) * | 2018-11-09 | 2019-03-26 | 浙江大学 | A kind of three-dimensional CAD geometric model simplification method |
CN110349252A (en) * | 2019-06-30 | 2019-10-18 | 华中科技大学 | A method of small curvature part actual processing curve is constructed based on point cloud boundary |
CN110675508A (en) * | 2019-09-10 | 2020-01-10 | 长江勘测规划设计研究有限责任公司 | BIM model geometric figure simplification method |
CN112767552A (en) * | 2021-01-25 | 2021-05-07 | 绍兴文理学院 | Support vector machine-based scattered point cloud triangularization method |
-
2022
- 2022-03-16 CN CN202210257628.4A patent/CN114626157A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104966317A (en) * | 2015-06-04 | 2015-10-07 | 中南大学 | Automatic three-dimensional modeling method based on contour line of ore body |
CN109522635A (en) * | 2018-11-09 | 2019-03-26 | 浙江大学 | A kind of three-dimensional CAD geometric model simplification method |
CN110349252A (en) * | 2019-06-30 | 2019-10-18 | 华中科技大学 | A method of small curvature part actual processing curve is constructed based on point cloud boundary |
CN110675508A (en) * | 2019-09-10 | 2020-01-10 | 长江勘测规划设计研究有限责任公司 | BIM model geometric figure simplification method |
CN112767552A (en) * | 2021-01-25 | 2021-05-07 | 绍兴文理学院 | Support vector machine-based scattered point cloud triangularization method |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109271654A (en) * | 2018-07-19 | 2019-01-25 | 平安科技(深圳)有限公司 | The cutting method and device of model silhouette, storage medium, terminal |
CN109271654B (en) * | 2018-07-19 | 2023-04-18 | 平安科技(深圳)有限公司 | Model contour segmentation method and device, storage medium and terminal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7613539B2 (en) | System and method for mesh and body hybrid modeling using 3D scan data | |
KR101250163B1 (en) | Process for creating from a mesh an isotopologic set of parameterized surfaces | |
CN110136072B (en) | Point cloud noise removing method, denoising system, computer device and storage medium | |
US8810571B2 (en) | Methods and systems for generating continuous surfaces from polygonal data | |
KR100914218B1 (en) | System and method for calculating loft surfaces using ?d scan data | |
CN110675508B (en) | BIM model geometric figure simplifying method | |
CN112733318B (en) | Adaptive grid subdivision method, device, equipment and storage medium | |
CN104331933A (en) | Slicing direction self-adaptive rapid selection method | |
CN114626157A (en) | Entity contour curve extraction method based on digital model | |
JP2023527287A (en) | 2. Computer Aided Generative Design with Layer Boundary Determination to Facilitate 5-Axis Rejection Manufacturing Process | |
WO2006097926A2 (en) | Methods and systems for creating and altering cad models | |
CN114429535A (en) | Smooth cutting method and device for triangular mesh curved surface | |
CN111210520A (en) | Reverse forming method and system for physical model | |
JP2007233560A (en) | Method for generating mesh model | |
US20150206342A1 (en) | Methods and Systems for Generating Continuous Surfaces from Polygonal Data | |
CN117340277A (en) | Dual-optical system wind-shielding partition scanning method and device and additive manufacturing equipment | |
CN108763767B (en) | VR engine-oriented large-data-volume IGS industrial model POLYGON conversion method | |
CN109991921B (en) | Smooth B spline track direct generation method | |
EP4092557A1 (en) | Parameterization of digital irregular freeform geometries | |
Shang et al. | Effective re-parameterization and GA based knot structure optimization for high quality T-spline surface fitting | |
CN115170734A (en) | Three-dimensional revolution structure reconstruction method and system based on section slices | |
Navangul et al. | A vertex translation algorithm for adaptive modification of STL file in layered manufacturing | |
CN114549795A (en) | Parameterization reconstruction method, parameterization reconstruction system, parameterization reconstruction medium and parameterization reconstruction equipment for shoe tree curved surface | |
CN109389672B (en) | Processing method of point cloud of reflective workpiece | |
US7890304B2 (en) | Method and system for designing smooth surfaces for vehicle parts |
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 |