CN115587451A - Dynamic updating method of webpage-side triangular patch model based on voxel division - Google Patents

Dynamic updating method of webpage-side triangular patch model based on voxel division Download PDF

Info

Publication number
CN115587451A
CN115587451A CN202211382977.5A CN202211382977A CN115587451A CN 115587451 A CN115587451 A CN 115587451A CN 202211382977 A CN202211382977 A CN 202211382977A CN 115587451 A CN115587451 A CN 115587451A
Authority
CN
China
Prior art keywords
triangular
patch
voxel
voxels
coding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211382977.5A
Other languages
Chinese (zh)
Inventor
肖文磊
赵辰
邱天泽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdezhen Branch Of Jiangxi Research Institute Of Beijing University Of Aeronautics And Astronautics
Original Assignee
Jingdezhen Branch Of Jiangxi Research Institute Of Beijing University Of Aeronautics And Astronautics
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdezhen Branch Of Jiangxi Research Institute Of Beijing University Of Aeronautics And Astronautics filed Critical Jingdezhen Branch Of Jiangxi Research Institute Of Beijing University Of Aeronautics And Astronautics
Priority to CN202211382977.5A priority Critical patent/CN115587451A/en
Publication of CN115587451A publication Critical patent/CN115587451A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/17Mechanical parametric or variational design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Hardware Design (AREA)
  • Data Mining & Analysis (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a dynamic updating method of a webpage end triangular patch model based on voxel division, which comprises the following steps: dividing and coding voxels; encoding a triangular patch; determining the position relation of the voxels and the triangular surface patches through voxel coding and triangular surface patch coding to carry out triangular surface patch segmentation, wherein the triangular surface patches after segmentation are all contained in one voxel; screening out voxels to be cut according to a tool path look-ahead, and establishing a hash barrel-shaped data structure according to the voxels and the triangular surface patch codes; screening voxels intersected with the cutter according to cutter position information returned in real time by edge end simulation, reading the codes of the intersected voxels by a webpage end, and deleting all triangular surface patches under corresponding nodes in a hash bucket; according to the edge end simulation, a newly generated triangular patch cut by a cutter is obtained, and the triangular patch is encoded and stored under a node of a hash bucket; and rendering and displaying the updated triangular patch to realize the geometric simulation of the webpage end. The method can realize the efficient updating of the workpiece model during the cutting simulation of the webpage end.

Description

Dynamic updating method of webpage-side triangular patch model based on voxel division
Technical Field
The invention belongs to the field of intelligent manufacturing numerical control machining, relates to a cutting simulation method, and particularly relates to a dynamic updating method of a webpage end triangular patch model based on voxel division.
Background
The accurate and efficient cutting simulation method is one of the key core technologies of intelligent numerical control machining and is also the core requirement of domestic related industrial software. The real-time online cutting simulation puts higher requirements on efficiency and precision on the basis of the traditional offline simulation.
Real-time simulation has high requirements on a CPU, a display card and a memory of a computer, so most simulation processes need to rely on a local high-performance computer for simulation calculation and rendering display, which means that simulation results can only be seen by field personnel. However, the development of numerical control machining intelligence needs to realize remote simulation, that is, a non-local computer can also observe the machining simulation situation in real time, so that the key of intelligence is to lift the simulation process to the cloud. The chinese patent application CN201811146285.4 discloses a cutting simulation implementation method facing machining real-time monitoring, which uses a binary tree data structure to improve the storage and search modes of models, but is still limited to local simulation. The chinese patent application CN202110899400.0 discloses a VBO-based efficient geometric simulation method for machining process, which solves the efficiency problem of online geometric simulation to a great extent, lays a foundation for cloud simulation, but does not realize model update of web page side. Although the precision and efficiency of local simulation operation are guaranteed, the data transmission efficiency and the rendering and displaying efficiency of a webpage end still have problems to realize cloud simulation. If each frame of model result of the local simulation is directly uploaded to the cloud for rendering and displaying, not only is a very large network bandwidth required, but also jamming and even page collapse are inevitably caused to the computer of an ordinary user.
In conclusion, the existing real-time online simulation methods are only limited to local, and cannot realize the simultaneous viewing of the simulation process by multiple machines in different places, and the existing geometric simulation methods have the problems of large data occupation space, low transmission efficiency and the like. In order to realize real-time simulation of a webpage end, an optimization design of a model data storage mode, a side cloud data transmission mode and a webpage end model rendering mode is urgently needed to meet the real-time and efficient requirements.
Disclosure of Invention
Under the background, the invention provides a dynamic update method of a webpage-end triangular patch model based on voxel division. The workpiece model is dynamically divided through voxel foresight and triangular patch pre-coding, and the method design is carried out aiming at efficient increasing, deleting, modifying and checking of triangular patch model data, so that the workpiece model is efficiently updated when the cutting simulation at the webpage end is realized. The invention adopts the following technical scheme:
a dynamic updating method of a webpage end triangular patch model based on voxel division comprises the following steps:
s1, voxel division and coding: dividing voxels of the blank three-dimensional model, and coding each voxel;
s2, triangular patch coding: reading in a blank triangular patch model, and encoding the triangular patch;
s3, triangular patch segmentation: determining the position relation of the voxel and the triangular surface patch through voxel coding and triangular surface patch coding, and if the triangular surface patch is completely contained in one voxel, the voxel does not need to be segmented; otherwise, segmenting the voxel-crossing triangular surface patch along a voxel boundary to obtain a segmented triangular surface patch, wherein the segmented triangular surface patch is contained in one voxel;
s4, preparing data: screening out voxels to be cut according to a tool path look-ahead, taking the code of each voxel to be cut as a node, placing a linked list in which triangular surface patch codes are stored in the node, and establishing a hash barrel-shaped data structure;
s5, dynamically updating the triangular patch: screening voxels intersected with the cutter according to cutter position information returned in real time by edge end simulation, reading the codes of the intersected voxels by a webpage end, and deleting all triangular surface patches under corresponding nodes in a hash bucket; obtaining a newly generated triangular surface patch cut by a cutter according to edge end simulation, coding the newly generated triangular surface patch and storing the newly generated triangular surface patch under a hash bucket node;
s6, visualization rendering: and rendering and displaying the updated triangular patch to realize the geometric simulation of the webpage end.
Further, the step S1 specifically includes:
dividing the blank three-dimensional model into a plurality of voxels, and carrying out 21-bit binary coding on each voxel according to the number of grids arranged in the x, y and z directions to obtain a unique vID code:
vID=x*2 14 +y*2 7 +z
where x, y, and z represent the number of grids in which voxels are arranged in the three-dimensional direction.
Further, the step S2 includes the following substeps:
s2.1, encoding the vertex of the triangular patch, wherein the coordinate of the vertex of the triangular patch is x m 、y m 、z m The length of a voxel side is l, and the coding of the vertex, i.e. the coding of the voxel where the vertex is located, is calculated by the following formula:
vID=i*2 14 +j*2 7 +k
wherein the content of the first and second substances,
i=x m /l
j=y m /l
k=z m /l
"/" is an integer division symbol, i.e. only an integer part is taken after division operations are performed on the left side and the right side of the symbol;
s2.2, coding a triangular patch, integrating the codes of three vertexes of the triangular patch to obtain an mID code:
mIDD=i 1 *2 56 +j 1 *2 49 +k 1 *2 42 +i 2 *2 35 +j 2 *2 28
+k 2 *2 21 +i 3 *2 14 +j 3 *2 7 +k 3
or
mID=vID 1 *2 42 +vID 2 *2 21 +vID 3
Wherein x, y and z represent the ordering of the voxels in which the vertexes are positioned in the three-dimensional direction; subscripts 1, 2, 3 denote the 1 st, 2 nd, 3 rd vertices in the triangular patch.
Further, the step S3 includes the following substeps:
s3.1, sorting voxel planes, wherein each voxel is defined by six planes, and numbering the six planes in sequence;
s3.2, intersecting the voxel plane with the triangular patch, substituting the vertex coordinates of the triangular patch into a plane equation to judge the position relation between the vertex and the plane: if the three vertexes are on the same side of the plane, the triangular patch is not intersected with the plane; if the vertex is positioned at the two sides of the plane, calculating two intersection points of the triangular patch and the plane; sequentially judging six planes according to the sequence numbers;
s3.3, cutting the triangular surface patches with the vertexes positioned at the two sides of the plane according to the Delaunay rule to obtain new triangular surface patches; all triangular patches are re-encoded to generate corresponding mIDs.
Further, the step S4 includes the following sub-steps:
s4.1, storing the data of the triangular patch, taking the vID of each voxel as a node, placing a linked list storing the data of the triangular patch in the node, and establishing a hash barrel-shaped data structure;
and S4.2, establishing a data buffer area, and storing the data returned by the edge end into the data buffer area.
Further, the step S5 includes the following sub-steps:
s5.1, deleting a triangular patch in the specified voxel: judging a voxel intersected with the cutter according to cutter position information returned in real time by edge end simulation, transmitting the vID of the intersected voxel to a webpage end, and storing the vID in a data buffer area; the webpage end reads the vIDs, and all triangular patches under the corresponding nodes are deleted in the hash bucket;
s5.2, adding a newly generated triangular patch: and obtaining a local triangular patch cut by a cutter according to edge simulation operation, transmitting the local triangular patch to a buffer area, and coding and storing the local triangular patch under a hash bucket node corresponding to the vID respectively.
Further, in the step S6, threejs is adopted to render and display the updated triangular patch.
High-precision cutting simulation often needs a huge calculation force support, and the existing geometric simulation method usually uses a local computer to read and write model data, boolean operation of a cutter and a workpiece in a machining process, rendering display in three-dimensional software and the like. Due to the fact that the model data size is large, the data transmission efficiency is low, the computing capacity of three-dimensional rendering of the webpage end is limited, and smooth, efficient and accurate geometric simulation is difficult to achieve at the cloud end. Compared with the prior art, the invention at least has the following beneficial effects:
(1) According to the method, the model is divided into the voxel squares with different sizes according to the prospective tool path, and only the locally generated changes are updated, so that compared with the traditional method, the whole model is updated, the data transmission amount is greatly reduced, and the GPU display rendering pressure is also greatly reduced. The method is more efficient in time and space, so that real-time geometric simulation can be realized at a webpage end;
(2) According to the invention, a triangle coding mode is designed according to the thought of the forward looking of the tool path, all triangle patches do not need to be traversed when increasing, deleting and modifying, the triangle patches contained in the corresponding voxel blocks can be found and operated only according to coding, and the efficiency is obviously improved;
(3) In order to realize the gain effect (2), the invention specially designs an algorithm for segmenting the triangular patch according to the voxel grid, is suitable for triangular patch models with any shape and any number, and has reusability and transportability;
(4) The invention constructs a hash bucket data structure aiming at a triangular patch model divided according to a voxel region. Compared with the common method, the method has the advantages that the waste of the memory space is avoided even if the one-dimensional container is used for storage, and efficient and flexible addition, deletion, modification and check can be carried out.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the following description of the embodiments are briefly introduced, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a schematic view of voxel division of a workpiece model;
FIG. 3 is a schematic diagram of a voxel vID encoding rule;
fig. 4 is a schematic view of a vlid data structure;
FIG. 5 is a diagram illustrating the structure of mID data;
FIG. 6 is a diagram of the intersection sequence of voxel boundary planes with triangles;
FIG. 7 is a schematic diagram of a single triangular patch intersecting a plane;
FIG. 8 is a flow of a triangular patch segmented by voxel boundaries in a two-dimensional case; in the figure: (a) the position relation between bold face elements and triangular surface patches; (b) solving an intersection sequence of the boundary planes; (c) Specific segmentation processes are shown as (d), (e) and (f);
FIG. 9 is a graph illustrating Delaunay's Law; in the figure: (a) A segmentation method that follows delaunay's law, (b) a segmentation method that does not follow delaunay's law;
FIG. 10 is a diagram of a hash bucket data structure;
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The invention provides a dynamic update method of a webpage end triangular patch model based on voxel division, which mainly comprises the following steps as shown in figure 1:
step 1: and (4) dividing and coding the voxels. As shown in fig. 2, the three-level voxel division (coarse granularity, fine granularity, finest granularity) is performed on the three-dimensional model of the blank according to the look-ahead tool path. In the cutting simulation process, only the area of the blank three-dimensional model intersected with the cutter needs to be updated, so that in order to improve the efficiency, the cutter path foresight and the voxel division are carried out: and carrying out voxel division on the blank three-dimensional model to obtain a plurality of cubes with different sizes, namely voxels, and only selecting partial voxels which the cutter possibly passes through.
As shown in fig. 3, each voxel is binary-coded with 21 bits according to the number of grids arranged in the x, y, and z directions to obtain a unique voxeld, abbreviated as vlid, as shown in fig. 4:
vID=i*2 14 +j*2 7 +k
where i, j, k are the ordering of the voxel in x, y, z directions, i.e. the several voxels, respectively.
And 2, step: the triangular patch coding specifically comprises the following steps:
step 2.1: and (5) encoding the vertex of the triangular patch. As shown in FIG. 3, let the vertex coordinate be x m 、y m 、z m The length of the voxel side is l, and the code of the vertex, i.e. the code of the voxel where the vertex is located, is calculated by the following formula:
vID=i*2 14 +j*2 7 +k
wherein
i=x m /l
j=y m /l
k=z m /l
"/" is an integer division symbol, i.e., only the integer part is taken after dividing the left and right sides of the symbol.
The 7-bit binary number can represent 128 voxels at maximum, the minimum side length of the voxels is 5mm, namely the encoding mode can represent a cube working space with the maximum side length of 640mm, and most numerical control machining requirements can be met.
Step 2.2: and (5) encoding a triangular patch. The three vertex codes of the triangular patch are integrated to obtain the meshrid, abbreviated as mID, as shown in fig. 5, which is represented by 64-bit long shaping binary number:
mID=i 1 *2 56 +j 1 *2 49 +k 1 *2 42 +i 2 *2 35 +j 2 *2 28
+k 2 *2 21 +i 3 *2 14 +j 3 *2 7 +k 3
or
mID=vID 1 *2 42 +vID 2 *2 21 +vID 3
Wherein i 1 、j 1 、k 1 Representing the ordering in three dimensions of the voxel at which the first vertex is located, i 2 、j 2 、k 2 Representing the ordering in three dimensions of the voxel at which the second vertex is located, i 3 、j 3 、k 3 Indicating the ordering of the voxel at which the third vertex is located in three dimensions.
If the codes of the three vertexes of the triangular surface patch are consistent, the triangular surface patch is completely contained in one voxel, and the triangular surface patch does not need to be segmented; if the two voxels are inconsistent, the triangular patch is contained in different voxels, and the triangular patch needs to be segmented.
And step 3: and (5) cutting the triangular patch. The purpose of this step is to segment the triangular patch across voxels along voxel boundaries. The newly generated vertices of each small triangular patch are completely contained in the same voxel. The specific method comprises the following steps:
step 3.1: voxel plane ordering. Each voxel is defined by six faces, the six faces are numbered in sequence, and as shown in fig. 6, when a triangular face is cut, the position relation between a voxel plane and a triangular face patch is calculated according to the sequence;
step 3.2: the voxel plane intersects the triangular patch. As shown in fig. 7, substituting the coordinates of the vertices of the triangular patch into the plane equation to determine the position relationship between the vertices a, B, C and the plane: if the three vertexes are on the same side of the plane, the triangular patch is not intersected with the plane, and a next plane is calculated; if the vertex is positioned at the two sides of the plane, two intersection points D and E of the triangular patch and the plane are calculated;
step 3.3: and generating a cut triangular dough sheet. As shown in fig. 8, for the convenience of understanding, a two-dimensional case is used for illustration, and assuming that a model only includes a triangular patch, 2 × 2 voxel division is performed on the model, and a three-dimensional process can be analogized. FIG. 8 (a) is a diagram showing the positional relationship between a triangular patch and a coarse voxel grid, indicating that the voxels are to be segmented according to this; fig. 8 (b) -8 (f) show the cutting process of the triangular surface under the voxel division (fig. 8 (b) only shows the intersection sequence of the upper left corner voxel boundary and the triangular surface patch, all boundaries of each upper left corner voxel square, upper right corner voxel square, lower right corner voxel square and lower left corner voxel square need to be intersected and cut with the triangular surface patch to complete the segmentation, the cutting sequence of each voxel boundary is clockwise, which is consistent with fig. 8 (b), and if the three-dimensional situation is adopted, the three-dimensional situation is sorted according to the step 3.1). The triangular patch is divided into a triangle and a quadrangle by a single voxel boundary, and the coordinates of each vertex are known and connected into a new triangular patch according to the delaunay law, as shown in fig. 8 (c), and then the next cutting is performed, as shown in fig. 8 (d). And intersecting all boundaries of the voxels with all triangular surface patches in sequence to finish segmentation of the bold voxels, and obtaining a result as shown in fig. 8 (e). Fig. 8 (f) shows the coarse mesh segmentation result and the position relationship of the next fine mesh segmentation (assuming that the lower left corner voxel needs to be subdivided when looking ahead along the tool path). The fine mesh segmentation is the same as the coarse mesh segmentation. And re-encoding all triangular patches to generate corresponding mIDs.
Delaunay's law is a characteristic of delaunay triangulation. For example, four points are connected into two triangular faces, for two connection methods, as shown in fig. 9. Wherein the method (b) does not conform to Delaunay's rule and results in triangles with sharp interior angles after segmentation. Such a triangle, called a slice triangle, does not work well in linear interpolation and is therefore to be avoided as much as possible. Delaunay's law is to maximize the sum of the minimum angles of all triangles.
And 4, step 4: preparing data, screening voxels which can be cut according to a result of a tool path look-ahead so as to prepare a triangular patch which needs to be modified in advance to improve efficiency, and specifically comprising the following steps:
step 4.1: and storing data of the triangular patch. Voxels have a tertiary size and therefore a tertiary vlid. The node is set with the void of each voxel, and a linked list storing data of the triangular patch is placed in the node to establish a hash bucket data structure, as shown in fig. 10. Therefore, all triangular surface patches contained in a certain voxel block can be inquired only by the vID of the voxel;
and 4.2: a data buffer is established. Because the edge cloud communication frequency is not consistent with the webpage end model refreshing frequency, information transmitted by the edge end needs to be stored in the buffer area firstly, and then operation is carried out.
And 5: updating the triangular patch model, which specifically comprises the following steps:
step 5.1: the triangular patches within the specified voxel are deleted. And judging which voxels with the finest granularity are intersected with the cutter according to cutter position information returned by the edge end simulation in real time, and transmitting the vID of the intersected voxels to a webpage end to store in a buffer area. The webpage end reads the vIDs, and all triangular patches under the corresponding nodes are deleted in the hash bucket;
step 5.2: a newly generated triangular patch is added. And obtaining a local triangular patch model cut by the cutter according to the simulation operation of the edge end, and transmitting the triangular patches to a buffer area. When the buffer is processed, the newly added triangular patches are respectively encoded and hung under the hash bucket nodes corresponding to the vID.
Step 6: and (6) visual rendering.
The method comprises the last step of a single cycle of cutting simulation at the webpage end, and is used for rendering and drawing the triangular patch data stored in the hash bucket to a screen through threads. Threejs provides various webpage rendering modes, and in the example, it is recommended to use buffer geometry to construct and render a basic data structure for storing a triangular patch.
BufferGeometry is a valid representation of patch, line or point geometry. Including vertex position, patch index, normal phasor, color value, UV coordinate, and custom cache attribute value. The use of the bufferegeometry can effectively reduce the overhead required for transmitting the data to the GPU. For the present example, the triangular patch uses three vertices as a group as a basic unit, which is consistent with the vertex array arrangement rule of bufferegeometry.
Finally, it should be noted that: the foregoing examples are provided only for illustrating the technical solutions of the present invention and are not intended to limit the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (7)

1. A webpage end triangular patch model dynamic updating method based on voxel division is characterized by comprising the following steps:
s1, voxel division and coding: dividing voxels of the blank three-dimensional model, and encoding each voxel;
s2, triangular patch coding: reading in a blank triangular patch model, and encoding the triangular patch;
s3, cutting the triangular patch: determining the position relation of the voxel and the triangular surface patch through voxel coding and triangular surface patch coding, wherein if the triangular surface patch is completely contained in one voxel, the triangular surface patch does not need to be segmented; otherwise, segmenting the voxel-crossing triangular surface patch along a voxel boundary to obtain a segmented triangular surface patch, wherein the segmented triangular surface patch is contained in one voxel;
s4, preparing data: screening out voxels to be cut according to a tool path look-ahead, taking the code of each voxel to be cut as a node, placing a linked list storing triangular surface patch codes in the node, and establishing a hash barrel-shaped data structure;
s5, dynamically updating the triangular patch: screening voxels intersected with the cutter according to cutter position information returned in real time by edge end simulation, reading the codes of the intersected voxels by a webpage end, and deleting all triangular surface patches under corresponding nodes in a hash bucket; obtaining a newly generated triangular surface patch cut by a cutter according to edge end simulation, coding the newly generated triangular surface patch and storing the newly generated triangular surface patch under a hash bucket node;
s6, visualization rendering: and rendering and displaying the updated triangular patch to realize the geometric simulation of the webpage end.
2. The method according to claim 1, wherein step S1 is specifically:
dividing a blank three-dimensional model into a plurality of voxels, and carrying out 21-bit binary coding on each voxel according to the number of grids arranged in the x direction, the y direction and the z direction of each voxel to obtain a unique vID code:
vID=x*2 14 +y*2 7 +z
wherein x, y, z represent the number of grids in which voxels are arranged in the three-dimensional direction.
3. Method according to claim 2, characterized in that said step S2 comprises the following sub-steps:
s2.1, encoding the vertex of the triangular patch, wherein the coordinate of the vertex of the triangular patch is x m 、y m 、z m The length of a voxel side is l, and the coding of the vertex, i.e. the coding of the voxel where the vertex is located, is calculated by the following formula:
vID=i*2 14 +j*2 7 +k
wherein, the first and the second end of the pipe are connected with each other,
i=x m /l
j=y m /l
k=z m /l
"/" is an integer division symbol, i.e. only an integer part is taken after division operations are carried out on the left side and the right side of the symbol;
s2.2, coding a triangular patch, integrating the codes of three vertexes of the triangular patch to obtain an mID code:
mID=i 1 *2 56 +j 1 *2 49 +k 1 *2 42 +i 2 *2 35 +j 2 *2 28 +k 2 *2 21 +i 3 *2 14 +j 3 *2 7 +k 3
or
mID=vID 1 *2 42 +vID 2 *2 21 +vID 3
Wherein x, y and z represent the ordering of the voxels in which the vertexes are located in the three-dimensional direction; subscripts 1, 2, 3 denote the 1 st, 2 nd, 3 rd vertices in the triangular patch.
4. A method according to claim 3, characterized in that said step S3 comprises the sub-steps of:
s3.1, sorting voxel planes, wherein each voxel is surrounded by six planes, and numbering the six planes in sequence;
s3.2, intersecting the voxel plane with the triangular surface patch, substituting the coordinate of the vertex of the triangular surface patch into a plane equation to judge the position relation between the vertex and the plane: if the three vertexes are on the same side of the plane, the triangular surface patch is not intersected with the plane; if the vertex is positioned at the two sides of the plane, calculating two intersection points of the triangular patch and the plane; sequentially judging six planes according to the sequence numbers;
s3.3, cutting the triangular surface patches with the vertexes positioned at the two sides of the plane according to the Delaunay rule to obtain new triangular surface patches; all triangular patches are re-encoded to generate corresponding mIDs.
5. Method according to claim 4, characterized in that said step S4 comprises the following sub-steps:
s4.1, storing triangular patch data, taking the vID of each voxel as a node, placing a linked list storing the triangular patch data in the node, and establishing a hash barrel-shaped data structure;
and S4.2, establishing a data buffer area, and storing the data returned by the edge terminal into the data buffer area.
6. Method according to claim 5, characterized in that said step S5 comprises the following sub-steps:
s5.1, deleting a triangular patch in the specified voxel: judging a voxel intersected with the cutter according to cutter position information returned in real time by edge end simulation, transmitting the vID of the intersected voxel to a webpage end, and storing the vID in a data buffer area; the webpage end reads the vIDs and deletes all triangular patches under the corresponding nodes in the hash bucket;
s5.2, adding a newly generated triangular patch: and obtaining a local triangular patch cut by a cutter according to edge simulation operation, transmitting the local triangular patch to a buffer area, and respectively encoding and storing the local triangular patch under a hash bucket node corresponding to the vID.
7. The method according to claim 6, wherein in step S6, threejs is adopted to render and display the updated triangular patch.
CN202211382977.5A 2022-11-07 2022-11-07 Dynamic updating method of webpage-side triangular patch model based on voxel division Pending CN115587451A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211382977.5A CN115587451A (en) 2022-11-07 2022-11-07 Dynamic updating method of webpage-side triangular patch model based on voxel division

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211382977.5A CN115587451A (en) 2022-11-07 2022-11-07 Dynamic updating method of webpage-side triangular patch model based on voxel division

Publications (1)

Publication Number Publication Date
CN115587451A true CN115587451A (en) 2023-01-10

Family

ID=84781710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211382977.5A Pending CN115587451A (en) 2022-11-07 2022-11-07 Dynamic updating method of webpage-side triangular patch model based on voxel division

Country Status (1)

Country Link
CN (1) CN115587451A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116493681A (en) * 2023-03-17 2023-07-28 西安钧诚精密制造有限公司 Cutting control system and cutting device for inner circle of shell

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116493681A (en) * 2023-03-17 2023-07-28 西安钧诚精密制造有限公司 Cutting control system and cutting device for inner circle of shell

Similar Documents

Publication Publication Date Title
CN106683167B (en) Automatic modeling method for high-precision model of complex building
EP1710720B1 (en) Method of computer-aided design of a modeled object having several faces
US7561156B2 (en) Adaptive quadtree-based scalable surface rendering
US7557803B2 (en) Method, computer program product and data structure for representing two- or three-dimensional object modeling
WO2020206669A1 (en) Self-adaptive point cloud stripe division method
CN106875495B (en) Relief grid representation and 3D printing slicing method and system based on concave-convex mapping
JP2005038219A (en) Method for generating volume data from boundary expression data and program therefor
CN102306180A (en) Modeling method based on mass laser radar grid point cloud data
CN111260784B (en) Urban three-dimensional space grid compression coding method and device and terminal equipment
EP2663965B1 (en) Direct rendering of cad models on the gpu
CN109118588B (en) Automatic color LOD model generation method based on block decomposition
CN102629391A (en) Three-dimensional space structure graph cutting and slicing method based on digital graph medium
CN109325316B (en) STL model efficient parallel layer cutting method based on concurrent welding sequencing
CN112862970A (en) BIM model Layering (LOD) method based on three-dimensional mesh curved surface and solid entity
CN113724401A (en) Three-dimensional model cutting method and device, computer equipment and storage medium
CN115587451A (en) Dynamic updating method of webpage-side triangular patch model based on voxel division
CN109551768A (en) A kind of data processing method of the 3D printing file based on STL
CA3037575A1 (en) Geometric modelling for facilitating simulation for manufacturing operations
CN113792458B (en) Optimization method and device for finite element triangle mesh
CN111210520A (en) Reverse forming method and system for physical model
CN111444573A (en) Ship symmetric segment model generation method and device, storage medium and terminal
CN113343546B (en) VBO-based efficient geometric simulation method for cutting machining process
CN112687007B (en) Stereoscopic grid chart generation method based on LOD technology
CN111028349B (en) Hierarchical construction method suitable for rapid visualization of massive three-dimensional live-action data
CN112734934A (en) STL model 3D printing slicing method based on intersecting edge mapping

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination