Method, electronic device and storage medium for constructing three-dimensional model along lofting path

By checking the validity of polygons and lofting paths, merging collinear edges, and constructing a three-dimensional model by sequential sweeping, the problem of insufficient stability in complex path modeling in existing technologies is solved, and stable and efficient three-dimensional modeling effects are achieved.

CN114882170BActive Publication Date: 2025-09-05HANGZHOU QUNHE INFORMATION TECHNOLOGIES CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210391153.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-14
Publication Date
2025-09-05
Estimated Expiration
2042-04-14

AI Technical Summary

Technical Problem

Existing lofting algorithms lack stability on complex paths, leading to modeling errors. Improving stability will lead to reduced efficiency and cannot effectively support complex 3D modeling.

Method used

By performing validity checks and legalization on polygons and lofting paths, merging collinear edges, and sequentially sweeping to construct a 3D model, lofting end faces are generated at the starting and end points, and side faces are generated using U and V direction edges. Side faces that do not meet the conditions are discarded to ensure the closure of the path.

Benefits of technology

It realizes the stable and rapid construction of correct 3D models on arbitrary polygons and polyline paths, supports complex paths and self-intersection situations, and improves the stability and efficiency of modeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114882170B_ABST
    Figure CN114882170B_ABST
Patent Text Reader

Abstract

The present invention provides a method, electronic device, and storage medium for constructing a three-dimensional model along a lofted path. The method includes: legitimacy detection and legitimization processing; determining a starting point for the lofted path; sorting all edges of the lofted path according to the starting point to determine a lofting order; using the polygon to sweep along each edge of the lofted path to construct the three-dimensional model; and when the lofted path is not a closed loop, generating lofted end faces at the starting point and end point. The present invention ensures that correct results can be obtained when lofting any polygon along any polyline path. Even when a polygon with a large number of edges is used as input, sweeping along the polyline can produce the fastest possible calculation results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer three-dimensional modeling, and in particular relates to a method for constructing a three-dimensional model along a lofting path, an electronic device and a storage medium. Background Art

[0002] Lofting is a very common geometric modeling method. Baidu Encyclopedia explains it as follows: Lofting is the process of creating a complex three-dimensional object by taking a two-dimensional object and treating it as a cross-section along a path. Different shapes can be created at different sections along the same path.

[0003] In some modeling systems, a set of planes is used to simulate a curved surface. This greatly simplifies the calculations. This modeling method is also used by many software in the industry, such as the Cool Master modeling system in Cool Home and SketchUp.

[0004] Currently, the stability of existing staking algorithms is still insufficient to meet practical requirements, and whether staking out complex paths will produce erroneous results. Instable staking algorithms can only support relatively simple staking paths, which greatly limits modeling capabilities. There are also some algorithms that improve stability, but these algorithms lead to a sharp drop in efficiency. Summary of the Invention

[0005] In view of this, the present invention proposes a lofting modeling method for a system entirely modeled by plane, specifically a method, electronic device and storage medium for constructing a three-dimensional model along a lofting path.

[0006] In a first aspect, the present invention provides a method for constructing a three-dimensional model along a lofting path, comprising:

[0007] Performing validity detection and legalization processing on a polygon and a lofting path used for lofting, wherein the polygon is a planar polygon and the lofting path is composed of multiple edge segments;

[0008] Sorting all edges of the stakeout path according to the starting point to obtain a stakeout order;

[0009] Using the polygons in the order of lofting to sweep along each edge of the lofting path to construct a three-dimensional model;

[0010] When the lofting path is not a closed loop, lofting end faces are generated at the starting point and the end point.

[0011] In the above solution, the validity check of the polygon used for lofting includes:

[0012] Performing a coplanarity check on the polygon to ensure that all edges of the polygon are on the same plane and connected end to end;

[0013] The validity check of the staking path includes:

[0014] Detecting whether there are collinear edges in the lofting path;

[0015] The legalization process includes:

[0016] When there are collinear edges in the lofting paths, the collinear edges are merged.

[0017] In the above solution, using the polygons to sweep along each edge of the lofting path in the order of lofting to construct a three-dimensional model includes:

[0018] Projecting the polygon onto the initial plane to obtain an initial projection surface containing a set of polygon projection points, and moving and transforming the initial projection surface to the starting point of each edge in the lofting path according to the direction of each edge, to obtain a set of projection points of the polygon at the starting point of each edge in the lofting path;

[0019] Generate the plane where the side surface of each edge segment is located and the straight line where the side surface edge line is located according to the direction of each edge segment and the projection point set at the starting point;

[0020] Performing an intersection operation on the side edge lines of two adjacent segments of the lofting path to obtain all intersection points, wherein the intersection points are the endpoints of the constructed three-dimensional model;

[0021] Generate a U-direction edge according to the intersection point, wherein the U direction is a direction along the lofting path;

[0022] Generate a V-direction edge according to the intersection point and the U-direction edge, wherein the V direction is a direction along the polygon edge;

[0023] Build all side faces based on U and U edges.

[0024] In the above solution, the method for generating the U-direction edge according to the intersection point is:

[0025] Connect the intersection points on the same side edge to generate U-direction edges.

[0026] In the above solution, the method for generating the V-direction edge according to the intersection point and the U-direction edge is:

[0027] For each edge of the polygon, calculate the side intersection line of two adjacent edge segments in the lofting path corresponding to the edge;

[0028] Calculate the two intersection points of the intersection line and the U-direction edge associated with the edge as the two endpoints of the V-direction edge;

[0029] Connect the two endpoints to get the V direction edge.

[0030] The above solution further includes: selecting or rejecting the V-edges according to the intersection of the V-edges.

[0031] In the above scheme, all side faces are constructed based on the U-direction edge and the U-direction edge, including:

[0032] A selection operation is performed on the side surface.

[0033] In the above solution, the operation of selecting and rejecting the side surface includes:

[0034] When the U-direction edge contained in a side surface is in the same direction as the edge of the corresponding lofting path, the side surface is retained; otherwise, the side surface is discarded.

[0035] In the above scheme, the calculation and determination of the starting point and starting direction of the layout path include:

[0036] When the lofting path is a closed loop, the endpoints of all the edges of the lofting path that are closest to the center of gravity of the polygon are calculated; planes perpendicular to the edges on which the endpoints are closest are generated, the projected area of ​​the polygon onto each of the planes is calculated, the plane with the largest projected area is set as the initial plane, the direction of the edge corresponding to the initial plane is set as the starting direction, and the endpoints corresponding to the initial plane are set as the starting point;

[0037] When the lofting path is not a closed loop, the distances from the first and last endpoints of the lofting path to the center of gravity of the polygon are calculated, the endpoint closest to the distance is set as the starting point, and the direction of the side where the starting point is located or the opposite direction thereof is set as the starting direction.

[0038] In a second aspect, the present invention further provides an electronic device, comprising: at least one processor; a memory communicatively connected to the at least one processor;

[0039] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method of constructing a three-dimensional model along a lofting path as described in any one of the first aspects above.

[0040] In a third aspect, the present invention further provides a non-transitory computer-readable storage medium, characterized in that:

[0041] The non-transitory computer-readable storage medium stores computer instructions, which are used to enable a computer to execute the method for constructing a three-dimensional model along a lofting path as described in any one of the first aspects.

[0042] Compared with the existing technology, the present invention supports three-dimensional modeling, and the lofting path can be on different planes, ultimately constructing a model composed of multiple planes; in terms of stability, it ensures that any polygon can be lofted along any polyline path to obtain correct results; in addition, it can also ensure efficiency. For polygons with a large number of sides as input, sweeping along the polyline can also calculate the results as quickly as possible. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is a flow chart of a method for constructing a three-dimensional model along a lofting path provided by an embodiment of the present invention;

[0044] Figure 2 This is a schematic diagram of polygons and lofting paths provided by an embodiment of the present invention;

[0045] Figure 3 Schematic diagram of the starting point of the lofting path provided by an embodiment of the present invention;

[0046] Figure 4 is a schematic diagram of the lofted side plane and edge line provided by an embodiment of the present invention;

[0047] Figure 5 This is a schematic diagram of side edge line intersection provided by an embodiment of the present invention;

[0048] Figure 6 This is a schematic diagram of generating a U-direction edge provided by an embodiment of the present invention;

[0049] Figure 7 Schematic diagram of a self-intersection of a V-direction edge according to an embodiment of the present invention;

[0050] Figure 8 This is a schematic diagram of the logic of edge selection in the V direction provided by an embodiment of the present invention;

[0051] Figure 9 This is a schematic diagram of the aspect selection logic provided by an embodiment of the present invention;

[0052] Figure 10 This is a schematic diagram of the direction of the surface formed by the U-direction edge and the V-direction edge provided by an embodiment of the present invention;

[0053] Figure 11 This is a schematic diagram of complex three-dimensional path sweeping provided by an embodiment of the present invention;

[0054] Figure 12 is a schematic diagram of a complex three-dimensional path sweep result provided by an embodiment of the present invention;

[0055] Figure 13 Schematic diagram of a circle-swept circle situation where a body intersects itself, provided by an embodiment of the present invention;

[0056] Figure 14Schematic diagram of a circular sweep result provided by an embodiment of the present invention;

[0057] Figure 15 This is a schematic diagram of automatically finding intersection with the environment after setting out provided by an embodiment of the present invention;

[0058] Figure 16 This is a schematic diagram of the result of automatic intersection processing with the environment after setting out provided by an embodiment of the present invention; DETAILED DESCRIPTION

[0059] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0060] Unless otherwise specified, the terms (including technical terms) used in this embodiment have the meanings commonly understood by those skilled in the art. In addition, it is understood that terms defined in commonly used dictionaries should be understood to have the same meanings as those in the context of the relevant fields, and should not be understood as idealized or overly formal.

[0061] Most existing modeling systems are based on the BREP data structure. Boundary Representation (BREP) is a commonly used data structure for representing models in graphics modeling. The BREP data structure hierarchy is as follows: A connected object is a shell, which is composed of many faces. Each face first consists of an outermost loop and may also have many internal loops. Loops are directional, and each loop is composed of many halfedges, which are also directional. Halfedges are attached to edges, and edges are undirected. An edge may have multiple halfedges. Multiple vertices (usually two) form an edge.

[0062] Figure 1 This is a flow chart of the method for constructing a 3D model along a lofting path provided in this embodiment. In this embodiment, the polygon used for lofting must be a planar polygon with no internal holes. The direction along the path is called the u direction, and the direction along the edge of the polygon is called the v direction.

[0063] The method for constructing a three-dimensional model along a lofting path provided in this embodiment includes:

[0064] Step 101: Check the validity of polygons and projection paths, reorder them, and merge edges if necessary.

[0065] The polygon and the lofting path and their positions are all set by the user. First, the validity of the polygon and the lofting path must be checked.

[0066] Polygon and loft paths such as Figure 2 shown.

[0067] In some embodiments, a coplanarity check is performed on the polygon to ensure that all edges of the polygon must be on the same plane and connected end to end.

[0068] In some embodiments, when lofting a path, if intersecting and collinear edges are encountered, a merge operation is required. This is because two collinear edges cannot intersect and determine the intersection point, which can easily cause various problems. Furthermore, coplanar faces will also need to be merged at the end, so it is better to perform edge merging at this step.

[0069] Step 102: Determine the starting point and starting direction of the layout path.

[0070] Calculation to determine the starting point and starting direction of the layout path includes:

[0071] When the lofting path is a closed loop, the endpoints of all the edges of the lofting path that are closest to the center of gravity of the polygon are calculated; planes perpendicular to the edges on which the endpoints are closest are generated, the projected area of ​​the polygon onto each of the planes is calculated, the plane with the largest projected area is set as the initial plane, the direction of the edge corresponding to the initial plane is set as the starting direction, and the endpoints corresponding to the initial plane are set as the starting point;

[0072] When the lofting path is not a closed loop, the distances from the first and last endpoints of the lofting path to the center of gravity of the polygon are calculated, the endpoint closest to the distance is set as the starting point, and the direction of the side where the starting point is located or the opposite direction thereof is set as the starting direction.

[0073] Specifically, the polygon is mapped to the starting point of the lofting path, and the polygon projection at the starting point of each lofting path is obtained according to the transformation of the lofting path.

[0074] In some embodiments, the lofting is performed along the loft path, but rather than translating the polygon to the starting point of the loft path, the polygon is projected to the starting point of the loft path and swept. Therefore, determining the starting point of the loft path is particularly important, especially when the loft path is a loop.

[0075] There are several criteria for determining the starting point of the stakeout path:

[0076] First, find the point closest to the polygon's centroid among the endpoints of all the edges of the loft path. If there are multiple points with the same distance, all of them are taken into consideration. If the edges associated with the point (the edges connected to the point) are all parallel to the polygon's plane, then they are not taken into consideration.

[0077] For continuous edges, only the start and end points are compared. A set of connected straight edges representing a curve is called a continuous edge.

[0078] For all the points closest to each other, find the associated edges of the points, calculate the planes perpendicular to these edges, find the projected area of ​​the polygon on these planes, and use the direction of the edge corresponding to the plane with the largest projected area as the starting direction and the corresponding endpoint as the starting point.

[0079] After determining the starting point of the lofting path, all edges of the lofting path are reordered according to this point. This order is the order in which the lofting will be performed next.

[0080] Project the polygon onto the initial plane (a plane perpendicular to the starting direction), and ensure that the projected edges are counterclockwise in the direction of the loft path. The orientation of the faces in this system follows the right-hand rule, so by ensuring that the projected edges are counterclockwise, the generated sides are guaranteed to face outward.

[0081] Then, the initial projection surface is moved to the starting point of each segment according to the distance and direction of each segment of the lofting path, and the projection point set of the starting point of the polygon on each segment of the lofting path is obtained. Figure 3 shown.

[0082] Step 103: Determine the lofted side plane and edge line of each segment according to the projection of each segment.

[0083] After obtaining the projection point set of each starting point of the edge of the lofting path in step 102, we only need to obtain the straight line where the side edge is located and the plane where the side is located according to each endpoint and the direction of the edge of this lofting path, as shown in the following example: Figure 4 shown.

[0084] Step 104: Obtain all intersection points based on the edge lines.

[0085] After obtaining the side edge line in the previous step, intersect each segment of the edge line with the next segment (each segment here corresponds to each segment of the edge of the lofting path) to obtain the intersection points. These intersection points are the endpoints of the final lofted object. Figure 5 shown.

[0086] Step 105: Obtain the edge in the u direction (SegEdge) according to the intersection line.

[0087] The direction along the path is called the u-direction. The process of generating the U-direction edge is relatively simple. You only need to connect the endpoints in the previous step in sequence. Sometimes, the endpoint of the previous edge and the endpoint of the next edge are the same point. In this case, the U-direction edge is a point instead of a line segment. Figure 6 shown.

[0088] Step 106: Obtain the V-direction edge (ContuourEdge) according to the intersection line and the U-direction edge.

[0089] The edges in the v direction are also obtained by connecting the endpoints according to the column coordinates, but because sometimes the polygon is too large, there will be self-intersections during the sweep process, which makes the logic of this part more complicated. Figure 7 and Figure 8 , edge e1 and edge e2 are mutually interrupted, and edge e2 is mutually interrupted with edge e3, so edge e2 is now divided into 3 segments. The v-direction edges of these segments need to be recorded, and the corresponding selection and rejection are made according to the u-direction edge information when generating the surface.

[0090] Sequentially determine whether two adjacent v-edges intersect. If so, form two v-edges based on the intersection point and endpoints, record them, and add the remaining two v-edges to the cache. When calculating the next two adjacent v-edges, if an intersection also occurs, determine which of the two v-edges in the cache the intersection point is on and split that segment. If no intersection occurs, use the cache directly as the edge record for that segment. If the final path is closed, then perform the same process on the last segment and the first segment, and update the record of the first v-edge segment based on the result.

[0091] As in the example above, we first intersect edge 1 and edge 2. When they intersect, we find the intersection point. Based on the endpoints and intersection point of edge 1, we obtain the two edges formed by edge 1, e1 and e2, and store them in the v-edges corresponding to edge 1. At the same time, we store the two edges formed by edge 2 and the intersection point (e3 and e4) in the cache. Next, we process edge 2 and edge 3. When they intersect and find the intersection point, we determine which segment of the cache this intersection is located in (if the cache only has one segment, no processing is required). As shown in the figure, the intersection point is on e3, which splits e3 into e5, e6, and e4. These three edges are stored in the v-edges corresponding to edge 1. We also store the two edges formed by edge 3, e7 and e8, in the cache, and so on. Since we are only intersecting adjacent faces, we only need to store one cache segment.

[0092] If the U-direction edge is a point, then there is no need to make the above judgment, because the intersection of the two adjacent V-direction edges is the point, so you can just record it directly.

[0093] Step 107: Get all sides based on all edges.

[0094] The side surface can be constructed based on the above-mentioned U-direction edges and V-direction edges. The point to note here is that the side plane needs to be selected. For example, two intersecting V-direction edges will form two opposite triangles, so one of the triangles needs to be discarded. The criterion for selection is to see whether the U-direction edge contained in the face is in the same direction as the corresponding path. If the direction is the same, it will be retained, otherwise it will be discarded. This criterion also applies to faces with no intersection points on the V-direction edges, because the faces formed by the reverse sweep caused by the inner sweep also need to be deleted. Inner sweep means that in some special cases, the lofting direction of one edge of the polygon is completely opposite to the lofting path direction.

[0095] like Figure 9 As shown, lines 1 and 2 form two faces, f1 and f2, while lines 2 and 3 form two faces, f3 and f4. Clearly, the U-direction edges corresponding to f1 and f3 align with the loft path and are therefore retained. f2 and f4 are discarded.

[0096] Then, the face is constructed based on the corresponding two U-direction edges (there may be only one) and two groups of V-direction edges (each group may have more than one), with the direction as follows: Figure 10 shown.

[0097] As mentioned above, for the starting surface, the order of the points is guaranteed to be counterclockwise on the projection screen. The subsequent U-direction edge order is determined according to this order, and the v-direction edge order is based on the projection path direction. Then we can stipulate that the adjacent uEdges are upEdge and downEdge from small to large. If there is a vEdge intersection, the uEdge measured at the intersection is undefined. The adjacent vEdges are edge Left and edge Right from small to large. The directions of these four groups (or three groups) of edges are as follows: Figure 10 As shown. Then, we need to construct halfEdge based on edge. The right-hand rule basically states that the halfEdge of edgeLeft and downEdge is in the same direction as the edge, while the halfEdge of edgeRight and upEdge is in the opposite direction. This ensures that the face faces outward.

[0098] In this way, this embodiment obtains a corresponding set of halfEdges, and then can construct loops and faces.

[0099] Step 108: Determine whether to generate the end face based on whether the lofting path is closed.

[0100] For lofting with an open path, you need to generate loft end faces. In this case, all halfedges of the starting end face are in the opposite direction of the edge, and all halfedges of the ending end face are in the same direction as the edge.

[0101] If all side faces adjacent to an end face are discarded, there is no need to generate the end face.

[0102] Step 109: Fusion of coplanar faces on the side.

[0103] After constructing the swept volume, all coplanar faces within the swept volume need to be merged to ensure topological consistency. Coplanarity only exists among all faces swept from the same profile edge. Therefore, the faces are determined to be coplanar and intersecting along the sweep path, and all coplanar intersecting faces are merged.

[0104] In some optional embodiments, the polygons used for lofting are no longer needed after the lofting modeling result is generated, and retaining the polygons may also cause other errors, so the polygons can be deleted.

[0105] Through the above lofting process, the lofting modeling method provided in this embodiment can support complex three-dimensional path sweeping, such as Figure 11 and 12 As shown; it also supports the case where the body generated by lofting intersects with itself, such as circle sweep circle, as shown Figure 13 and 14 As shown; after lofting, it will automatically intersect with the environment, such as Figure 15 and 16 shown.

[0106] An embodiment of the present invention further provides an electronic device, comprising: at least one processor; a memory communicatively connected to the at least one processor;

[0107] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the aforementioned method of constructing a three-dimensional model along a lofting path.

[0108] The electronic device of this embodiment may be, for example, a terminal device or a server. The terminal device may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and fixed terminals such as digital TVs and desktop computers. The above examples should not limit the functionality and scope of use of this embodiment.

[0109] An electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes based on a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.

[0110] Typically, the following devices can be connected to an I / O interface: input devices such as a touch screen, touchpad, keyboard, mouse, and camera; output devices such as a liquid crystal display (LCD) and speakers; storage devices such as magnetic tape and hard disk; and communication devices. Communication devices can allow electronic devices to communicate with other devices wirelessly or by wire to exchange data.

[0111] An embodiment of the present invention further provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the aforementioned method of constructing a three-dimensional model along a lofting path.

[0112] All or part of the steps of the embodiment can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, random access memory (RAM), read-only memory (ROM), magnetic disk or optical disk, etc. Various media that can store program codes.

[0113] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention, or the part that contributes to the relevant technology, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (such as a personal computer, server, or network device) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, RAM, ROM, magnetic disks or optical disks.

[0114] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for constructing a three-dimensional model along a lofting path, characterized in that: include: Performing validity detection and legalization processing on a polygon used for lofting and a lofting path, wherein the polygon is a planar polygon and the lofting path is composed of multiple edge segments; Calculate and determine the starting point and starting direction of the layout path; Sorting all edges of the stakeout path according to the starting point to obtain a stakeout order; Using the polygons in the order of lofting to sweep along each edge of the lofting path to construct a three-dimensional model; When the lofting path is not a closed loop, generating lofting end faces at the starting point and the end point; Sweeping each edge of the lofting path using the polygon in the lofting order to construct a three-dimensional model includes: Projecting the polygon onto an initial plane to obtain an initial projection surface containing a set of polygon projection points, and moving and transforming the initial projection surface to the starting point of each edge in the lofting path according to the direction of each edge, to obtain a set of projection points of the polygon at the starting point of each edge in the lofting path; Generate the plane where the side surface of each edge segment is located and the straight line where the side surface edge line is located according to the direction of each edge segment and the projection point set at the starting point; Performing an intersection operation on the side edge lines of two adjacent segments of the lofting path to obtain all intersection points, wherein the intersection points are the endpoints of the constructed three-dimensional model; Generate a U-direction edge according to the intersection point, wherein the U direction is a direction along the lofting path; Generate a V-direction edge according to the intersection point and the U-direction edge, wherein the V direction is a direction along the polygon edge; Build all side faces based on U and U edges.

2. The method according to claim 1, wherein: The validity check of the polygon used for lofting includes: performing a coplanar check on the polygon to ensure that all edges of the polygon are on the same plane and connected end to end; The validity check of the staking path includes: Detecting whether there are collinear edges in the lofting path; The legalization process includes: When there are collinear edges in the lofting paths, the collinear edges are merged.

3. The method according to claim 1, wherein: The method for generating the U-direction edge according to the intersection point is: Connect the intersection points on the same side edge to generate U-direction edges.

4. The method according to claim 1, wherein: The method for generating the V-direction edge according to the intersection point and the U-direction edge is: For each edge of the polygon, calculate the side intersection line of two adjacent edge segments in the lofting path corresponding to the edge; Calculate the two intersection points of the intersection line and the U-direction edge associated with the edge as the two endpoints of the V-direction edge; Connect the two endpoints to get the V direction edge.

5. The method according to claim 4, characterized in that: Also includes: The V-edges are selected based on their intersection.

6. The method according to claim 1, wherein: Constructing all sides based on U-direction edges and U-direction edges includes: A selection operation is performed on the side surface.

7. The method according to claim 6, characterized in that: The operation of selecting and rejecting the side surface includes: When the U-direction edge contained in a side surface is in the same direction as the edge of the corresponding lofting path, the side surface is retained; otherwise, the side surface is discarded.

8. The method according to any one of claims 1 to 7, characterized in that: Calculation to determine the starting point and starting direction of the layout path includes: When the lofting path is a closed loop, the endpoints of all the edges of the lofting path that are closest to the center of gravity of the polygon are calculated; planes perpendicular to the edges on which the endpoints are closest are generated, the projected area of ​​the polygon onto each of the planes is calculated, the plane with the largest projected area is set as the initial plane, the direction of the edge corresponding to the initial plane is set as the starting direction, and the endpoints corresponding to the initial plane are set as the starting point; When the lofting path is not a closed loop, the distances from the first and last endpoints of the lofting path to the center of gravity of the polygon are calculated, the endpoint closest to the distance is set as the starting point, and the direction of the side where the starting point is located or the opposite direction thereof is set as the starting direction.

9. An electronic device, characterized in that: include: at least one processor; a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for constructing a three-dimensional model along a lofting path as described in any one of claims 1-8.

10. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which are used to enable a computer to execute the method for constructing a three-dimensional model along a lofting path as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Swept volume model

    US6993461B1