CN115828349A - Geometric model processing method and device, electronic equipment and storage medium - Google Patents

Geometric model processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115828349A
CN115828349A CN202310015561.8A CN202310015561A CN115828349A CN 115828349 A CN115828349 A CN 115828349A CN 202310015561 A CN202310015561 A CN 202310015561A CN 115828349 A CN115828349 A CN 115828349A
Authority
CN
China
Prior art keywords
geometric
data
list
point
topological
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
Application number
CN202310015561.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.)
Pera Corp Ltd
Original Assignee
Pera Corp 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 Pera Corp Ltd filed Critical Pera Corp Ltd
Priority to CN202310015561.8A priority Critical patent/CN115828349A/en
Publication of CN115828349A publication Critical patent/CN115828349A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The application relates to a geometric model processing method, a geometric model processing device, electronic equipment and a storage medium. Reading a geometric model file, and acquiring geometric topological data of the geometric model file, wherein the geometric topological data comprises geometric point topological data, geometric line topological data and geometric surface topological data; after the geometric topological data are preprocessed, performing discrete processing according to the preprocessed geometric topological data to obtain part grid data; and generating a result model file according to the part grid data, and generating a geometric model on the web by adopting a corresponding web interface data extraction mode according to the data structure of the result model file. Therefore, the point-line-surface information of the simulation geometric model and the membership between the point-line-surface parts can be acquired, the rendering effect is good, the user interactive pickup operation of the Web interface is well realized, and the processing efficiency of the simulation geometric model is improved.

Description

Geometric model processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a geometric model processing method and apparatus, an electronic device, and a storage medium.
Background
With the continuous maturity and perfection of modern product design and analysis means such as Computer Aided Engineering (CAE) and Computer simulation analysis systems, computer Aided design and analysis technology has become indispensable force in the research and development and technical innovation processes of various manufacturing industries, but the traditional CAD/CAE technology needs to involve a large amount of software and hardware resources, so that the software and hardware resource load is large, and the use of the CAD/CAE technology on a Web cloud simulation platform is a recent emerging technology.
In the related art, the simulation geometric model can be analyzed and interacted on a Web simulation platform, but the current Web simulation platform cannot acquire the membership between point-line-surface parts of the simulation geometric model and cannot acquire geometric point-line information effectively, the rendering effect of the simulation geometric model is poor, and the user interaction pickup operation of a Web interface cannot be realized well.
Disclosure of Invention
In order to solve or partially solve the problems in the related art, the application provides a geometric model processing method, a geometric model processing device, an electronic device and a storage medium, which can acquire point-line-surface information of a simulation geometric model and a subordinate relationship between point-line-surface parts, have a good rendering effect, and well realize user interactive pickup operation of a Web interface.
The first aspect of the present application provides a geometric model processing method, including reading a geometric model file, and obtaining geometric topology data of the geometric model file, where the geometric topology data includes geometric point topology data, geometric line topology data, and geometric plane topology data;
after the geometric topological data are preprocessed, discrete processing is carried out according to the preprocessed geometric topological data to obtain part grid data;
and generating a result model file according to the part grid data, and generating a geometric model on the web by adopting a corresponding web interface data extraction mode according to the data structure of the result model file.
In one embodiment, the reading the geometric model file and obtaining the geometric topology data of the geometric model file includes:
and reading the geometric model file according to a reading mode corresponding to the file format of the geometric model file, and acquiring geometric topological data of the geometric model file.
In one embodiment, the preprocessing the geometric topology data includes:
extracting free geometric topological data in the geometric topological data, and storing the free geometric topological data and the extracted geometric topological data, wherein the free geometric topological data comprises one or more of free point topological data, free line topological data and free surface topological data.
In one embodiment, the performing discrete processing on the geometry topology data after the preprocessing the geometry topology data to obtain the part mesh data includes:
checking and repairing the geometric topological data to obtain repaired geometric topological data;
and performing discrete processing according to the repaired geometric topological data to obtain the part grid data.
In one embodiment, the performing discrete processing according to the preprocessed geometric topological data to obtain part mesh data includes:
performing discrete processing on the geometric line topological data and the geometric surface topological data to obtain first discrete data corresponding to the geometric line topological data and second discrete data corresponding to the geometric surface topological data;
and obtaining the part grid data according to the geometric topological data, the first discrete data and the second discrete data.
In one embodiment, before generating the result model file based on the part mesh data, the method includes:
acquiring a first geometric point coordinate value list and a first geometric point ID number in geometric point topological data;
storing the first geometric point coordinate value list and the first geometric point ID number into a point list.
In one embodiment, the generating a result model file based on the part mesh data previously comprises:
acquiring a first discrete point coordinate list and a first geometric line ID number in the first discrete data, and storing the first point coordinate list and the first geometric line ID number into a line list;
and acquiring a second geometric point coordinate value and a second geometric point ID number in the geometric line topology data, and storing the second geometric point coordinate value and the second geometric point ID number into the point list.
In one embodiment, before generating the result model file based on the part mesh data, the method includes:
acquiring triangular patch data in the second discrete data, and storing the triangular patch data into a patch list;
acquiring a second discrete point coordinate value list and a second geometric line ID number in second discrete data, and storing the second discrete point coordinate value list and the second geometric line ID number in the line list;
and acquiring a third geometric point coordinate value and a third geometric point ID number in the geometric surface topology data, and storing the third geometric point coordinate value and the third geometric point ID number in the point list.
In one embodiment, shared point data, shared line data and shared surface data in the geometric topological data are obtained, the shared point data are stored in the shared point list, the shared line data are stored in the shared line list, and the shared surface data are stored in the shared surface list.
In one embodiment, the geometric topological data is checked and repaired, and geometric topological data with repair failure or discrete failure is obtained;
checking and repairing the geometric topological data to obtain geometric topological data with failed repair or discrete failure;
storing geometric point topology data in the geometric topology data with repair failure or discrete failure into the error point list;
storing geometric line topology data in the geometric topology data of the repair failure or the discrete failure into the error line list;
and storing the geometric surface topology data in the geometric surface topology data with repair failure or discrete failure into an error surface list.
In one embodiment, the triangle patch data includes a number of triangle patches, a list of triangle patch vertex orders, a list of triangle patch vertex normal vectors, a list of triangle patch vertex coordinate values, and a list of triangle patch vertex normalized UV coordinate values.
In one embodiment, the dependencies between the geometric points, geometric lines, geometric surfaces and parts in the geometric topological data are stored in a topological relation set according to the order of recursively traversing the geometric topological data.
In one embodiment, the generating a result model file based on the part mesh data includes:
and generating a result model file according to the point list, the line list, the surface list, the shared point list, the shared line list, the shared surface list, the error point list, the error line list, the error surface list and the topological relation set.
A second aspect of the present application provides a geometric model processing apparatus, including a reading module, configured to read a geometric model file, and obtain geometric topology data of the geometric model file;
the first processing module is used for carrying out discrete processing according to the preprocessed geometric topological data after preprocessing the geometric topological data to obtain part grid data;
and the second processing module is used for generating a result model file according to the part grid data and generating a geometric model on the web by adopting a corresponding web interface data extraction mode according to the data structure of the result model file.
A third aspect of the present application provides an electronic device comprising:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method as described above.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon executable code, which, when executed by a processor of an electronic device, causes the processor to perform the method as described above.
The technical scheme provided by the application can comprise the following beneficial effects:
the geometric model processing method comprises the steps of reading a geometric model file and obtaining geometric topological data of the geometric model file, wherein the geometric topological data comprise geometric point topological data, geometric line topological data and geometric surface topological data; after the geometric topological data are preprocessed, performing discrete processing according to the preprocessed geometric topological data to obtain part grid data;
and generating a result model file according to the part grid data, and generating a geometric model on the web by adopting a corresponding web interface data extraction mode according to the data structure of the result model file. Therefore, the point-line-surface information of the simulation geometric model and the membership between the point-line-surface parts can be acquired, the rendering effect is good, the user interactive pickup operation of the Web interface is well realized, and the processing efficiency of the simulation geometric model is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The above and other objects, features and advantages of the present application will become more apparent by describing in more detail exemplary embodiments thereof with reference to the attached drawings, in which like reference numerals generally represent like parts throughout.
FIG. 1 is a schematic flow chart diagram illustrating a geometric model processing method according to an embodiment of the present application;
FIG. 2 is another schematic flow chart diagram illustrating a geometric model processing method according to an embodiment of the present disclosure;
FIG. 3 is another schematic flow chart diagram illustrating a geometric model processing method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a geometric model processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device shown in an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While embodiments of the present application are illustrated in the accompanying drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms "first," "second," "third," etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
In the related technology, a user can log in a simulation platform on a Web page and upload a geometric model to perform corresponding operation on the geometric model, but the problem that point-line-surface part dependency cannot be selected and the point-line-surface part dependency cannot be obtained in the interactive operation of the geometric model on the Web page at present is solved, the rendering effect of the geometric model is poor, and the interaction between the user and the Web interface cannot be well realized.
In view of the above problems, embodiments of the present application provide a geometric model processing method, which can obtain point-line-plane information of a simulation geometric model and a dependency relationship between point-line-plane parts, has a good rendering effect, and well achieves a user interactive pickup operation on a Web interface.
The technical solutions of the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a geometric model processing method according to an embodiment of the present application.
Referring to fig. 1, a geometric model processing method includes:
in S110, the geometric model file is read, and geometric topology data of the geometric model file is obtained, where the geometric topology data includes geometric point topology data, geometric line topology data, and geometric plane topology data.
In one embodiment, the geometric model file can be read in different reading modes according to the file format of the geometric model file, and geometric topology data of the geometric model file can be obtained. The geometric model file is used for designing and analyzing the model file, the file format of the geometric model file can be step, stp, iges, igs, brep and the like, the geometric model file is read in different reading modes according to the file formats of the received different geometric model files, and the geometric model file is converted into a topological data structure to obtain geometric topological data, so that the geometric model file can be read quickly, efficiently and comprehensively, and the geometric model can be displayed better.
In S120, after the geometric topological data is preprocessed, discrete processing is performed according to the preprocessed geometric topological data, so as to obtain the part mesh data.
In one embodiment, free-geometry topology data in the geometry topology data is extracted and stored, wherein the free-geometry topology data includes one or more of free-point topology data, free-line topology data, and free-surface topology data. Because some free points, free lines or free surfaces exist in the geometric model and are not required by a user, after the geometric model file is converted into geometric topological data, the free geometric topological data existing in the geometric topological data can be identified, namely the free geometric topological data correspond to the topological data of the free points, the free lines and the free surfaces in the geometric model, the free geometric topological data can be extracted and stored in other data storage positions, only the topological data of the required geometric model are reserved, and only the required geometric model can be displayed on the Web cloud simulation platform in this way.
In one embodiment, the geometric topological data is checked and repaired, and the repaired geometric topological data is obtained; and performing discrete processing according to the repaired geometric topological data to obtain part grid data. When the geometric model file is converted into the geometric topological data, the situation of conversion failure or conversion error may exist, so that the converted geometric topological data needs to be checked and repaired, the topological data with conversion failure or conversion error is repaired to obtain the repaired geometric topological data, and then the repaired geometric topological data is subjected to discrete processing to ensure that the obtained part grid data is complete.
In S130, a result model file is generated according to the part mesh data, and a geometric model is generated on the web by using a corresponding web interface data extraction method according to a data structure of the result model file.
In one embodiment, a result model file is generated through the part mesh data, the result model file can be a json file or the like, and a corresponding web interface data extraction mode is adopted according to the data result of the result model file, so that the geometric model is generated on the web.
The geometric model processing method comprises the steps of reading a geometric model file and obtaining geometric topological data of the geometric model file, wherein the geometric topological data comprise geometric point topological data, geometric line topological data and geometric surface topological data; after the geometric topological data are preprocessed, performing discrete processing according to the preprocessed geometric topological data to obtain part grid data; and generating a result model file according to the part grid data, and generating a geometric model on the web by adopting a corresponding web interface data extraction mode according to the data structure of the result model file. Therefore, the point-line-surface information of the simulation geometric model and the membership between the point-line-surface parts can be acquired, the rendering effect is good, the user interactive pickup operation of the Web interface is well realized, and the processing efficiency of the simulation geometric model is improved.
Fig. 2 is another schematic flow chart of a geometric model processing method according to an embodiment of the present application.
Referring to fig. 2, a geometric model processing method includes:
in S210, the geometric model file is read, and geometric topology data of the geometric model file is acquired.
In one embodiment, the data of the geometric model files of step, stp, iges, igs, brep may be acquired through an OCCT (Open ca scan Technology) technique, and the data of the geometric model files may be converted into geometric topology data.
In S220, the geometric line topology data and the geometric surface topology data are subjected to discrete processing, so as to obtain first discrete data corresponding to the geometric line topology data and second discrete data corresponding to the geometric surface topology data.
In one embodiment, after discretizing the geometric line and the geometric surface in the geometric model, corresponding first discretization data and second discretization data can be obtained, wherein the first discretization data comprises data of the discretization line of the geometric line and data of the discretization point on the geometric line, and the second discretization data comprises data of the discretization of the geometric surface, and data of the discretization of the geometric line and data of the discretization point of the geometric line on the geometric surface.
In S230, a first geometric point coordinate value list and a first geometric point ID number in the geometric point topology data are acquired; the first geometric point coordinate value list and the first geometric point ID number are stored into the point list.
In one embodiment, the coordinate values of all geometric points, such as (x, y, z), and the point ID numbers corresponding to all geometric points are obtained, each point has a specific point ID number, and the coordinate values and the ID numbers of the geometric points are stored in a point list, which includes the coordinate values and ID numbers of all geometric points.
In S240, a first discrete point coordinate list and a first geometric line ID number in the first discrete data are obtained, and the first discrete point coordinate list and the first geometric line ID number are stored in the line list; and acquiring a second geometric point coordinate value and a second geometric point ID number in the geometric line topological data, and storing the second geometric point coordinate value and the second geometric point ID number into the point list.
In one embodiment, after a geometric line is discretized, a large number of discrete points can exist on a discrete line corresponding to the geometric line, the geometric line has a dedicated line ID number, the coordinates of all the discrete points on the discrete line can be obtained, and a first discrete point coordinate list is generated, wherein the first discrete point coordinate list can be [ x1, y1, z1, x2, y2, z2, \8230, xn, yn, zn ], the first discrete point coordinate list and a first geometric line ID number are stored in a line list, and the line list contains all data of the geometric line; and the coordinate values of the geometric points of the two end points on the geometric line and the corresponding ID numbers of the geometric points can be stored in the point list.
In S250, triangular patch data in the second discrete data is obtained, and the triangular patch data is stored in the patch list; acquiring a second discrete point coordinate value list and a second geometric line ID number in the second discrete data, and storing the second discrete point coordinate value list and the second geometric line ID number in the line list; and acquiring a third geometric point coordinate value and a third geometric point ID number in the geometric surface topology data, and storing the third geometric point coordinate value and the third geometric point ID number in the point list.
In one embodiment, the discretized surface is formed by combining a large number of triangular patches, so that the data of the triangular patches can be obtained and stored into a face list, wherein the face list contains the data of all the triangular patches, and the data of the triangular patches comprise the number of the triangular patches, a triangular patch vertex sequence list, a triangular patch vertex normal vector list, a triangular patch vertex coordinate value list and a triangular patch vertex normalization UV coordinate value list.
In one embodiment, the method comprises the steps of obtaining the number of triangular patches, a sorted list of triangular patch vertex ID numbers, a list of vertex coordinate values [ x1, y1, z1, x2, y2, z2, \ 8230;, xn, yn, zn ], a list of vertex normalized UV coordinate values [ u1, v1, u2, v2, \ 8230;, un, vn ], a list of vertex normal vector values [ nx1, ny1, nz1, nx2, ny2, nz2, \ 8230;, nxn, nyn, nzn ], wherein the normalized UV coordinate values of the triangular patch vertices are obtained by normalizing UV values of the triangular patch vertices in geometric data, and then storing the triangular patch data in a face list; the geometric surface comprises geometric lines, after the geometric surface is dispersed, the geometric lines on the geometric surface are dispersed at the same time, so that discrete line data corresponding to the geometric lines on the geometric surface can be obtained, the discrete line data comprise a second discrete point coordinate value list and a second geometric line ID number, and the second discrete point coordinate value list and the second geometric line ID number are stored in a line list; the geometric surface includes geometric points, and the coordinate values of the geometric points and the ID numbers of the geometric points can be stored in a point list.
In S260, shared point data, shared line data, and shared surface data in the geometric topological data are obtained, and the shared point data is stored in the shared point list, the shared line data is stored in the shared line list, and the shared surface data is stored in the shared surface list.
In one embodiment, in the geometric model, there may be geometric situations where two or more geometric lines share the same geometric point, two or more geometric planes share the same geometric line, two geometric bodies or two or more geometric bodies share the same geometric plane, and so on, and therefore according to the geometric topology data structure and the point-line-plane part dependency thereof, shared point data, shared line data, and shared plane data in the geometric topology data may be obtained, and the shared point data is stored in the shared point list, the shared line data is stored in the shared line list, and the shared plane data is stored in the shared plane list.
In S270, the geometric topological data is checked and repaired, and geometric topological data with repair failure or discrete failure is obtained; storing geometric point topology data in the geometric topology data with repair failure or discrete failure into an error point list; storing geometric line topology data in the geometric topology data with repair failure or discrete failure into an error line list; and storing the geometric surface topology data in the geometric surface topology data with repair failure or discrete failure into an error surface list.
In one embodiment, the geometric topological data can be checked and repaired, and the geometric topological data with repair failure or discrete failure is obtained; and respectively storing geometric point topology data, geometric line topology data and geometric surface topology data in the geometric topology data with failed repair or discrete failure into an error point list, an error line list and an error surface list. When the geometric topological data are dispersed, the condition of dispersion failure or dispersion error may occur, so that the geometric topological point data, the geometric topological line data and the geometric topological surface data can be checked and repaired by using the OCCT, and after the geometric topological point data, the geometric topological line data and the geometric topological surface data are repaired, the geometric point ID number in the geometric topological point data, the geometric line ID number in the geometric topological line data and the geometric surface ID number in the geometric surface topological data which are failed to be repaired can be respectively stored in an error point list, an error line list and an error surface list.
In S280, the dependencies among the geometric points, geometric lines, geometric surfaces, and parts in the geometric topology data are stored in the topological relation set according to the order of recursively traversing the geometric topology data.
In S290, a result model file is generated according to the point list, the line list, the plane list, the sharing point list, the sharing line list, the sharing plane list, the error point list, the error line list, the error plane list, and the topology relationship set.
In one embodiment, the point list includes data information of all geometric points in the geometric model, the line list includes data information of all geometric lines in the geometric model, the surface list includes data information of all geometric surfaces in the geometric model, the error point list includes ID numbers of error geometric points in the geometric model, the error line list includes ID numbers of error geometric lines in the geometric model, the error surface list includes ID numbers of error geometric surfaces in the geometric model, the shared point list includes data information of shared geometric points in the geometric model, the shared line list includes data information of shared geometric lines in the geometric model, the shared surface list includes data information of shared geometric surfaces in the geometric model, the topological relation set includes dependency relationships between part point points in the geometric model, so that the point list, the line list, the surface list, the error point list, the error line list, the shared point list, the shared line list, the shared surface list, the topological relation set including dependency relationships between part point points in the geometric model, the result generation file can be sent to the cloud platform, or the platform can perform interaction with the point simulation platform, and the platform can perform interaction with the point.
The geometric model processing method comprises the steps of reading a geometric model file and obtaining geometric topological data of the geometric model file, wherein the geometric topological data comprise geometric point topological data, geometric line topological data and geometric surface topological data; after the geometric topological data are preprocessed, performing discrete processing according to the preprocessed geometric topological data to obtain part grid data; and generating a result model file according to the part grid data, and generating a geometric model on the web by adopting a corresponding web interface data extraction mode according to the data structure of the result model file. Therefore, the point-line-surface information of the simulation geometric model and the membership between the point-line-surface parts can be acquired, the rendering effect is good, the user interactive pickup operation of the Web interface is well realized, and the processing efficiency of the simulation geometric model is improved.
Fig. 3 is a schematic flow chart of another geometric model processing method according to the present application.
Referring to fig. 3, the geometric model processing method includes:
in S301, a geometric model file is read, where the geometric model file may be a step file, an stp file, an iges file, an igs file, a brep file, or the like, and geometric topology data of the geometric model file is obtained.
In S302, points, lines, and surfaces that are not needed in the filtering geometric model may be selected, i.e., free point topology data, free line topology data, and free surface topology data may be filtered.
In S303, the geometric topology data is checked and repaired, and ID number data corresponding to the point-line plane having the problem is stored.
In S304, topological data corresponding to all parts in the geometric model is obtained.
In S305, a suitable discrete coefficient is selected according to different geometric models, and the topological data of the geometric models are iteratively traversed.
In S306, the part mesh data is determined.
In S307, the parent ID number of one part I in the geometric model and the discrete mesh information corresponding to the part I are acquired.
In S3071, the ID numbers and coordinate information of all the geometric points in the part I, for example, coordinate values (x, y, z) of the point a, are acquired and stored into a point list.
In S3072, the ID numbers of all the geometric lines in the part I and the coordinate information of the discrete points on the discrete lines after the geometric lines are discrete are obtained, and a point coordinate value list [ x1, y1, z1, x2, y2, z2, \ 8230;, xn, yn, zn ] is formed according to the coordinate values of the discrete points and stored in the line list.
In S308, the line ID numbers of the geometric lines on all the geometric faces in the part I, the coordinate value list [ x1, y1, z1, x2, y2, z2, \8230;, xn, yn, zn ], the number of triangular patches, the ordered list [ n1, n2, n3, n4, n5, n6, \8230;, nn ], the angular patch vertex normal vector list [ nx1, ny1, nz1, nx2, ny2, nz2, \8230;, nxn, nyn, nzn ], the triangular patch vertex coordinate value list [ x1, y1, z1, x2, y2, z2, < 8230;, xn, yn, zn ], and the triangular patch vertex list [ u1, v1, u2, v2, \\\ 8230n ], the line ID numbers of the geometric lines on all the geometric faces in the part I, and the triangular patch ID numbers, the coordinate value list [ x1, y2, \\\\\\\\\ n ], are obtained, and the data of the triangular patch vertex coordinates are stored.
In S309, the point list, the line list, and the surface list are output to the json data structure, where the part mesh data further includes bounding box information, shared point data, shared line data, and shared surface data in the geometric topology data, the name, hierarchy, parent ID data of the part i, and geometric topology point data, geometric topology line data, and geometric topology surface data of the repair failure, and the process returns to step S306.
In S310, the system outputs a json file.
Another embodiment of the present application is as follows.
Reading a step or stp or iges or igs or brep geometric model file, then converting the geometric model into a geometric topological structure inside the OCCT, and recursively traversing each branch structure of the geometric topological structure for data processing and saving.
Step, for example, for an assembly consisting of point a, line B, face C, shell D, cube E, and assembly F, where assembly F consists of a cylinder G and a sphere H.
1. Reading a geometric model to select a proper discrete coefficient, calculating the discrete coefficient through a bounding box, dispersing the geometric model to obtain part grid information, recursively identifying the part information of the whole geometric model according to the storage sequence of data in a geometric model file, firstly identifying a point A, storing the name, ID (identity) number and other information of the point A into an object sequential container, and storing coordinate values (x, y, z) of the point A and the ID number into a point list.
2. The name, ID number and other information of the line B are acquired and stored in the objects sequential container, and a point coordinate value list [ x1, y1, z1, x2, y2, z2, \8230;, xn, yn, zn ] of the points on the line B is stored in the line list, and the point coordinate values (x, y, z) and the point ID number on the line B are stored in the point list.
3. The name, ID number and other information of the face C are obtained and stored in an object sequential container, the ID number of the face C and the number of the triangle patches contained after the face C is dispersed, a list [ n1, n2, n3, n4, n5, n6, \8230, nn ] of vertex normal vectors [ nx1, ny1, nz1, nx2, ny2, nz2, \8230, nxn, nyn, nzn ], a list [ u1, v1, u2, v2, \8230, un, vn ], a list [ x1, y1, z1, x2, y2, z2, \8230;, xn, yn, zn ] of vertex normalized UV coordinate values of the triangle patches are stored in a face list, and the list [ x1, y1, z1, x2, y2, z2, \ 8230, xn, yn ] of vertex coordinates of the face C and the line ID number of the triangle patches and the dispersed coordinate values [ x1, y1, x2, y2, z2, \\\\\ z2, 8230, x2, x, zn ] are stored in the face list.
4. The name, ID number and other information of the shell D are acquired and stored in an objects sequential container, the ID number of each geometric surface contained in the shell D and the number of triangle patches contained after each geometric surface is dispersed, a list [ n1, n2, n3, n4, n5, n6, \ 8230, nn ] of vertex normal vectors [ nx1, ny1, nz1, nx2, ny2, nz2, \ 8230;, nxn, nyn, nzn ], a list [ u1, v1, u2, v2, \\ \ un, vn ] of vertex normalized UV coordinate values of each triangle patch [ x1, y1, z1, x2, y2, z2, \\\ 8230, xn, yn, zn ] is stored in a list of vertex values [ x1, y1, z1, x2, y2, z2, \\\ 8230, xn, yn, zn ], and the coordinate values of each vertex list [ x1, y2, z2, \\\\\\\\ of the coordinate values of each triangle patch [ x1, y2, z ] are stored in a list of vertex coordinates of each triangle patch D, and the list [ x1, y2, z ] of each coordinate values of the coordinate values of each vertex lines and the coordinate values of each point ID number and each point ID number of each point contained in the list [ x1, x, z ] are stored in a list of each triangle patch.
5. Obtaining and storing cube E name, ID number and other information into objects sequential container, sorting list [ n1, n2, n3, n4, n5, n6, \ 8230, nn ] of each geometric face ID number contained in cube E and the number of triangle patches contained in the corresponding discrete face, triangle patch vertex ID number, list [ nx1, ny1, nz1, nx2, ny2, nz2, \ 8230, nxn, nyn, nzn ] of each triangle patch, list [ u1, v1, u2, v2 ] of normalized UV coordinate value of each vertex of each triangle patch, 8230, un, vn, and vertex coordinate value lists [ x1, y1, z1, x2, y2, z2, \8230, xn, yn, zn ] of the triangular patches are stored in the face lists, the ID numbers of the geometric lines included in the cube E and the point coordinate value lists [ x1, y1, z1, x2, y2, z2, \8230, xn, yn, zn ] on the geometric lines after the geometric lines are dispersed are stored in the line lists, and the geometric point coordinate values (x, y, z) and the ID numbers included in the cube E are stored in the point lists through the geometric point reading and storing module.
6. Obtaining and storing the name, ID number and other information of an assembly F into an objects sequential container, wherein the assembly F comprises a cylinder G and a sphere H, the ID numbers of all geometrical surfaces contained in the cylinder G and the sphere H, the number of triangular patches contained in all geometrical surfaces, and a sorted list [ n1, n2, n3, n4, n5, n6, \ 8230;, nn ] of vertex normal vector lists [ nx1, ny1, nz1, nx2, ny2, nz2, \ 8230 ], nxn, nyn, nzn ] of vertex normalized UV coordinate values of all triangular patches [ u1, v1, u2, v2, \8230;, un, vn;, each vertex coordinate value list [ x1, y1, z1, x2, y2, z2, \8230;, xn, yn, zn ] of each triangular patch is stored in a face list, each geometric line ID number included in each of the cylinder G and the sphere H and each point coordinate value list [ x1, y1, z1, x2, y2, z2, \8230;, xn, yn, zn ] on the geometric line after each geometric line is discretized are stored in a line list, each geometric point coordinate value (x, y, z) and each ID number included in each of the cylinder G and the sphere H are stored in a point list.
7. The geometric points, geometric lines and geometric surfaces of the parts are checked and repaired by using OCCT, and the ID numbers of the geometric surfaces, the ID numbers of the geometric lines and the ID numbers of the geometric points which fail in repair or discrete failure are stored in a system; and acquiring the data of the sharing point, the data of the sharing line and the data of the sharing surface after the parts are scattered, and storing the ID number of the sharing point, the ID number of the sharing line and the ID number of the sharing surface into a system.
8. And outputting the data stored in the steps to a json file.
It can be seen from this embodiment that, in the method provided in the embodiment of the present application, data obtained after each part is dispersed is obtained by recursively traversing each part in the geometric model topology, and the data is stored in a point list, a line list, and a plane list, respectively, and finally a json file is generated. Therefore, the point-line-surface information of the simulation geometric model and the membership between the point-line-surface parts can be acquired, the rendering effect is good, the user interactive pickup operation of the Web interface is well realized, and the processing efficiency of the simulation geometric model is improved.
Corresponding to the embodiment of the application function implementation method, the application also provides a device of the geometric model processing method, electronic equipment and a corresponding embodiment.
Fig. 4 is a schematic structural diagram of a geometric model processing apparatus according to an embodiment of the present application.
Referring to fig. 4, a geometric model processing apparatus 40 includes a reading module 410, a first processing module 420, and a second processing module 430.
The reading module 410 is configured to read the geometric model file and obtain geometric topology data of the geometric model file, where the geometric topology data includes geometric point topology data, geometric line topology data, and geometric plane topology data.
The first processing module 420 is configured to, after the geometric topological data is preprocessed, perform discrete processing according to the preprocessed geometric topological data to obtain part mesh data.
And the second processing module 430 is configured to generate a result model file according to the part mesh data, and generate a geometric model on the web by using a corresponding web interface data extraction manner according to a data structure of the result model file.
In an embodiment, the reading module 410 reads the geometric model file according to a reading mode corresponding to a file format of the geometric model file, and obtains geometric topology data of the geometric model file.
In one embodiment, the first processing module 420 extracts free geometry topology data from the geometry topology data, and stores the free geometry topology data and the extracted geometry topology data, wherein the free geometry topology data includes one or more of free point topology data, free line topology data, and free surface topology data; checking and repairing the geometric topological data to obtain repaired geometric topological data; performing discrete processing according to the repaired geometric topological data to obtain part grid data; performing discrete processing on the geometric line topological data and the geometric surface topological data to obtain first discrete data corresponding to the geometric line topological data and second discrete data corresponding to the geometric surface topological data; and obtaining part grid data according to the geometric topological data, the first discrete data and the second discrete data.
In one embodiment, the second processing module 430 obtains a first geometric point coordinate value list and a first geometric point ID number in the geometric point topology data; storing the first geometric point coordinate value list and the first geometric point ID number into the point list; acquiring a first discrete point coordinate list and a first geometric line ID number in first discrete data, and storing the first discrete point coordinate list and the first geometric line ID number in a line list; acquiring a second geometric point coordinate value and a second geometric point ID number in the geometric line topological data, and storing the second geometric point coordinate value and the second geometric point ID number in a point list; acquiring triangular patch data in the second discrete data, and storing the triangular patch data into a patch list; acquiring a second discrete point coordinate value list and a second geometric line ID number in the second discrete data, and storing the second discrete point coordinate value list and the second geometric line ID number in the line list; acquiring a third geometric point coordinate value and a third geometric point ID number in the geometric surface topology data, and storing the third geometric point coordinate value and the third geometric point ID number in a point list; acquiring shared point data, shared line data and shared surface data in the geometric topological data, storing the shared point data into a shared point list, storing the shared line data into a shared line list, and storing the shared surface data into a shared surface list; checking and repairing the geometric topological data to obtain the geometric topological data with failed repair or discrete failure; storing geometric point topology data in the geometric topology data with repair failure or discrete failure into an error point list; storing geometric line topology data in the geometric topology data with repair failure or discrete failure into an error line list; storing geometric surface topology data in the geometric topology data with repair failure or discrete failure into an error surface list; and generating a result model file according to the point list, the line list and the surface list, the shared point list, the shared line list, the shared surface list, the error point list, the error line list, the error surface list and the topological relation set.
According to the technical scheme of the embodiment of the application, the geometric model file is read, and geometric topological data of the geometric model file are obtained, wherein the geometric topological data comprise geometric point topological data, geometric line topological data and geometric surface topological data; after the geometric topological data are preprocessed, performing discrete processing according to the preprocessed geometric topological data to obtain part grid data; and generating a result model file according to the part grid data, and generating a geometric model on the web by adopting a corresponding web interface data extraction mode according to the data structure of the result model file. Therefore, the point-line-surface information of the simulation geometric model and the membership between the point-line-surface parts can be acquired, the rendering effect is good, the user interactive pickup operation of the Web interface is well realized, and the processing efficiency of the simulation geometric model is improved.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated herein.
Fig. 5 is a schematic structural diagram of an electronic device shown in an embodiment of the present application.
Referring to fig. 5, the electronic device 500 includes a memory 510 and a processor 520.
The Processor 520 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 510 may include various types of storage units, such as system memory, read Only Memory (ROM), and permanent storage. Wherein the ROM may store static data or instructions for the processor 520 or other modules of the computer. The persistent storage device may be a read-write storage device. The persistent storage may be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered off. In some embodiments, the persistent storage device employs a mass storage device (e.g., magnetic or optical disk, flash memory) as the persistent storage device. In other embodiments, the permanent storage may be a removable storage device (e.g., floppy disk, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as a dynamic random access memory. The system memory may store instructions and data that some or all of the processors require at runtime. Further, the memory 510 may comprise any combination of computer-readable storage media, including various types of semiconductor memory chips (e.g., DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic and/or optical disks, as well. In some embodiments, memory 510 may include a removable storage device that is readable and/or writable, such as a Compact Disc (CD), a digital versatile disc read only (e.g., DVD-ROM, dual layer DVD-ROM), a Blu-ray disc read only, an ultra-dense disc, a flash memory card (e.g., SD, min SD, micro-SD, etc.), a magnetic floppy disk, or the like. Computer-readable storage media do not contain carrier waves or transitory electronic signals transmitted by wireless or wired means.
The memory 510 has stored thereon executable code that, when processed by the processor 520, may cause the processor 520 to perform some or all of the methods described above.
Furthermore, the method according to the present application may also be implemented as a computer program or computer program product comprising computer program code instructions for performing some or all of the steps of the above-described method of the present application.
Alternatively, the present application may also be embodied as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) having executable code (or a computer program or computer instruction code) stored thereon, which, when executed by a processor of an electronic device (or server, etc.), causes the processor to perform part or all of the steps of the above-described methods according to the present application.
The foregoing description of the embodiments of the present application has been presented for purposes of illustration and description and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (16)

1. A geometric model processing method, characterized by:
reading a geometric model file, and acquiring geometric topological data of the geometric model file, wherein the geometric topological data comprises geometric point topological data, geometric line topological data and geometric surface topological data;
after the geometric topological data are preprocessed, discrete processing is carried out according to the preprocessed geometric topological data to obtain part grid data;
and generating a result model file according to the part grid data, and generating a geometric model on the web by adopting a corresponding web interface data extraction mode according to the data structure of the result model file.
2. The method according to claim 1, wherein the reading a geometric model file and obtaining geometric topology data of the geometric model file comprises:
and reading the geometric model file according to a reading mode corresponding to the file format of the geometric model file, and acquiring geometric topological data of the geometric model file.
3. The method of claim 1, wherein the pre-processing the geometric topology data comprises:
extracting free geometric topological data in the geometric topological data, and storing the free geometric topological data and the extracted geometric topological data, wherein the free geometric topological data comprises one or more of free point topological data, free line topological data and free surface topological data.
4. The method according to claim 1, wherein the preprocessing the geometric topological data and then performing discrete processing according to the preprocessed geometric topological data to obtain part mesh data comprises:
checking and repairing the geometric topological data to obtain repaired geometric topological data;
and performing discrete processing according to the repaired geometric topological data to obtain the part grid data.
5. The method according to claim 1, wherein the performing discrete processing according to the preprocessed geometric topological data to obtain part mesh data comprises:
performing discrete processing on the geometric line topology data and the geometric surface topology data to obtain first discrete data corresponding to the geometric line topology data and second discrete data corresponding to the geometric surface topology data;
and obtaining the part grid data according to the geometric topological data, the first discrete data and the second discrete data.
6. The method of claim 5, prior to generating a result model file from the part mesh data, comprising:
acquiring a first geometric point coordinate value list and a first geometric point ID number in the geometric point topology data;
storing the first geometric point coordinate value list and the first geometric point ID number into a point list.
7. The method of claim 6, prior to generating a result model file from the part mesh data, further comprising:
acquiring a first discrete point coordinate list and a first geometric line ID number in the first discrete data, and storing the first discrete point coordinate list and the first geometric line ID number in a line list;
and acquiring a second geometric point coordinate value and a second geometric point ID number in the geometric line topology data, and storing the second geometric point coordinate value and the second geometric point ID number into the point list.
8. The method of claim 7, prior to generating a result model file from the part mesh data, further comprising:
acquiring triangular patch data in the second discrete data, and storing the triangular patch data into a patch list;
acquiring a second discrete point coordinate value list and a second geometric line ID number in the second discrete data, and storing the second discrete point coordinate value list and the second geometric line ID number in the line list;
and acquiring a third geometric point coordinate value and a third geometric point ID number in the geometric surface topology data, and storing the third geometric point coordinate value and the third geometric point ID number in the point list.
9. The method of claim 8, wherein:
the triangular patch data comprises a triangular patch number, a triangular patch vertex sequence list, a triangular patch vertex normal vector list, a triangular patch vertex coordinate value list and a triangular patch vertex normalization UV coordinate value list.
10. The method of claim 8, further comprising:
and acquiring shared point data, shared line data and shared surface data in the geometric topological data, storing the shared point data into a shared point list, storing the shared line data into a shared line list, and storing the shared surface data into a shared surface list.
11. The method of claim 10, further comprising:
checking and repairing the geometric topological data to obtain geometric topological data with failed repair or discrete failure;
storing geometric point topology data in the geometric topology data with repair failure or discrete failure into an error point list;
storing geometric line topology data in the geometric topology data with repair failure or discrete failure into an error line list;
and storing the geometric surface topology data in the geometric surface topology data with repair failure or discrete failure into an error surface list.
12. The method of claim 11, further comprising:
and storing the dependency relationships among the geometric points, the geometric lines, the geometric surfaces and the parts in the geometric topological data into a topological relationship set according to the sequence of recursively traversing the geometric topological data.
13. The method of claim 12, wherein generating a result model file based on the part mesh data comprises:
and generating a result model file according to the point list, the line list, the surface list, the shared point list, the shared line list, the shared surface list, the error point list, the error line list, the error surface list and the topological relation set.
14. A geometric model processing apparatus, comprising:
the reading module is used for reading a geometric model file and acquiring geometric topological data of the geometric model file, wherein the geometric topological data comprises geometric point topological data, geometric line topological data and geometric surface topological data;
the first processing module is used for carrying out discrete processing according to the preprocessed geometric topological data after preprocessing the geometric topological data to obtain part grid data;
and the second processing module is used for generating a result model file according to the part grid data and generating a geometric model on the web by adopting a corresponding web interface data extraction mode according to the data structure of the result model file.
15. An electronic device, comprising:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method of any one of claims 1-13.
16. A computer-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the method of any one of claims 1-13.
CN202310015561.8A 2023-01-06 2023-01-06 Geometric model processing method and device, electronic equipment and storage medium Pending CN115828349A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310015561.8A CN115828349A (en) 2023-01-06 2023-01-06 Geometric model processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310015561.8A CN115828349A (en) 2023-01-06 2023-01-06 Geometric model processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115828349A true CN115828349A (en) 2023-03-21

Family

ID=85520233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310015561.8A Pending CN115828349A (en) 2023-01-06 2023-01-06 Geometric model processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115828349A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118013770A (en) * 2024-04-10 2024-05-10 成都飞机工业(集团)有限责任公司 Discrete grid patch geometric topological relation reconstruction method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118013770A (en) * 2024-04-10 2024-05-10 成都飞机工业(集团)有限责任公司 Discrete grid patch geometric topological relation reconstruction method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
JP6855535B2 (en) Simulation data optimization methods, devices, storage media and programs
WO2019188040A1 (en) Image processing device, image processing method, and image processing program
US20170154127A1 (en) Efficient packing of objects
US7414624B2 (en) Apparatus and method for a frustum culling algorithm suitable for hardware implementation
Wiseman et al. When an inescapable accident of autonomous vehicles is looming
CN111897660B (en) Model deployment method, model deployment device and terminal equipment
CN115828349A (en) Geometric model processing method and device, electronic equipment and storage medium
CN114565548A (en) Industrial defect identification method, system, computing device and storage medium
Park et al. Segmentation of Lidar data using multilevel cube code
Jakob et al. Parallel globally consistent normal orientation of raw unorganized point clouds
CN117391011A (en) Method and device for realizing graphic Boolean processing in hierarchical layout verification
CN116543134B (en) Method, device, computer equipment and medium for constructing digital twin model
CN115830180A (en) Optimization method and device applied to geometric data, electronic equipment and storage medium
CN116843983A (en) Pavement disease recognition method, model training method, electronic equipment and medium
CN113807472B (en) Hierarchical target detection method and device
CN115272552A (en) Model rendering method and device
CN114596420A (en) Laser point cloud modeling method and system applied to urban brain
CN110119721B (en) Method and apparatus for processing information
CN113298822A (en) Point cloud data selection method and device, equipment and storage medium
US8514223B2 (en) Apparatus and method for generating three-dimensional model data
JP7038918B2 (en) Inspection equipment, inspection program and inspection method
US10977861B1 (en) Inferring quality in point cloud-based three-dimensional objects using topographical data analysis
US20210327134A1 (en) Automated component design extraction
US20210334426A1 (en) Section measurement system
Smith et al. Adapting Robotics Vision Algorithms for Space Rated FPGAs

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