Front-end-based three-dimensional model section cutting plane geometric analysis method and device
By generating the collision surface and analysis line segment, the polygon is formed and determined its attribute information, the problem of unable to automatically analyze the three -dimensional geological model sectional length and area in the existing technology, and realize the precise identification and accurate identification and the geometric analysis of the front -end three -dimensional model cutting surface cutting surface. calculate.
Patent Information
- Application Number
- CN202411952069.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-12-27
AI Technical Summary
The prior art cannot directly and automatically analyze and calculate the perimeter and area of the entity part in the front-end section analysis of the three-dimensional geological model.
By generating multiple collisions, the line segments obtained from the collision between the three -dimensional model and the target collision surface are formed to form polygon, and their attribute information is determined, including geometric measurement and depth values to achieve three -dimensional model cutting geometric analysis.
The digital analysis of arbitrarily cutting surface of the 3D model at the front end, accurately identify the types and geometry of the target geometric area, and solve the problem that the cutting surface length and area cannot be directly calculated in the existing technology.
Smart Images

Figure CN119359788A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of three-dimensional measurement, and in particular to a front-end-based three-dimensional model section surface geometry analysis method and device. Background Art
[0002] In the field of 3D measurement, new 3D models will be cut to help users explore the internal structure. Taking the 3D geological model as an example, the existing technology provides a 3D geological model online cutting and mapping method, which loads the 3D geological model to the front end (including but not limited to web pages, browsers and clients, etc.), and generates a cutting area through the intersection of the cutting surface of the model and the model through the user's point-selection operation. The spatial point information of the cutting area is extracted and a CAD standard drawing format file is generated, thereby realizing the generation of geological model section vector drawings, which is convenient for later manual inspection and modification.
[0003] As for the existing model sectioning related methods, especially the front-end sectioning integration method, there is no method directly integrating the area and perimeter measurement. Even if the three-dimensional geological model provided by the prior art is described in the online sectioning mapping method, a sectioning vector map can be generated, and there are corresponding methods in the software to map the area or perimeter of the specified selected area, but in the actual sectioning surface, the area enclosed by the contour is partly a solid, and partly a void, so the prior art does not have the function of automatically analyzing and calculating the perimeter and area of the solid part directly at the front end. Summary of the invention
[0004] The present application provides a front-end-based three-dimensional model section surface geometry analysis method and device, the purpose of which is to achieve front-end three-dimensional model section surface geometry analysis.
[0005] In order to achieve the above objectives, this application provides the following technical solutions:
[0006] A front-end-based three-dimensional model section geometry analysis method, comprising:
[0007] Generate multiple collision surfaces based on the front-end 3D model;
[0008] Generate multiple line segment groups based on multiple line segments obtained by the collision between the three-dimensional model and a target collision surface; the target collision surface is a collision surface specified by a user to serve as a model cutting plane; the line segments are intersection line segments between triangular facets of the target collision surface and triangular facets of the three-dimensional model;
[0009] Based on the plurality of line segment groups, generating a plurality of polygons;
[0010] Determining attribute information of the plurality of polygons; the attribute information comprising at least a geometric metric and a depth value;
[0011] Based on the attribute information of the target polygon that meets the target condition among the multiple polygons, the geometric measurement of the target geometric area is determined.
[0012] Optionally, multiple collision surfaces are generated based on the front-end 3D model, including:
[0013] Obtain the three-dimensional model of the front-end input;
[0014] Constructing a spatial data structure for the three-dimensional model to obtain a corresponding bounding box;
[0015] Based on the bounding box, collision surfaces corresponding to multiple spatial directions are generated; the multiple spatial directions include an X direction, a Y direction, and a Z direction in a three-dimensional coordinate system; and the size of the collision surface is determined based on the size of the bounding box.
[0016] Optionally, based on a plurality of line segments obtained by the collision between the three-dimensional model and the target collision surface, a plurality of line segment groups are generated, including:
[0017] Determining a target collision surface in the front end that responds to a user input;
[0018] Performing template buffering on the three-dimensional model to obtain a buffer model;
[0019] The target collision surface collides with the three-dimensional model to obtain a plurality of line segments; wherein the collision process uses a template buffer for sectioning rendering, and simultaneously constructs a spatial data structure for the three-dimensional model after the collision, and hides a portion of the three-dimensional model after the collision located on one side of the target collision surface to display a corresponding section view;
[0020] According to a connected component algorithm, the plurality of line segments are classified to obtain at least one line segment group.
[0021] Optionally, based on the plurality of line segment groups, a plurality of polygons are generated, including:
[0022] For each of the line segment groups, selecting an initial line segment from the line segment group;
[0023] Based on a preset connectivity rule, determining the connectivity relationship between the initial line segment and other line segments in the line segment group; the preset connectivity rule is: directly or indirectly connecting with both ends of the initial line segment according to the direction of the initial line segment;
[0024] Arranging the initial line segment and the other line segments according to the connectivity relationship to obtain an ordered curve;
[0025] Based on the obtained multiple ordered curves, generate multiple curve groups;
[0026] Combine multiple ordered curves in the same curve group to obtain a long curve;
[0027] Based on the obtained plurality of long curves, a plurality of polygons are generated.
[0028] Optionally, based on the obtained multiple ordered curves, multiple curve groups are generated, including:
[0029] According to a preset connectivity threshold, the endpoints of the obtained multiple ordered curves are compared in pairs to obtain the endpoint comparison results of the pairwise ordered curves;
[0030] According to the endpoint comparison results of the pairwise ordered curves, the plurality of ordered curves are classified to obtain a plurality of curve groups; the curve groups include a plurality of ordered curves that are directly or indirectly connected to each other; wherein, if the endpoint comparison result of any two ordered curves is that the endpoints coincide, it is determined that the any two ordered curves are directly connected; if the endpoint comparison result of a first ordered curve that is directly connected to any ordered curve is that the endpoints coincide with those of a second ordered curve, it is determined that any ordered curve is indirectly connected to the second ordered curve.
[0031] Optionally, multiple polygons are generated based on the obtained multiple long curves, including:
[0032] For each obtained long curve, de-duplicate points on the long curve to determine the starting point and the end point of the long curve;
[0033] When the starting point and the end point are the same, closing the long curve to obtain a corresponding polygon;
[0034] In the case that the starting point and the end point are different, a new end point which is the same as the starting point is added to the long curve, and the long curve after the new end point is added is closed to obtain the polygon.
[0035] Optionally, the geometric measurement includes at least area and perimeter, and determining the attribute information of the plurality of polygons includes:
[0036] For each of the polygons, determining the perimeter of the polygon based on distances between a plurality of vertices on the polygon;
[0037] Determining the area of the polygon based on the two-dimensional coordinates of a plurality of vertices on the polygon on the target collision surface;
[0038] Determining a geometric metric of the polygon based on the perimeter and area of the polygon;
[0039] Performing plane spatial analysis on the plurality of polygons to obtain the parent-child relationship of the plurality of polygons;
[0040] Based on the parent-child relationship, determine the depth values of the plurality of polygons; wherein the depth value is a natural number, the depth value of any polygon is greater than the depth value of the parent of any polygon, and the difference between the depth value of any polygon and the depth value of the parent of any polygon is 1;
[0041] Based on the geometrical measurements and depth values of the multiple polygons, attribute information of the multiple polygons is generated.
[0042] Optionally, determining a geometric metric of the target geometric area based on attribute information of a target polygon that meets the target condition among the multiple polygons includes:
[0043] Obtaining a target point; the target point is determined based on the position of the front end in response to a user input;
[0044] In order of area from small to large, the contour point sets of the plurality of polygons are compared with the target point position respectively, until the target polygon is determined to be obtained, and the comparison between the polygon and the target point position is terminated; the contour point set includes a plurality of contour points, and the contour points are obtained by converting the polygon from a three-dimensional coordinate system to a screen coordinate system; if the contour point set of any polygon includes the target point position, the any polygon is determined as a target polygon that meets the target condition; the target condition is that the contour area of the target polygon displayed on the front end includes the target point position;
[0045] If the depth value of the target polygon is an even number, determining that the type of the target geometric region is a closed solid section; the target geometric region is a section plane specified by the user on the front end;
[0046] For the closed solid section, determining at least one child polygon of the target polygon;
[0047] Calculate the sum of the areas and the sum of the perimeters of at least one child polygon;
[0048] Determine the area of the target geometric region based on the difference between the area of the target polygon and the sum of the areas;
[0049] Determine the perimeter of the target geometric area based on the sum of the perimeter of the target polygon and the sum of the perimeters;
[0050] A geometric metric of the target geometric region is generated based on the area and the perimeter of the target geometric region.
[0051] Optionally, the method further includes:
[0052] If the depth value of the target polygon is an odd number, determining that the type of the target geometric region is a closed hole;
[0053] For the closed hole, the geometrical metric of the target geometrical area is determined based on the geometrical metric of the target polygon.
[0054] A front-end-based three-dimensional model section geometry analysis device, comprising:
[0055] A model analysis unit, used to generate multiple collision surfaces based on the front-end three-dimensional model;
[0056] A line segment classification unit, for generating a plurality of line segment groups based on a plurality of line segments obtained by the collision between the three-dimensional model and a target collision surface; the target collision surface is a collision surface specified by a user for serving as a model cutting plane; the line segments are intersection line segments between triangular facets of the target collision surface and triangular facets of the three-dimensional model;
[0057] A polygon construction unit, used for generating a plurality of polygons based on a plurality of line segment groups;
[0058] A polygon analysis unit, configured to determine attribute information of the plurality of polygons; the attribute information comprising at least a geometric metric and a depth value;
[0059] The area analysis unit is used to determine the geometrical measurement of the target geometrical area based on the attribute information of the target polygons that meet the target conditions among the multiple polygons.
[0060] A system includes a server and a front end, wherein the server is used to execute the front-end-based three-dimensional model section surface geometry analysis method, and the front end is used to display a user interaction interface, which at least includes a three-dimensional model, a target collision surface, a section view, a target geometric area, and corresponding geometric measurements.
[0061] The technical solution provided by the present application generates multiple collision surfaces based on the three-dimensional model of the front end. Generate multiple line segment groups based on the multiple line segments obtained by the collision between the three-dimensional model and the target collision surface. Generate multiple polygons based on the multiple line segment groups. Determine the attribute information of the multiple polygons. Determine the geometric measurements of the target geometric area based on the attribute information of the target polygons that meet the target conditions among the multiple polygons. The present application utilizes the multiple line segments obtained by the collision between the target collision surface and the three-dimensional model to obtain multiple polygons and corresponding attribute information, and determines the geometric measurements of the target geometric area in combination with the attribute information of the multiple polygons, thereby realizing the digital analysis of any cross-section of the three-dimensional model at the front end, accurately identifying the type and geometric measurements of the target geometric area, and thus effectively realizing the geometric analysis of the cross-section of the three-dimensional model at the front end. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0063] Figure 1 A schematic diagram of a flow chart of a front-end-based three-dimensional model section geometry analysis method provided in an embodiment of the present application;
[0064] Figure 2 A schematic diagram of a flow chart of another front-end-based three-dimensional model section geometry analysis method provided in an embodiment of the present application;
[0065] Figure 3 A schematic diagram of a flow chart of another front-end-based three-dimensional model section geometry analysis method provided in an embodiment of the present application;
[0066] Figure 4 A schematic diagram of a flow chart of another front-end-based three-dimensional model section geometry analysis method provided in an embodiment of the present application;
[0067] Figure 5 A schematic diagram of a flow chart of another front-end-based three-dimensional model section geometry analysis method provided in an embodiment of the present application;
[0068] Figure 6 A schematic diagram of a flow chart of another front-end-based three-dimensional model section geometry analysis method provided in an embodiment of the present application;
[0069] Figure 7 A schematic diagram of a flow chart of another front-end-based three-dimensional model section geometry analysis method provided in an embodiment of the present application;
[0070] Figure 8 A schematic diagram of a flow chart of another front-end-based three-dimensional model section geometry analysis method provided in an embodiment of the present application;
[0071] Fig. 9 A schematic diagram of the architecture of a front-end-based 3D model section geometry analysis device provided in an embodiment of the present application;
[0072] Fig.10 A front-end interface display effect diagram provided in an embodiment of the present application;
[0073] Fig.11 Another front-end interface display effect diagram provided in the embodiment of the present application;
[0074] Fig.12Another front-end interface display effect diagram provided in the embodiment of the present application;
[0075] Fig.13 Another front-end interface display effect diagram provided in the embodiment of the present application;
[0076] Fig.14 Another front-end interface display effect diagram provided in the embodiment of the present application;
[0077] Fig.15 Another front-end interface display effect diagram provided in the embodiment of the present application;
[0078] Fig.16 Another front-end interface display effect diagram provided in the embodiment of the present application;
[0079] Fig.17 Another front-end interface display effect diagram provided in the embodiment of the present application;
[0080] Fig.18 Another front-end interface display effect diagram provided in the embodiment of the present application;
[0081] Fig.19 Another front-end interface display effect diagram provided in the embodiment of the present application;
[0082] Fig. 20 Another front-end interface display effect diagram provided in the embodiment of the present application;
[0083] Fig.21 Another front-end interface display effect diagram provided in an embodiment of the present application. DETAILED DESCRIPTION
[0084] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0085] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "comprise one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0086] like Figure 1 As shown, it is a flow chart of a front-end-based three-dimensional model section surface geometry analysis method provided in an embodiment of the present application, including the following steps.
[0087] S101: Generate multiple collision surfaces based on the three-dimensional model of the front end.
[0088] The three-dimensional model includes but is not limited to the physical model uploaded by the user through the front end, and the physical model obtained by scanning the entity using a scanning device.
[0089] It should be noted that, in obtaining the three-dimensional model of the front end, the three-dimensional model can be imported into a three-dimensional coordinate system (which can be understood as a world coordinate system) for display. Correspondingly, the collision surface generated based on the three-dimensional model is also in the three-dimensional coordinate system.
[0090] In some examples, the number of multiple collision surfaces can be set by technicians according to actual conditions. For example, for three spatial directions in a three-dimensional coordinate system, collision surfaces corresponding to the three spatial directions can be generated.
[0091] Optionally, based on the front-end 3D model, the implementation process of generating multiple collision surfaces can be seen in Figure 2 The steps are shown and the corresponding explanations.
[0092] S102: Generate a plurality of line segment groups based on a plurality of line segments obtained by the collision between the three-dimensional model and the target collision surface.
[0093] The target collision surface is a collision surface specified by the user and used as a model cutting plane, and the line segment is an intersection line segment between the triangular facet of the target collision surface and the triangular facet of the three-dimensional model.
[0094] It should be noted that the collision between the 3D model and the target collision surface is essentially to use the target collision surface to cut the 3D model to obtain the corresponding cut view (i.e., a geometric outline composed of multiple line segments, which is represented by the polygons mentioned later). The intersecting line segments between the triangular facets of the target collision surface and the triangular facets of the 3D model are disordered and have no connectivity, but from a spatial perspective, multiple added line segments can be regarded as the outline of the cut surface.
[0095] Optionally, based on the multiple line segments obtained by the collision between the 3D model and the target collision surface, the implementation process of generating multiple line segment groups can be seen in Figure 3 The steps are shown and the corresponding explanations.
[0096] S103: Generate multiple polygons based on the multiple line segment groups.
[0097] Each line segment group may generate a corresponding polygon, and the types of polygons include but are not limited to regular polygons and irregular polygons.
[0098] Optionally, the implementation process of generating multiple polygons based on multiple line segment groups can be found in Figure 4 The steps are shown and the corresponding explanations.
[0099] S104: Determine attribute information of multiple polygons.
[0100] The attribute information includes geometric measurements and depth values.
[0101] Optionally, the geometric measurement includes at least area and perimeter. The implementation process of determining the attribute information of multiple polygons can be found in Figure 7 The steps are shown and the corresponding explanations.
[0102] S105: Determine the geometrical measurement of the target geometrical area based on the attribute information of the target polygon that meets the target condition among the multiple polygons.
[0103] The target condition is that the contour area of the target polygon displayed on the front end contains the target point. The target point is determined based on the front end in response to the user input, and the target geometric area is the section plane specified by the user on the front end.
[0104] In some examples, the types of positions input by the user include, but are not limited to: mouse click positions, touch click positions, key input positions, handle selection positions, etc.
[0105] Optionally, the implementation process of determining the geometric measurement of the target geometric area based on the attribute information of the target polygon that meets the target conditions among multiple polygons can be found in Figure 8 The steps are shown and the corresponding explanations.
[0106] Combination Figure 2-Figure 8 The method shown in the embodiment of the present application has the following advantages compared with the prior art: First, it ensures that the front-end three-dimensional model analysis application is more lightweight and fast, especially on the mobile terminal, it also has the advantage of fast application; second, it can perform analysis and measurement of any closed surface in the section plane with higher accuracy and higher degree of freedom; third, the calculation of geometric measurements is very fast, and can be synchronized with the sectioning, to present the section plane of the three-dimensional model and the geometric measurements of the target geometric area in an integrated manner.
[0107] The process shown in S101-S105 above utilizes multiple line segments obtained from the collision between the target collision surface and the three-dimensional model to obtain multiple polygons and corresponding attribute information, and combines the attribute information of the multiple polygons to determine the geometric measurements of the target geometric area, thereby realizing digital analysis of any cross-section of the three-dimensional model at the front end, accurately identifying the type and geometric measurements of the target geometric area, and effectively realizing the front-end three-dimensional model cross-section geometric analysis.
[0108] like Figure 2 As shown, it is a flow chart of another front-end-based three-dimensional model section surface geometry analysis method provided in an embodiment of the present application, including the following steps.
[0109] S201: Obtain a three-dimensional model input by a front end.
[0110] Among them, the front end can input multiple three-dimensional models simultaneously or sequentially.
[0111] In some examples, the 3D model formats that can be input by the front end include but are not limited to OBJ, FBX, STL, GLB, DAE, 3DS, and PLY.
[0112] S202: constructing a spatial data structure for the three-dimensional model to obtain a corresponding bounding box.
[0113] Among them, the BVH (Bounding Volume Hierarchy) tree construction algorithm can be used to construct a spatial data structure of the three-dimensional model to obtain the corresponding bounding box.
[0114] The so-called BVH tree is a data structure used to accelerate ray tracing, which can quickly determine the intersection relationship between rays and 3D models in a 3D scene. Generally speaking, the BVH tree needs to construct a spatial data structure based on the triangular facets (mesh) of the 3D model. Therefore, if the 3D model input by the front end is point cloud data, the point cloud data needs to be converted into corresponding triangular facets.
[0115] The so-called mesh is a polygonal mesh, which is a data structure used to model various irregular objects in computer graphics. In the polygonal mesh, the triangle face is the smallest unit to be divided.
[0116] In some examples, the types of bounding boxes of three-dimensional models include but are not limited to AABB bounding boxes, bounding spheres, directional bounding boxes, etc. Generally speaking, the bounding box is an algorithm for solving the optimal bounding space of a discrete point set. The basic idea is to use a geometric body (called a bounding box) with a slightly larger volume and simpler characteristics to approximate a complex geometric object (specifically a three-dimensional model).
[0117] S203: Based on the bounding box, generate collision surfaces corresponding to multiple spatial directions.
[0118] The multiple spatial directions include an X direction, a Y direction, and a Z direction in a three-dimensional coordinate system, and the size of the collision surface is determined based on the size of the bounding box.
[0119] It should be noted that, since the geometric structure of the bounding box is simple, for example, the bounding box may be a cuboid, collision surfaces corresponding to multiple spatial directions may be generated based on the parallel surfaces of the bounding box in multiple spatial directions as references.
[0120] In some examples, the collision surface corresponding to the X direction may be recorded as planeX, the collision surface corresponding to the Y direction may be recorded as planeY, and the collision surface corresponding to the Z direction may be recorded as planeZ.
[0121] In a possible implementation, planeX is parallel to the X direction, planeY is parallel to the Y direction, and planeZ is parallel to the Z direction.
[0122] In a possible implementation, the size of planeX is greater than or equal to the planar size of the bounding box in the X direction, the size of planeY is greater than or equal to the planar size of the bounding box in the Y direction, and the size of planeZ is greater than or equal to the planar size of the bounding box in the Z direction.
[0123] The process shown in S201-S203 above implements the preprocessing of the three-dimensional model by constructing a spatial data structure for the three-dimensional model to obtain a corresponding bounding box, and using the bounding box to generate a corresponding plurality of collision surfaces.
[0124] like Figure 3 As shown, it is a flow chart of another front-end-based three-dimensional model section surface geometry analysis method provided in an embodiment of the present application, including the following steps.
[0125] S301: Determine a target collision surface in the front end that responds to a user input.
[0126] The user may specify a target collision surface from multiple collision surfaces through the front end, for example, by selecting planeX as the target collision surface by clicking the mouse.
[0127] S302: The target collision surface collides with the three-dimensional model to obtain a plurality of line segments.
[0128] The collision process uses the template buffer for sectioning rendering, constructs a spatial data structure for the three-dimensional model after the collision, and hides the part of the three-dimensional model after the collision that is located on the side of the target collision surface to display the corresponding section view, which contains multiple line segments.
[0129] In some examples, the stencil buffer is another data buffer commonly used in computer graphics hardware such as 3D drawing, in addition to the color buffer, pixel buffer, and depth buffer. Generally speaking, the purpose of stencil buffering for a 3D model is to visually retain only the part of the model after the cutting plane (i.e., the collision area between the target collision plane and the 3D model), and hide the other part of the model before the cutting plane, so that users can intuitively see the cutting view on the front end.
[0130] S303: Classify the multiple line segments according to the connected component algorithm to obtain at least one line segment group.
[0131] Among them, multiple line segments are discrete and disordered, so it is necessary to classify the line segments through the connected domain algorithm to prepare for constructing closed curves.
[0132] The connected domain algorithm is a commonly used algorithm in computer vision and image processing, which is used to identify continuous areas in an image. The embodiment of the present application is used to classify multiple line segments, which is essentially to classify multiple line segments that can be connected into the same line segment group.
[0133] In some examples, the connected domain algorithm may be defined as: if the endpoint distance between any two line segments is less than 1e-8 (expressed as 1*10 to the negative 8th power), then it can be determined that the two line segments are connected, that is, the two line segments belong to the same line segment group.
[0134] In the above process S301 - S304 , the target collision surface is used to collide with the three-dimensional model to obtain multiple line segments, and the multiple line segments that can be connected are classified into the same line segment group to prepare for constructing a closed curve.
[0135] like Figure 4 As shown, it is a flow chart of another front-end-based three-dimensional model section surface geometry analysis method provided in an embodiment of the present application, including the following steps.
[0136] S401: For each line segment group, select an initial line segment from the line segment group.
[0137] Among them, a line segment can be arbitrarily selected from the line segment group as the initial line segment.
[0138] S402: Determine a connectivity relationship between the initial line segment and other line segments in the line segment group based on a preset connectivity rule.
[0139] The preset connection rule is: according to the direction of the initial line segment, directly or indirectly connect with the beginning and the end of the initial line segment.
[0140] It should be noted that after determining the initial line segment in the line segment group, the arrangement order of multiple line segments in the line segment group (i.e., the connectivity relationship) is determined according to the direction of the initial line segment and the connectivity between the head and the tail of the line segment. If the curve after the multiple line segments are connected is not closed (i.e., it is not a closed loop, which may occur if the three-dimensional model is a hole model), it is necessary to determine the arrangement order of the multiple line segments in the line segment group in the reverse direction of the initial line segment to achieve orderly arrangement of the multiple line segments in the line segment group.
[0141] In a possible implementation, the line segment group includes line segment a, line segment b, line segment c, and line segment d, and line segment a is selected as the initial line segment. Based on a preset connectivity rule, the connectivity relationship between the initial line segment and other line segments in the line segment group can be determined to be acbd.
[0142] S403: Arrange the initial line segment and other line segments according to the connectivity relationship to obtain an ordered curve.
[0143] Among them, the multiple line segments in the line segment group have no order relationship, and the forward order of the initial line segment needs to be specified, and the multiple line segments are arranged in order according to the order of connectivity. Strictly speaking, if the coordinates of the two points where the two line segments are connected are completely consistent, then the two line segments are confirmed to be connected. In actual calculations, it is based on a pre-given threshold of 1e-8. If the selected initial line segment belongs to the middle section of the ordered curve, and the ordered curve is actually interrupted, it is also necessary to arrange it in the reverse order of the initial line segment.
[0144] In some examples, if the connectivity relationship corresponding to the line segment grouping is acbd, line segment a, line segment c, line segment b, and line segment d are arranged in sequence to obtain an ordered curve acbd.
[0145] S404: Generate multiple curve groups based on the obtained multiple ordered curves.
[0146] Among them, multiple ordered curves are connected in a broad sense. Due to multiple mashes or holes, multiple ordered curves are divided into different line segment groups. Therefore, the connectivity threshold is relaxed, multiple ordered curves are connected as much as possible, and multiple ordered curves that may be connected are classified into the same curve group. In accordance with the closed polygon requirements, multiple ordered curves in the curve group are constructed into corresponding polygons.
[0147] It should be noted that how to determine whether multiple ordered curves can be connected can be understood as identifying the connectivity relationship between multiple ordered curves. Optionally, the implementation process of generating multiple curve groups based on the obtained multiple ordered curves can be referred to. Figure 5 The steps are shown and the corresponding explanations.
[0148] S405: Combine multiple ordered curves in the same curve group to obtain a long curve.
[0149] Since a plurality of ordered curves in the same curve group have a connectivity relationship, the plurality of ordered curves can be combined according to the connectivity relationship to obtain a corresponding long curve.
[0150] In some examples, the curve group includes an ordered curve abcd and an ordered curve fhg, and the ordered curve abcd and the ordered curve fhg are combined to obtain a corresponding long curve abcdfhg.
[0151] S406: Generate multiple polygons based on the obtained multiple long curves.
[0152] Among them, each line segment group can correspond to multiple long curves, and based on the multiple long curves corresponding to the same line segment group, the polygon corresponding to the same line segment group can be obtained.
[0153] Optionally, based on the obtained multiple long curves, the realization process of generating multiple polygons can be seen in Figure 6 The steps are shown and the corresponding explanations.
[0154] The process shown in S401-S406 above uses multiple ordered curves in the same curve combination to construct corresponding polygons, so that the cross-section of the three-dimensional model can display the corresponding geometric contour.
[0155] like Figure 5 As shown, it is a flow chart of another front-end-based three-dimensional model section surface geometry analysis method provided in an embodiment of the present application, including the following steps.
[0156] S501: According to a preset connectivity threshold, the endpoints of the obtained multiple ordered curves are compared in pairs to obtain endpoint comparison results of the pairwise ordered curves.
[0157] When comparing the endpoints of two ordered curves, the connectivity threshold used for comparison can be relaxed. Specifically, the connectivity threshold can be set to 1e-2 (expressed as 1*10 to the negative power of -2). If the distance between the two endpoints is less than 1e-2, the corresponding two ordered curves are considered to be connected.
[0158] S502: Classifying the plurality of ordered curves according to the endpoint comparison results of the ordered curves in pairs, so as to obtain a plurality of curve groups.
[0159] The curve group includes a plurality of ordered curves that are directly or indirectly connected to each other.
[0160] It should be noted that if the endpoint comparison result of any two ordered curves is that the endpoints coincide, it is determined that the two ordered curves are directly connected. If the endpoint comparison result of the first ordered curve directly connected to any ordered curve and the second ordered curve is that the endpoints coincide, it is determined that any ordered curve is indirectly connected to the second ordered curve.
[0161] In some examples, ordered curve a is directly connected to ordered curve b, and ordered curve b is directly connected to ordered curve c, then it is determined that ordered curve a is indirectly connected to ordered curve c, and ordered curve a, ordered curve b, and ordered curve c belong to the same curve group.
[0162] In the above process S501-S502, multiple ordered curves can be classified by comparing the endpoints of each pair of ordered curves, and multiple ordered curves that may have a connected relationship can be divided into the same curve group.
[0163] like Figure 6 As shown, it is a flow chart of another front-end-based three-dimensional model section surface geometry analysis method provided in an embodiment of the present application, including the following steps.
[0164] S601: For each obtained long curve, remove duplicate points on the long curve to determine the start point and the end point of the long curve.
[0165] Among them, a long curve is obtained by combining multiple ordered curves, and it is necessary to eliminate the overlapping middle points in the long curve. For example, the long curve abcd is obtained based on the combination of the ordered curves ab and cd, and the coordinates of b and c are the same, then the long curve after deduplication is abd or acd.
[0166] It can be understood that each connection point in the long curve after deduplication is confirmed to be correct, so the starting point and the end point of the long curve can be determined.
[0167] S602: When the starting point and the end point are the same, close the long curve to obtain a corresponding polygon.
[0168] Among them, the starting point and the end point of the long curve are the same, so it can be determined that the long curve meets the requirements of a closed polygon. Therefore, the long curve is closed to obtain the corresponding polygon.
[0169] In some examples, the long curve is abcd, a is the starting point, d is the end point, a and d are the same, and it can be determined that the long curve abcd meets the closed polygon requirement, and the long curve abcd is closed to obtain the corresponding triangle.
[0170] S603: When the starting point and the end point are different, a new end point that is the same as the starting point is added to the long curve, and the long curve after the new end point is added is closed to obtain a polygon.
[0171] Among them, the starting point and the end point are different, which means that the long curve does not meet the requirements of a closed polygon. It is necessary to add a new end point to the long curve so that the added long curve meets the requirements of a closed polygon.
[0172] In some examples, the long curve is abcd, a is the starting point, d is the end point, a and d are not the same, and it is determined that the long curve abcd does not meet the closed polygon requirement. Therefore, a new end point e is added to the long curve abcd, and e is the same as a. The long curve abcde after adding the new end point is closed to obtain a quadrilateral.
[0173] In the above process S601 - S603 , the long curve is closed to obtain the corresponding polygon, so that the cross-section of the three-dimensional model can accurately display the corresponding geometric contour.
[0174] like Figure 7 As shown, it is a flow chart of another front-end-based three-dimensional model section surface geometry analysis method provided in an embodiment of the present application, including the following steps.
[0175] S701: For each polygon, determine the perimeter of the polygon based on distances between a plurality of vertices on the polygon.
[0176] Among them, multiple vertices on the polygon are known. By calculating the distance between two vertices, the corresponding side length can be obtained. Based on the sum of all side lengths of the polygon, the perimeter of the polygon can be determined.
[0177] S702: Determine the area of the polygon based on the two-dimensional coordinates of multiple vertices on the polygon on the target collision surface.
[0178] The two-dimensional coordinates of multiple vertices on the polygon on the target collision surface can be substituted into the shoelace formula to calculate the area of the polygon.
[0179] S703: Determine the geometrical measurement of the polygon based on the perimeter and area of the polygon.
[0180] In this process, while determining the geometrical measurement of the polygon based on the perimeter and area of the polygon, it is also necessary to supplement the polygon with complete three-dimensional coordinates.
[0181] It should be noted that the polygon is determined based on multiple line segments on the target collision surface. The target collision surface is a two-dimensional plane, which causes the polygon to lack coordinates in one spatial dimension. Therefore, it is necessary to supplement the polygon with complete three-dimensional coordinates to provide favorable support for subsequent steps (which require the process of converting the three-dimensional coordinate system to the screen coordinate system).
[0182] In some examples, if the target collision surface is an XY plane, the coordinates of the polygon supplementing the Z dimension are used, if the target collision surface is an XZ plane, the coordinates of the polygon supplementing the Y dimension are used, and if the target collision surface is a YZ plane, the coordinates of the polygon supplementing the X dimension are used.
[0183] In a possible implementation, the coordinates of the polygon corresponding to the supplementary spatial dimension can be determined based on the perpendicular distance between the target collision surface and the coordinate system axis corresponding to the spatial dimension in the three-dimensional coordinate system. For example, if the target collision surface is the XY plane and the perpendicular distance between the target collision surface and the Z axis is 5, then the coordinate value of the supplementary Z dimension corresponding to each point on the polygon is 5. For example, the coordinates of a point on the polygon change from (3, 4) to (3, 4, 5).
[0184] S704: Performing plane spatial analysis on the multiple polygons to obtain the parent-child relationship of the multiple polygons.
[0185] Among them, by performing plane space analysis on multiple polygons, the inclusion relationship of the multiple polygons can be obtained, and based on the inclusion relationship of the multiple polygons, the parent-child relationship of the multiple polygons can be determined.
[0186] In some examples, any polygon may be parented by another polygon that has the smallest area and can contain any polygon.
[0187] In a possible implementation, if polygon A includes polygon B and the area of polygon B is smaller than the area of polygon A, polygon A can be considered as the parent of polygon B and polygon B is the child of polygon A.
[0188] S705: Determine depth values of multiple polygons based on the parent-child relationship.
[0189] The depth value is a natural number, the depth value of any polygon is greater than the depth value of the parent of any polygon, and the difference between the depth value of any polygon and the depth value of the parent of any polygon is 1.
[0190] In some examples, since multiple polygons are in a parent-child relationship (the polygon shown in the outer layer is the parent of the polygon shown in the inner layer), according to the parent-child relationship, from the outside to the inside, the depth value of the polygon in the first layer is recorded as 0, the depth value of the polygon in the second layer is recorded as 1, the depth value of the polygon in the third layer is recorded as 2, and so on to obtain the depth values of polygons at all levels.
[0191] S706: Generate attribute information of the multiple polygons based on the geometric measurements and depth values of the multiple polygons.
[0192] The attribute information of the polygon is determined based on the area, perimeter and depth values of the polygon row, so as to determine the geometric measurements of the geometric contour on the cross-section of the three-dimensional model using the area, perimeter and depth values of the polygon row.
[0193] In the above process S701-S706, the area and perimeter of the polygon are calculated using the vertices of the polygon, and the depth values of the multiple polygons are determined using the inclusion relationship of the multiple polygons to obtain the attribute information of the multiple polygons.
[0194] like Figure 8 As shown, it is a flow chart of another front-end-based three-dimensional model section surface geometry analysis method provided in an embodiment of the present application, including the following steps.
[0195] S801: Obtain the target point.
[0196] The target point is determined based on the position of the front end in response to the user input.
[0197] In some examples, the coordinate A of the mouse click position of the front end in response to the user input in the screen coordinate system is recorded as the target point.
[0198] In some examples, if the user uses a terminal device that supports a touch screen, the front end can input a touch click position to replace the mouse click position.
[0199] S802: Compare the contour point sets of multiple polygons with the target point in order from the smallest to the largest area, until the target polygon is determined, and then end the comparison between the polygon and the target point.
[0200] The contour point set includes a plurality of contour points, and the contour points are obtained by converting the polygon from a three-dimensional coordinate system to a screen coordinate system. If the contour point set of any polygon contains a target point, any polygon is determined as a target polygon that meets the target condition.
[0201] It should be noted that a polygon includes multiple contour points. Converting a polygon from a three-dimensional coordinate system to a screen coordinate system is essentially converting the contour points of the polygon from a three-dimensional coordinate system to a screen coordinate system so that the contour points of the polygon and the target points are in the same coordinate system.
[0202] It can be understood that if the contour point set of the polygon includes the target point, it can be determined that the contour area of the polygon displayed on the front end includes the target point.
[0203] In some examples, multiple polygons are polygon a, polygon b, polygon c and polygon d in order from small to large in area. First, the contour point set of polygon a is analyzed to see whether it contains the target point. The contour point set of polygon a does not contain the target point. Then, the contour point set of polygon b is analyzed to see whether it contains the target point. The contour point set of polygon b contains the target point, and polygon b is determined to be the target polygon. Polygon c and polygon d are no longer compared to save computing resources.
[0204] S803: If the depth value of the target polygon is an even number, determine that the type of the target geometric area is a closed solid section.
[0205] There may be holes inside the three-dimensional model. Therefore, the section surface obtained by cutting the three-dimensional model through the target collision surface may contain closed solid sections and / or closed holes. The specific type of the target geometric area determined based on the user input position can be determined according to the depth value of the target polygon.
[0206] Optionally, if the depth value of the target polygon is an odd number, the type of the target geometric area is determined to be a closed hole, and for the closed hole, the geometric metric of the target geometric area is determined based on the geometric metric of the target polygon.
[0207] It should be noted that, if the type of the target geometric area is a closed hole, it is considered that the target polygon refers to the closed hole.
[0208] S804: For a closed solid section, determine at least one child polygon of the target polygon.
[0209] Among them, if the type of the target geometric area is a closed solid section, it is necessary to determine at least one child polygon of the target polygon, that is, determine the children of the target polygon based on the parent-child relationship of multiple polygons, so as to use the geometric measurements of the children to calculate the geometric measurements of the target geometric area.
[0210] It should be noted that, if the type of the target geometric region is a closed solid section, it means that the target geometric region contains closed-loop regions one by one, and the closed-loop regions can be regarded as sub-polygons of the target polygon.
[0211] S805: Calculate the sum of the areas and the sum of the perimeters of at least one child polygon.
[0212] The area of at least one sub-level polygon is cumulatively added to obtain the total area, and the perimeter of at least one sub-level polygon is cumulatively added to obtain the total perimeter.
[0213] S806: Determine the area of the target geometric region based on the difference between the area of the target polygon and the total area.
[0214] The area of the target geometric region can be obtained by subtracting the difference between the area of the target polygon and the total area.
[0215] S807: Determine the perimeter of the target geometric area based on the sum of the perimeter of the target polygon and the sum of the perimeters.
[0216] The perimeter of the target geometric area can be obtained by adding the perimeter of the target polygon to the sum of the perimeters.
[0217] S808: Generate geometric measurements of the target geometric region based on the area and perimeter of the target geometric region.
[0218] Among them, based on the area and perimeter of the target geometric area, the geometric measurements of the target geometric area are generated, and the geometric measurements of the target geometric area are displayed on the front end, and the display effect of the target geometric area is changed (for example, based on red highlighting), so that the integrated presentation of the three-dimensional model section and the corresponding geometric measurements can be achieved.
[0219] The process shown in S801-S808 above determines the target polygon by comparing the contour point set of the polygon with the target point, calculates the depth value of the target polygon, analyzes the type of the target geometric area, and obtains the geometric measurement of the target geometric area by adopting a reasonable geometric measurement calculation method.
[0220] like Fig. 9 As shown, it is a schematic diagram of the architecture of a front-end-based three-dimensional model section surface geometry analysis device provided in an embodiment of the present application, including the units shown below.
[0221] The model analysis unit 100 is used to generate a plurality of collision surfaces based on the three-dimensional model of the front end.
[0222] Optionally, the model parsing unit 100 is specifically used to: obtain a three-dimensional model input by the front end; construct a spatial data structure for the three-dimensional model to obtain a corresponding bounding box; based on the bounding box, generate collision surfaces corresponding to multiple spatial directions; the multiple spatial directions include the X direction, Y direction and Z direction in the three-dimensional coordinate system; the size of the collision surface is determined based on the size of the bounding box.
[0223] The line segment classification unit 200 is used to generate multiple line segment groups based on multiple line segments obtained by the collision between the three-dimensional model and the target collision surface; the target collision surface is a collision surface specified by the user to serve as a model cutting plane; the line segment is an intersecting line segment between the triangular facets of the target collision surface and the triangular facets of the three-dimensional model.
[0224] Optionally, the line segment classification unit 200 is specifically used to: determine a target collision surface in the front end that responds to user input; collide the target collision surface with a three-dimensional model to obtain multiple line segments; wherein the collision process uses a template buffer for sectioning rendering, while constructing a spatial data structure for the three-dimensional model after the collision, and hiding the part of the three-dimensional model after the collision that is located on one side of the target collision surface to display the corresponding section diagram; and classify multiple line segments according to a connected domain algorithm to obtain at least one line segment grouping.
[0225] The polygon construction unit 300 is used to generate multiple polygons based on multiple line segment groups.
[0226] Optionally, the polygon construction unit 300 is specifically used to: for each line segment group, select an initial line segment from the line segment group; based on a preset connectivity rule, determine the connectivity relationship between the initial line segment and other line segments in the line segment group; the preset connectivity rule is: according to the direction of the initial line segment, directly or indirectly connect with the beginning and end of the initial line segment; according to the connectivity relationship, arrange the initial line segment and other line segments to obtain an ordered curve; based on the obtained multiple ordered curves, generate multiple curve groups; combine multiple ordered curves in the same curve group to obtain a long curve; based on the obtained multiple long curves, generate multiple polygons.
[0227] Optionally, the polygon construction unit 300 is specifically used to: compare the endpoints of the obtained multiple ordered curves in pairs according to a preset connectivity threshold to obtain the endpoint comparison results of the pairwise ordered curves; classify the multiple ordered curves according to the endpoint comparison results of the pairwise ordered curves to obtain multiple curve groups; the curve grouping includes multiple ordered curves that are directly or indirectly connected to each other; wherein, if the endpoint comparison result of any two ordered curves is that the endpoints coincide, it is determined that the any two ordered curves are directly connected; if the endpoint comparison result of a first ordered curve directly connected to any ordered curve and a second ordered curve is that the endpoints coincide, it is determined that any ordered curve is indirectly connected to the second ordered curve.
[0228] Optionally, the polygon construction unit 300 is specifically used to: for each long curve obtained, remove duplicate points on the long curve to determine the starting point and the end point of the long curve; when the starting point and the end point are the same, close the long curve to obtain a corresponding polygon; when the starting point and the end point are different, add a new end point that is the same as the starting point to the long curve, and close the long curve after the new end point is added to obtain a polygon.
[0229] The polygon analysis unit 400 is used to determine attribute information of multiple polygons; the attribute information includes geometric metrics and depth values.
[0230] Optionally, the geometric measurement includes at least area and perimeter, and the polygon analysis unit 400 is specifically used to: for each polygon, determine the perimeter of the polygon based on the distance between multiple vertices on the polygon; determine the area of the polygon based on the two-dimensional coordinates of the multiple vertices on the polygon on the target collision surface; determine the geometric measurement of the polygon based on the perimeter and area of the polygon; perform planar space analysis on multiple polygons to obtain the parent-child relationship of the multiple polygons; determine the depth values of the multiple polygons based on the parent-child relationship; wherein the depth value is a natural number, the depth value of any polygon is greater than the depth value of the parent of any polygon, and the difference between the depth value of any polygon and the depth value of the parent of any polygon is 1; generate attribute information of multiple polygons based on the geometric measurements and depth values of multiple polygons.
[0231] The area analysis unit 500 is used to determine the geometric measurements of the target geometric area based on the attribute information of the target polygon that meets the target conditions among multiple polygons; the target conditions are: the contour area of the target polygon displayed on the front end contains the target point; the target point is determined based on the mouse click position input by the front end; the target geometric area is the section surface specified by the user on the front end.
[0232] Optionally, the area analysis unit 500 is specifically used to: obtain a target point; the target point is determined based on the position of the front end in response to the user input; in order of area from small to large, the contour point sets of multiple polygons are compared with the target point respectively, until the target polygon is determined to be obtained, and the comparison between the polygon and the target point is ended; the contour point set includes multiple contour points, and the contour points are obtained by converting the polygon from a three-dimensional coordinate system to a screen coordinate system; if the contour point set of any polygon contains the target point, any polygon is determined as a target polygon that meets the target condition; the target condition is: the target polygon is displayed on the front end in the wheel The contour area contains the target point; if the depth value of the target polygon is an even number, the type of the target geometric area is determined to be a closed solid section; the target geometric area is a section plane specified by the user on the front end; for a closed solid section, at least one sub-polygon of the target polygon is determined; the sum of the area and the sum of the perimeters of at least one sub-polygon are calculated; the area of the target geometric area is determined based on the difference between the area of the target polygon and the sum of the area; the perimeter of the target geometric area is determined based on the sum of the perimeter of the target polygon and the sum of the perimeters; based on the area and perimeter of the target geometric area, a geometric measurement of the target geometric area is generated.
[0233] Optionally, the region analysis unit 500 is further used to: if the depth value of the target polygon is an odd number, determine the type of the target geometric region as a closed hole; for the closed hole, determine it as the geometric metric of the target geometric region based on the geometric metric of the target polygon.
[0234] Each of the above-mentioned units utilizes the multiple line segments obtained from the collision between the target collision surface and the three-dimensional model to obtain multiple polygons and corresponding attribute information, and combines the attribute information of the multiple polygons to determine the geometric measurements of the target geometric area, thereby realizing digital analysis of any cross-section of the three-dimensional model at the front end, accurately identifying the type and geometric measurements of the target geometric area, and effectively realizing the front-end geometric analysis of the three-dimensional model cross-section.
[0235] The present application also provides a system including a server and a front end, wherein the server is used to execute a three-dimensional model section surface geometry analysis method based on the front end, and the front end is used to display a user interaction interface, which includes at least a three-dimensional model, a target collision surface, a section view, a target geometric area, and corresponding geometric measurements.
[0236] In some examples, geometric analysis of any section of a 3D model is implemented on the front end. The user interface displayed by the front end can be seen in Figure 10-Figure 21 shown.
[0237] Specifically, when the user selects the target collision surface on the front end, he can refer to Figure 10-12 The collision surface effect diagram, Fig.10 This is the effect diagram of the collision surface in the X-axis direction. Fig.11 This is the effect diagram of the collision surface in the Y-axis direction. Fig.12 This is the effect diagram of the collision surface in the Z-axis direction.
[0238] For details, see Fig.13 As shown, after the three-dimensional model is sectioned based on the collision surface in the X-axis direction as the target collision surface, the closed contour curve on the section surface can be understood as the target geometric area selected by the user. After the geometric measurements (i.e., the perimeter and area) of the closed contour curve are calculated based on the embodiment of the present application, the perimeter and area of the closed contour curve are displayed on the front end.
[0239] For details, see Fig.14 As shown, after the 3D model is sectioned based on the Z-axis collision surface as the target collision surface, the unselected closed contour area can be calculated by switching the mouse object (i.e., reselecting the target geometric area). The selected closed contour area (i.e., the type of the target geometric area is a closed solid section) contains holes (i.e., closed holes). The area of the holes needs to be eliminated when calculating the area, and there needs to be no response when the mouse is clicked on the holes.
[0240] For details, see Fig.15 As shown, during the collision between the target collision surface and the three-dimensional model, after the reverse sectioning is turned on, the left model of the Z-axis collision surface is retained and rendered through the template buffer, and the right model of the Z-axis collision surface is not rendered.
[0241] For details, see Fig.16 As shown, during the collision between the target collision surface and the three-dimensional model, if the template buffer is not enabled, the models on both sides of the Z-axis collision surface will remain rendered.
[0242] For details, see Fig.17 As shown, during the collision between the target collision surface and the three-dimensional model, the template buffer is turned on, and the model on the side of the X-axis collision surface is retained for rendering.
[0243] For details, see Fig.18 As shown, during the collision between the target collision surface and the three-dimensional model, the template buffer is turned on, and the model on the Y-axis collision surface side is retained for rendering.
[0244] For details, see Fig.19 As shown, during the collision between the target collision surface and the three-dimensional model, the template buffer is turned on, and the model on the Z-axis collision surface side is retained for rendering.
[0245] Specifically, when the Z-axis collision surface is used as the target collision surface, during the collision between the target collision surface and the 3D model, the hidden model part can be seen in Fig. 20 shown.
[0246] Specifically, when the Z-axis collision surface is used as the target collision surface, the cross-section diagram displayed after the target collision surface collides with the 3D model can be seen in Fig.21 shown.
[0247] The present application also provides a computer-readable storage medium, which includes a stored program, wherein the program executes the front-end-based three-dimensional model section geometry analysis method provided by the present application.
[0248] The present application also provides an electronic device, including: a processor, a memory and a bus. The processor and the memory are connected via a bus, the memory is used to store programs, and the processor is used to run the programs, wherein the program executes the front-end-based three-dimensional model section geometry analysis method provided by the present application when it is run.
[0249] In addition, the functions described above in the embodiments of the present application may be at least partially performed by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0250] Although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present application. Certain features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination.
[0251] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
Claims
1. A front-end-based three-dimensional model section geometry analysis method, characterized in that: include: Generate multiple collision surfaces based on the front-end 3D model; Generate multiple line segment groups based on multiple line segments obtained by the collision between the three-dimensional model and a target collision surface; the target collision surface is a collision surface specified by a user to serve as a model cutting plane; the line segments are intersection line segments between triangular facets of the target collision surface and triangular facets of the three-dimensional model; Based on the plurality of line segment groups, generating a plurality of polygons; Determining attribute information of a plurality of said polygons; The attribute information includes at least a geometric metric and a depth value; Based on the attribute information of the target polygon that meets the target condition among the multiple polygons, the geometric measurement of the target geometric area is determined.
2. The method according to claim 1, characterized in that Based on the front-end 3D model, multiple collision surfaces are generated, including: Obtain the three-dimensional model of the front-end input; Constructing a spatial data structure for the three-dimensional model to obtain a corresponding bounding box; Based on the bounding box, collision surfaces corresponding to multiple spatial directions are generated; the multiple spatial directions include an X direction, a Y direction, and a Z direction in a three-dimensional coordinate system; and the size of the collision surface is determined based on the size of the bounding box.
3. The method according to claim 1, characterized in that Based on a plurality of line segments obtained by the collision between the three-dimensional model and the target collision surface, a plurality of line segment groups are generated, including: Determining a target collision surface in the front end that responds to a user input; The target collision surface collides with the three-dimensional model to obtain a plurality of line segments; wherein the collision process uses a template buffer for sectioning rendering, and simultaneously constructs a spatial data structure for the three-dimensional model after the collision, and hides a portion of the three-dimensional model after the collision located on one side of the target collision surface to display a corresponding section view; According to a connected component algorithm, the plurality of line segments are classified to obtain at least one line segment group.
4. The method according to claim 1, characterized in that: Based on the plurality of line segment groups, a plurality of polygons are generated, including: For each of the line segment groups, selecting an initial line segment from the line segment group; Based on a preset connectivity rule, determining the connectivity relationship between the initial line segment and other line segments in the line segment group; the preset connectivity rule is: directly or indirectly connecting with both ends of the initial line segment according to the direction of the initial line segment; Arranging the initial line segment and the other line segments according to the connectivity relationship to obtain an ordered curve; Based on the obtained multiple ordered curves, generate multiple curve groups; Combine multiple ordered curves in the same curve group to obtain a long curve; Based on the obtained plurality of long curves, a plurality of polygons are generated.
5. The method according to claim 4, characterized in that Based on the obtained multiple ordered curves, multiple curve groups are generated, including: According to a preset connectivity threshold, the endpoints of the obtained multiple ordered curves are compared in pairs to obtain the endpoint comparison results of the pairwise ordered curves; According to the endpoint comparison results of the pairwise ordered curves, the plurality of ordered curves are classified to obtain a plurality of curve groups; the curve groups include a plurality of ordered curves that are directly or indirectly connected to each other; wherein, if the endpoint comparison result of any two ordered curves is that the endpoints coincide, it is determined that the any two ordered curves are directly connected; if the endpoint comparison result of a first ordered curve that is directly connected to any ordered curve is that the endpoints coincide with those of a second ordered curve, it is determined that any ordered curve is indirectly connected to the second ordered curve.
6. The method according to claim 4, characterized in that Based on the obtained multiple long curves, multiple polygons are generated, including: For each obtained long curve, de-duplicate points on the long curve to determine the starting point and the end point of the long curve; When the starting point and the end point are the same, closing the long curve to obtain a corresponding polygon; In the case that the starting point and the end point are different, a new end point which is the same as the starting point is added to the long curve, and the long curve after the new end point is added is closed to obtain the polygon.
7. The method according to claim 1, characterized in that The geometric measurement includes at least area and perimeter, and the attribute information of the plurality of polygons is determined, including: For each of the polygons, determining the perimeter of the polygon based on distances between a plurality of vertices on the polygon; Determining the area of the polygon based on the two-dimensional coordinates of a plurality of vertices on the polygon on the target collision surface; Determining a geometric metric of the polygon based on the perimeter and area of the polygon; Performing plane spatial analysis on the plurality of polygons to obtain the parent-child relationship of the plurality of polygons; Based on the parent-child relationship, determine the depth values of the plurality of polygons; wherein the depth value is a natural number, the depth value of any polygon is greater than the depth value of the parent of any polygon, and the difference between the depth value of any polygon and the depth value of the parent of any polygon is 1; Based on the geometrical measurements and depth values of the multiple polygons, attribute information of the multiple polygons is generated.
8. The method according to claim 7, characterized in that Determining a geometrical measure of a target geometrical area based on attribute information of a target polygon that meets the target condition among the plurality of polygons includes: Obtaining a target point; the target point is determined based on the position of the front end in response to a user input; In order of area from small to large, the contour point sets of the plurality of polygons are compared with the target point position respectively, until the target polygon is determined to be obtained, and the comparison between the polygon and the target point position is terminated; the contour point set includes a plurality of contour points, and the contour points are obtained by converting the polygon from a three-dimensional coordinate system to a screen coordinate system; if the contour point set of any polygon includes the target point position, the any polygon is determined as a target polygon that meets the target condition; the target condition is that the contour area of the target polygon displayed on the front end includes the target point position; If the depth value of the target polygon is an even number, determining that the type of the target geometric region is a closed solid section; the target geometric region is a section plane specified by the user on the front end; For the closed solid section, determining at least one child polygon of the target polygon; Calculate the sum of the areas and the sum of the perimeters of at least one child polygon; Determine the area of the target geometric region based on the difference between the area of the target polygon and the sum of the areas; Determine the perimeter of the target geometric area based on the sum of the perimeter of the target polygon and the sum of the perimeters; A geometric metric of the target geometric region is generated based on the area and the perimeter of the target geometric region.
9. The method according to claim 8, characterized in that The method further comprises: If the depth value of the target polygon is an odd number, determining that the type of the target geometric region is a closed hole; For the closed hole, the geometrical metric of the target geometrical area is determined based on the geometrical metric of the target polygon.
10. A front-end-based three-dimensional model section geometry analysis device, characterized in that: include: A model analysis unit, used to generate multiple collision surfaces based on the front-end three-dimensional model; A line segment classification unit, for generating a plurality of line segment groups based on a plurality of line segments obtained by the collision between the three-dimensional model and a target collision surface; the target collision surface is a collision surface specified by a user for serving as a model cutting plane; the line segments are intersection line segments between triangular facets of the target collision surface and triangular facets of the three-dimensional model; A polygon construction unit, used for generating a plurality of polygons based on a plurality of line segment groups; A polygon analysis unit, used to determine attribute information of a plurality of said polygons; The attribute information includes at least a geometric metric and a depth value; The geometrical measurements include at least area and perimeter; The area analysis unit is used to determine the geometrical measurement of the target geometrical area based on the attribute information of the target polygons that meet the target conditions among the multiple polygons.
11. A system, characterized in that: It includes a server and a front end, the server is used to execute the front-end-based three-dimensional model section surface geometry analysis method as described in any of claims 1 to 9, and the front end is used to display a user interaction interface, which includes at least a three-dimensional model, a target collision surface, a section view, a target geometric area and corresponding geometric measurements.
Citation Information
Patent Citations
Section sealing method and device for goaf three-dimensional model
CN114219913A
Method, device and equipment for cutting and displaying three-dimensional model in WEB browser
CN116977608A
Global continuous path construction method based on combined contour and zigzag
CN118570234A
Processor and method for image processing
JP1999175752A
Method for obtaining polygon information of three-dimensional object model
KR101552828B1
Cited By
Method and system for calculating fault plane segmentation rock stratum and electronic equipment
CN120298312A