A shape extraction method simulating a raw material grinding process in a plant

The Boolean operation method designed by triangulation and bonding algorithms solves the accuracy problem of milling cutter and raw material simulation under complex topological structures in the existing technology, and achieves the effect of accurately obtaining the topological information of the raw material during the simulated grinding process.

CN115357957BActive Publication Date: 2026-04-17ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG UNIV
Filing Date
2022-09-05
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing solid modeling methods cannot properly handle complex topological structures during the simulation of grinding, especially when the hole is tangent to the solid inside, making it difficult to calculate the topological information and accurately simulate the Boolean operation between the milling cutter and the raw material.

Method used

By employing triangulation and bonding algorithms, and calculating the intersection and complement of the milling cutter and the raw material, a novel Boolean operation method was designed to ensure accurate acquisition of the topological information of the raw material during simulated grinding.

Benefits of technology

It enables the simulation of milling cutters and raw materials of arbitrary shapes and numbers, accurately calculates the connected components and number of holes in the ground material, supports Boolean operations on complex topologies, and improves the accuracy and efficiency of the simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115357957B_ABST
    Figure CN115357957B_ABST
Patent Text Reader

Abstract

This invention discloses a shape extraction method for simulating the raw material grinding process in a workshop. First, the milling cutter and the raw material are modeled to obtain triangulation. Then, the triangulation is subjected to triangle intersection, retriangulation, cutting, selection of suitable triangular facets, bonding, and splitting operations to obtain the result of the ground raw material. This invention simulates the grinding process, and its method is applicable to milling cutters and raw materials of any shape and number. Furthermore, during the grinding process, the number of connected components and the number of holes in the remaining raw material can always be known, which is helpful for subsequent analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of materials processing technology, and specifically relates to a method for shape extraction in simulating the grinding process of raw materials in a workshop. Background Technology

[0002] In grinding simulations, surfaces are used to represent the boundaries of the milling cutter and the material to be ground. The grinding process involves tracking the milling cutter's position at each small time step, performing a difference operation on the material and the milling cutter, or an intersection operation on the complements of the material and the milling cutter. The result is the ground material. Simulation offers two advantages: ① It is a highly efficient method compared to actual testing, saving on the costs of manufacturing milling cutters and producing raw materials, and computer simulations are faster and more convenient than actual experiments; ② During simulation, the parameters of the milling cutter (such as size and shape) and the grinding parameters (such as grinding time, number of milling cutters, and their distribution) can be freely modified to find the milling cutter with the best grinding effect and the most efficient grinding method. Similarly, the above steps can be used to simulate processes such as cutting raw materials and bonding raw materials.

[0003] like Figure 1 The grinding simulation process shown uses curved surfaces to represent the raw material and milling cutter, which belongs to the boundary representation method in solid modeling. Mathematical modeling of three-dimensional continuous media is called solid modeling, a mature field with fundamental and important significance in engineering and science. Solid modeling emphasizes the fidelity of objects and aims to capture the geometric structure of solids, forming the basis of computer-aided design (CAD) and computer-aided engineering (CAE). Three commonly used methods in solid modeling are: Constructed Solid Geometry (CSG), Boundary Representation Method (BREP), and Element Decomposition. The CSG method represents solids as primitives and performs a series of operations (such as intersection and union) to obtain the results. These primitives are pre-defined parameterized solids, such as cubes, spheres, cylinders, etc. The primitives and their operational results can be translated and scaled. The description of a CSG solid is often precise and can be parameterized and edited, making it suitable for procedural, high-level modeling. Boundary representation uses boundaries to represent entities. To enable representation in a computer, these boundaries are typically approximated by discrete facets, such as triangles or rectangles, referred to as triangular meshes and rectangular meshes, respectively. Boundary representation can accurately represent the geometry and topology of entities. Element decomposition decomposes space into a set of elements, which can be cubes or other polyhedra of equal size. An entity is represented as the union of all elements occupying its space.

[0004] For solid modeling, Boolean algebra is a powerful tool that can be used to handle geometric problems and detect topological changes. Boolean algebra is an algebra composed of a series of Boolean operations, including intersection, union, complement, and their composite operations. In the above process, the difference operation between the milling cutter and the raw material belongs to the composite operation of intersection and complement. In Boolean operation design, the most commonly used solid modeling method is the boundary representation method [Xiaotong Jiang, Qingjin Peng, Xiaosheng Cheng, Ning Dai, Cheng Cheng, and Dawei Li. EfficientBooleans algorithms for triangulated meshes of geometric modeling. Computer-Aided Design and Applications, 13(4):419–430, 2016]. This is because constructing solid geometry and unit decomposition methods require more memory to represent solids and cannot accurately capture the geometric structure of solids as much as the boundary representation method. Therefore, Boolean algorithms designed based on these two methods are not very efficient. In boundary representation, triangular meshes are the most widely used, so existing Boolean algorithms are mainly designed for triangular meshes. Most Boolean algorithms can be summarized into three steps: ① calculate the intersection of the entities represented by two boundary representations; ② determine which parts need to be retained and which need to be discarded; ③ reconstruct a new boundary representation from the retained parts. For triangular meshes, step ① can be divided into three sub-steps: first, find the intersection of each pair of triangles in the two triangular meshes to obtain a series of intersection lines; then, for each triangular mesh, re-triangulate the triangles according to the intersection lines; finally, cut the triangular mesh along these intersection lines into several surface patches.

[0005] In recent years, many improvements have been made to this framework. Reference [Ming Chen, Xiao Yu Chen, Kai Tang, and Matthew MF Yuen. Efficient Boolean operation on manifold meshsurfaces. Computer-Aided Design and Applications, 7(3):405–415, 2010] uses the LDI model to accelerate triangle intersection and determine whether surface patches should be retained. Their algorithm is only applicable to triangular meshes with manifold boundaries. Reference [Xiaotong Jiang, Qingjin Peng, Xiaosheng Cheng, Ning Dai, Cheng Cheng, and Dawei Li. Efficient Boolean algorithms for triangulated meshes of geometric modeling. Computer-Aided Design and Applications, 13(4):419–430, 2016] uses octree technology to accelerate triangle intersection and designs an algorithm to determine whether intersecting triangles should be retained based on their normals, thus enabling Boolean operations on non-closed surfaces. Reference [ Landier.Booleanoperations on arbitrary polygonal and polyhedral meshes.Computer-AidedDesign,85:138–153,2017], Literature[ Landier.Boolean operations on arbitrarypolyhedral meshes.Procedia Engineering,124:200–212,2015] and literature [HichemBarki, Guennebaud and Sebti Foufou. Exact, robust, and efficient regularized Booleans on general 3D meshes. Computers Mathematics with Applications, 70(6):1235–1254, 2015] both designed selection algorithms for the case where multiple triangles intersect at the same intersection line, thus handling some non-manifold cases. Among them, Barki's selection algorithm can also handle cases where the entity has holes, is unbounded, etc.

[0006] In production simulations, such as the grinding and cutting processes mentioned above, the total simulation time needs to be divided into many time steps, and Boolean operations are required in each time step. This frequently involves topological changes and degradation scenarios (such as non-manifold points, changes in connectivity, etc.), and existing algorithms cannot guarantee the correct handling of all such cases. In fact, the aforementioned Boolean algorithms based on boundary representation lack a theoretical foundation; most only provide the algorithm's steps, but rarely offer rigorous mathematical proofs to guarantee its correctness. Only the literature [Hichem Barki, ...] provides a more comprehensive and accurate explanation. Guennebaud and SebtiFoufou. Exact, robust, and efficient regularized Booleans on general 3Dmeshes. Computers Mathematics with Applications, 70(6):1235–1254, 2015] provide proofs for some of the algorithm steps; however, their method is only applicable to some simple cases with holes and cannot handle all cases.

[0007] The algorithms described above fail to produce accurate results when encountering complex topologies, such as holes tangent to solids within them. This is because research on boundary representation methods has yet to provide a general characterization of the boundaries of three-dimensional continuous media. Therefore, the methods described above can only be designed based on some simple cases. Furthermore, topological information (such as the number of connected components and the number of holes) is extremely useful during simulations. For instance, when simulating a blade cutting raw material, the simulator wants to know whether the blade has cut the material in half at any given time. This is essentially equivalent to determining whether the number of connected components in the raw material is two. However, the topological information obtained from Boolean operations using the algorithms described above is difficult to compute. In conclusion, existing solid modeling methods cannot support solid modeling and Boolean operations in grinding simulations. Summary of the Invention

[0008] In view of the above, the present invention provides a shape extraction method for simulating the raw material grinding process in a workshop, which can ensure the correctness of Boolean operations and always know the topological information of the raw material during the grinding process.

[0009] A method for shape extraction in a simulated raw material grinding process in a workshop includes the following steps:

[0010] (1) Obtain the curved surface pieces of the milling cutter and the raw material through triangulation algorithm and corresponding operations;

[0011] (2) Glue the curved surface pieces together to obtain several curved surfaces;

[0012] (3) Calculate the intersection of the milling cutter and the raw material based on the surface obtained in step (2);

[0013] (4) Calculate and determine the complement of the intersection between the milling cutter and the raw material, and then find the intersection between the raw material and the complement to obtain the shape of the raw material after grinding.

[0014] Furthermore, the specific implementation of step (1) is as follows:

[0015] 1.1 The interface between the milling cutter and the raw material is obtained using the triangulation algorithm, and then the intersection line between the two interfaces is obtained;

[0016] 1.2 Re-triangulate the triangular mesh of the milling cutter interface and the raw material interface along the intersection line;

[0017] 1.3 After re-dividing, the new triangular meshes of the two interfaces are cut along the intersection line to obtain several curved surface pieces of the milling cutter and the raw material.

[0018] Furthermore, in step 1.3, for any milling cutter's surface piece, if it is contained within the raw material space, it is retained; otherwise, it is deleted. For any raw material's surface piece, if it is contained within the milling cutter space, it is retained; otherwise, it is deleted.

[0019] Furthermore, the surface patch obtained in step (1) has a normal vector pointing towards the outside of the milling cutter and the raw material.

[0020] Furthermore, the specific implementation of step (2) is as follows:

[0021] 2.1 For any boundary curve A in any surface patch T1, find the boundary curves of other surface patches. If there exists a boundary curve of a surface patch T2 that coincides with boundary curve A and is in the opposite direction, calculate the angle between the normal vector direction of surface patch T2 and the normal vector direction of surface patch T1, thereby determining the angle between the two surface patches.

[0022] 2.2 According to step 2.1, select the surface patch with the smallest angle to surface patch T1, and bond it to surface patch T1 along the boundary curve A;

[0023] 2.3 According to steps 2.1 to 2.2, traverse the boundary curves of all surface patches until all boundary curves are glued together, thereby obtaining several surfaces.

[0024] Furthermore, the boundary curve is determined by the right-hand screw of the direction of the normal vector of the surface patch to which it is located.

[0025] Further, the specific implementation of step (3) is as follows: for any surface obtained in step (2), calculate all its self-intersecting lines. If the number of surface pieces obtained after cutting along these lines is 1, then output the surface and include it in the intersection of the milling cutter and the raw material; if the number of surface pieces obtained is greater than 1, then reverse the direction of the normal vector of these surface pieces, and return to execute step (2) to output the obtained surface and include it in the intersection of the milling cutter and the raw material.

[0026] Further, in step (4), the intersection of the milling cutter and the raw material is composed of several curved surfaces. All self-intersecting lines of these curved surfaces are calculated and obtained. Several curved surface pieces are obtained by cutting along these lines. Then, the normal vector direction of these curved surface pieces is reversed, and step (2) is returned to obtain several curved surfaces. For any of these curved surfaces, all self-intersecting lines are calculated and obtained. If the number of curved surface pieces obtained after cutting along these lines is 1, the curved surface is output and included in the complement of the intersection of the milling cutter and the raw material. If the number of curved surface pieces obtained is greater than 1, the normal vector direction of these curved surface pieces is reversed, and step (2) is returned to obtain the curved surface and included in the complement of the intersection of the milling cutter and the raw material.

[0027] The method of this invention realizes the simulation of the grinding process. The method is applicable to milling cutters and raw materials of any shape and number. Furthermore, during the grinding process, the number of connected components and the number of holes in the remaining raw material can always be known, which is helpful for subsequent analysis. Attached Figure Description

[0028] Figure 1 This is a schematic diagram simulating the raw material grinding process.

[0029] Figure 2 This is a Hasse graph constructed using the topological sorting algorithm.

[0030] Figure 3 This is a schematic diagram illustrating the dependencies between the various algorithms used in this invention. Detailed Implementation

[0031] To describe the present invention in more detail, the technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0032] Before designing the technical solution of this invention, we performed mathematical modeling of milling cutters and raw materials with arbitrarily complex shapes.

[0033] Given a three-dimensional continuous medium Y, The homeomorphism is the result of bonding a series of two-dimensional compact surfaces along a subset that is homeomorphic to a one-dimensional CW-complex.

[0034] This theorem reveals that for a milling cutter or raw material with complex topology, its boundary is always equivalent to bonding a series of two-dimensional compact surfaces along a one-dimensional intersection line. Previous Boolean operation methods focused on algorithm design while neglecting the study of the modeling object itself. With this theorem, we can design Boolean algorithms that hold true for milling cutters and raw materials with arbitrarily complex topologies.

[0035] To obtain a unique representation of the boundary between the end mill and the raw material, we need to define the primitive of the representation, namely, the bonded tight surface. The bonded tight surface is either a tight surface or a quotient space of this tight surface, whose quotient mapping bonds the tight surface along a set homeomorphic to a 1D CW-complex. If this set is removed, the remaining surface patches remain connected. The boundary representation of a simply connected end mill and raw material is given below:

[0036] Theorem ①: The boundary of a bounded connected end mill or raw material can be uniquely decomposed into a positively oriented bonded tight surface and several (which can be 0) negatively oriented bonded tight surfaces. The positively oriented bonded tight surface contains all negatively oriented bonded tight surfaces, and the negatively oriented bonded tight surfaces do not contain each other. There is no proper intersection between any two bonded tight surfaces, and the intersection is homeomorphic to a 1D CW-complex. The boundary of an unbounded connected end mill or raw material can be uniquely decomposed into several (which can be 0) negatively oriented bonded tight surfaces. The negatively oriented bonded tight surfaces do not contain each other and have no proper intersection. The intersection between any two bonded tight surfaces is homeomorphic to a 1D CW-complex.

[0037] Theorem ②: For a bounded connected end mill or raw material Y, the boundary representation derived from Theorem ① is denoted as... in For positive bonding of curved surfaces, For a negatively bonded tight surface, the boundary representation derived from Theorem ① is denoted as […]. in For negatively bonded tight surfaces; according to this notation, we have The interior is determined by the orientation of the tightly bonded surface. By representing each connected component according to Theorem ①, we establish a general boundary representation theory for milling cutters or raw materials.

[0038] Theorem ③: The boundary of a bounded and connected end mill or raw material can be uniquely decomposed into: The number of connected components is n, and the number of holes is all The sum of the number of negatively bonded surfaces; the boundary of an unbounded connected end mill or raw material can be uniquely decomposed into The number of connected components is n+1, and the number of holes is all. and The sum of the number of negatively bonded tight surfaces, where and These represent the boundaries of the milling cutter or raw material, which are respectively bounded and unbounded connected.

[0039] In fact, all the tightly bounded surfaces in the boundary representation given by Theorem ③ form a partially ordered set with inclusion relations as their partial order. This partially ordered set can be clearly represented by constructing a Hasse graph using a topological sorting algorithm, such as... Figure 2 As shown, the gray circle represents a positively bonded tight surface, and the white circle represents a negatively bonded tight surface. Two circles connected by an edge have a partial order relationship (inclusion relationship). Since the two bonded tight surfaces at the top are both positive, the represented continuous medium is bounded. According to Theorem ③, its boundary is expressed as... in Therefore, the number of connected components is 4, and the number of holes is 3. From Hasse, we can directly obtain the topological information of the continuous medium with a time complexity of O(1).

[0040] Based on the above boundary representation, we designed a Boolean algorithm. First, we need to define three basic operations: cutting, gluing, and splitting. These three operations are the core of the Boolean operation design.

[0041] Cutting operation:

[0042] Input: Adhesive tight surface set SG, intersection set IS

[0043] Output: The set of directed surface patches SP after cutting

[0044] Algorithm steps: For G∈SG, extract all intersection lines in IS that belong to G, cut G along these intersection lines to obtain several directed surface patches, and add these directed surface patches to SP.

[0045] Adhesion calculation:

[0046] Input: a set of directed surface patches SP

[0047] Prerequisite: The directed surface patch in SP is exactly obtained by cutting the boundary θY of a certain continuous medium Y (milling cutter or raw material) along a certain set of intersection lines.

[0048] Output: Closed surface set SS

[0049] Algorithm steps:

[0050] (1) Traverse SP. For a closed directed surface patch, initialize it as a tightly bound surface and add it to SS.

[0051] (2) Take a directed surface patch β from SP. For each boundary curve b of β, take a sufficiently small neighborhood of a point p on it. The surface is approximately a plane in this small neighborhood, and the outward normal vector n can be obtained. b (called the external normal vector with respect to p), the orientation of b in β is determined by n. b Make a right-handed screw decision. From SP, find a directed surface patch whose boundary contains b and whose orientation in SP is opposite to its orientation in β. For a directed surface patch β that satisfies this condition... c Its external normal vector about p is denoted as n. c Calculate n b and n c If the included angle α (0 < α < π) is given, then β and β c The included angle at point b is π - α. If n b ×n c Since the dot product of the direction vector of b at point b0 is less than 0, let angle = 2π - angle. We calculate the angle of all directed surface patches that satisfy the condition, and select the smallest one. The corresponding directed surface patch is denoted as β. out , β and β out Adhere along b to obtain γ. Repeat the above operation until γ is closed, add the closed surface γ to SS, and delete the corresponding surface patch in SP.

[0052] (3) Repeat (2) until SP is empty.

[0053] Splitting operation:

[0054] Input: Closed surface set SS

[0055] Prerequisites: In SS, each closed surface is the boundary of a certain connected continuous medium (milling cutter or raw material), and the opposite direction of the external normal vector of any point on the closed surface points to this connected continuous medium. There is no proper intersection between any two closed surfaces or within any closed surface.

[0056] Output: Adhesive Tight Surface Set SG

[0057] Algorithm steps:

[0058] (1) Take a closed surface S from SS, find all the self-intersecting lines of S, and add them to the self-intersecting line set IS;

[0059] (2) Cut S along IS to obtain a set of directed surface patches SP;

[0060] (3) If the number of elements in SP is 1, initialize S as a tightly bound surface and add it to SG, and the algorithm terminates.

[0061] (4) Reverse the orientation of all surface patches in SP;

[0062] (5) Call the bonding algorithm to bond SP to obtain the bonded tight surface set SG;

[0063] (6) Reverse the orientation of all tightly bonded surfaces in SG;

[0064] (7) Repeat (1) to (6) until SS is empty.

[0065] It can be proven that the composition of the splitting and gluing operations is the inverse operation of the cutting operation. Therefore, the Boolean operations designed based on these three algorithms have a closed boundary representation according to Theorem 5.13, which is something previous work could not achieve. The complement and intersection algorithms are given below:

[0066] Complement operation:

[0067] Input: The set of tightly bounded surfaces G corresponding to the boundary of the continuous medium Y. Y

[0068] Output: Y ⊥ The boundary corresponding to the tightly bonded surface set

[0069] Algorithm steps:

[0070] (1) G Y By finding the pairwise intersections of the tightly bound surfaces in the diagram, the intersection set IS is obtained;

[0071] (2) Call Algorithm 4.9 to apply G Y Perform a cutting operation according to IS to obtain a set of directed surface patches SP;

[0072] (3) Reverse the orientation of all directed surface patches in SP;

[0073] (4) Call Algorithm 4.10 to perform a bonding operation on SP to obtain the closed surface set SS;

[0074] (5) Call Algorithm 4.11 to split SS, and obtain And output it.

[0075] Intersection operation ∧:

[0076] Input: The set of tightly bounded surfaces corresponding to the boundaries of continuous media Y1 and Y2 and

[0077] Output: The set of tightly bounded surfaces corresponding to the boundary of Y1∩Y2

[0078] Algorithm steps:

[0079] (1) The bonded tight surface and Find the pairwise intersection of the tightly bonded surfaces in the middle (not correct) or Find the intersection of two tightly bonded surfaces to obtain the intersection line set IS (which contains information about the coincident surfaces);

[0080] (2) Call algorithm 4.9 to... and Perform the cutting operation according to IS to obtain the directed surface patch sets SP1 and SP2;

[0081] (3) Take out the overlapping directed surface patches in SP1 and SP2. If the directions are the same, add any one of them to the directed surface patch set SP. Regardless of whether the directions are the same, delete the directed surface patch from SP1 and SP2.

[0082] (4) For the directed surface patch β in SP1, if the set of points on β other than the boundary is contained in Y2, then add β to SP.

[0083] (5) For the directed surface patch β in SP2, if the set of points on β other than the boundary is contained in Y1, then add β to SP.

[0084] (6) Call the bonding algorithm to perform bonding operation on SP to obtain the closed surface set SS;

[0085] (7) Call the splitting algorithm to split SS, and obtain... And output it.

[0086] The union operation can be obtained directly from the intersection and complement operations according to De Morgan's law.

[0087] The union operation V: G×G→G on G is defined as follows:

[0088]

[0089] Figure 3 The dependencies between the various algorithms are presented. It can be proven that our designed Boolean algorithm constitutes a Boolean algebra with respect to the boundary space G of the milling cutter and the raw material.

[0090] In practice, the input consists of tightly bound surfaces obtained from the decomposition of the milling cutter and the raw material boundary. These tightly bound surfaces are often in the form of triangulation. The orientation of the tightly bound surfaces determines whether the traversal order of the triangle edges is clockwise or counterclockwise (the outward normal vector generated by the right-hand screw rule of the triangle edges is consistent with the outward normal vector of the tightly bound surface). Whether using intersection or complement algorithms, we must first perform pairwise intersection on the tightly bound surfaces. Finding the intersection of two tightly bound surfaces actually involves finding the pairwise intersection of all triangles in both surfaces. Each triangle records its corresponding intersection line and coincidence information.

[0091] Given two triangles triA and triB, there are two cases for finding their intersection: (1) When triA and triB are coplanar, we first project them onto a suitable coordinate plane to obtain triA′ and triB′. We then find the intersection of each side e in triA′ with triB′ (which can be transformed into finding the intersection of the line e with the three sides of triB′ respectively). We also find the intersection of each side in triB′ with triA′. We restore the result back to the original space and record it. If there is an intersection point, the relationship between the two triangles is recorded as coincidence. (2) When triA and triB are not coplanar, we first find the intersection line l of the plane where triA is located and the plane where triB is located. We then project triA and l onto a suitable coordinate plane to find their intersection, and then project triB and l onto a suitable coordinate plane to find their intersection (the two coordinate planes may not be the same). We restore the result of the two intersections back to the original space and merge them.

[0092] After finding the intersections of all triangles, for subsequent cutting and joining, each triangle needs to be re-triangulated based on its recorded intersection lines. Our triangulation algorithm is as follows: Given a triangle, we add the endpoints of all its intersection lines and the vertices of the triangle to the vertex set. Each time, we take two vertices from the vertex set. If their connection does not coincide with any existing intersection lines, added connections, or the edges of the triangle, and has no intersection points other than the endpoints, we connect these two vertices. We repeat this operation until all vertex pairs have been checked. The final result is a triangulation of the triangle about the given intersection lines. For the edges of the triangles that coincide with the intersection lines after triangulation, we additionally mark them as intersection line edges.

[0093] The next step is to cut the bonded surfaces along the intersection line, which in practice is more like a bonding process.

[0094] Cutting algorithm implementation:

[0095] Input: All triangles vecTri contained in the triangulation of the set of tightly bound surfaces G.

[0096] Prerequisite: vecTri has been re-triangulated about the intersection line.

[0097] Output: A set of surface patches SP obtained by cutting the tightly bonded surfaces in G along the intersection line.

[0098] Algorithm steps:

[0099] (1) Take any triangle tri from vecTri, traverse the three sides of tri. If it is not an intersection edge, continue to search for triangles adjacent to this edge; if it is an intersection edge, change to the next edge, delete all the searched triangles from vecTri, initialize them as a surface patch p, and add them to SP.

[0100] (2) Repeat (1) until vecTri is empty, then output SP.

[0101] Our cutting algorithm is a special depth-first search. Starting from a small triangle, it glues together the adjacent triangles it finds. When it encounters an intersection line, the adjacent triangles at the intersection line are not glued together. The final effect is to cut the glued surface into surface pieces along the intersection line.

[0102] The final challenge will now be discussed: determining whether a surface patch is inside a continuous medium. The essential difficulty of this problem lies in determining the positional relationship between a point and a tightly bonded surface. The algorithm is as follows:

[0103] Determine the positional relationship between a point and a tightly bonded surface:

[0104] Input: R 3 At point p, the triangle set vecTri corresponding to a tightly bonded surface

[0105] Prerequisite: The traversal order of the triangle sides in vecTri determines the external normal vector n of the triangle (for any two sides e1 and e2 of the triangle, if the order is from e1 to e2, then the direction of e1×e2 is the same as the direction of n), and n is in the same direction as the external normal vector of the bonded surface at this point.

[0106] Output: 1 (within the bounded complement of the bonded tight surface), 0 (within the bonded tight surface), -1 (within the unbounded complement of the bonded tight surface)

[0107] Algorithm steps:

[0108] (1) Starting from p, draw any ray l and find the intersection of l with all triangles in vecTri. If there is no intersection, return -1;

[0109] (2) Select the intersection point q that is closest to p. If p and q coincide, return 0.

[0110] (3) Let the triangle corresponding to q be tri. If q is inside tri, let the outer normal vector of tri be n. Calculate dot(n,qp). If it is greater than 0, return 1; if it is less than 0, return -1.

[0111] (4) Repeat (1)(2)(3).

[0112] The reason this algorithm works is that among all the intersections of the ray originating from p with the tightly bound surface, we select the closest intersection point q. All points on line segment pq except q belong to the same connected component, so their positional relationship with the tightly bound surface is the same. If the angle between vector qp and the outside normal vector of the triangle containing q is less than 90 degrees, then qp must be inside the tightly bound surface; if it is greater than 90 degrees, then qp is outside the tightly bound surface; there is no case where the angle is equal to 90 degrees, because q is an interior point of the triangle and is the point on the ray closest to p.

[0113] Our algorithm follows a single criterion for uncertainty parameters during the design process: when the distance between two points is less than the user-given tolerance ∈, we consider them to be the same point.

[0114] The significance of the sole criterion for uncertain parameters is as follows: (1) Floating-point systems have errors. For the same point, the coordinates may differ during the calculation process. This criterion allows us to ignore these differences and ensure the correct operation of the algorithm; (2) Finding the intersection point of line segments is a very difficult problem in computational geometry. When the slopes of two line segments are sufficiently close, the error of the calculated intersection point will be very large. This criterion allows us to treat this ill-conditioned situation as a parallel case when finding the intersection point of line segments. We only use the normal intersection method for line segments with large differences in slope, thereby reducing our calculation error and making the program more stable.

[0115] The following will discuss how to apply this principle to the program. First, we define a vertex comparison function `PointCompare(Point a, Point b)`. This function determines whether the distance between points `a` and `b` is less than ∈ (0, 0). This function is called in all algorithms that need to add vertices or determine the relationship between points. For example, during triangulation, a vertex set is constructed, which is a `set` in C++. Its comparison function is the `PointCompare` function we defined, ensuring that the distance between points in the vertex set is greater than ∈ (0, 0). Using the `PointCompare` function, we can define a `SegmentCompare` function to compare whether two line segments are equal. It determines whether the two endpoints of the two line segments are equal. If the two endpoints of the two line segments are equal (distance less than ∈ (0, 0), then the two line segments are considered to coincide. When determining parallelism, such as whether line segments are parallel, for line segments `s1` and `s2`, let their corresponding vectors be... and We calculate The norm() function returns the magnitude of a given vector. If the result is less than ∈ , s1 and s2 are considered parallel. This criterion is also introduced for algorithms involving numerical comparisons in the program, which ensures that the program ignores the effects of floating-point errors during runtime.

[0116] The above description of the embodiments is provided to enable those skilled in the art to understand and apply the present invention. Those skilled in the art can readily make various modifications to the above embodiments and apply the general principles described herein to other embodiments without creative effort. Therefore, the present invention is not limited to the above embodiments, and any improvements and modifications made to the present invention by those skilled in the art based on the disclosure thereof should be within the scope of protection of the present invention.

Claims

1. A method for shape extraction in a simulated raw material grinding process in a workshop, comprising the following steps: (1) Obtain the curved surface patches of the milling cutter and the raw material through triangulation algorithm and corresponding operations; (2) The curved surface patches are glued together to obtain several curved surfaces. The specific implementation method is as follows: 2.1 For any boundary curve A in any surface patch T1, find the boundary curves of other surface patches. If there exists a boundary curve of a surface patch T2 that coincides with boundary curve A and is in the opposite direction, calculate the angle between the normal vector direction of surface patch T2 and the normal vector direction of surface patch T1, thereby determining the angle between the two surface patches. 2.2 According to step 2.1, select the surface patch with the smallest angle to surface patch T1, and bond it to surface patch T1 along the boundary curve A; 2.3 According to steps 2.1~2.2, traverse the boundary curves of all surface patches until all boundary curves are glued together, thereby obtaining several surfaces; (3) Calculate the intersection of the milling cutter and the raw material based on the surface obtained in step (2); (4) Calculate and determine the complement of the intersection between the milling cutter and the raw material, and then find the intersection between the raw material and the complement to obtain the shape of the raw material after grinding.

2. The shape extraction method according to claim 1, characterized by: The specific implementation method of step (1) is as follows: 1.1 The interface between the milling cutter and the raw material is obtained using the triangulation algorithm, and then the intersection line between the two interfaces is obtained; 1.2 Re-triangulate the triangular mesh of the milling cutter interface and the raw material interface along the intersection line; 1.3 After re-dividing, the new triangular meshes of the two interfaces are cut along the intersection line to obtain several curved surface pieces of the milling cutter and the raw material.

3. The shape extraction method according to claim 2, characterized in that: In step 1.3, for any milling cutter surface piece, if it is contained within the raw material space, it is retained; otherwise, it is deleted. For any raw material surface piece, if it is contained within the milling cutter space, it is retained; otherwise, it is deleted.

4. The shape extraction method according to claim 2, characterized in that: The surface patch obtained in step (1) has a normal vector pointing towards the outside of the milling cutter and the raw material.

5. The shape extraction method according to claim 1, characterized in that: The boundary curve is determined by the right-hand screw of the direction of the normal vector of the surface patch it belongs to.

6. The shape extraction method according to claim 1, characterized in that: The specific implementation of step (3) is as follows: For any surface obtained in step (2), calculate all its self-intersecting lines. If the number of surface pieces obtained after cutting along these lines is 1, then output the surface and include it in the intersection of the milling cutter and the raw material; if the number of surface pieces obtained is greater than 1, then reverse the direction of the normal vector of these surface pieces, and return to execute step (2) to output the obtained surface and include it in the intersection of the milling cutter and the raw material.

7. The shape extraction method according to claim 1, characterized in that: In step (4), the intersection of the milling cutter and the raw material consists of several curved surfaces. All self-intersecting lines of these curved surfaces are calculated and obtained. Several curved surface pieces are obtained by cutting along these lines. Then, the normal vector direction of these curved surface pieces is reversed, and step (2) is returned to obtain several curved surfaces. For any of these curved surfaces, all self-intersecting lines are calculated and obtained. If the number of curved surface pieces obtained after cutting along these lines is 1, the curved surface is output and included in the complement of the intersection of the milling cutter and the raw material. If the number of curved surface pieces obtained is greater than 1, the normal vector direction of these curved surface pieces is reversed, and step (2) is returned to obtain the curved surface and included in the complement of the intersection of the milling cutter and the raw material.

Citation Information

Patent Citations

  • Workpiece three-dimensional surface topography simulating method based on ball head milling

    CN102490081A

  • Cutter path automatic generation method for complex curved surface grinding

    CN112518433A