A method for closed display of dynamic sectioning view of solid surface model
By constructing the organizational structure of the three-dimensional scene of sectioning and adjusting the position of the section surface, the problems of slow calculation speed and incorrect closed display effect in the dynamic section cutting operation of the solid surface model are solved, and convenient and smooth closed display and correct cross-sectional expression are achieved.
Patent Information
- Application Number
- CN202210448278.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-27
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2042-04-27
AI Technical Summary
In the dynamic cutting operation of solid surface models, the calculation speed is slow, the physical units cannot be automatically closed on the section surface, and the display effect of multiple physical units is incorrect.
By constructing a three-dimensional scene organization structure of the section, creating a solid surface view model and a solid surface enclosing box model, adjusting the section surface position and normal direction, hiding the pixels on the normal direction, marking and filling the pixels on the outer contour lines and outer contour surface of the section surface, realizing the closed display of dynamic section view.
It realizes the convenient and smooth use of the section sealing function in any terminal, can intuitively view the section view, meet users' performance requirements for dynamic section operation, and correctly express the section sections of multiple solid units.
Smart Images

Figure CN114596411B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of computer application, and in particular to a method for closed display of dynamic sectioning views of a solid surface model. Background Art
[0002] The solid unit in the solid surface model is composed of closed triangular facets (mesh), which mainly has the characteristics of high-precision expression and is mostly used for three-dimensional terrain entities, geological entities, special-shaped structural entities, etc. With the application of technologies such as three-dimensional GIS and BIM, the industry has accumulated a large number of solid surface models through manual modeling or automated modeling, including geological information models (GIM), building information models (BIM), and city information models (CIM). Among them, in terms of automated modeling technology for geological information models, the Chinese invention patent with publication number CN106558100B applied by the applicant proposes a method for automatic modeling of stratum models based on drilling data, which can realize one-click generation of stratum solid surface models.
[0003] When analyzing rock formations, building structures, and urban spaces, dynamic sectioning of solid surface models is the most common operation, but there are still the following deficiencies:
[0004] 1. The section analysis results are obtained through Boolean operations on the solid surface model. The calculation speed is slow and the model needs to be backed up once for each analysis.
[0005] 2. Through view sectioning analysis, the solid elements of the solid surface model on the sectioning surface cannot be automatically closed, and the visual auxiliary analysis effect is poor.
[0006] 3. Through view sectioning analysis, the solid surface model on the sectioning plane can be closed, but multiple solid units only have a single closed display effect and cannot be expressed correctly. Summary of the invention
[0007] In view of the above-mentioned problems existing in the current sectioning operation, the present invention proposes a method for closed display of dynamic sectioning views of solid surface models, so as to help users use the sectioning closure function conveniently and smoothly on any terminal, and allow users to intuitively view the sectioning view status.
[0008] The technical solution adopted by the present invention is as follows: a method for closed display of dynamic sectioning views of a solid surface model, comprising the following steps:
[0009] 1) Construct the sectioning 3D scene organization structure, create the solid surface view model and solid surface bounding box model based on the solid surface model, and determine the initial sectioning plane position and normal direction according to the solid surface model space occupation and current viewport;
[0010] 2) Adjust the section plane position and normal direction of the solid surface model, and hide the pixels on the normal direction side of the solid surface view model;
[0011] 3) Mark the pixels of the outer contour line of the section position of the solid surface model to identify the section position;
[0012] 4) Fill the pixels of the outer contour surface of the sectioning surface of the solid surface model, identify the original appearance features of the solid surface model, and realize the closed display of the sectioning view.
[0013] Repeat steps 2) to 4) to realize closed display of dynamic section view.
[0014] Preferably, the solid surface view model is copied based on the prepared solid surface model, and its composition, size, orientation, and appearance characteristics are consistent with the prepared solid surface model. The composition means that the solid surface view model is composed of one or more solid units; the appearance characteristics may include color, pattern, transparency, etc.
[0015] Preferably, the solid surface bounding box model uses a minimum cube or sphere to represent the space occupied by the solid surface model, and can also be represented by shapes such as a cuboid, a cylinder or an ellipsoid.
[0016] Preferably, the initial section plane position passes through the center point of the solid surface bounding box model, and its normal is parallel to the axis of the solid surface bounding box model, and the normal direction faces the current viewport.
[0017] Preferably, the pixels of the outer contour line of the section surface position can be set to a fixed color, the same color as the solid surface model, or the opposite color of the solid surface model, and the pixel size can also be adjusted.
[0018] Preferably, when the current viewport is translated, rotated, or scaled, the solid surface view model, solid surface bounding box model, section plane, and normal in the three-dimensional scene change synchronously with the viewport, the relative position and normal direction of the section plane with reference to the solid surface view model remain unchanged, and the hidden part of the solid surface view model remains unchanged.
[0019] As a preferred embodiment, the outer contour line and the outer contour surface both inherit the unique coding attribute of the entity unit corresponding to the intersection of the section plane and the entity surface view model. The unique coding attribute is used to identify the entity unit and can be the entity unit ID number or code.
[0020] The method of the present invention is universal in computer-aided design, geographic information system, building information model and other applications, and can be applied to three-dimensional visualization analysis of geological bodies, building structures and urban spaces. The beneficial effect of the method of the present invention is that multiple entity units of a solid surface model can be dynamically sectioned and closed at the sectioned sections at the same time. Specifically, it includes at least the following aspects:
[0021] 1. The method proposed in the present invention is based on the principle of graphics, fully utilizes the computing power advantage of the graphics card, and fully meets the performance requirements of users for dynamic sectioning operations;
[0022] 2. The method proposed in the present invention can realize the closed display of a single entity unit of a solid surface model, and the sectioning effect is better;
[0023] 3. The method proposed in the present invention can dynamically section multiple solid units of a solid surface model at the same time, and can ensure the correct expression of the model section.
[0024] The above beneficial effects facilitate experience exchange, scientific decision-making and risk avoidance among users at different levels, and are of great significance to the value mining and application promotion of solid surface models. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 A flow chart of a method for closing a cutaway view of a solid surface model according to an embodiment of the present invention;
[0026] Figure 2 An example diagram of a stratum solid surface model according to an embodiment of the present invention;
[0027] Figure 3 An example diagram of determining a cutting normal direction according to an embodiment of the present invention;
[0028] Figure 4 A schematic diagram of a structure in which pixels on one side of the normal direction are hidden in an embodiment of the present invention;
[0029] Figure 5 A schematic diagram of the operation of marking outer contour line pixels according to an embodiment of the present invention;
[0030] Figure 6 Schematic diagram of a section view changing synchronously with a viewport according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to make the features of the method described in the present invention more complete and clear, the following takes the formation model dynamically generated by drilling data of a certain project as an example, combined with the accompanying drawings, to illustrate the specific implementation of the present invention.
[0032] The graphics rendering environment used in this embodiment is WebGL2.0.
[0033] The following are specific steps for dynamically cutting and closing a solid surface model in this embodiment:
[0034] S1: Construct the sectioning 3D scene organization structure, create a solid surface view model and a solid surface bounding box model based on the solid surface model, and determine the initial sectioning plane position and normal direction according to the solid surface model space position and the current viewport.
[0035] First, a solid surface model needs to be constructed or prepared in advance. The solid surface model of this embodiment is a stratigraphic model, which is composed of a layer of stratigraphic units or multiple layers of stratigraphic units of different properties. Each stratigraphic unit can also be called a solid unit. It is generated using the publication number CN106558100B and the name "A method for automatically building a stratigraphic model based on drilling data". Figure 2 As shown, the stratigraphic model of this embodiment is formed by superimposing three stratigraphic units of different properties, which is recorded as DCModel in this embodiment.
[0036] Then, a solid surface view model and a solid surface bounding box model are constructed based on the solid surface model. The solid surface view model of this embodiment is copied from the stratum model and is recorded as DCViewModel. The solid surface view model is also composed of three stratum units, and the size, orientation, and appearance characteristics of these three stratum units are consistent with the stratum model. The appearance characteristics may refer to characteristics such as color, lithology, and transparency. The solid surface bounding box model of this embodiment is centered on the center point of the solid surface model and circumscribed with a minimum cube, which is recorded as DCBoxModel in this embodiment. It should be noted that the solid surface bounding box model of this embodiment can also be centered on the center point of the solid surface model, and the circumscribed minimum sphere represents the spatial position of the solid surface model.
[0037] Finally, the above models are added to the scene in turn to construct a cut-away three-dimensional scene organization structure for storing model data. In order to better control the identification of the outer contour line and the outer contour surface, this embodiment needs to use the unique code of each stratigraphic unit, that is, the stratigraphic code. Specifically, the stratigraphic model of this embodiment has three stratigraphic units, namely DCModel1, DCModel2, and DCModel3. Among them: the stratigraphic code of DCModel1 is ①; the stratigraphic code of DCModel2 is ②; the stratigraphic code of DCModel3 is ③.
[0038] In addition, the initial section plane position and normal direction are determined according to the spatial location of the solid surface model and the current viewport. In this embodiment, the center point of the DCBoxModel is taken as the initial section plane position, and the section plane normal is facing the current viewport. Figure 3The schematic diagram of the cutting normal in this embodiment is shown. In this embodiment, the vector composed of the initial cutting plane position O and the camera (i.e., viewport) position C , when the vector Normal to cutting plane When the angle between is acute, the normal This is the normal direction of the cutting plane.
[0039] S2: Adjust the section plane position and normal direction of the solid surface model, and hide the pixels on one side of the normal direction in the solid surface view model.
[0040] In order to achieve the dynamic sectioning effect, after the 3D scene organization structure is built, it is necessary to adjust the sectioning position O and normal of the stratum model. Once the section is cut, it can be pixel-marked and filled in subsequent viewports. By dragging the section position, the closed display effect of the section view changes accordingly.
[0041] In this embodiment, the method of hiding the pixels on one side of the normal direction in the solid surface view model is as follows: when the angle between the vector formed by any point of DCModel and the position of the cutting plane and the normal of the cutting plane is an acute angle, the points on the same side as the normal of the cutting plane are discarded. Figure 4 As shown, in this embodiment, point A is a point on DCModel, and point O and point A form a vector ,vector Normal to cutting plane If the angle θ between is an acute angle, then point A is discarded, that is, it is not drawn. Discard all points of DCModel that have an acute angle between the vector formed by point O and the normal of the section plane, and the result is Figure 4 The area enclosed by the dotted line.
[0042] S3: Mark the pixels of the outer contour line of the section position of the solid surface model to identify the section position.
[0043] The cross-section area of the solid surface model is marked in the template buffer in the GPU (Graphic Processing Unit). There is a one-to-one correspondence between the template buffer and the pixels of the viewport, that is, the pixels of the cross-section of the solid surface model in the viewport are marked.
[0044] The stratigraphic code of the corresponding stratigraphic unit is inherited by the outer contour line and the outer contour surface by marking the pixels in the template buffer. Specifically, by setting the rendering state attribute, the double-sided drawing entity view model has different results at the outer contour line, but the results at other positions are the same, thus triggering the writing of the stratigraphic code in the template buffer corresponding to the outer contour line.
[0045] This embodiment sets the rendering status attributes of the solid surface view model according to the following rules: when drawing the back side of the model, the value in the corresponding template buffer area is marked or assigned as the solid surface model stratum code; when drawing the front side of the model, the value in the corresponding template buffer area is marked or assigned as 0.
[0046] It should be noted that the setting of the rendering state attributes of the solid surface model of this embodiment adopts the principles of graphics and are conventional technical means of graphics. The difference is that when the template test is turned on in this embodiment, the setting of the rendering state attributes of the solid surface model can meet the purpose of identifying the pixels of the outer contour line.
[0047] Figure 5 The figure shows a specific example of the process of double-sided drawing of a solid surface view model and marking the pixels of the outer contour line. Figure 5 -t1 means that the initial value of the corresponding template buffer in the viewport is 0 when the stratum model is not drawn; Figure 5 -t2 is the template buffer area corresponding to the viewport after drawing the back side of the solid surface view model. It is divided into four areas according to the drawn solid surface model. Their unique codes are 0, ①, ②, and ③ respectively. At this time, in addition to the non-zero value marked in the cross-section area, there are also non-zero areas on the side and top surfaces; Figure 5 -t3 is the template buffer area corresponding to the viewport after drawing the front of the solid surface view model. It is divided into four areas according to the drawn solid surface model. The marking values are 0, ①, ②, ③, respectively. Figure 5 The difference between -t2 is that in this case, only the outer contour area is marked with a non-zero value, that is, the formation code.
[0048] S4: Fill the pixels of the outer contour surface of the sectioning surface of the solid surface model, identify the original appearance features of the solid surface model, and realize the closed display of the sectioning view.
[0049] In this embodiment, the pixels of the outer contour surface at the position of the section plane are set to the same color as the solid surface model. It should be noted that the pixels of the outer contour surface at the position of the section plane can also be set to a fixed color, or inversely colored with the solid surface model, and the pixel size can also be adjusted. In this embodiment, the stratigraphic unit color is red, and the red RGB color value can be (255,0,0). When the pixels of the outer contour surface are the same color as the solid surface model, the RGB value of the pixels of the outer contour surface is also (255,0,0); when the pixels of the outer contour surface are inversely colored with the solid surface model, the RGB value of the pixels of the outer contour surface is (255-255,255-0,255-0), that is, (0,255,255); the pixel size can be adjusted, that is, the pixels can be thickened or thinned, which means that the number of pixels occupying the outer contour surface area changes with the viewport. When the viewport is enlarged, the number of pixels occupying the outer contour surface area increases; otherwise, it decreases. The pixels of the outer contour surface are set to inverse and thicken to highlight the position.
[0050] By setting the rendering state attribute, the solid surface bounding box model is drawn to ensure that the template test is passed only when the value in the template buffer is a stratum code. Through step S3, only the value in the template buffer of the outer contour line area is marked as a stratum code, so only the pixels in the outer contour surface area are filled.
[0051] Repeat steps S2 to S4 to realize closed display of dynamic section view.
[0052] When the current viewport is translated, rotated, or scaled, the solid surface view model, solid surface bounding box model, section plane, and normal in the 3D scene change synchronously with the viewport. The relative position and normal direction of the section plane with reference to the solid surface view model remain unchanged, and the hidden part of the solid surface view model remains unchanged.
[0053] Figure 6 The figure shows an example of how the solid surface view model, solid surface bounding box model, cut plane, and normal in a 3D scene change as the viewport rotates. Figure 6 -t1 viewport orientation, the sectioning normal is parallel to the axis of the solid surface bounding box model, and the normal direction is facing the current viewport; Figure 6 -t2 The viewport orientation has changed, and the viewport rotates to the left by a certain angle. At this time, the solid surface view model, solid surface bounding box model, section plane and normal are triggered to change synchronously with the viewport, but the relative position and normal direction of the section plane with reference to the solid surface view model remain unchanged, and the hidden part of the solid surface view model remains unchanged.
[0054] When you exit or close the dynamic sectioning view, the sectioning 3D scene is also closed and the viewport returns to a state where only the solid surface model is displayed.
[0055] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, a person skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for closed display of dynamic sectioning views of a solid surface model, characterized in that The steps include: 1) Construct the sectioning 3D scene organization structure, create the solid surface view model and solid surface bounding box model based on the solid surface model, and determine the initial sectioning plane position and normal direction according to the solid surface model space occupation and current viewport; 2) Adjust the section plane position and normal direction of the solid surface model, and hide the pixels on the normal direction side of the solid surface view model; 3) Mark the pixels of the outer contour line of the section position of the solid surface model to identify the section position; 4) Fill the pixels of the outer contour surface of the sectioning surface of the solid surface model, identify the original appearance features of the solid surface model, and realize the closed display of the sectioning view; Repeat steps 2) to 4) to realize closed display of dynamic section view.
2. The method for closed display of dynamic section views of a solid surface model according to claim 1, characterized in that The composition, size, orientation and appearance characteristics of the solid surface view model are consistent with the prepared solid surface model; the solid surface bounding box model represents the spatial location of the solid surface model with a minimum cube or sphere; the initial section plane position passes through the center point of the solid surface bounding box model, its normal is parallel to the axis of the solid surface bounding box model, and the normal direction faces the current viewport.
3. The method for closed display of dynamic section views of a solid surface model according to claim 1, characterized in that The pixel color of the outer contour line of the section surface position can be a fixed color, the same color as the solid surface model, or the inverse color of the solid surface model, and the pixel size is adjustable.
4. The method for closed display of dynamic section views of a solid surface model according to claim 1, characterized in that When the current viewport is translated, rotated or scaled, the solid surface view model, solid surface bounding box model, section plane and normal in the three-dimensional scene change synchronously with the viewport, the relative position and normal direction of the section plane with reference to the solid surface view model remain unchanged, and the hidden part of the solid surface view model remains unchanged.
5. The method for closed display of dynamic section views of a solid surface model according to any one of claims 1 to 4, characterized in that The solid surface view model is created by copying the solid surface model; the outer contour line and outer contour surface inherit the unique coding attribute of the solid unit corresponding to the intersection of the section plane and the solid surface view model; the unique code represents each stratigraphic unit code of the solid surface model.
Citation Information
Patent Citations
An Automatic Formation Modeling Method Based on Borehole Data
CN106558100B
Method for creating three-dimensional shape data, apparatus for creating three-dimensional shape data, and computer-readable storage medium
CN102985950A
System for displaying solid cuts for surfaces of solid models
EP0549183A2