A dynamic sectioning and section filling method for 3D geological models based on Cesium engine
Through the dynamic sectioning and section filling method of the Cesium engine, the ray method is used to determine the sectioning range points and construct the wall, which solves the problem of the internal hollowness of the three-dimensional geological model after sectioning, and achieves a complete display and optimized sectioning of the internal geological structure. All processing.
Patent Information
- Application Number
- CN202410658262.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-09-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The hollow interior of the three-dimensional geological model after sectioning cannot completely display the geological structure, and there is a lack of effective display methods.
The dynamic sectioning and section filling method based on the Cesium engine is used to determine the sectioning range points through the ray method, build the sectioning plane and fill the wall to display the internal geological structure of the three-dimensional geological model.
It achieves a complete display of the internal geological structure of the three-dimensional geological model, solves the hollow problem, provides intuitive cutting and filling solutions, and optimizes the dynamic cutting process.
Smart Images

Figure CN118229907B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of earth science technology, and in particular to a three-dimensional geological model dynamic sectioning and section filling method based on the Cesium engine. Background Art
[0002] Three-dimensional visualization of geological models is one of the current scientific computing visualization studies. Cesium is a JavaScript engine library for creating a real three-dimensional earth on the web side. It supports the display of various geographic elements in 2D, 2.5D and 3D. Cesium can create various three-dimensional collection models and support the loading of multiple custom model formats such as 3D Tiles, GLB and FBX. A three-dimensional geological model is a three-dimensional model built using software based on the results collected by geological drilling, which can clearly show the three-dimensional spatial relationship between three-dimensional elements in a three-dimensional scene. And it can rely on setting different colors, textures, transparency and other methods to express the spatial distribution of various geological elements intuitively, clearly and three-dimensionally. In Cesium, the geological spatial distribution of the outermost part of the three-dimensional geological model can be intuitively seen, but the geological spatial distribution of the interior cannot be intuitively viewed. Moreover, the constructed three-dimensional geological model is generally only a layer of shell on the outside, and the inside is hollow. Therefore, after the three-dimensional model is cut, a reasonable method for displaying the geological structure of the cutting range should be designed. The present invention provides a three-dimensional geological model dynamic cutting and profile filling method based on the Cesium engine. Summary of the invention
[0003] 1. Technical issues to be resolved
[0004] The present invention provides a method for dynamic sectioning and section filling of a three-dimensional geological model based on the Cesium engine, which overcomes the problem that the interior of the three-dimensional geological model is hollow and cannot fully display the geological structure, and fills the interior of the sectioned three-dimensional geological model by constructing a wall.
[0005] (II) Technical solution
[0006] In order to solve the above technical problems, the technical solution provided by the present invention is: a method for dynamic sectioning and section filling of a three-dimensional geological model based on the Cesium engine is provided, comprising the following steps:
[0007] (1) Load and display the 3D geological model through Cesium and obtain the rotation matrix T of the model. The rotation matrix is usually a 4×4 matrix used to specify the reference system of the drawn object, including the three parameters of position, rotation, and scaling;
[0008] (2) Determine the coordinate array U of the point on the surface sectioning range of the 3D geological model by using the ray method w , according to the array Uw Loop to build the cutting plane and put it into the cutting plane array C;
[0009] (3) According to the three-dimensional geological model surface section range point coordinate array U w Obtain the sectioning range points of the three-dimensional geological model sectioning range in all stratigraphic layers, and put them into the coordinate array Q of the sectioning range points of all stratigraphic layers;
[0010] (4) sectioning the three-dimensional geological model according to the created sectioning plane array C;
[0011] (5) Construct a wall based on the coordinate array Q of all the points in the sectioning range of the stratigraphic layer obtained in step (3) and fill the section.
[0012] Furthermore, the specific implementation method of step (1) is as follows:
[0013] When obtaining the rotation matrix T of the three-dimensional geological model, it should be determined whether the model has been moved and scaled. If it has not been moved, the rotation matrix T is the rotation matrix of the model itself; if it has been moved, the rotation matrix T is calculated based on the coordinates of the center point of the model bounding box using the CesiumTransforms eastNorthUpToFixedFrame method.
[0014] Furthermore, the specific implementation method of step (2) is as follows:
[0015] (a) With the 3D geological model sectioning range point selected by the user as the origin, a ray is constructed along the downward direction perpendicular to the earth's surface. The intersection of the ray and the 3D geological model surface is put into the 3D geological model surface sectioning range point coordinate array U w If the user selects internal sectioning, the array U w The points in the array should be arranged counterclockwise; if the user chooses external sectioning, the array U w The points in should be arranged clockwise;
[0016] (b) According to the rotation matrix T of the three-dimensional geological model, the three-dimensional geological model surface section range point coordinate array U is looped w Convert the 3D world coordinate system to the 3D model local coordinate system to obtain the coordinate array U of each point in the 3D local coordinate system. s (c) Calculate the direction vectors of each edge of the 3D geological model section range and construct a direction vector L perpendicular to the earth's surface u , so that the direction vector L of each edge ri With the vertical upward direction vector L u Cross product, calculate the plane normal vector L of the surface formed by the vector perpendicular to the cutting range edge of the three-dimensional model and the vertical upward vector of the earth's surface f , and for L fPerform normalization:
[0017] L ri =((X i+1 -X i ), (Y i+1 -Y i ), (Z i+1 -Z i ))
[0018] L u =(0,0,1)
[0019] L f =NormaliZation(L ri ×L u )
[0020] Where L ri is the direction vector of the edge constructed by the i-th point and the i+1-th point in the sectioning range, L u is the vertical upward direction vector of the earth’s surface, L f is the plane normal vector finally obtained;
[0021] (d) According to the coordinate array U of the point on the surface sectioning range of the three-dimensional geological model in the local coordinate system s Loop, use Cesium Plane fromPointNormal method, according to the current point coordinates (X i , Y i Z i ) and the plane normal vector L f Construct the cutting plane and put it into the cutting plane array.L.
[0022] Furthermore, the specific implementation method of step (3) is as follows:
[0023] (a) Pick up the world coordinates of two points in the direction perpendicular to the surface of the three-dimensional geological model in two adjacent geological layers of the three-dimensional geological model, calculate the downward direction vector along these two points, and perform normalization to obtain the direction vector L of the section surface in the world coordinate system. w ;
[0024] (b) The coordinate array U of the point on the surface section of the 3D geological model is obtained by equidistant interpolation. w Interpolate and expand array U w According to the array U w Loop, according to the array U w Points inside (X w1i , Y w1i , Z w1i ) and direction vector L wCreate a ray, use the created ray to perform collision detection with the internal stratigraphic layer of the 3D geological model to obtain the intersection point, and then compare it with the direction vector L again according to the obtained intersection point. w Construct the ray and then perform collision detection on the next internal stratum layer. Circularly obtain the 3D world coordinates (X wmi , Y wni , Z wni ) and put in the coordinate array Q of the section range of all stratigraphic layers.
[0025] Furthermore, the specific implementation method of step (5) is as follows:
[0026] (a) Transpose the coordinate array Q of the section range of all stratigraphic layers in the three-dimensional geological model to obtain the transposed stratigraphic layer section range coordinate array Q T , where Q T Each row of coordinates represents the coordinates of each stratigraphic sectioning point;
[0027] (b) Cycle Q T For each row of T The coordinate arrays of the current row and the next row are used to calculate and create the elevation arrays H of the current row and the next row. n and H n+1 ;
[0028] (c) According to the Cesium wall method and the coordinate array and elevation array H of the current row n and H n+1 Create walls and color them according to the texture properties of different geological layers in the 3D geological model.
[0029] (III) Beneficial effects
[0030] The advantages of the present invention are:
[0031] The present invention combines Cesium technology and WEBGL technology, provides a three-dimensional geological model dynamic sectioning and section filling method based on the Cesium engine, optimizes the processing process of dynamic sectioning of the three-dimensional geological model; designs a method for obtaining the sectioning range points of each surface of the three-dimensional geological model based on the ray method, and constructs walls according to the obtained sectioning range points to fill the sections, thereby solving the problem of internal hollowness of the geological three-dimensional model after sectioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is the overall network flow chart of the present invention.
[0033] Figure 2 This is a schematic diagram of the present invention using internal sectioning to section the model.
[0034] Figure 3 This is a schematic diagram of the present invention using external sectioning to section the model. DETAILED DESCRIPTION
[0035] In order to make the purpose, content, and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the accompanying drawings and embodiments:
[0036] First, this embodiment displays and slices a three-dimensional geological model based on Cesium, a Web-based open source engine, and fills the section through the Cesium wall method. In the description of the present invention, it should be understood that the terms "left", "right", "front", "back", "top", "bottom", etc., indicating the orientation or position relationship are based on the orientation or position relationship shown in the accompanying drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0037] Reference Figure 1 , the specific implementation steps of the present invention are:
[0038] Step 1: Load and display the three-dimensional geological model through Cesium to obtain the rotation matrix T of the model; based on the above technical solution, the step 1 includes:
[0039] When obtaining the rotation matrix T of the three-dimensional geological model, it should be determined whether the model has been moved and scaled. If it has not been moved, the rotation matrix T is the rotation matrix of the model itself; if it has been moved, the rotation matrix T is calculated based on the coordinates of the center point of the model bounding box using the CesiumTransforms eastNorthUpToFixedFrame method.
[0040] Step 2: Determine the coordinate array U of the cutting range point on the surface of the 3D geological model by using the ray method w , according to the array U w Loop to construct the cutting plane and put it into the cutting plane array C; Based on the above technical solution, the step 2 includes:
[0041] (a) With the 3D geological model sectioning range point selected by the user as the origin, a ray is constructed along the downward direction perpendicular to the earth's surface. The intersection of the ray and the 3D geological model surface is put into the 3D geological model surface sectioning range point coordinate array U w If the user selects internal sectioning, the points in the array should be arranged counterclockwise; if the user selects external sectioning, the points in the array should be arranged clockwise;
[0042] (b) According to the rotation matrix T of the three-dimensional geological model, the three-dimensional geological model surface section range point coordinate array U is looped w Convert the 3D world coordinate system to the 3D model local coordinate system to obtain the coordinate array U of each point in the 3D local coordinate system. s ;
[0043] (c) Calculate the direction vectors of each edge of the 3D geological model section range and construct a direction vector L perpendicular to the earth's surface u , so that the direction vector L of each edge ri With the vertical upward direction vector L u Cross product, calculate the plane normal vector L of the surface formed by the vector perpendicular to the cutting range edge of the three-dimensional model and the vertical upward vector of the earth's surface f , and for L f Perform normalization processing;
[0044] L ri =((X i+1 -X i ), (Y i+1 -Y i ), (Z i+1 -Z i ))
[0045] L u =(0,0,1)
[0046] L f =Normalization(L ri ×L u )
[0047] Where L ri is the direction vector of the edge constructed by the i-th point and the i+1-th point in the sectioning range, L u is the vertical upward direction vector of the earth’s surface, L f is the plane normal vector finally obtained;
[0048] (d) According to the coordinate array U of the point on the surface sectioning range of the three-dimensional geological model in the local coordinate system s Loop, use Cesium Plane fromPointNormal method, according to the current point coordinates (X i , Y i Z i ) and the plane normal vector L f Construct the cutting plane and put it into the cutting plane array.C.
[0049] Since the interior of the 3D geological model is hollow, the section surface needs to be filled after the 3D geological model is sectioned. This example uses Cesium Entity to create a wall entity to fill the section surface of the 3D geological model.
[0050] Step 3: Calculate the coordinate array U of the sectioning range point on the surface of the 3D geological model w Obtain the sectioning range points of the three-dimensional geological model sectioning range in all stratigraphic layers, and put them into the coordinate array Q of the sectioning range points of all stratigraphic layers; based on the above technical solution, the step three includes:
[0051] (a) Pick up the world coordinates of two points in the direction perpendicular to the surface of the three-dimensional geological model in two adjacent geological layers of the three-dimensional geological model, calculate the direction vectors of the two points, and perform normalization processing to obtain the direction vector L of the section surface in the world coordinate system. w ;
[0052] (b) The coordinate array U of the point on the surface section of the 3D geological model is obtained by equidistant interpolation. w Interpolate and expand array U w According to the array U w Loop, according to the array U w Points inside (X w1i , Y w1i , Z w1i ) and direction vector L w Create a ray, use the created ray to perform collision detection with the internal stratigraphic layer of the 3D geological model to obtain the intersection point, and then compare it with the direction vector L again according to the obtained intersection point. w Construct the ray and then perform collision detection on the next internal stratum layer. Circularly obtain the 3D world coordinates (X wni , Y wni , Z wni ), put all the stratigraphic section range coordinate array Q. The key code is as follows:
[0053] let direction = Cesium.Cartesian3.normalize(sub, direction) / / Normalize the direction vector
[0054] let ray = new Cesium.Ray(point, direction); / / define ray
[0055] let result = window.viewer.scene.pickFromRay(ray); / / Calculate the intersection
[0056] pointHeightOnce.push(result.position); / / Add the first-layer intersection to the intersection array
[0057] for(let i=0;i<4;i++){
[0058] if(Ii){ / / Process the first layer intersection
[0059] let startPoint=result.position; / / Get the first layer intersection
[0060] ray = new Cesium.Ray(result.position, direction); / / Create ray
[0061] result = window.viewer.scene.pickFromRay(ray); / / Get the lower layer intersection point according to the ray
[0062] if(typeof(result)!=="undefined"){ / / Judge whether there is an intersection
[0063] pointHeightOnce.push(result.position); / / If it exists, put it into the intersection array
[0064] tempPoint = result.position;}}else{ / / Process the non-first-layer intersection
[0065] let startPoint=tempPoint; / / Get the coordinates of the intersection point on the previous layer
[0066] ray = new Cesium.Ray(tempPoint, direction); / / Create ray
[0067] result = window.viewer.scene.pickFromRay(ray); / / Get the next layer of intersection
[0068] if(typeof(result)!=="undefined"){ / / Judge whether there is an intersection
[0069] pointHeightOnce.push(result.position); / / If it exists, put it into the intersection array
[0070] tempPoint = result.position;}}} / / Update the coordinates of the intersection point on the previous layer
[0071] pointHeight.push(pointHeightOnce); / / Put the set of ground plane coordinates into the array
[0072] Among them, direction is the direction vector of the geological model section in the world coordinate system, ray is the ray constructed according to the current point and direction, result is the collision point between the ray and the stratigraphic layer, and pointHeight is the coordinate array of the section range of all stratigraphic layers.
[0073] Step 4: Slice the three-dimensional geological model according to the created slice plane array C.
[0074] Step 5: construct a wall and fill the section according to the coordinate array Q of all geological layer section range points obtained in step (3); based on the above technical solution, step 5 includes:
[0075] (a) Transpose the coordinate array Q of the section range of all stratigraphic layers in the three-dimensional geological model to obtain the transposed stratigraphic layer section range coordinate array Q T , where Q T Each row of coordinates represents the coordinates of each stratigraphic sectioning point;
[0076] (b) Cycle Q T For each row of T The coordinate arrays of the current row and the next row are used to calculate and create the elevation arrays H of the current row and the next row. n and H n+1 ;
[0077] (c) According to the Cesium wall method and the coordinate array and elevation array H of the current row n and H n+1 Create walls and color them according to the texture characteristics of different geological layers in the 3D geological model. The key codes are as follows:
[0078] for(let i=0;i<pointArray.length;i++){ / / Iterate the transposed stratigraphic section range array
[0079] if(i!==pointArray.length-1){ / / Judge whether it is the last layer, if not
[0080] currentArray.forEach(function(item){ / / Iterate the points of the current formation
[0081] const cartographic = Cesium.Cartographic.fromCartesian(item); / / Convert point to Cartographic
[0082] firstHeight.push(cartographic.height)}) / / Create the current formation elevation array
[0083] nextArray.forEach(function(item){ / / Iterate over the points of the next stratum
[0084] const cartographic = Cesium.Cartographic.fromCartesian(item); Convert the point to CartographicnextHeight.push(cartographic.height)}) / / Create the next layer elevation array
[0085] window.viewer.entities.add({id:featureName[i], / / Create a wall
[0086] wall:{positions:currentArray, / / Create a wall based on the current stratum coordinate point array
[0087] maximumHeights:firstHeight, / / The maximum elevation is the current formation elevation array
[0088] minimumHeights:nextHeight, / / The minimum elevation is the lower stratum elevation array
[0089] material:featureColor[i], / / Set material
[0090] outline:false,}}); / / Outer border settings
[0091] }else{let heightArray=[]; / / Process the last layer
[0092] pointArray[i].forEach(function(item){ / / Iterate the points of the current formation
[0093] const cartographic = Cesium.Cartographic.fromCartesian(item); / / Convert point to Cartographic heightArray.push(cartographic.height)}) / / Create current formation elevation array
[0094] window.viewer.entities.add({id:featureName[i], / / Create a wall
[0095] wall:{positions:pointArray[i], / / Create a wall based on the current stratum coordinate point array
[0096] maximumHeights:heightArray, / / The maximum height is the current stratum height array
[0097] minimumHeights:Array(pointArray[i].length).fill(-1000), / / Minimum height is -1000 material:featureColor[i], / / Set material
[0098] outline:false,}}); / / Outer border settings
[0099] }}
[0100] Among them, currentArray is the profile array of the current geological layer, nextArray is the profile array of the next geological layer, firstHeight is the elevation array of the current geological layer, and nextHeight is the elevation array of the next geological layer.
[0101] Therefore, in summary, the technical solution provided by the present invention has the following advantages over the prior art:
[0102] First, the present invention is based on the Web, and users can observe and analyze three-dimensional geological models without downloading professional tools;
[0103] Secondly, the present invention is based on the dynamic selection of the sectioning range. The user can select the area of interest for sectioning, and provides two modes of internal sectioning and external sectioning, which is convenient for the user to observe the section situation;
[0104] Finally, the present invention provides a method for obtaining the internal stratum surface of a three-dimensional geological model, and based on this method, a more complete solution for filling the profile of a hollow three-dimensional geological model is proposed.
[0105] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic features of the present invention. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the attached claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved.
[0106] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A method for dynamic sectioning and section filling of a three-dimensional geological model based on the Cesium engine, characterized in that: The following steps are involved: (1) Load and display the 3D geological model through Cesium and obtain the rotation matrix T of the model; (2) Determine the coordinate array U of the point on the surface sectioning range of the 3D geological model by using the ray method w , according to the array U w Loop to build the cutting plane and put it into the cutting plane array C; (3) According to the three-dimensional geological model surface section range point coordinate array U w Obtain the sectioning range points of the three-dimensional geological model sectioning range in all stratigraphic layers, and put them into the coordinate array Q of the sectioning range points of all stratigraphic layers; (4) sectioning the three-dimensional geological model according to the created sectioning plane array C; (5) constructing a wall according to the coordinate array Q of all the points in the sectioning range of the stratigraphic layer obtained in step (3) and filling the section; The specific method in step (2) is as follows: (a) With the 3D geological model sectioning range point selected by the user as the origin, a ray is constructed along the downward direction perpendicular to the earth's surface; the intersection of the ray and the 3D geological model surface is placed in the 3D geological model surface sectioning range point coordinate array U w ; If the user selects internal sectioning, array U w The points in the array should be arranged counterclockwise; if the user chooses external sectioning, the array U w The points in should be arranged clockwise; (b) According to the rotation matrix T of the three-dimensional geological model, the three-dimensional geological model surface section range point coordinate array U is looped w Convert the 3D world coordinate system to the 3D model local coordinate system to obtain the coordinate array U of each point in the 3D local coordinate system. s ; (c) Calculate the direction vectors of each edge of the 3D geological model section range and construct a direction vector L perpendicular to the earth's surface. u , so that the direction vector L of each edge ri With the vertical upward direction vector L u Cross product, calculate the plane normal vector L of the surface formed by the vector perpendicular to the cutting range edge of the three-dimensional model and the vertical upward vector of the earth's surface f , and for L f Perform normalization: L ri =((X i+1 -X i ),(Y i+1 -Y i ),(Z i+1 -Z i )) L u =(0,0,1) L f =Normalization(L ri ×L u ) Where L ri is the direction vector of the edge constructed by the i-th point and the i+1-th point in the sectioning range, L u is the vertical upward direction vector of the earth’s surface, L f is the plane normal vector finally obtained; (d) According to the coordinate array U of the point on the surface sectioning range of the three-dimensional geological model in the local coordinate system s Loop, use CesiumPlane fromPointNormal method, according to the current point coordinates (X i , Y i , Z i ) and the plane normal vector L f Construct the cutting plane and put it into the cutting plane array C; The specific method in step (3) is as follows: (a) Pick up the world coordinates of two points in the direction perpendicular to the surface of the three-dimensional geological model in two adjacent geological layers of the three-dimensional geological model, calculate the downward direction vector along these two points, and perform normalization to obtain the direction vector L of the section surface in the world coordinate system. w ; (b) The coordinate array U of the point on the surface section of the 3D geological model is obtained by equidistant interpolation. w Interpolate and expand array U w ; According to array U w Loop, according to the array U w Points inside (X w1i , Y w1i , Z w1i ) and direction vector L w Create a ray, use the created ray to perform collision detection with the internal stratigraphic layer of the 3D geological model to obtain the intersection point, and then compare it with the direction vector L again according to the obtained intersection point. w Construct the ray and then perform collision detection on the next internal stratum layer; loop to obtain the 3D world coordinates (X wni, Y wni, Z wni ) and put in the coordinate array Q of the section range of all stratigraphic layers.
2. According to claim 1, a three-dimensional geological model dynamic cutting and profile filling method based on the Cesium engine is characterized in that: The specific method in step (1) is as follows: When obtaining the rotation matrix T of the three-dimensional geological model, it should be determined whether the model has been moved and scaled. If it has not been moved, the rotation matrix T is the rotation matrix of the model itself; if it has been moved, the rotation matrix T is calculated based on the coordinates of the center point of the model bounding box using the Cesium Transforms eastNorthUp ToFixedFrame method.
3. The method for dynamic sectioning and section filling of a three-dimensional geological model based on the Cesium engine according to claim 1, characterized in that: The specific method in step (5) is as follows: (a) Transpose the coordinate array Q of the section range of all stratigraphic layers in the three-dimensional geological model to obtain the transposed stratigraphic layer section range coordinate array Q T , where Q T Each row of coordinates represents the coordinates of each stratigraphic sectioning point; (b) Cycle Q T For each row of T The coordinate arrays of the current row and the next row are used to calculate and create the elevation arrays H of the current row and the next row. n and H n+1 ; (c) According to the Cesium wall method and the coordinate array and elevation array H of the current row n and H n+1 Create walls and color them according to the texture properties of different geological layers in the 3D geological model.
