Offset boundary representation in computer aided design
Through distance field technology, the inversion area of complex surfaces is identified and processed, combined with multi-threaded processing and mesh patches, the problem of non-closed or self-intersected offset results in the prior art is solved, and efficient and robust offset and shelling operations are achieved.
Patent Information
- Application Number
- CN202411076216.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-09-27
- Filing Date
- 2024-08-07
- Publication Date
- 2025-03-28
AI Technical Summary
In the prior art, when performing offset and shelling operations of three-dimensional objects, it is difficult to effectively deal with the self-intersection of complex surfaces, resulting in the offset result being not closed or self-intersection.
Distance field technology is used to identify and process the inverted areas in offset surface elements, and a compliant, closed offset B-rep model is generated through multi-threading and the use of mesh patches.
It realizes efficient execution of offset and shelling operations on complex surfaces, ensuring the sealing and topological correctness of offset results, and improving computing efficiency and robustness.
Smart Images

Figure CN119720470A_ABST
Abstract
Description
Background Art
[0001] This specification relates to computer-aided design, such as generating three-dimensional (3D) models of objects and performing operations such as offsetting and shelling on the models. The objects may be manufactured using additive manufacturing, subtractive manufacturing, and / or other manufacturing systems and techniques, or may be other objects that may be provided as digital assets (such as for use in animations).
[0002] Computer-aided design (CAD) software has been developed and used to generate 3D representations of objects, and computer-aided manufacturing (CAM) software has been developed and used to evaluate, plan and control the manufacture of those objects, for example, using computer numerical control (CNC) manufacturing techniques. Typically, CAD software uses a boundary representation (B-Rep) format to store a 3D representation of the geometry of the object being modeled. A B-Rep model includes a set of connected surface elements that define the boundaries between the internal and external points of the modeled 3D object. In a B-Rep model (commonly referred to as B-Rep), the geometry is stored in the computer using smooth and precise mathematical surfaces, which contrasts with the discrete and approximate surfaces of a mesh model, which may be difficult to work with in a CAD program. CAD software can be used to manipulate B-reps and perform operations such as offsets and shelling.
[0003] CAD programs have been used in conjunction with subtractive manufacturing systems and techniques. Subtractive manufacturing refers to any manufacturing process that creates a 3D object from stock material (generally a "blank" or "workpiece" that is larger than the 3D object) by cutting away portions of the stock material. Such manufacturing processes typically involve the use of multiple CNC machine cutting tools in a series of operations starting with a roughing operation, an optional semi-finishing operation, and a finishing operation. In addition to CNC machining, other subtractive manufacturing techniques include electrode discharge machining, chemical machining, water jet machining, and the like. In contrast, additive manufacturing (also known as solid freeform fabrication or 3D printing) refers to any manufacturing process that builds a 3D object from a raw material (generally a powder, liquid, suspension, or molten solid) in a series of layers or cross-sections. Examples of additive manufacturing include fused filament fabrication (FFF) and selective laser sintering (SLS). Other manufacturing techniques for building 3D objects from raw materials include casting and forging (both hot and cold) and molding. Summary of the invention
[0004] This specification describes techniques related to computer-aided design using objects (such as three-dimensional objects stored as B-reps) that can use distance fields to efficiently perform operations such as offset and shelling. The described systems and techniques can be used for computer-aided manufacturing of the resulting objects.
[0005] In general, one or more aspects of the subject matter described in this specification may be embodied in one or more methods (and in one or more non-transitory computer-readable media tangibly encoding a computer program operable to cause one or more processors to perform operations) comprising: receiving, by a computer-aided design program, an offset of a first boundary representation of a first three-dimensional object, the first boundary representation comprising connected surface elements defining a boundary between an interior portion and an exterior portion of the first three-dimensional object; forming, by the computer-aided design program, a second boundary representation of a second three-dimensional object, the second three-dimensional object being an offset version of the first three-dimensional object; and processing, by the computer-aided design program, the second boundary representation of the second three-dimensional object for output by a physical device. The forming comprises: processing respective ones of the connected surface elements using multiple threads to generate offset surface elements for the second boundary representation of the second three-dimensional object according to the offset; and identifying portions of the connected surface elements that will not have corresponding portions in the offset surface elements by evaluating a distance field representation of the first three-dimensional object using sample points taken from the connected surface elements, the offset surface elements, or both.
[0006] One or more aspects of the subject matter described in this specification may also be embodied in one or more systems, the one or more systems comprising: one or more processors; and a computer-readable medium storing instructions, the instructions, when executed, causing the one or more processors to perform operations, the operations comprising: receiving, by a computer-aided design program, an offset of a first boundary representation of a first three-dimensional object, the first boundary representation comprising connected surface elements defining a boundary between an interior portion and an exterior portion of the first three-dimensional object; forming, by the computer-aided design program, a second boundary representation of a second three-dimensional object, the second three-dimensional object being an offset version of the first three-dimensional object; and processing, by the computer-aided design program, the second boundary representation of the second three-dimensional object for output by a physical device. The forming comprises: processing respective ones of the connected surface elements using multiple threads to generate offset surface elements for the second boundary representation of the second three-dimensional object according to the offset; and identifying portions of the connected surface elements that will not have corresponding portions in the offset surface elements by evaluating a distance field representation of the first three-dimensional object using sample points taken from the connected surface elements, the offset surface elements, or both.
[0007] Identifying portions of the connected surface elements that will not have corresponding portions in the offset surface elements by evaluating the distance field representation of the first three-dimensional object using sample points taken from the connected surface elements may include: for at least one of the connected surface elements that has been identified as an inverted surface element: taking the sample points from the at least one inverted surface element; determining a corresponding offset point for a corresponding one of the sample points and a first distance vector from the corresponding offset point to the corresponding one of the sample points; determining, for the corresponding offset point and using the distance field representation, a closest point on the first boundary representation and a second distance vector from the corresponding offset point to the closest point on the first boundary representation; adding the corresponding one of the sample points to a set of inverted points of an inverted region that will not have a corresponding portion in the offset surface element based on a comparison of the first distance vector and the second distance vector; and splitting a portion of at least one inverted surface element corresponding to the inverted region from the first boundary representation to obtain a non-inverted portion of the first boundary representation.
[0008] The method and the operations may include discretizing one or more of the connected surface elements to form a mesh representing at least the at least one inverse connected surface element. The mesh may include vertices from which the sample points are taken. Determining the closest point on the first boundary representation for the corresponding offset point and using the distance field representation may include using a data structure configured to support searching in three-dimensional space to evaluate the distance field representation at the corresponding offset point by finding the closest mesh element in the data structure to the offset point.
[0009] A mesh representation of the first boundary representation may be stored in the data structure. The mesh representation may include at least the mesh representing the at least one inverted connected surface element. A discretization size of the mesh representation of the first boundary representation may be smaller than the offset.
[0010] Processing respective ones of the connected surface elements using multiple threads to generate offset surface elements for the second boundary representation according to the offset may include processing the non-inverted portion of the first boundary representation to generate the one or more non-inverted offset surface elements of the second boundary representation.
[0011] Processing the boundary representation of the second three-dimensional object by the computer-aided design program for physical device output may include displaying, using a graphical user interface, the one or more non-inverted offset surface elements of the second boundary representation and an indication that the inversion region is missing in the second boundary representation.
[0012] The method and the operations may include adding a patch to the one or more non-inverted surface elements of the second boundary representation. The patch corresponds to an approximate offset boundary representation of the inversion region that is hermetically coupled to the one or more non-inverted offset surface elements.
[0013] Adding the patch may include: determining a set of points on a boundary of the inversion region; determining a set of surface normal vectors, each of the surface normal vectors being determined at a corresponding point in the set of points; generating a mesh patch of the inversion region using the set of points and the set of surface normal vectors; and generating an offset boundary representation corresponding to the mesh patch. The offset boundary representation corresponding to the mesh patch may be generated using a lofted surface or a thin plate spline.
[0014] Identifying portions of the connected surface elements that will not have corresponding portions in the offset surface elements by evaluating the distance field representation of the first three-dimensional object using sample points taken from the offset surface elements may include: taking sample points from at least one of the offset surface elements using a predefined distance between sample points in three-dimensional space; finding, for a corresponding sample point evaluated against the distance field, any of the connected surface elements that are within a distance range from the corresponding sample point, wherein the distance range may be dependent on the offset and the predefined distance between the sample points in three-dimensional space; and removing a first portion of the offset surface element corresponding to a first portion of the connected surface element based on having corresponding sample points of two or more of the connected surface elements that are found within the distance range.
[0015] The method and the operation may include: for each corresponding sampling point having two or more of the connected surface elements found within the distance range, finding one or more intersection curves between pairs of offset surface elements corresponding to the pairs of the two or more connected surface elements found within the distance range; for each corresponding sampling point, intercepting a travel step size along the found intersection curve to determine an offset surface element belonging to a candidate edge based on the pair having the two or more connected surface elements found within the travel distance range, wherein the travel distance range may depend on the offset and the travel step size; determining candidate vertices that bound the candidate edge; and removing a second portion of the offset surface element corresponding to a second portion of the connected surface element using the determined candidate edge and candidate vertices.
[0016] The same-face candidate edges and same-face candidate vertices from the candidate edges and candidate vertices may be determined in the same computation thread. The same-face candidate edges and same-face candidate vertices may delimit the face represented by the second boundary. The method and the operation may include completing a set of edges delimiting the face based on unconnected same-face candidate vertices.
[0017] Processing the second boundary representation of the second three-dimensional object by the computer-aided design program for output by a physical device may include displaying, using a graphical user interface, the second boundary representation and an indication that an area of the first boundary representation cannot be offset and is missing in the second boundary representation. The method and the operations may include displaying, using the graphical user interface, a recommended action to be applied to the second boundary representation.
[0018] The method and the operation may include replacing a region of the first three-dimensional object having a radius of curvature less than an offset with one or more arcs. Processing corresponding ones of the connected surface elements using multiple threads to generate offset surface elements for the boundary representation of the second three-dimensional object according to the offset may include generating one or more torus surfaces corresponding to the one or more arcs.
[0019] The method and the operations may include subtracting the second boundary representation from the first boundary representation to obtain a shelled version of the first three-dimensional object.
[0020] The method and the operations may include: discretizing one or more of the connected surface elements to form a mesh representation of the first boundary representation; storing the mesh representation in a data structure configured to support searching in three-dimensional space; the evaluating may include using the data structure to evaluate the distance field representation at the selected point by finding the closest mesh element in the data structure to the selected point. The selected point may be selected based on a corresponding sampling point.
[0021] Specific embodiments of the subject matter described in this specification may be implemented to achieve one or more of the following advantages. The offset operation is more robust than a conventional offset operation because a partial offset B-rep may be generated even if some of the input surfaces cannot produce a closed offset B-rep output. Inversion regions of the input model that would generate self-intersecting offset surfaces may be handled by splitting the input model to separate the inversion regions from the non-inversion regions. The offset of the inversion regions may be approximated a posteriori using patches. An efficient implementation of the distance field is used to speed up the operation. Using the distance field to guide the topology solution rather than creating geometry as in some conventional offset operations, the offset surface may be accurately computed. In addition, in contrast to conventional offset operations, most of the computations may be performed in parallel, for example using multiple threads to perform most operations independently for each B-rep face.
[0022] The details of one or more embodiments of the subject matter described in this specification are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages of the invention will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 An example of a system that can be used to facilitate computer-aided design of objects using distance field-based offset and shelling operations is presented.
[0024] Figures 2A to 2B Example showing the offset operation.
[0025] Figures 3A to 3F An example of a schematic representation of components for generating a data structure that can be used to store a mesh for distance field evaluation is presented. Figures 3G to 3H Examples showing offset operations performed with and without distance fields.
[0026] Figure 4 is a flow chart of an example of a process for a distance field based offset operation.
[0027] Figures 5A to 5E Example demonstrating reversal region detection and removal.
[0028] Figure 6 An example showing a mesh-based patching operation.
[0029] Figures 7A to 7F An example showing offset based on a torus surface.
[0030] Figures 8A to 8B An example showing the offset operation for B-rep.
[0031] Fig. 9 Example showing the faces of a B-rep.
[0032] Figures 10A to 10D Shows an example of generating and displaying some results of a shelling operation.
[0033] Fig.11 is a schematic diagram of a data processing system that includes a data processing device that can be programmed as a client or as a server and implements the techniques described in this document.
[0034] Throughout the various drawings, like reference numbers and designations indicate like elements. DETAILED DESCRIPTION
[0035] Figure 1 An example of a system 100 that can be used to facilitate computer-aided design and manufacturing of an object is shown. A computer 110 includes a processor 112 and a memory 114, and the computer 110 can be connected to a network 140, which can be a private network, a public network, a virtual private network, etc. The processor 112 can be one or more hardware processors, which can each include multiple processor cores. The memory 114 can include both volatile memory and non-volatile memory, such as random access memory (RAM) and flash RAM. The computer 110 can include various types of computer storage media and devices, which can include the memory 114 to store instructions for programs running on the processor 112, the programs including a computer-aided design (CAD) program 116, the CAD program including a distance field based offset and shelling operation subroutine / process 116a.
[0036] As used herein, CAD refers to any suitable program for designing an object, regardless of whether the program is capable of interfacing with and / or controlling manufacturing equipment. Thus, CAD programs 116 may include computer-aided engineering (CAE) programs, computer-aided manufacturing (CAM) programs, and the like. Programs 116 may be run locally on computer 110, remotely on computers of one or more remote computer systems 150 (e.g., one or more server systems of one or more third-party providers accessible by computer 110 via network 140), or both locally and remotely. Thus, CAD programs 116 may be two or more programs operating cooperatively on two or more separate computer processors, wherein one or more programs 116 operating locally at computer 110 may offload processing operations (e.g., geometry generation and / or physical simulation operations) "to the cloud" by causing one or more programs 116 on one or more computers 150 to perform the offloaded processing operations. In some embodiments, some or all geometry offset operations are run by one or more programs in the cloud, rather than in a geometry representation modeler (e.g., B-Rep modeler) running on a local computer. Furthermore, in some embodiments, the geometry offset program may be run in the cloud from an application program interface (API) called by the program without requiring user input through a graphical user interface.
[0037] CAD program 116 presents a user interface (UI) 122 on display device 120 of computer 110, which can be operated using one or more input devices 118 (e.g., keyboard and mouse) of computer 110. Figure 1 110, but the display device 120 and / or the input device 118 may also be integrated with each other and / or with the computer 110, such as in a tablet computer (for example, a touch screen may be an input / output device 118, 120). Moreover, the computer 110 may include a virtual reality (VR) and / or augmented reality (AR) system or be part of it. For example, the input / output devices 118 and 120 may include a VR / AR input controller, a glove or other manual manipulation tool 118a, and / or a VR / AR headset 120a. In some instances, the input / output device may include a sensor-based hand tracking device that tracks movement and recreates interaction as if it were performed using a physical input device. In some embodiments, the VR device and / or AR device may be a stand-alone device that may not need to be connected to the computer 110. The VR device and / or AR device may be a stand-alone device with processing capabilities and / or an integrated computer such as the computer 110, for example, with input / output hardware components such as controllers, sensors, detectors, etc.
[0038] In any case, user 160 interacts with CAD program 116 to generate and / or manipulate a 3D model, which may be stored in model document 130. Figure 1 In the example shown, 3D model 132 has been generated using a shelling operation employing the systems and techniques described in this document.
[0039] The CAD program 116 may implement at least one distance field based offset and shelling operation process 116a to obtain the shape of the modeled object, for example, a corresponding physical structure may be manufactured for the modeled object. The 3D model of the modeled object may have a boundary representation. For example, the CAD program 116 may use a B-Rep model for the input geometry to the shelling or offset process. In general, the boundary representation may use a variety of types of surface data structures, including planes, cylinders, T-splines, NURBS (non-uniform rational B-splines), offset surfaces, lofted surfaces, and / or other surface data structures. The distance field based offset and shelling operation 116a may additionally use a subdivision representation (e.g., a mesh such as a triangular mesh) of at least a portion of the modeled object. The distance field based offset and shelling operation 116a may use the subdivision representation to evaluate the distance field to determine the minimum distance from the model.
[0040] The computer model 132 or at least a portion of the computer model 132 may be processed for output by a physical device. For example, at least a portion of the computer model 132 may be rendered to a display device 120. An indication that an area of the model cannot be offset and is missing in the second boundary representation may be displayed 134a using a graphical user interface. A recommended action to be applied 134b may also be displayed. In some examples, the recommended action may be to apply a patch to the missing area.
[0041] The computer model 132 or at least a portion of the computer model 132 may be stored as a model document 130. The model document 130 may be stored in a permanent storage device. The model document 130 may be used to generate another representation of the model (e.g., a tool path specification for a manufacturing process of the object or a portion thereof). This may be performed by a user 160 request or in view of a user request for another action (such as sending the computer model 132 to one or more computer-controlled manufacturing systems, such as additive manufacturing (AM) machines and / or subtractive manufacturing (SM) machines 170 or other manufacturing machines that may be directly connected to the computer 110 or connected via the network 140 as shown). This may involve post-processing that is performed on the local computer 110 (e.g., based on a call to a cloud service running in the cloud) or externally to further process the generated 3D model (e.g., based on considerations associated with the additive manufacturing process) and export the 3D model to an electronic document that is manufactured based thereon. Note that an electronic document (referred to simply as a document for brevity) may be a file, but does not necessarily correspond to a file. The document may be stored in a portion of a file that stores other documents, in a single file dedicated to the document in question, or in multiple collaborative files. In addition, the user 160 may save or transfer the 3D model for later use. For example, the CAD program 116 may store a document 130 that includes a model 132 of an algorithmic design.
[0042] The CAD program 116 can provide the document 135 (e.g., a tool path specification in an appropriate format) to the AM and / or SM machine 170 to generate a physical structure corresponding to at least a portion of the model 132. The AM machine 170 can employ one or more additive manufacturing techniques, such as particle technology (e.g., powder bed fusion (PBF), selective laser sintering (SLS), and direct metal laser sintering (DMLS)) or extrusion technology (e.g., fused filament fabrication (FFF), metal deposition). In some cases, the AM machine 170 can directly use the tool path specification to manufacture the physical structure. In some cases, the AM machine 170 builds a mold for casting or forging the physical structure.
[0043] The SM machine 170 may be a computer numerically controlled (CNC) milling machine, such as a multi-axis, multi-tool milling machine, used in the manufacturing process. For example, the CAD program 116 may generate CNC instructions for a machine tool system 170 that includes a plurality of tools that may be used for various machining operations (e.g., solid carbide round tools of different sizes and shapes, and insert tools of different sizes that receive metal inserts to produce different cutting surfaces). Thus, in some embodiments, the CAD program 116 may provide a corresponding document 135 (which has a tool path specification in an appropriately formatted format, such as a CNC numerical control (NC) program) to the SM machine 170 for use in manufacturing a physical structure using various cutting tools, etc.
[0044] In addition, in some embodiments, no physical manufacturing is involved. The systems and techniques described herein are applicable to any suitable 3D modeling software. Therefore, in some embodiments, the CAD program 116 may include an animation program that renders the 3D model 132 to a document 165 of an appropriate format for visual display, such as by a digital projector 174 (e.g., a digital cinema package (DCP) 165 for movie release) or other high-resolution display device. The computer model 132 or at least a portion of the computer model 132 may be processed for output by a digital projector, and the processing may include rendering at least a portion of the model 132 to an animation document for a digital projector. Other applications are also possible.
[0045] Figures 2A to 2B An example of an offset operation is shown. The shelling operation removes all material from the representation of an object that is more than a predefined (e.g., user-defined) offset distance from the object's surface. To do that, the offset geometry of all elements of the object (i.e., vertices, edges, and faces) is calculated. For some elements, there is a direct correspondence between the input element and the corresponding offset element. For example, the offset of a plane is a parallel plane. For more complex surfaces, the offset is procedural. A B-rep is expressed as a parametric surface that is a two-dimensional domain of parameters u, v ( ) is mapped to a point in 3D space: The offset B-rep of p can generally be calculated based on the offset and the surface normal n(u,v) as o , where the normal can be determined as the cross product of the first-order partial derivatives with respect to the parameters u and v: .
[0046] The offset edge curve is calculated from the intersection of the offset surface of the adjacent face. The offset vertex position is defined by the intersection of the offset curve of the adjacent edge with the offset surface around the vertex.
[0047] Several problems can occur during the calculation of the offset geometry. For example, the topology of the offset may be different from the topology of the input model. Figure 2A An input model 200a and its corresponding offset 250a are shown. The input and offset models 250a may be B-reps. Some of the surface elements 210, 220 of the input model have corresponding elements 215, 225 in the offset model. However, as the face 230 is offset to the edge 235, the face 230 of the input model 250a disappears in the offset model 250a. Figure 2B The offset model 250b is shown with an edge 265 that has no corresponding edge in the input model 200b. Rather, the edge 265 is the result of the offset inversion region 260. The offset inversion region 260 is a complex operation because it involves the calculation of the self-intersections of the offset surface. In general, the self-intersections of the offset surface are difficult to handle because the properties of the surface near the self-intersections are not well defined.
[0048] To determine the B-rep model at a constant offset distance from the input model, a high-performance distance field algorithm can be used to calculate the distance to the exterior of the input body, which can find the closest point on the input B-rep. The distance field is a scalar field that is defined as the minimum distance to a point on the surface of the input B-rep at any point in space. The distance field can be represented using an isosurface (i.e., a surface where the distance field has the same value). The isosurface corresponding to the exterior contour of the input model will correspond to an isosurface where the distance field value is equal to zero.
[0049] Any suitable distance field evaluation can be used with the technology of the present disclosure. In some examples, a fast distance field evaluator is implemented from the sample point to the input B-rep, and the fast distance field evaluator also returns all surface elements (faces, edges and vertices) within the distance range. In order to achieve fast implementation, the input B-rep is converted to a discrete mesh representation using a faceting algorithm, and the distance to this mesh is calculated. Finding the distance to the triangle mesh can be much faster than finding the distance to the B-rep. In order to make the distance calculation to the mesh efficient, the mesh can be stored using a data structure that accelerates the search for data in 3D space. In some examples, an r-tree is used. In some examples, a bounding volume hierarchy (BVH) structure is used. Discretizing the input B-rep and storing the mesh in a data structure that allows 3D searching and projecting back to the B-rep provides an efficient implementation for distance field evaluation.
[0050] Figure 3AAn exemplary mesh representation 300 obtained by discretizing an input B-rep is shown. The mesh representation 300 shows three visible input B-rep faces 305, 310, 315 discretized using a mesh size. Mesh elements (e.g., mesh triangles) corresponding to B-rep elements (i.e., B-rep faces, edges, and vertices) are stored in a BVH structure according to their bounding boxes.
[0051] Figure 3B Schematic representations of bounding boxes 300' corresponding to mesh representation 300 and bounding boxes 305', 310', 315' corresponding to faces 305, 310, 315, respectively, are shown. A separate face BVH structure may be created for each face from the bounding boxes 305', 310', 315' of faces 305, 310, 315.
[0052] Figure 3C A schematic representation is shown of an exemplary bounding box 316' corresponding to mesh elements 316 belonging to face 315. For each individual face, the BVH stores the mesh elements belonging to the corresponding face according to their bounding boxes (eg, bounding boxes 316').
[0053] Each subdivided version of each edge of the input B-rep is also stored in a separate edge BVH structure. Figure 3D A schematic representation of the edges 306, 307 and corresponding bounding boxes 306', 307' of the input B-rep is shown. Each edge BVH stores segments according to their bounding boxes that are approximated by the polyline of the corresponding edge. Figure 3E Exemplary segments 308, 309 of the polyline approximation of an edge are shown, as well as corresponding bounding boxes 308', 309'.All points corresponding to vertices of the input B-rep are also added to the vertex BVH storing the vertex positions. Figure 3F Vertices 311 are shown to be stored in the vertex BVH. All of these face, edge, and vertex BVHs may then be nested within a BVH containing a discretized version of all the edges, faces, and vertices of the input model.
[0054] In some examples, only the edges and vertices that contribute to the offset B-rep are added to the BVH. For example, the edge between two convex adjacent faces can be ignored. When offsetting inward, there will be no rounded surface generated by the edge, because the adjacent face will always be closer to any point inside than the edge, that is, the edge will never be found to be the closest point to any point. The rules for ignoring edges and vertices can be inferred from the analysis of whether the offset B-rep may contain surfaces derived from the edges and vertices. This can be found from the range of angles between the faces around the edge and the vertex. For example, convex edges can be ignored because convex edges do not create offset faces when offsetting inward. As another example, vertices that are only on convex edges can also be ignored. On the other hand, if a vertex is located on both concave and convex edges, then the vertex may or may not contribute to the offset, so the vertex cannot be ignored.
[0055] The distance field algorithm implements a function that returns the elements of the input B-rep that are within a given distance range [min_distance, max_distance] of the sample position, provided that the closest point is not closer than the lower end of the distance range. If the closest point is too close, nothing is returned. For example, the pseudo code of the function prototype can be
[0056]
[0057] Traverse the BVH of the element while skipping any branches of the tree whose bounding box is outside the given range of sampled positions. For faces and edges whose bounding boxes are within the range, find the closest point on the grid or polyline by further traversing its BVH structure. For all elements whose closest point is within the distance range, return the element's position and identity.
[0058] The distance field can be used to determine how to combine the offset surfaces into a conforming, closed, non-self-intersecting B-rep model that is at the correct offset distance from the input B-rep at any position. Using the distance field allows for quick selection of relevant fragments of this offset. The method works by finding the trimming of the exact B-rep offset surfaces to form a given interface that meets at closed edges. In contrast to conventional methods, the distance field is used here to guide the topology solution rather than creating geometry approximately. The offset B-rep can be generated by concatenating the trimmed offset surfaces of all faces, concave edges, and concave vertices in the input B-rep. To calculate the final geometry, a tubular surface can be generated around the concave edges, and a sphere can be generated around the concave vertices.
[0059] Figures 3G to 3H Shown in use ( Figure 3H ) and not using ( Figure 3G) An example of an offset operation performed in the context of the distance field method described in the present disclosure. Figure 3G Input B-rep 330 is shown offset inwardly by an offset distance using conventional methods to generate offset B-rep 340b. Concave vertex 345 is offset using surface extension 345b to generate corresponding offset B-rep 340b. Figure 3H The same input B-rep 330 is shown offset inwardly by the same offset distance using the distance field method described in this disclosure. Concave vertex 345 is offset to a rounded corner 345c with all points at the offset distance from input B-rep 330, generating a corresponding offset B-rep 340c.
[0060] Figure 4 4 is a flow chart of an example of a process 400 for a distance field based offset operation. At 420, an offset of a first boundary representation of a first three-dimensional object is received by a computer-aided design program. The first boundary representation includes connected surface elements defining a boundary between an interior portion and an exterior portion of the first three-dimensional object.
[0061] At 440, a second boundary representation of the second three-dimensional object is formed by a computer-aided design program. The second three-dimensional object is an offset version of the first three-dimensional object. Forming the second boundary representation includes processing 450 corresponding ones of the connected surface elements to generate offset surface elements for the second boundary representation of the second three-dimensional object according to the offset. In some examples, processing 450 includes processing (e.g., multi-threaded processing) and identifying 460 portions of the connected surface elements that will not have corresponding portions in the offset surface elements by evaluating the distance field representation of the first three-dimensional object using sample points taken from the connected surface elements, the offset surface elements, or both.
[0062] At 490, the computer-aided design program processes the second boundary representation of the second three-dimensional object for output by the physical device. In some examples, the physical device may include a display device, and the processing may include rendering at least a portion of the second boundary representation of the second three-dimensional object to the display device. In some examples, the physical device includes a permanent storage device, and the processing includes rendering at least a portion of the second boundary representation of the second three-dimensional object to an output document stored in the permanent storage device. In some examples, the physical device includes a digital projector, and the processing includes rendering at least a portion of the second boundary representation of the second three-dimensional object to an animation document for the digital projector. In some examples, the physical device includes one or more computer-controlled manufacturing systems, which may include additive and / or subtractive manufacturing machines, and the processing includes: using at least a portion of the second boundary representation of the second three-dimensional object to generate a tool path specification for the one or more computer-controlled manufacturing systems (e.g., additive and / or subtractive manufacturing machines); and using the generated tool path specification for the additive and / or subtractive manufacturing machines to manufacture at least a portion of the physical structure corresponding to the second boundary representation of the second three-dimensional object with one or more computer-controlled manufacturing systems (e.g., additive and / or subtractive manufacturing machines).
[0063] In some examples, identifying 460 includes detecting and splitting any inversion regions from the input B-rep, which includes: identifying 470 portions of the connected surface elements that will not have corresponding portions in the offset surface elements by evaluating the distance field representation of the first three-dimensional object using sample points taken from the connected surface elements. This may include: for at least one of the connected surface elements that has been identified as an inversion surface element, taking 472 sample points from at least one inversion surface element. At 473, a corresponding offset point of a corresponding one of the sample points is determined. A first distance vector from the corresponding offset point to the corresponding one of the sample points may be determined. At 474, for the corresponding offset point and using the distance field, a closest point on the first boundary representation and a second distance vector from the corresponding offset point to the closest point on the first boundary representation are determined. At 476, based on a comparison of the first distance vector and the second distance vector, the corresponding one of the sample points is added to a set of inversion points of the inversion region, the inversion region will not have a corresponding portion in the offset surface element. At 478, a portion of at least one inversion surface element corresponding to the inversion region is split from the first boundary representation to obtain a non-inversion portion of the first boundary representation. As a result of the split, the inversion portion is delineated in the B-rep so that the inversion portion can be ignored and / or removed.
[0064] In some examples, identifying 460 includes discarding any portion of the input B-rep that is not needed in the offset B-rep based on an initial assessment of the topology of the offset B-rep, which includes: identifying 480 a portion of the connected surface element that will not have a corresponding portion in the offset surface element by evaluating the distance field representation of the first three-dimensional object using sample points taken from the offset surface elements. This may include taking 482 sample points from at least one of the offset surface elements using a predefined distance between sample points in three-dimensional space. At 484, for a corresponding sample point evaluated against the distance field, any connected surface element in the connected surface element that is within a distance range from the corresponding sample point is found, wherein the distance range depends on the offset and the predefined distance between the sample points in three-dimensional space. At 486, a portion of the offset surface element corresponding to a portion of the connected surface element is removed based on having corresponding sample points of two or more connected surface elements in the connected surface element that are found to be within the distance range. As explained in more detail below, samples having two or more elements within a distance range may be determined to be located at a boundary between a portion of the connected surface element to be removed and a portion to be retained.
[0065] Note that both the detection and splitting of any inversion regions and the discarding of any unwanted portions of the input B-rep based on the initial assessment of the topology of the offset B-rep can be performed on the same input B-rep, for example, in parallel, such as using multiple threads. Thus, identification 460 can include both identification 470 and identification 480. Figures 5A to 5D Example demonstrating reversal region detection and removal.
[0066] In some examples, before calculating the offset B-rep, the method may check whether any face of the input B-rep has a surface that will be reversed when offset. This can be done by generating a procedural offset surface for each face and checking whether any of the generated offset surfaces has a potential self-intersecting portion. This can be done by performing a compliance check on the surface. For example, the normal of the surface can be determined using the first-order partial derivative of the surface in parametric form with respect to the parameter as described above, and the normal should not be a null value. Near the inversion, the property is not satisfied. For any surface element identified as an inversion (i.e., self-intersecting) element, the method finds the inversion region and splits the input model into an inversion region and a non-inversion region.
[0067] Figure 5A An input B-rep 500a is shown having a region 510 that has been determined to cause a reversal. Figure 5BThe faceting 520b of the face 520a is shown. The resulting mesh 520b (eg, a triangular mesh) can be used as a discretization method to find the inverse sub-region 550a of the face using sampling points 525b. Figure 5C The found inversion sub-region 550a of the face and the remaining non-inversion region 520c of the face 520a are shown. The boundary of the inversion sub-region 550a can be approximated with a boundary curve. The procedure can be repeated for adjacent faces to obtain all points belonging to each face inversion sub-region 550a, 550b, 550c that together constitute the inversion region 550 and to obtain all boundary curves that delimit the inversion region 550. Then, the input B-rep can be split into non-inversion regions and inversion regions 550 delimited by edges 552a generated from the approximated boundary curves. Figure 5D The final input B-rep 500d is shown split into a non-inversion region 551 and an inversion region 550 .
[0068] For simplicity, refer to Figure 5E The procedure for detecting inversion regions is described in 2D. As described above, the input B-rep 500e is discretized, and a mesh (or polyline in 2D) is generated using a mesh size (e.g., the side length of a mesh element in 3D or the segment length in 2D) 502. In some examples, the input B-rep 500e may be discretized using a mesh size 502 that is less than an offset 504. Mesh vertex positions 525e may be used as sampling points. Mesh vertex positions 525e are offset by offset 504 to find offset positions on offset surface 545. For each sampling point, the corresponding offset position may be calculated by moving from vertex position 525e along a normal to the input surface at that position by offset 504. The distance field may be evaluated at offset position 525e' to see if point 525e' is too close to the input B-rep. The input B-rep is then split to the edges bounding the inversion region 550e, which maps to the inverted region 540 beyond the point where the offset B-rep self-intersects.
[0069] In some examples, a vertex 525e (V) of the input mesh may be selected as a sampling point, and a corresponding offset vertex 525e' (V') on the offset surface may be found by moving a distance along the normal based on the offset. In some examples, the distance is equal to the offset plus a tolerance.
[0070] The offset vertex 525e' (V') may be projected back onto the input surface using the distance field to obtain the nearest input vertex 525e'' (V'').
[0071] If the distance vector V''-V' from the offset vertex to the nearest input vertex does not have the same direction as the distance vector V-V' from the offset vertex to the sample vertex, then the offset point 525e' is close to or beyond the self-intersection point, and the mesh elements (e.g., segments of a polyline, triangles of a triangle mesh) surrounding the sample point (i.e., input vertex 525e) belong to an inversion region that should be split in the input B-rep.
[0072] Go to again Figure 5D Once the input B-rep is split into the inversion region 550 and the non-inversion region, any migration algorithm can be used to generate a migration B-rep for the non-inversion portion 500d. For example, a precise migration algorithm can be used. In some examples, the migration B-rep is calculated using a distance field method, as described with respect to method 480 and described in more detail below.
[0073] The resulting offset B-rep will have missing regions corresponding to inversion regions 550c. In some examples, a patch may be generated for the missing region. In some examples, a grid-based patching operation may be used.
[0074] Figure 6 An example of a mesh-based patching operation is shown. A region 600 encloses a hole to be patched. The boundary of the region 600 can be detected. A polyline 640 can be created along the boundary. For each of a set of sampling points 605 along the boundary 640, information about the normal of the neighboring face of the B-rep is extracted. In some examples, in the case where there is a neighboring face arranged, the average value of the normal of the neighboring face at the sampling point is extracted. Based on this information, a mesh patch including mesh elements 610 is generated to cover the hole 600. The generated mesh patch has no internal vertices. The vertices 605 of the mesh patch are located on the boundary 640 of the hole. Based on the mesh elements, the mesh patch is divided into sections 615. In some examples, one or more of the sections can be filled using thin plate splines. In some examples, one or more of the sections can be filled using lofted surfaces. The mesh is used to partition the hole boundary 640 into parts that can be connected to the lofted surface 615.
[0075] If the mesh patch is a triangular mesh and the mesh elements 610 are mesh triangles, then each of the mesh triangles can theoretically have zero, one, two, or three edges on the boundary. Mesh elements with three edges on the boundary can be ignored since this situation does not occur in practice. Mesh elements 630 with two edges on the boundary can be used to split the boundary 640 into parts that can be connected to the lofted surface 615. Mesh elements 620 with zero edges on the boundary can be used to create triangular planes. Triangles with one edge on the boundary do not require any special treatment since the triangle will be inside one of the lofted surfaces.
[0076] The result of the repair operation is a closed repaired offset B-rep including the repair patch and the non-inverted offset B-rep.
[0077] The patched offset B-rep may be subtracted from the input B-rep to obtain a shelled version of the input B-rep having a thickness substantially equal to the offset.
[0078] Figures 7A to 7F Example showing offsetting based on a torus surface. Fitting a B-rep to a distance field contour surface requires creating a surface for each concave non-smooth edge (i.e., one that has a different normal direction than the two surfaces adjacent to the edge, and therefore is not offset in the same direction) where each point on the surface is a constant offset distance away from the closest point on the edge.
[0079] Fig. 7A An example of an input B-rep with a circular, concave, non-smooth edge 702 is shown. For a circular edge, a torus surface 704b with a major radius equal to the circular edge radius and a minor radius equal to the offset distance can be used as the offset surface, such as Figure 7B The torus satisfies the requirement that the surface be at a constant distance from the input edge, even if the offset distance is larger than the radius of the input torus edge, as in Figure 7C The same is true for the annular surface 704c in FIG.
[0080] Unless the input edges are straight lines or edge rings, an offset distance greater than the minimum radius of curvature of the edge can cause offset problems. Fig.7D An example of a non-annular, concave, non-smooth edge 706 of an input B-rep is shown. Edge 706 corresponds to the intersection curve between a cylindrical surface 708 and a torus 710. Edge 706 has a radius of curvature that changes continuously along its length. At its start and end points, the radius of curvature may be less than the offset distance, while in the middle, the radius of curvature may be greater than the offset distance. When the radius of curvature of edge 706 is less than the offset distance, the surface is inverted on one side, which means that the surface normal flips direction. At the point where the radius of curvature is exactly equal to the offset distance, the surface has "bad" properties, such as a sudden discontinuity in the surface normal, that is, the surface is non-smooth.
[0081] To address this issue, the input B-rep can be modified by replacing high curvature regions of concave edges (i.e., regions where the radius of curvature is less than the offset distance) with a sequence of tangent arcs that approximate the input shape and can be reliably offset. High curvature edges can be split into ranges where the radius of curvature is greater or less than the offset distance. For ranges where the radius is less than the offset distance, the range is further split into shorter segments that can be replaced by circular arcs. These arcs can be offset to a torus.
[0082] Fig. 7E The portion showing edge 706 has been replaced by arc 710 Fig.7D The arcs are approximated to the input edge 706 up to a selected tolerance. The arcs are selected to fit the input edge as closely as possible while meeting each other accurately and smoothly (ie, preserving G0 and G1 continuity).
[0083] Figure 7F An offset body corresponding to edge 706 and its surroundings are shown after splitting high curvature edge 706 and replacing parts of it with arcs 710. Each arc edge 710 generates a torus offset surface 714 that can be solved using, for example, a distance field fitting method to find its correct trim.
[0084] The distance field can be used to determine how to combine the offset surfaces into a conforming, airtight, non-self-intersecting B-rep model that is at the correct offset distance from the input B-rep at any location. Using the distance field allows the selection of relevant fragments of this offset. The method works by finding the trimming of the exact B-rep offset surfaces to form a defined interface that meets at airtight edges. In contrast to conventional methods, the distance field is used here to guide the topology solution rather than to create the geometry approximately.
[0085] In order to enable parallel (e.g., multithreaded) processing, a thread-safe geometry cache may be implemented. This allows different threads to concurrently request surfaces and intersection geometry from the geometry cache without causing race conditions or inefficient processing. In some examples, a concurrent hash map may be used to implement the geometry cache. The geometry cache takes B-rep surface elements (i.e., faces, edges, and vertices) as input. Since any of these elements can create a surface in an offset B-rep, these elements may be processed in a similar manner.
[0086] The geometry cache may implement several functions. In some examples, the geometry cache may implement a function that accepts a surface element as an argument (e.g., get_offset_surface(ENTITY)) and returns an offset surface for the surface element. In some examples, the geometry cache may implement a function that accepts two surface elements as arguments (e.g., get_intersections(ENTITY, ENTITY)) and returns one or more intersection curves between the offset surfaces of the two elements. In some examples, the geometry cache may implement a function that accepts an intersection curve and a surface element as arguments (e.g., get_intersections(CURVE, ENTITY)) and returns the intersection points between the intersection curve and the offset surface of the element. In some examples, the latter function may be used to calculate vertex positions.
[0087] The first time a geometry is requested from the geometry cache, it can be calculated, stored, and a reference to it can be returned. When the same geometry is subsequently requested, a reference to the cached geometry can be returned.
[0088] Fig. 8A An exemplary input B-rep 800 is shown that includes several faces (eg, faces 810, 815). In some examples, the input B-rep may be a non-inverted portion of a B-rep, where the inverted portion has been previously removed using, for example, method 470. Figure 8B An offset B-rep 850 corresponding to the input B-rep 800 is shown.
[0089] An initial guess for the topology of the offset B-REP can be determined by sampling the distance field on the offset elements. In some examples, the sampling points on the offset surface parameter domain for each input face, edge, and vertex can be taken using a point grid. The distance field can be evaluated at the offset location of each sample. The sampling points can have a predefined separation distance x in three-dimensional space. The separation distance x can be used to determine the distance range to be transferred to the distance field evaluation. For example, the distance field of all entities and their closest points on the input B-rep can be requested within the range [offset – x, offset + x]. This ensures that all entities that may intersect near the offset point can be found.
[0090] Samples where no input B-rep elements are found within the distance range can be ignored. These samples are in areas where the offset surface is too close to the input B-rep.
[0091] Samples that are found to be within the distance range of only the input element from which they are being sampled may also be ignored. These samples are located in a region that belongs to the interior of the offset B-rep surface, rather than near the edge of the surface.
[0092] Samples where two or more input B-rep elements are found within a distance range are of interest. These samples are located in a region that may correspond to an edge of an offset B-rep.
[0093] Fig. 8A , an example of several elements found within a distance range of a particular offset and predefined separation distance for input faces 810, 815 is shown. Element 820 corresponds to a sample where no input B-rep element was found within the distance range. Darker elements (e.g., 830, 840) correspond to samples where two or more input B-rep elements were found within the distance range. Elements 830, 840 colored in different grayscales correspond to different numbers of input B-rep elements found within the distance range.
[0094] For samples with multiple elements within the distance range, each pair of elements is considered and the intersection curves (if any) between the offset curves of each pair of elements are determined. For example, the function of the geometry cache as described above can be used to determine whether and how many intersection curves exist for each pair of elements.
[0095] After determining the intersecting curves, the process can determine which portions of those intersecting curves, if any, will be transformed into edges. To do this, a sample offset point is projected onto each intersecting curve and a step size is taken along the curve. The curve has a parametric function definition such that the position along the curve is defined as a function f(t) of a parameter t. To step or march along the curve, the parameter t can be increased or decreased by a march step size of dt. Taking a smaller t step size, i.e., reducing dt, can increase the resolution of marching along the curve.
[0096] At each t step, the distance field can be evaluated to check whether the two closest input B-rep elements are the two elements from which the intersection curve is generated. For example, the distance field can be evaluated within a distance range [offset - dP, offset + dP], where dP is the 3D step size. In some examples, dP can be estimated based on the first-order derivative of the parameter function of the curve f(t) and the step size dt along the curve. Stepping along the curve with a step size dt will produce a dP step distance in 3D, which can be estimated as dP=dt * f'(t), where f'(t) is the first-order derivative of the curve f(t). If the intersection curve is too close to the input B-rep, the distance field will not return any elements within the range. If the intersection curve is too far away from any of the two elements from which the intersection curve is generated, the element will not be returned by the distance field. Some intersection curves will not have points that will be part of the edge. These intersection curves can be ignored.
[0097] Stepping along the intersection curve can give an approximate range of the offset edge. Taking smaller t-steps can provide more accurate values for the start and end of the offset edge range. In some examples, a binary search can be performed. The t-step size is halved each time a neighboring point is found, where one point is on the edge and the next point is not on the edge. Once the step size is below a threshold, progress can be stopped.
[0098] Next, vertex positions are found to delimit the edges. Vertex positions can be found by intersecting intersection curves with offset surfaces. Elements found to be within range at the last distance field evaluation are used for determination. For each pair of found elements, the intersection curves of the corresponding offset surfaces are determined. In some examples, the functionality of the geometry cache as described above may be used.
[0099] Next, determine the intersection point between each determined intersection curve and each offset curve of each of the remaining elements in the range. In some examples, the function of the geometry cache as described above can be used. The intersection points between the surface and the curves tangent to these surfaces can be ignored because the intersection points do not provide vertex positions. When the curve is tangent to the surface, the intersection between them is the curve itself, not a point, so the intersection does not provide vertex positions. Test the intersection points according to the distance field to ensure that the intersection points are at the offset distance from the input B-rep. If the situation is like this, then select the intersection points as candidate vertices. Project the candidate vertex positions onto the intersection curves. If the candidate fixed point is within the predefined tolerance of the intersection curve, the candidate vertex positions will be used as candidate vertices to delimit the corresponding candidate edges.
[0100] The determination of candidate edges, edge ranges, and vertex positions may be performed independently for each offset face of each input element. In some examples, these calculations may be multithreaded, with each face being calculated as a separate multithreaded task. Although multithreading has computational advantages, the method may also be performed sequentially, for example, using a single computational thread.
[0101] Due to the resolution limitations imposed by the discrete march, the set of candidate edges and vertices found to bound the offset face of each corresponding input element may be incomplete. For example, small fragments of one or more intersecting curves may be missed during the march. To obtain the final set of edges and vertices, the start and end positions of each edge may be tested against the start and end positions of all other edges. This can provide a graph of the connectivity of all edges.
[0102] If each edge is connected to another edge at both its starting point and end point or if the starting point and end point of each edge coincide (i.e., a closed edge), then the set of edges is complete. If some edges do not intersect with another edge at one or both of them, further searches are performed to find more edges to fill the gaps. At each unconnected vertex of the candidate edge, the distance field is evaluated to find all elements within the distance range [offset-tolerance, offset+tolerance]. The tolerance can be determined based on the accuracy of the distance field evaluation. Determine the intersection curves of each pair of elements in the range. For example, the intersection curves can be retrieved from the geometry cache. The newly discovered intersection curves can then be converted into candidate edges and vertices, as described above. This process can be repeated until there are no gaps or the gaps no longer produce edges. This process can also be performed independently for each offset face, so multiple threads can be used to solve each face independently.
[0103] Once all candidate edges and vertices have been found, the method may search for cycles in the edge connectivity graph to determine face loops that define the faces of the offset B-rep. Fig. 9 An example of a B-rep of face 900 is shown. Loop 910 defines the portion of surface 905 that is inside face 900. Loop 910 can be constructed from edges 930 by finding a loop formed by a set of adjacent co-edges 940 having a direction determined by normal 950 of face 900 and the normals of adjacent faces.
[0104] In some examples, loop solving can be performed in a sequential manner. In areas where surfaces are nearly tangent to each other, there can be ambiguities due to pairs of edges that can be used individually but not both. By performing loop solving sequentially, the selection of edges for one face can be made to match the selection of edges for adjacent faces. In this way, faces can be joined into a closed model.
[0105] Connected loops of edges and vertices can be converted to B-rep faces. Faces can be stitched into a closed offset B-rep. In some examples, checks can be performed to ensure that the resulting offset B-rep is satisfactory. Healing can be applied to resolve remaining issues. For example, healing can be applied to ensure that each face is fully connected.
[0106] Figures 10A to 10D An example of generating and displaying partial results of a shelling operation is shown. Since the offset operation can be performed independently for each element, if an element fails to provide a corresponding offset element that does not self-intersect and properly splices with adjacent elements, the portion of the offset corresponding to other entities can still be processed for output. Fig. 10A An exemplary input B-rep 1002 is shown. Fig. 10B A corresponding offset sheet 1004 is shown that was generated using the techniques described in this disclosure. Fig. 10B An example of a partial result offset sheet 1004 is shown with a hole 1006 due to a surface-surface intersection problem that prevents trimming of one of the offset surfaces. In some examples, a patch (such as reference Figure 6 The mesh-based patch described in ) is used to generate a closed body. For example, Fig. 10C A partial result of repairing the offset sheet 1004 using the repair sheet 1008 is shown. Fig. 10D A shelled body 1008 generated based on the offset 1004 is shown.
[0107] However, even if the hole is not repaired, it can be treated as Fig. 10B The partial result offset sheet 1004 is shown for output. For example, the user may only be interested in the portion of the offset 1004 that was successfully offset.
[0108] Fig.11 1 is a schematic diagram of a data processing system including a data processing device 1100 that can be programmed as a client or a server and can be used to facilitate computer-aided design of objects using distance field-based offset and shelling operations. The data processing device 1100 is connected to one or more computers 1190 via a network 1180. Although in Fig.11 Only one computer is shown as data processing device 1100, but multiple computers can be used. Data processing device 1100 includes various software modules that can be distributed between the application layer and the operating system. These may include executable and / or interpretable software programs or libraries, including tools and services of one or more 3D modeling programs 1104 that use distance fields to implement offset and shelling operations on B-rep models as described above. Therefore, 3D modeling program 1104 can be CAD program 1104 (such as CAD program 116) and can implement one or more offsets a. In addition, program 1104 can potentially implement manufacturing control operations (for example, generate and / or apply tool path specifications to realize the manufacture of designed objects). The number of software modules used may vary depending on the implementation. Moreover, software modules can be distributed on one or more data processing devices connected by one or more computer networks or other suitable communication networks.
[0109] The data processing device 1100 also includes hardware or firmware devices, which include one or more processors 1112, one or more additional devices 1114, a computer-readable medium 1116, a communication interface 1118, and one or more user interface devices 1120. Each processor 1112 is capable of processing instructions for execution within the data processing device 1100. In some embodiments, the processor 1112 is a single-threaded or multi-threaded processor. Each processor 1112 is capable of processing instructions stored on a computer-readable medium 1116 or a storage device (such as one of the additional devices 1114). The data processing device 1100 uses the communication interface 1120 to communicate with one or more computers 1190, for example, via a network 1180. Examples of the user interface device 1120 include a display, a camera, a speaker, a microphone, a tactile feedback device, a keyboard, a mouse, and VR and / or AR equipment. The data processing apparatus 1100 may store instructions implementing operations associated with the above-described procedures on a computer-readable medium 1116 or one or more additional devices 1114 (eg, one or more of a hard disk device, an optical disk device, a magnetic tape device, and a solid-state memory device).
[0110] The embodiments of the subject matter and functional operations described in this specification may be implemented in a digital electronic circuit system, or in computer software, firmware or hardware (including the structures disclosed in this specification and their structural equivalents), or in a combination of one or more of them. The embodiments of the subject matter described in this specification may be implemented using one or more computer program instruction modules encoded on a non-temporary computer-readable medium for execution by a data processing device or for controlling the operation of a data processing device. The computer-readable medium may be a manufactured product, such as a hard drive in a computer system, or an optical disk sold through a retail channel, or an embedded system. The computer-readable medium may be obtained separately, and later encoded using one or more computer program instruction modules, for example, after one or more computer program instruction modules are delivered via a wired or wireless network. The computer-readable medium may be a machine-readable storage device, a machine-readable storage substrate, a memory device, or a combination of one or more of them.
[0111] The term "data processing device" covers all devices, equipment and machines for processing data, including, for example, a programmable processor, a computer or multiple processors or computers. In addition to hardware, the device may also include code that generates an execution environment for the computer program in question, for example, code constituting processor firmware, a protocol stack, a database management system, an operating system, a runtime environment, or a combination of one or more of them. In addition, the device may employ a variety of different computing model infrastructures, such as web services, distributed computing, and grid computing infrastructures.
[0112] Computer programs (also referred to as programs, software, software applications, scripts, or codes) may be written in any suitable form of programming language, including compiled or interpreted languages, declarative or procedural languages, and may be deployed in any suitable form, including as stand-alone programs or modules, components, subroutines, or other units suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program may be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple collaborative files (e.g., files that store portions of one or more modules, subroutines, or codes). A computer program may be deployed to execute on one computer, or on multiple computers located at one location or distributed across multiple locations and interconnected by a communication network.
[0113] The processes and logic flows described in this specification can be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuitry, and the device can also be implemented as a special purpose logic circuit system, such as an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit).
[0114] Processors suitable for executing computer programs include, for example, both general-purpose and special-purpose microprocessors, and any one or more processors of any kind of digital computer. In general, the processor will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a processor for executing instructions and one or more memory devices for storing instructions and data. In general, a computer will also include one or more mass storage devices for storing data, such as a magnetic disk, a magneto-optical disk, or an optical disk, or operatively coupled to receive data from or transfer data to the one or more mass storage devices, or both. However, a computer does not need to have such a device. Moreover, a computer may be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device (e.g., a universal serial bus (USB) flash drive), to name a few. Devices suitable for storing computer program instructions and data include all forms of nonvolatile memory, media, and storage devices, including, for example: exemplary semiconductor memory devices, such as EPROM (erasable programmable read-only memory), EEPROM (electrically erasable programmable read-only memory), and flash memory devices; magnetic disks, such as internal hard disks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The processor and memory may be supplemented by, or incorporated in, special purpose logic circuitry.
[0115] To provide interaction with a user, embodiments of the subject matter described in this specification may be implemented on a computer having: a display device, such as an LCD (liquid crystal display) display device, an OLED (organic light emitting diode) display device, or another monitor for displaying information to a user; and a keyboard and pointing device, such as a mouse or trackball, by which a user can provide input to the computer. Other kinds of devices may also be used to provide interaction with a user; for example, the feedback provided to the user may be any suitable form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; and input from the user may be received in any suitable form, including acoustic, voice, or tactile input.
[0116] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact through a communication network. The relationship between the client and the server is generated by running on a corresponding computer and making a computer program with a client-server relationship with each other. The embodiment of the subject matter described in this specification may be implemented in a computing system, and the computing system includes a back-end component (e.g., as a data server), or includes a middleware component (e.g., as an application server), or includes a front-end component, for example, a client computer with a graphical user interface or a browser user interface through which a user can interact with the embodiment of the subject matter described in this specification, or any combination of one or more such back-ends, middleware or front-end components. The components of the system can be interconnected by digital data communication (e.g., a communication network) of any suitable form or medium. Examples of communication networks include local area networks ("LAN") and wide area networks ("WAN"), internetworks (e.g., the Internet) and peer-to-peer networks (e.g., dedicated peer-to-peer networks).
[0117] Although this specification contains many implementation details, these should not be interpreted as limitations on the scope of what is claimed or may be claimed, but rather as descriptions of features that are peculiar to a particular embodiment of the disclosed subject matter. Certain features described in this specification in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually in multiple embodiments or in any suitable sub-combination. Moreover, although features may be described above as acting in certain combinations and even initially claimed to be protected as such, one or more features from a claimed combination may be separated from the combination in some cases, and a claimed combination may involve a sub-combination or a variant of a sub-combination.
[0118] Similarly, although operations are depicted in a particular order in the drawings, this should not be understood as requiring that such operations be performed in the particular order shown or in a sequential order, or that all illustrated operations be performed to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can be generally integrated together in a single software product or packaged into multiple software products.
[0119] Thus, particular embodiments of the invention have been described. Other embodiments are within the scope of the following claims. Additionally, the actions recited in the claims can be performed in a different order and still achieve desirable results.
Claims
1. A method, comprising: receiving, by a computer-aided design program, an offset of a first boundary representation of a first three-dimensional object, the first boundary representation comprising connected surface elements defining a boundary between an interior portion and an exterior portion of the first three-dimensional object; forming, by the computer-aided design program, a second boundary representation of a second three-dimensional object, the second three-dimensional object being an offset version of the first three-dimensional object, wherein the forming comprises processing respective ones of the connected surface elements using multiple threads to generate offset surface elements for the second boundary representation of the second three-dimensional object according to the offset; as well as identifying portions of the connected surface elements that will not have corresponding portions in the offset surface elements by evaluating the distance field representation of the first three-dimensional object using sample points taken from the connected surface elements, the offset surface elements, or both; as well as The second boundary representation of the second three-dimensional object is processed by the computer-aided design program for output by a physical device.
2. The method of claim 1 , wherein identifying portions of the connected surface elements that will not have corresponding portions in the offset surface elements by evaluating the distance field representation of the first three-dimensional object using sample points taken from the connected surface elements comprises: For at least one of the connected surface elements that has been identified as an inverted surface element: Obtaining the sampling point from the at least one inverted surface element; determining a corresponding offset point of a corresponding one of the sampling points and a first distance vector from the corresponding offset point to the corresponding one of the sampling points; determining, for the corresponding offset point and using the distance field representation, a closest point on the first boundary representation and a second distance vector from the corresponding offset point to the closest point on the first boundary representation; adding the corresponding one of the sample points to a set of inversion points of an inversion region based on a comparison of the first distance vector and the second distance vector, the inversion region not having a corresponding portion of the offset surface element; as well as A portion of the at least one inverted surface element corresponding to the inverted region is split from the first boundary representation to obtain a non-inverted portion of the first boundary representation.
3. The method according to claim 2, comprising: discretizing one or more of the connected surface elements to form a mesh representing at least the at least one inverse connected surface element, wherein the mesh includes vertices from which the sampling points are taken; and wherein Determining, for the corresponding offset point and using the distance field representation, a closest point on the first boundary representation includes evaluating the distance field representation at the corresponding offset point using a data structure configured to support searching in three-dimensional space by finding a mesh element in the data structure that is closest to the offset point.
4. A method according to claim 3, wherein a mesh representation of the first boundary representation is stored in the data structure, the mesh representation includes at least the mesh representing the at least one inverted connected surface element, and the discretization size of the mesh representation of the first boundary representation is less than the offset.
5. A method according to claim 2, wherein using multiple threads to process corresponding ones of the connected surface elements to generate offset surface elements for the second boundary representation based on the offset includes processing the non-inverted portion of the first boundary representation to generate one or more non-inverted offset surface elements of the second boundary representation.
6. A method according to claim 5, wherein processing the boundary representation of the second three-dimensional object by the computer-aided design program for output to a physical device includes using a graphical user interface to display the one or more non-inverted offset surface elements of the second boundary representation and an indication of the missing inverted region in the second boundary representation.
7. A method according to claim 5, the method comprising adding a patch to the one or more non-inverted surface elements of the second boundary representation, wherein the patch corresponds to an approximate offset boundary representation of the inversion region connected to the one or more non-inverted offset surface elements in a closed manner.
8. The method of claim 7, wherein adding the patch comprises: determining a set of points on a boundary of the inversion region; determining a set of surface normal vectors, each of the surface normal vectors being determined at a corresponding point in the set of points; generating a mesh patch of the inversion region using the set of points and the set of surface normal vectors; as well as An offset boundary representation corresponding to the mesh patch is generated.
9. The method of claim 8, wherein the offset boundary representation corresponding to the mesh patch is generated using a lofted surface or a thin plate spline.
10. The method of claim 1, wherein identifying portions of the connected surface elements that will not have corresponding portions in the offset surface elements by evaluating the distance field representation of the first three-dimensional object using sample points taken from the offset surface elements comprises: obtaining the sampling points from at least one of the offset surface elements using a predefined distance between the sampling points in three-dimensional space; for a corresponding sampling point evaluated against the distance field, finding any of the connected surface elements that are within a distance range from the corresponding sampling point, wherein the distance range depends on the offset and the predefined distance between the sampling points in three-dimensional space; as well as A first portion of the offset surface element corresponding to the first portion of the connected surface elements is removed based on having corresponding sampling points of two or more of the connected surface elements found within the distance range.
11. The method according to claim 10, comprising: for each corresponding sampling point having two or more of the connected surface elements found within the distance range, finding one or more intersection curves between pairs of offset surface elements corresponding to the pair of the two or more of the connected surface elements found within the distance range; for each corresponding sampling point, intercepting a travel step size along the found intersection curve to determine an offset surface element belonging to a candidate edge based on the pair having the two or more of the connected surface elements found within a travel distance range, wherein the travel distance range depends on the offset amount and the travel step size; determining candidate vertices that bound the candidate edge; as well as A second portion of the offset surface element corresponding to a second portion of the connected surface element is removed using the determined candidate edges and candidate vertices.
12. The method of claim 11, wherein same-face candidate edges and same-face candidate vertices from the candidate edges and candidate vertices are determined in a same computation thread, wherein the same-face candidate edges and same-face candidate vertices bound the face represented by the second boundary.
13. The method according to claim 12, comprising: A set of edges that bounds the face is completed based on unconnected same-face candidate vertices.
14. A method according to claim 10, wherein processing the second boundary representation of the second three-dimensional object by the computer-aided design program for output to a physical device includes using a graphical user interface to display the second boundary representation and an indication that an area of the first boundary representation cannot be offset and is missing in the second boundary representation.
15. The method of claim 14, comprising displaying, using the graphical user interface, the recommended action to be applied to the second boundary representation.
16. The method according to claim 1, comprising: replacing a region of the first three-dimensional object having a radius of curvature less than the offset with one or more arcs; and Wherein processing corresponding ones of the connected surface elements using multiple threads to generate offset surface elements for the boundary representation of the second three-dimensional object according to the offset includes generating one or more torus surfaces corresponding to the one or more arcs.
17. The method of claim 1, further comprising subtracting the second boundary representation from the first boundary representation to obtain a shelled version of the first three-dimensional object.
18. The method according to claim 1, comprising: discretizing one or more of the connected surface elements to form a mesh representation of the first boundary representation; storing the grid representation in a data structure configured to support searching in three-dimensional space; and wherein The evaluating includes evaluating the distance field representation at the selected point using the data structure by finding a mesh element in the data structure that is closest to the selected point, wherein the selected point is selected based on a corresponding sampling point.
19. A system, comprising: one or more processors; as well as A computer-readable medium storing instructions that, when executed, cause the one or more processors to perform operations comprising: receiving, by a computer-aided design program, an offset of a first boundary representation of a first three-dimensional object, the first boundary representation comprising connected surface elements defining a boundary between an interior portion and an exterior portion of the first three-dimensional object; forming, by the computer-aided design program, a second boundary representation of a second three-dimensional object, the second three-dimensional object being an offset version of the first three-dimensional object, wherein the forming comprises processing respective ones of the connected surface elements using multiple threads to generate offset surface elements for the second boundary representation of the second three-dimensional object according to the offset; and identifying portions of the connected surface elements that will not have corresponding portions in the offset surface elements by evaluating the distance field representation of the first three-dimensional object using sample points taken from the connected surface elements, the offset surface elements, or both; and The second boundary representation of the second three-dimensional object is processed by the computer-aided design program for output by a physical device.
20. A non-transitory computer readable medium tangibly encoding a computer program operable to cause a processing system to perform operations comprising: receiving, by a computer-aided design program, an offset of a first boundary representation of a first three-dimensional object, the first boundary representation comprising connected surface elements defining a boundary between an interior portion and an exterior portion of the first three-dimensional object; forming, by the computer-aided design program, a second boundary representation of a second three-dimensional object, the second three-dimensional object being an offset version of the first three-dimensional object, wherein the forming comprises processing respective ones of the connected surface elements using multiple threads to generate offset surface elements for the second boundary representation of the second three-dimensional object according to the offset; as well as identifying portions of the connected surface elements that will not have corresponding portions in the offset surface elements by evaluating the distance field representation of the first three-dimensional object using sample points taken from the connected surface elements, the offset surface elements, or both; as well as The second boundary representation of the second three-dimensional object is processed by the computer-aided design program for output by a physical device.