Computer-assisted automated modeling of editable sketches

Converting 2D curves into primitive sketched geometry through segmentation and fitting techniques solves the problem of difficulty in maintaining shape integrity and building high-quality 3D models in the prior art, and realizes robust automated modeling and easy-to-edit sketched geometry.

CN119989608APending Publication Date: 2025-05-13AUTODESK INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411619073.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-04-16
Filing Date
2024-11-13
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art has difficulty effectively converting the representation of 2D curves as simple sketched outline sets, especially in maintaining the overall shape of the input curve and building high-quality 3D models.

Method used

Through segmentation and fitting techniques, 2D curves and predefined geometry are converted into primitive sketch geometry, using a relatively small number of primitives (such as lines, arcs, circles) to approximate the shapes, and respecting contact of the reserved area and avoiding obstacles during the conversion process.

Benefits of technology

It realizes robust post-processing of automated modeling results, supports users to improve productivity during the design process, generates sketched geometry that is easy to edit, and can effectively build 3D models for manufacturing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119989608A_ABST
    Figure CN119989608A_ABST
Patent Text Reader

Abstract

Methods, systems, and apparatus, including medium-encoded computer program products, for converting a 2D curve representation into a set of simple sketched profiles. A 2D curve and a predefined geometry are obtained and converted into a primitive sketch geometry by approximating a free region as segmented from the 2D curve to a set of 2D primitives in order to minimize the number of 2D primitives used in the primitive sketch geometry. The conversion of the 2D curve includes: processing candidate segments determined based on segmenting the free region from identified points on the 2D curve that meet a threshold for curvilinear contact with a geometry of the predefined geometries to determine a set of segments for the free region; and fitting the set of segments to the set of 2D primitives. The primitive sketch geometry is provided for rendering, editing and / or simulation in a computer-aided design program.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to U.S. Provisional Application No. 63 / 598,299, filed on November 13, 2023. The disclosure of the prior application is considered part of and incorporated by reference into the disclosure of the present application. Background Art

[0003] This description relates to computer-aided design of physical structures that can be manufactured using additive manufacturing, subtractive manufacturing, and / or other manufacturing systems and techniques, or other structures that can be provided as digital assets (such as for animation).

[0004] Computer-aided design (CAD) software has been developed and used to generate three-dimensional (3D) representations of objects, and computer-aided manufacturing (CAM) software has been developed and used to evaluate, plan, and control the manufacture of the physical structures of those objects (e.g., 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 is a set of connected surface elements that specify the boundaries between solid and non-solid portions of the modeled 3D object. In a B-Rep model (often referred to as a B-Rep), the geometry is stored in the computer using a smooth and precise mathematical surface, in contrast to the discrete and approximate surface of a mesh model, which can be difficult to use in a CAD program.

[0005] In addition, CAD software has been designed to perform automatic generation of 3D geometry of one or more parts in design (referred to as "topology optimization", "generative design" or "generative modeling", etc.). This automatic generation of 3D geometry typically works within a "design domain" specified by the user or the CAD software, and typically generates geometry by optimizing design goals and complying with design constraints (which may be defined by the user, the CAD software, or a third party). Design goals may include, but are not limited to, minimizing material waste, minimizing the weight of the part, and minimizing compliance, stress, maximum mass, maximum deflection under load, or other inherent properties of the part, and are used to drive the shape synthesis process to obtain a better design. Although not required, design goals are typically rooted in simulations of the design (linear statics, fluid dynamics, electromagnetics, etc.). Design constraints may include various physical properties or behaviors that must be met in any generated design (requirements for individual parts or for the entire assembly are also acceptable); examples include maximum mass, maximum deflection under load, maximum stress, etc.

[0006] Geometric constraints may also be provided, for example to ensure that the generated shape has no tiny features or is easier to implement using a particular manufacturing process. In addition, the geometric input to such a 3D geometry generation tool may include one or more user- or CAD system-provided "reservation bodies" (indicating volumetric regions of the design space that should be filled with material in the final design) or "reservation faces" (indicating interfaces between the design space and adjacent components that the generated 3D geometry should contact) that should always be present in the design. Other areas where geometry should or should not be generated (e.g., "obstacle bodies" to indicate where geometry should not be created) may also be provided in a similar manner. In some cases, the shape synthesis process is performed using a different geometry representation than that used by the CAD system. For example, a CAD system may use a boundary representation ("B-Rep"), while a geometry generation engine may use a level set function embedded in a voxel or tetrahedral mesh. Summary of the invention

[0007] This specification describes the technology relevant to the computer-aided design of two-dimensional (2D) geometric shapes, including the representation of converting 2D curves to provide a simple sketch outline set, which maintains the overall shape of the input curve to build the 3D model of the object. The representation of the 2D curve includes connecting a set of points to describe the 2D curve. In some cases, different techniques can be used to synthesize the region of 2D shapes or 3D geometric shapes, and the geometric shapes are represented by applying level sets or dense broken line approximation techniques. Based on this type of technology, 2D shapes can be provided in the form of editable sketched geometric shapes that are not suitable for forming a user that can be used in a CAD system. In some cases, the representation of a 2D curve can be based on the hand-drawn input that defines the 2D shape, and the hand-drawn input can be provided by the user and used as the input for sketching automation to convert into a sketched geometric shape.

[0008] In some cases, points describing a 2D curve may be obtained and used to convert to a parametric primitive set that approximates the shape. In some cases, points may be sampled on the zero contour of a level set representation of the 2D contour of the plate (generated based on an automated modeling plate solver). In some cases, points may be derived from another type of geometric representation generated by a modeling plate solver, not limited to a level set representation. In some cases, points defining a 2D curve may be derived from a hand-drawn curve defined as connecting the bodies of the reserved area. The conversion of 2D curves to primitive sketched geometry may be used in a variety of scenarios, including generative design and automated modeling, as well as sketch workspace automation. In some implementations, topology optimization may be performed, and a 2D contour representing the geometry may be created for a region or the entirety of the design by sketching and extrusion (e.g., as direct output or by post-processing after topology optimization). In such cases, based on the conversion techniques described in the present disclosure, a relatively small number of primitives (e.g., simple primitives such as lines and arcs) can be used to convert a geometry representation (such as a level set representation) to a sketched geometry while maintaining the shape and connectivity of the curves as implied by the optimized design.

[0009] In some implementations, a 2D shape representation (e.g., a 2D level set representation, contour lines or dense polyline geometry from a 2D level set, and other representation types) is converted into primitive sketched geometry to construct a boundary representation of a 3D model of the object. Construction of the 3D model may include extruding the sketched 2D geometry into a third dimension to form the 3D geometry of the object for use in manufacturing the physical structure of the object using a computer-controlled manufacturing system.

[0010] In the context of automated modeling, it is desirable to minimize the complexity of the resulting sketch, even if this reduces the accuracy of the output that matches the initial shape. The initial shape may be an optimized design, such as based on different topology optimization methods. In general, there are two main types of topology optimization: density-based methods and boundary-based methods. The density-based method discretizes the volume of the part and assigns density to each discrete unit, such as in the penalized solid isotropic material (SIMP) method. The density is then driven toward solid and hollow while minimizing the constrained target. In contrast, the boundary-based method tracks the shape of the external interface of the solid part and moves the boundary so that the constraints are met and the target is minimized, such as in the level set method. In some implementations, it is possible to perform a conversion of the level set shape or track the intermediate density field in the SIMP to generate an accurate sketched geometry using a relatively small number of primitives according to the implementation of the present disclosure. In addition, in the context of sketch automation, a hand-drawn curve can be used instead of a level set representation or another geometric representation to provide a simple sketch that is easy to edit and can be used to construct a 3D boundary representation. In some cases, the methods of the present disclosure may be tailored for situations where a set of input reserved area outlines (i.e., slices or projections of 3D reserved area geometry in automated modeling) and an optional set of obstacles are part of a problem setup that defines the input to be used to generate a simple primitive sketch. In some cases, the problem setup may be inferred from the geometric context of a received representation of a 2D curve that is provided for conversion to a simple primitive sketch. In some cases, the input representing the 2D curve may be provided as a sketch geometry that may be obtained, for example, by a sketching application that receives user interaction to define the sketch. In some cases, it may be inferred from the geometry of the input sketch that the portion of the sketch that is not in contact with the input marking line corresponds to the portion that defines the obstacle. By processing the geometry of the input sketch, a problem setup may be defined that includes reserved areas and / or obstacles, where these reserved areas and / or obstacles may be inferred from the geometric context.

[0011] The described method can be applied not only in generative design and automated modeling contexts, as the method can help automate sketch generation. Independently of the optimization framework (or possibly in conjunction with the optimization framework), the user can connect some existing sketch elements (e.g., a holdout provided as input for 3D geometry generation, or if the initial 2D curve is provided as a hand-drawn sketch, the holdout can be automatically detected by analyzing pre-existing sketch elements near the start or end of the hand-drawn input) with a hand-drawn curve (or an input roughly defined by a computer or tool). A rough approximation of the shape, such as provided by the hand-drawn curve, can be used in a similar manner to level set contours to create primitive sketch geometry that roughly follows the user's curve while using a relatively small number of sketch entities.

[0012] Particular embodiments of the subject matter described in this specification can be implemented to achieve one or more of the following advantages.

[0013] The described method can be applied to provide robust and stable post-processing of automated modeling results. Automated modeling can support user productivity in the design process and in creating engineering-style shapes rather than organic forms. Converting shape representations into easily editable sketched geometry can improve the design process and support users. The present method can support approximating shapes with a small number of 2D primitives while respecting exact contacts with a set of reserved regions and avoiding a set of obstacle bodies.

[0014] In some cases, the level set geometry representation may not be a native form of representation used by the CAD system employed, and therefore editing, simulating, and manufacturing shapes based on such representations may be difficult. By utilizing the techniques of the present disclosure, the representation may be converted into a sketch entity that can be easily used and modified without switching to other software applications, or requiring excessive time delays or heavy computational processing to perform the modification. Converting 2D curves and predefined geometric shapes into primitive sketch geometry may provide a useful starting point for further editing by the user, because the generated sketch will use a small number of sketch entities. Generating a low number of sketch entities ensures timely response to further editing, while still allowing the sketch to be as close as possible to a sketch that a human can design. In addition, by generating a sketch with a lower number of sketch entities (e.g., determined by reference to a threshold number of sketch entities, where the threshold can be determined dynamically or statically), a sketch solver as a program code for processing the sketch is provided with improved stability during editing, so that the program has a reduced probability of failure and / or unresponsiveness based on a request to perform editing on the generated sketch. When a sketch is edited, the edits may be handled so as to maintain the edited sketch stable and complete.

[0015] The present curve approximation method supports the generation of simple sketches where boundary curves exist and can be touched or not touched (e.g., in some cases, some boundary curves may have to be fully touched, while in other cases, automatic selection can be performed to select boundary curves that should not be touched), while maintaining relatively low complexity by using fewer and less complex primitives (e.g., lines, arcs, circles). The described method can provide a stable low-entity count sketch that can be generated even when there are constraints on the automated modeling project.

[0016] 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

[0017] Figure 1 An example of a system that can be used to facilitate computer-aided design of a structure converted into a set of simple sketched outlines is shown.

[0018] Figure 2A is an example of a conversion process where input 2D curves and predefined geometric shapes are converted into multiple 2D primitives based on segmentation and fitting techniques.

[0019] Figure 2B Represents different types of intersection points.

[0020] Figure 3 is an example of a process for converting 2D curves and predefined geometric shapes into primitive sketched geometric shapes with a minimum number of 2D primitives according to an implementation of the present disclosure.

[0021] Figure 4A and Figure 4B An example of a process for segmenting representations of 2D curves and predefined geometric shapes as input for conversion to sketched geometric shapes is shown in accordance with implementations of the present disclosure.

[0022] Figure 5 is an example of a contour line with labeled start and end indexes.

[0023] Figure 6 Two examples of setting up the drawing of event vectors and modification of segments to ensure connectivity of candidate segments to objects are shown.

[0024] Figure 7 shows that when the endpoint is connected to Figure 4B The 465 mentioned objects are connected before and after the identified segmentation.

[0025] Figure 8 is an example of an unnecessary segmentation of a contour line that forms a path that is almost equivalent to two boundary curves.

[0026] Fig. 9 is a flow chart of an example of a method for fitting a set of segments based on a segment specification according to an implementation of the present invention.

[0027] Fig.10 An example of piecewise fitting using primitives including lines, arcs, a combination of lines and arcs, and splines according to the present disclosure is shown.

[0028] Fig.11A and Fig. 11B is a flow chart presenting an example of a trimming process according to an implementation of the present disclosure.

[0029] Fig. 12AAn example of a simplified curve according to a process of simplifying a polyline curve into a set of simple primitives is shown.

[0030] Fig. 12B An example of polyline simplification is shown.

[0031] Fig. 12C An example of a polyline is shown.

[0032] Fig.13 is a schematic diagram of a data processing system including a data processing device which can be programmed as a client or as a server. DETAILED DESCRIPTION

[0033] In general, the present description relates to methods for approximating shapes using a small number of 2D primitives while respecting exact contact with a set of preserved regions and / or avoiding a set of obstacle entities.

[0034] A method for converting 2D curves and predefined geometries is described, the method providing primitive sketch geometry including simple low-count primitives generated by segmentation based on proximity to a reserved area. The generated primitive sketch geometry can be used for rendering at a display device. The generated sketch geometry can be provided for editing and simulation performed, for example, at a CAD program based on user input, and can be used to build a 3D model of a physical object that can be manufactured using a computer-controlled manufacturing system.

[0035] Figure 1 An example of a system 100 that can be used to facilitate computer-aided design of a structure converted into a simple sketch outline set 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, and the one or more hardware processors 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 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 implementing two-dimensional (2D) and / or three-dimensional (3D) modeling functions, the 2D and / or 3D modeling functions can be implemented (e.g., using at least one level set method) as part of one or more generative design processes for topology optimization, implemented in other applications of topology optimization (e.g., automated modeling), and / or implemented for automated sketch generation processes.

[0036] As used herein, CAD refers to any suitable program for designing a physical structure that meets design requirements, regardless of whether the program is capable of docking with and / or controlling manufacturing equipment. Thus, the CAD program 116 may include a computer-aided engineering (CAE) program, a computer-aided manufacturing (CAM) program, and the like. The program 116 may be run locally on the computer 110, remotely on a computer of one or more remote computer systems 150 (e.g., one or more server systems of one or more third-party providers accessible to the computer 110 via the network 140), or both locally and remotely. Thus, the CAD program 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 the computer 110 may offload processing operations (e.g., shape 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.

[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. Note that although 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 (e.g., a touch screen may be the input / output device 118, 120). In addition, the computer 110 may include or be part of a virtual reality (VR) and / or augmented reality (AR) system. For example, the input device 118 / output device 120 may include a VR / AR input controller, a glove or other manual manipulation tool 118a, and / or a VR / AR head-mounted device 120a. In some instances, the input / output device may include a sensor-based hand tracking device that tracks movement and recreates interactions as if performed using a physical input device. In some implementations, 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, the user 160 interacts with the CAD program 116 to create and / or modify representations of 2D curves. In some implementations, the 2D curves may be provided based on user input, such as manual drawing from the user 160. In some implementations, the 2D curves may be output geometry of a shape synthesis process. In some cases, the 2D curves may be provided as output representations from topology optimization, the output representations including 2D outlines representing the geometry created for the designed region. The 2D curves may be represented as level set shape representations, which may be converted to sketched geometry based on conversion logic implemented according to the present implementations and used at the CAD program 116 for further review, editing, and / or simulation to generate a 3D model 130 for manufacturing a physical structure.

[0039] In some cases, based on user input and some existing sketch elements as predefined geometries (e.g., keep-outs and / or obstacles), primitive sketched geometry that follows a curve can be created while using a relatively small number of sketched entities. The input that can be used for sketch generation can be obtained through different techniques to synthesize 2D shapes or regions of optimized 3D geometry, or can be hand-drawn curves as a rough approximation of a 2D shape, which can be used as a representation (in a manner similar to a level set representation) to initiate the conversion to primitive sketched geometry generation according to implementations of the present disclosure.

[0040] The input predefined geometry that can be provided to the conversion process can include retained regions that can be unconnected modeled solids or surfaces (e.g., user-identified faces of modeled solids). The sketch generation process is used to produce a simple sketch geometry, where the converted sketch geometry connects all input retained regions and avoids obstacles, such as Figure 1 as shown in the example.

[0041] The CAD program 116 may implement at least one generative design process that enables the CAD program 116 to automatically generate one or more portions (or the entire 3D model) of a 3D model based on design goals and constraints (i.e., design criteria), wherein the geometric design may be iteratively optimized based on simulation feedback (e.g., based on numerical physical property simulations). In some cases, multiple 3D models may be jointly created by one or more generative design processes, and may be assembled to form a new 3D model. Note that, as used herein, "optimization" (or "optimal," etc.) does not mean that the best design among all possible designs is achieved in all cases, but rather that the best (or near-optimal) design is selected from a limited set of possible designs that can be generated within the allocated time given the available processing resources. In any case, note that the shape generation process may be performed using a different geometric shape representation than that employed by the CAD program 116 for 3D modeling. For example, the CAD program 116 may use a B-Rep model for the input geometry, while the geometry generation engine (e.g., in the CAD program 116) may employ a level set function embedded in a mesh.

[0042] In some cases, the user 160 can obtain the sketch geometry 123, and optionally can modify the sketch geometry to generate the final result. In some cases, the sketch geometry property 123 can be generated based on the 2D sketch that can be provided as input. The 2D sketch can have a representation such as a level set shape representation. The user 160 can use the 2D sketch as input, such as input to a modeling tool for further modeling or automated processing, wherein the sketch geometry 123 can be created by, for example, an automated modeling tool that uses the 2D sketch and executes commands to create a 3D model that can be used to manufacture a physical structure. The computer model can be generated as a 3D model document 130 and / or another representation for generating the model (e.g., a tool path specification for a manufacturing process). This can be performed at the request of the user 160 or in view of the user's request for another action (such as sending the computer model to a manufacturing machine, for example, an additive manufacturing (AM) machine and / or a subtractive manufacturing (SM) machine 170, or other manufacturing machinery that can be directly connected to the computer 110 or connected via a network 140 as shown in the figure). This may involve post-processing 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 based on which manufacturing is performed. It is noted that an electronic document (referred to simply as a document for brevity) may be a file, but does not necessarily correspond to a file. A document may be stored in a portion of a file that holds 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 an algorithmically designed model.

[0043] The CAD program 116 can provide a document 135 (with a tool path specification in an appropriate format) to an AM and / or SM machine 170 to generate a physical structure corresponding to at least a portion of the model designed by the algorithm. The AM machine 170 can employ one or more additive manufacturing technologies, 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 directly constructs the physical structure. In some cases, the AM machine 170 constructs a mold for casting or forging the physical structure. The SM machine 170 can be a computer numerically controlled (CNC) milling machine used in the manufacturing process, such as a multi-axis, multi-tool milling machine. For example, the CAD program 116 can generate CNC instructions for a machine tool system 170, which includes multiple tools that can 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 create different cutting surfaces). Thus, in some implementations, the CAD program 116 can provide the corresponding document 135 (with tool path specifications in an appropriate format, such as a CNC numerical control (NC) program) to the SM machine 170 for manufacturing the physical structure using various cutting tools, etc. For example, in the context of plate-based automated modeling, manufacturing the physical structure based on the shape and tool path specifications in the corresponding document can include a 2D cutting process relying on laser cutting, plasma cutting, water jet cutting, curved panel splitting, etc.

[0044] Furthermore, in some implementations, no physical manufacturing is involved. The systems and techniques described herein are applicable to any suitable 2D or 3D modeling software. Thus, in some implementations, the CAD program 116 may be an animation program that renders the 3D model in an appropriate format for visual display.

[0045] Figure 2A is an example of a conversion process where input 2D curves and predefined geometric shapes are converted into multiple 2D primitives based on segmentation and fitting techniques.

[0046] In some implementations, the conversion process may be implemented to include sub-processes such as:

[0047] Segments - A representation of a curve, such as a level set contour (or other input curve), can be divided into fixed regions that should follow precise boundary geometry (e.g., keep-out regions and / or intersection geometry), and free regions to which new sketch primitives should be fitted. Segments can be provided as an output segment specification, identifying the free regions to be approximated during the fitting sub-process.

[0048] Optional trimming - the trimming operation can take the input segmentation specification as provided by the segmentation of the final sketch geometry and the output fixed regions. In some cases, the exact geometry of the boundary geometry (keep regions and intersection regions) can be trimmed so that when combined with the free regions, the resulting sketch geometry forms a simple shape (e.g., every join between primitives is a 2-joint); and

[0049] Fitting - where the geometries of the free areas as provided by the segmentation are each approximated with simple sketch primitives (e.g., one of a line, arc, circle, ellipse, etc.), while minimizing the number of primitives used. This way, the overall complexity of the sketch is minimized, which can be one of the goals of the conversion process.

[0050] In some implementations, an input is provided for conversion and is processed through segmentation and fitting steps, wherein trimming may be optionally performed. In the current example process, the input is a level set representation 210 of a shape, however, other representations may be processed in a substantially similar manner and the level set representation is used for purposes of example. The level set representation 210 may be applied to a 2D profile generated by a topology optimization process. A set of reserve region curves, reserve regions 225 and 215, and obstacles 220 are predefined. Reserve region curves are included in the final sketched geometry while avoiding obstacles.

[0051] At 230, segmentation of the level set contour is performed, where the level set contour is divided into fixed regions and free regions. The fixed regions correspond to portions of the reserved regions 225 and 215 (shown in thicker lines), while the free regions are curves to be fitted with simple geometric shapes (such as lines, arcs, and circles). As shown at 240, the free curves are fitted to simple geometric shapes and merged with the reserved region curves into a final sketched contour that approximates the input 2D level set representation 210. The fitting is used to approximate the free regions of the reserved regions with a relatively low number of 2D primitives (at least one of lines, arcs, circles, and cubic b-splines) while avoiding obstacles 220.

[0052] In some implementations, the conversion algorithm as discussed above can be implemented in the context of plates, whose positions (mid-planes) and thicknesses are provided by upstream processes. In some implementations, one or more upstream processes provide a set of plates, as described in U.S. Application No. 18 / 507,958, entitled "Computer-Assisted Automated Shape Synthesis of Plate-Like Structures," filed on November 13, 2023 under attorney docket number 15786-0378001, which is hereby incorporated by reference in its entirety, wherein each 2D outline of a plate is used as input to generate primitive sketch geometry therefrom. Thus, there can also be two or more plates used to co-create a design, and intersections with other plates can be considered during conversion by creating "intersection regions," which can be treated in a manner substantially similar to reserved area geometry, with some limitations, similar to how reserved areas are treated with some limitations, as described in more detail below. In some cases, when the boundary geometry includes the reserved area geometry and the intersection geometry, during the conversion, the intersection geometry is approximated by explicit approximation with lines or boxes (see Figure 2B In some cases, the keep-out region geometry may be approximated (e.g., if the keep-out region geometry is not already provided as exact sketch geometry), where the approximation may be made by fitting to primitives such as lines, arcs, or circles, as well as other examples of simple primitives.

[0053] In some cases where the generated design is made by cutting and joining panels of material, a variety of methods can be used to handle the joints between the panels. Typically, one panel is extended above the intersection area, while the other panel is cut and stopped at its top surface and joined by welding or some other means. In other cases, interlocking geometries are created where the intersection area between the two panels is alternately occupied by one panel and then the other panel. In some cases, appropriate profiles can be created for the detected intersection areas.

[0054] In some implementations, the input data for the conversion may be preprocessed before the conversion is performed in some cases. For example, depending on the input provided, a preprocessing step may be performed to prepare data for boundary geometry (including reserved area geometry, obstacles, and any current plate outlines or intersections).

[0055] In some implementations, input 2D curves and predefined geometries (e.g., 3D geometries) may be provided as input along with a pre-specified plate (e.g., specified by a selection algorithm). For a selected plate, a projection may be performed on a reserved region geometry that intersects the plate at its midplane. Selection of the plate may be performed using a method similar to the plate selection algorithm as described in U.S. Application No. 18 / 507,958, filed on November 13, 2023, under attorney docket number 15786-0378001, entitled “Computer-Assisted Automated Shape Synthesis of Plate-Like Structures,” which is hereby incorporated by reference in its entirety. The projection at the mid-plane of the plate may be performed using a method similar to the 2.5-axis milling filter used as described in U.S. Application No. 16 / 679,065, filed on August 11, 2019, entitled "Converting Geometry to Boundary Representations and 2.5-Axis Subtractive Manufacturing with Facilitated Editing for Computer-Aided Design," and published as U.S. Publication No. US-2020-0151286-A1 on May 14, 2020, which is hereby incorporated by reference. The 2.5-axis milling filter or another technique may be used to generate a preserved region level set representation of the plate, which may be a 2D level set along the mid-plane of the plate.

[0056] In some implementations, for each reserved region, the intersection of the reserved region's grid with the midplane of the plate can be calculated, and a tight boundary fit can be defined (e.g., relative to a simplified representation involving a broken line curve as described below). Fig. 12A , 12B and 12C) to approximate the intersection with a 2D simple primitive including at least one of a line and an arc. In some implementations, two representations of the retained area can be used, where the first representation can be a level set representation and the second representation can be a sketch primitive description of the retained area. In some implementations, the two representations can be obtained in different ways. In some cases, a first representation can be selected to be extracted first, and the first representation can be converted to the second representation. In some examples, a level set representation can be extracted first, and the level set representation can be converted to a sketch representation (e.g., by fitting the level set representation to the sketch primitive). In some examples, the two representations can be extracted separately and in parallel.

[0057] In some cases, the type of representation of the retained region to be obtained can be defined (e.g., explicitly stating the requested type as input). For example, if a sketched representation is of the type obtained as input, then when a 3D level set representation of the retained region is obtained, a 2D retained region level set representation can be computed and fit to the sketched geometry. As another example, if the level set representation is of the obtained type, then the retained region can be obtained as a sketched geometry (e.g., from a hand-drawn sketch generated based on user input, or when an exact planar slice of the retained region is computed along a sketch plane), and the level set representation can be computed from the input sketched geometry.

[0058] In some implementations, an explicit definition of a particular input representation type may be defined that may be used to compute a level set representation or a sketched geometry as a second representation. In some cases, the provided representation of a retained region geometry (e.g., a region or surface) for modeling may be preprocessed by offsetting to a generated body that may be further classified, as described below.

[0059] In some implementations, segments of the geometry of the retaining region may be categorized according to the area from which the geometry is derived by extruding the retaining region. In some implementations, the retaining region geometry may be provided as a 2D retaining region surface. In some cases, the retaining region surface may be extruded outward to produce a retaining region body (e.g., the extrusion may be performed to provide a body more suitable for use with a topology optimization code).

[0060] Slice curves can be classified as base surface slices, offset surface slices, or stitched surface slices. "Base surface" slices include curves in the slice of the retained area that correspond to the original input surface selected by the user. "Offset surface" slices include curves associated with the extruded (offset) face of the retained area body. "Stitched surface" slices include curves associated with the wall connecting ("stitching") the base surface and the offset surface.

[0061] In some implementations, in a manner substantially similar to processing input regarding the geometry of the reserved region boundary, for the currently processed plate received, the intersecting obstacles may be projected onto the plate's midplane to create a 2D level set of obstacles affecting the plate. In some implementations, the current profile of the plate may be preprocessed as previously discussed. To optimize the representation, a level set representation may be provided based on various algorithms as explained in the present disclosure, wherein the level set may be cleaned to remove tiny fragments (e.g., identified based on size criteria) or geometric fragments. The current plate intersects with a sub-plate, which adds geometry to the plate's profile but does not create an explicit intersection curve, as discussed further below, wherein a "sub-plate" is another plate that ends on the surface of the currently processed plate. In some implementations, the shapes of the intersection points of all sub-plates with this plate may be approximated by sampling the sub-plate's level set near the intersection region. In some cases, the approximate intersection point geometry can be combined with the input level set representation so that the contour level set is larger than any of the intersecting sub-plates to ensure that it terminates on the face of the input plate. A contour level set for the plate is generated based on the combination, and zero contours (contours) can be extracted. In some cases, the level set can be renormalized before extracting the zero contours without changing the extracted contours. The contour data is organized into rings, and the contours are densely sampled (e.g., at a predefined sampling rate) to generate a list of points so that the line strip drawn between each pair of consecutive points describes the zero contour.

[0062] In some implementations, the representation can include an intersection region that can occur when another plate intersects a mid-plane of a plate within the design domain. Figure 2BRepresents different types of intersections. Intersections can be of different types and can be handled according to their types - sub-plate intersections, boundary plate intersections, and own L-joints. In the 3D model 250, sub-plate (plate A) intersections are presented, as well as other classified intersections such as plates B and plates C. The current plate is a flat plate on the bottom of the 3D model 250 and intersects with plate A as a sub-plate. Plate B of the 3D model 250 is a boundary plate, and plate C of the 3D model 250 is a boundary plate, where the intersection of the current plate and plate C is an example of an "own L-joint" in the current plate. Sub-plate intersections are intersections that "terminate" to the current plate in a "T"-shaped construction. Approximate representations of these intersection areas are included in the plate outline, and no explicit intersection geometry is created. The boundary plate intersection serves as a boundary on the domain of the current plate outline. The boundary generates a line along the contact point between the top surface of the boundary plate and the midplane of the current plate, and the line extends throughout the domain. These boundaries can be enforced in the level set process by, for example, a prismatic filter as described in U.S. Publication No. US-2020-0151286-A1. The own L-joints act as both subplates and boundary plates. Approximate intersection footprints are added to the plate outlines, and a box around the approximate intersection footprints is also added to the intersection geometry.

[0063] Figure 2B An example of plate tectonics is shown in 3D model 250, where the current plate (bottom plate) intersects a plate in one of the above tectonics. Like the box defined for A at 260, the sub-plate intersection A adds geometry to the outline of the plate and does not create any explicit intersection curves. Plate B forms the boundary of the current plate. Plate B does not change the outline of the current plate, as shown in Figure 2. Figure 2B As shown in 270, since plate B generates lines along the contact points throughout the domain. The lines associated with B at 270 act as a form of reservation in the context of performing the segmentation and trimming subprocess as part of the transformation. Figure 2B As shown in 260 and 270 , plate C has its own L-shaped junction relationship with the current plate, which causes plate C to add an approximate footprint box to the outline of the current plate and add a box to the intersection geometry, as shown in 270 .

[0064] Figure 3 is an example of a process 300 for converting 2D curves and predefined geometric shapes into primitive sketched geometric shapes with a minimum number of 2D primitives according to an implementation of the present disclosure. When applied in the context of automated modeling, generative design, topology optimization, and sketch automation, the process 300 can be implemented in the context of approximating shapes with 2D sketch primitives.

[0065] At 310, a 2D curve and a predefined geometric shape are obtained for conversion. Obtaining includes obtaining a representation including a set of connected points describing the 2D curve. For example, the representation may be as follows: Figure 2A As shown in 210 of . The connected point set describes the input intent of defining the shape, and the input intent can be provided by different means and in different formats. In some implementations, the points are derived from a geometric shape representation generated in an automated modeling implementation. In some implementations, the geometric shape representation can be a level set representation, and the connected point set is sampled on the zero contour of the level set representation of the 2D contour of the plate (generated based on the automated modeling plate solver) to perform a shape synthesis process of the 3D geometry of the part according to the boundary conditions. In some implementations, the points are derived from a hand-drawn representation of a curve.

[0066] The 2D curve and the predefined geometry are converted to primitive sketch geometry at 320. Free regions are segmented from the 2D curve and approximated to a set of 2D primitives to minimize the number of 2D primitives used in the primitive sketch geometry.

[0067] In some implementations, the 2D curve is segmented into free regions and fixed regions, such as Figure 2A The fixed area is defined based on a predefined geometry including a boundary geometry. The boundary geometry includes the input reserved area geometry and optional obstacles.

[0068] The conversion of the 2D curve includes processing a plurality of candidate segments determined based on segmenting the free region to determine a set of segments to be fitted to the 2D primitives at 325. The free region is segmented into a plurality of candidate segments (determined based on identified points on the 2D curve that meet a threshold of curve contact with a geometric shape in the predefined geometric shapes). The candidate segments are evaluated at 330 to determine a set of segments. At 335, the set of segments of the free region are fitted to the set of 2D primitives. In some cases, the fitting of the set of segments includes selecting a 2D primitive of a certain primitive type to approximate a series of segments of a representation of the 2D curve by minimizing an error measure associated with the selected 2D primitive.

[0069] In some implementations, the conversion of the 2D curve and the predefined geometric shape includes assembling a segment set from the free region that fits to the 2D primitive set and at least a portion of the predefined geometric shape (or all of the predefined geometric shape) to obtain the primitive sketch geometry. Thus, the 2D primitive is determined to maintain contact with the predefined geometric shape.

[0070] At 340, the primitive sketch geometry is provided for rendering, editing, and / or simulation in a computer-aided design program. The provided sketch geometry may be modified or used "as is" to construct a 3D model for manufacturing. User input for modifications to the sketch geometry may be received based on rendering the sketch. In some cases, modifications may be performed on the sketch with an improved user experience, faster speed, and less computing resources to process requests for modifications and generate finalized output.

[0071] At 345, based on user input, the provided sketched geometry (in an initial state or a modified state) can be provided to construct a 3D model of the object for use in manufacturing a physical structure of the object using one or more computer-controlled manufacturing systems. In some implementations, the sketched geometry can be used directly for manufacturing, for example, by using the sketched geometry to generate a tool path specification as instructions for a machine to manufacture a shape from a piece of material. In some implementations, the sketched primitive geometry is a 2D geometry that is extruded into a 3D model of the object to manufacture the physical structure. The 3D model of the object can be used to generate a tool path specification, and the tool path specification is used to manufacture the physical structure based on different manufacturing processes (e.g., additive manufacturing or subtractive manufacturing), which are performed by a manufacturing machine (e.g., Figure 1 The process may be performed by an additive manufacturing (AM) machine and / or a subtractive manufacturing (SM) machine 170).

[0072] The resulting sketched geometry can be presented to the user as Figure 1 The user 160 may also display the design in a user interface (e.g., Figure 1 For example, a 3D model may be constructed based on user input and presented to user 160 in UI 122. In some implementations, the 3D model may be constructed (e.g., in a CAD program such as Figure 1 The CAD program 116) receives user input to modify the sketch geometry within a user interface. The sketch geometry can be easily modified (to include simple primitives and less complex structures), and the final resulting geometry can be stored. The resulting 2D geometry can be used by the CAD program to extrude the sketch into a 3D model object and render this model on the user interface for review. In some cases, the extrusion settings can be modified to provide specific characteristics, such as a specific thickness in the third dimension. Modifications to the extrusion settings can be user defined or automatically obtained from an external service or application (e.g., in connection with evaluating a model for manufacturing). The 3D model object generated from the sketch can be used for further editing and / or simulation based on user instructions.

[0073] Once the design is approved, the constructed 3D model may be sent or saved to a permanent storage device for use in fabricating a physical structure corresponding to the object using a computer-controlled manufacturing system.

[0074] In some implementations, constructing 345 a computer model of an object for manufacture involves: using the 3D model, for example, by a CAD program 116, to generate 350 a tool path specification for a computer-controlled manufacturing system, and using the tool path specification to manufacture 355 at least a portion of the physical structure corresponding to the object using the computer-controlled manufacturing system.

[0075] Figure 4A and Figure 4B An example of a process 400 for segmenting a representation of a 2D curve and a predefined geometry into input for conversion to a sketched geometry according to an implementation of the present disclosure is shown. The segmentation process can be performed based on different representations of the 2D curve as described in the present application. In some implementations, the shape can be defined in various ways as described in the present disclosure, for example, as a result of a generative design process, as a hand-drawn curve, etc. In some cases, a representation including a connected set of points describing the 2D curve and a boundary geometry including an input reserved area geometry can be obtained. Optionally, intersection points can be received as input for performing segmentation. For example, the input for segmentation can be a level set representation created by topology optimization by a prismatic filter, which represents a single sketch for extrusion in a welded plate design. In another example, the input can be a hand-drawn curve, or a geometric representation obtained by sketch automation or automated modeling.

[0076] To illustrate, Figure 4A and Figure 4B The segmentation process described is related to the processing of level set representations, but if the representation is another geometric shape representation and is not restricted to level sets, substantially similar operations are associated with segmentation. Based on the performed segmentation, a segmentation specification list can be provided, which includes information about the designed free areas that can be approximated during the fitting step, such as Figure 2A As discussed previously, trimming can be an additional process that is optionally performed prior to fitting and provides a list of segment specifications.

[0077] In some implementations, segmentation can be performed on a representation of a 2D curve as a set of connected points, where the representation is segmented into fixed regions and free regions. Fixed regions are defined for boundary geometry such as reserved areas, obstacles, and / or intersections. Free regions segmented from a 2D curve can be evaluated to determine a set of segments to fit to a set of 2D primitives, such as with respect to Figure 3 discussed.

[0078] In some implementations, segmentation can be performed by analyzing contour lines extracted from the level set of the current plate's profile (e.g., as described with respect to Figure 2B During segmentation, some segments of contours are identified as fixed geometry that can be replaced with a portion of precise boundary geometry (e.g., preserved regions and intersection curves), while other regions are identified as free geometry that will be approximated to 2D primitives during the fitting process. In some cases, a free region is used to create a segmentation specification and can be added to a list.

[0079] The implementation of the present application related to segmentation enables the creation of explicit, parametric and high-quality geometry to model the reserved area, rather than relying on poorly fitting guesses to approximate the reserved area. Based on performing such segmentation, the fitting process can be significantly simplified because the segmentation can provide "neighbor" information about adjacent boundary curves (such as tangents).

[0080] Figure 4A and Figure 4B 4 shows an operational flow, wherein an input for segmentation is provided at 410. As previously discussed, segmentation can be performed based on the obtained 2D shape and the predefined geometry. The obtained 2D shape can be obtained as a set of connected points (e.g., based on a hand-drawn curve, such as sampling on contour contours of a level set representation of the 2D contour of the plate (based on an automated modeling plate solver) to perform a shape synthesis process of the 3D geometry of the part according to boundary conditions, such as with respect to Figure 2B 406. The predefined geometries include intersection and reserved area geometries and other 2D and / or 3D geometries that can be obtained to initiate the segmentation shown in 401. The intersection geometry includes box 402 and line 408. The reserved area geometry is presented in a dashed pattern and includes loop 404 and box 405. In this example, the 2D shape at 401 is the zero outline of the level set, which includes a first loop along line 403, an outer boarder of the reserved area box 405, a curve 407, along line 408, and around the outer portion of the box 402 until it connects with the beginning of line 403, and a second loop that matches the curve 406.

[0081] The segmentation process includes obtaining initial input at 410, enhancing 420 (including defining properties of each point on a 2D curve (e.g., a contour line), updating 430 reserved region contact points to adjust the labeling of points to account for reserved regions that are close to but not touching the contour line, identifying and processing segments at 440 (this is done iteratively by traversing each segment until all segments are processed (at 450)), removing unnecessary segments and adding loops at 460, and collapsing (at 470) small segments to generate a list of segment specifications to be used for approximating 2D primitives. Process 400 is associated with an input curve, which is a 2D curve that can be, for example, a contour line. The following is related to Figure 4A and Figure 4B The description related to process 400 is associated with (and generally associated with) input curves, where for illustration purposes, contour lines are used as a specific example of an input curve, where other options are available, and such example does not limit the present disclosure to the use of contour lines.

[0082] Enhancement

[0083] At 410, each point in the contour is analyzed and marked with information about the proximity of the point to the boundary geometry (such as a reserved area or an intersection point object). When the level set representation and the boundary geometry are processed, an enhancement step is initiated at 420. In some implementations, the points of the level set representation are analyzed by selecting a first area as a fixed area (which is to be replaced with an exact portion of the boundary geometry) and selecting a second area as a free area (which is to be approximated with a 2D primitive). The free area is processed to determine candidate segments based on the segmentation, and the relative proximity between the determined candidate segments and the boundary geometry is evaluated according to the inclusion criteria.

[0084] In some implementations, processing of the free area can include marking each point of the contour based on a proximity of the corresponding point to the bounding geometry. In some implementations, the proximity is determined based on a first threshold contact distance.

[0085] In some implementations, regions on the boundary geometry can be evaluated to identify regions on each geometry as "contactable" or "uncontactable," depending on whether a segment determined from the segmentation process should be allowed to end on a given region of the boundary geometry. In some implementations, an "uncontactable" curve may occur when a reserved area slice includes two loops, one of which is sliced ​​from a base surface. If the base surface forms a loop and there is more than one loop in the reserved area slice, the base surface can be evaluated as "uncontactable." For example, a user-selected reserved area face that is a cylinder perpendicular to the 2D sketching plane can be extruded to produce a toroidal shape, and the shape can be sliced ​​to form two loops - an outer offset surface slice (outer circle) and an inner base surface slice (inner circle). In this example, since the base surface forms a closed loop (inner circle) and more than one loop (outer circle and inner circle of the base surface) is extracted from the reserved area, the base surface can be classified as "uncontactable" and the outer loop can be classified as "contactable" (the outer offset circle is contactable). During the enhancement at 420, each 2D curve point is labeled based on its proximity to a "touchable" boundary curve (excluding untouchable curves). In some cases, the distance between a point on a 2D curve and the nearest touchable point and the nearest untouchable point can be calculated and tracked. This calculation and tracking can be performed for each point on the input curve. In some cases, the distance to the nearest touchable point (and only this distance, not the distance to the nearest untouchable point) is evaluated and used to set a "touched" flag for the point, while the minimum distance to the boundary curve (touchable or untouchable) is used to determine whether to mark the point as "far", so that the 2D curve point cannot be classified as "touching" the untouchable boundary curve, but the 2D curve point will also be classified as "far" from the boundary at this point.

[0086] Update reserved area touchpoints

[0087] In some implementations, points on the contour are classified as touching the contactable boundary geometry based on the enhancement at 420. In some cases, the level set may surround the reserved region, but may not be close enough to record the contact point. In some implementations, it can be evaluated whether there are reserved regions that will not contact any point of the contour, and whether to consider the reserved regions as touching by lowering the threshold of these reserved regions until contact with the contour can be made, or allowing the maximum threshold distance under the touch criteria to be reached. At 430, an update to the flag is performed based on consideration of the relaxed touch criteria. The evaluation of the updated flag does not change the actual contact, but rather updates the classification of the point as touching based on the relaxed criteria.

[0088] In some cases, when the distance between the represented point and the boundary geometry is below a threshold contact distance, the point can be evaluated and marked as touching. In some cases, each point of the contour line can be marked to account for the boundary geometry that is close to but not touching the contour line. Based on the distance from the boundary curve, the point can be classified as far, neutral, and touching. When a point is classified as touching, even if the point does not actually touch, but the distance from the boundary geometry line is within the threshold distance, the point can also be considered as touching. In some cases, if the distance from the point on the contour line to the boundary geometry is higher than a second threshold distance, the point can be classified as far, and the second threshold distance can be different from or similar to the first threshold distance used to determine that the point is touching. If the point does not fall within the criteria for touching or falling within the criteria for far, the point can be classified as neutral, for example, the point is located between the first threshold distance and the second threshold distance. In some implementations, if the distance of the point away from the nearest contactable boundary curve is less than a certain decimal of the voxel size (e.g., 0.51), the point can be classified as "touching" the boundary curve. Note that the voxel size may be determined by the overall size of the design domain. In some implementations, a point may be classified as far if it is at least three voxels away from the nearest contactable or non-contactable boundary curve.

[0089] In some implementations, points on a contour curve are iteratively evaluated based on the marking of the points to determine multiple candidate segments of the contour. In some implementations, multiple candidate segments are processed based on the iteration of the points to iteratively extract segments that meet the inclusion criteria from the determined multiple candidate segments. In some implementations, the inclusion criteria specify that a candidate segment is to be selected for inclusion in the segment set when it connects two different boundary geometries or includes a point marked as not in contact with a boundary geometry, marked as having a distance from a boundary geometry that is higher than a threshold contact distance (e.g., classified as far).

[0090] In some implementations, segment specifications are generated based on the segments, the segment specifications including generating a segment specification list for the segment set for which metadata is generated for extraction. In some implementations, the generation of metadata includes initializing an entry into the segment specification list to include the generated metadata for the corresponding segment upon determining that the candidate segment meets the inclusion criteria and is to be included in the segment specification provided as an output from the segmentation process 400.

[0091] Iterative processing of segments

[0092] After completing the enhancement 420 and update 430 procedures, identification of multiple candidate segments may be performed at 440, where segmentation is performed for each successive ring of the contour as follows. Multiple candidate line segments are determined by evaluating points on the contour based on marking the points based on updates to the reserved area contact points.

[0093] In some implementations, the first candidate segment is determined by determining a start point and an end point of the segment. Figure 5 An example of a contour line with labeled start and end indexes is shown in .

[0094] The starting point of the segment is determined as a point marked as touching a boundary geometry, and wherein the next point on the contour line either does not touch the boundary geometry or touches a different boundary geometry. The endpoint for the segment is determined as the points from the set of connected points on the contour line that are successively iterated and touch the boundary geometry. The segment between the starting point and the endpoint can be determined as a first candidate segment. In some implementations, the determination of the candidate segments can be performed iteratively, wherein for the next candidate segment, a subsequent starting point is determined based on iterating the points after the endpoint as determined for the first candidate segment.

[0095] In some implementations, additional checks may be performed on candidate segments to determine whether the segment is to be included in the final list of segments to be fitted to the primitive. Candidate segments may be evaluated to determine whether the segment connects two different boundary curves (i.e., boundary curves from different reservations or intersection entities), or whether the segment includes a far point in its domain. If a candidate segment fails one of these checks, the candidate segment is rejected. Accepted candidates are used to initialize new entries in the segment specification list, which form the output of the segmentation algorithm 400. In some implementations, the segment specification may initially include the points on the contour lines that constitute the candidate, as well as information about the contour line rings from which the points are derived and the identity of the previous / next segment in the ring. Additional information attached to each segment specification entry may be filled in when the entry is initialized or at a later point in time.

[0096] In some implementations, a determination is made as to whether there is at least one isolated ring that satisfies an inclusion ring criterion, wherein the inclusion ring criterion defines a threshold distance from a boundary geometry according to which each isolated ring is considered for inclusion in the plurality of candidate segments. If it is determined that there is an isolated ring that satisfies the inclusion ring criterion, the isolated ring is added to the plurality of candidate segments in response to determining that the isolated ring that satisfies the inclusion ring criterion encloses an area that is greater than a threshold size area to be added as a candidate segment.

[0097] In the case of some contour rings, the starting index cannot be identified because the contour points have never been in contact with the boundary curve, or because the contour points are only in contact with a single boundary curve. In some implementations, when evaluating these rings, it can be considered whether to include these rings or abandon them. For example, logic can be implemented to abandon the contours of approximate boundary curve geometries (such as the inside of a hole created by a cylindrical reservation surface) and noise segments (such as tiny geometries floating in space). In other cases, rings representing holes caused by obstacles can be left. In some cases, when the ring is away from all boundary curves (contactable and incontactable) at all points at least a first threshold number of voxels (e.g., 1.02 voxels), the ring can be defined as an "isolated ring". In addition, it may be necessary for the isolated ring to surround the area of ​​at least a second number of (e.g., 1.5) square voxels. In some implementations, if the contour ring does not have a starting index and passes the isolated ring standard as described, the isolated ring can be added to the segment specification list as an entry.

[0098] Steering Figure 5 An example of a segment with a start and end index is now described. When performing a first evaluation for determining a candidate segment, the points are iteratively evaluated, for example, as shown in 510, which shows a portion of the points of the contour line shown in 520, the portion corresponding to Figure 4B The process described with respect to operation 440 .

[0099] In some implementations, during the extraction of candidate segments, points are iterated, and the first starting point of the candidate segment can be determined as the starting point 511. The starting point 511 in the candidate segment (indicated by a circle in the figure) can be determined as the last contour point that touches the reserved area before advancing to the open space. The endpoint is found by traversing along the contour points until (e.g., based on the marking and updating of the reserved area contact points, such as Figure 4A The isoline points between the start and end (including the end values) are used to initialize the candidate line segments. At 520, the isoline points are iteratively evaluated and multiple segments are extracted, for example, as described with respect to Figure 4B At 520, the segments of the shape are annotated with numbers from 1 to 8, where:

[0100] (1), (5) and (6) show normal (typical) segmentation,

[0101] (2) and (3) show unnecessary segmentation,

[0102] (4) shows a small segment,

[0103] (7) shows unused rings, and

[0104] (8) is an isolated loop. When defining candidate segments, the candidate segments can be evaluated to determine the set of segments to be provided for fitting. In some cases, some segments can be considered unnecessary (see Figure 4B 460), some small segments can be folded (see Figure 4B 470) to a point, and metadata may be added to the segments to generate a set of segments provided as output from process 400. In some implementations, the candidate segments may be iteratively evaluated to perform at least one of the following:

[0105] identifying one or more segments to be removed from the plurality of candidate segments (see 460),

[0106] Identifying additional segments to add to the plurality of candidate segments (e.g., adding isolated rings as discussed above), and / or

[0107] • Identify at least one segment to be collapsed into a single point (see 470).

[0108] Modify segments and remove unnecessary segments

[0109] exist Figure 4B At 460, when segments are identified and provided from the operations at 440 and 450, the segments can be evaluated to determine whether some segments can be removed. In some implementations, after creating candidate segments as an initial set of segments, the candidates can be processed to determine whether there is at least one segment to be modified to ensure connectivity of the segment to the boundary geometry.

[0110] In some implementations, at least one of the candidate segments is modified to ensure connectivity. In some implementations, the modification includes determining, for a given candidate, whether a point marked as touching a boundary geometry is connected to the boundary geometry. When it is determined that a candidate segment including a point marked as touching a boundary geometry is not connected to the boundary geometry, the candidate segment is modified to include a point that is actually in contact with the boundary geometry. In some implementations, during the modification, additional characteristics of the segment can be calculated and added as metadata, where the metadata can be subsequently used in the fitting phase. In some implementations, the segment can be modified to adjust the contact with the boundary geometry in a natural way so that the algorithm is applied to each end of the segment as a series of points to modify the segment.

[0111] Figure 6 Two example setups for drawing event vectors and modifying segments to ensure connectivity of candidate segments to objects are shown. Figure 6At 600, 610 and 620 of FIG. , the points shown as dots are contour points that comprise the candidate line segment. A vector is drawn from the endpoint to one of the points below the list (shown at 600). This vector is the "event vector" and describes the direction in which the contour line travels near the end of the segment. A search can be made forward and backward along the event vector to determine the intersection with the boundary curve (marked with an asterisk in 610). Once a contact point is established, the endpoint is moved to the contact point and a tangent along the boundary curve at the contact point is calculated (shown at 620). The tangent can be stored as part of the metadata for the segment to provide "neighborhood" information in the segment specification that can be used during the fitting operation.

[0112] Steering Figure 4A and 4B For example, Figure 7 In more detail, Figure 4B 465 of the figure shows the segments before and after the endpoints are connected to the object. At 700, the segment before the connection to the object is shown, and at 750, the segment after the connection is shown, as well as the tangents shown by arrows. It should be noted that in this example, only the segment endpoints that are in contact with the circle are assigned tangents, however, tangents are not limited to being assigned only to circles, and in some implementations, other assignments of tangents are also possible. When a segment contacts an intersecting geometry, the segment will not receive a tangent, and the tangents at the other two segment endpoints that are in contact with the rectangular reservation are unstable when a tangent moves along the reservation curve (because of sharp corners near the curve), so the tangent can be discarded.

[0113] Back to Figure 5 (where all candidate segments are extracted at 520), these candidate segments may be evaluated to determine whether they should be modified to ensure connectivity (e.g., regarding Figure 6 ), or whether unnecessary segments should be removed or collapsed and / or metadata added, such as Figure 4B Operations 460 and 470 are described in further detail.

[0114] exist Figure 5 In example 520, based on the annotated segments from 1 to 7, for each segment identified, the following can be noted:

[0115] Segments (1), (5) and (6) are typical segmentation examples. Each segment contains a far point and a transition between two boundary curves (reservation area-reservation area or reservation area-intersection point).

[0116] Segments (2) and (3) may be evaluated and determined to be unnecessary (see Figure 4B ); it can be noted that segments (3) and (4) share endpoints.

[0117] Segments (2), (3), and (4) are examples of small segments that can be collapsed (about Figure 4B 470).

[0118] Segment (7) is an example of a contour ring with no start index (each entry in the ring touches a single reserved area). Because the segment is close to the reserved area (no touching reserved area ring overlaps with it), it can be determined that the segment is not an isolated ring and can be identified as an unused ring and not added to the segment specification list, e.g., this candidate segment can be removed if unnecessary.

[0119] Segment (8) is an example of an orphan loop. The segment has no start index (never close enough to the reserved area) but passes the orphan loop test, so the loop is added to the segment specification list.

[0120] exist Figure 4B At 450, the evaluation of the segments continues to iteratively determine multiple candidate segments in response to iterative evaluation of the points on the contour lines and rings. The candidate segments are evaluated to determine whether the candidate segments should be removed from the candidate segment set. In some cases, the generated list of candidate segments may include segments that form unnecessary pairs.

[0121] Go to Figure 8 , an example 800 of unnecessary segmentation of a contour line 820 (shown in a dotted pattern) that forms a path that is nearly equivalent to two boundary curves (retained box 810 and intersection line 820). In this example, two candidate segments 860 and 865 are generated, which can cause the output sketch fit generated from the contour line 820 from such segmentation to proceed along the intersection line 820 (shown in a long dashed pattern), jump to the retaining box 810 (shown in a solid line), and then return to the intersection line 810, as shown at 850. In order to reduce the number of primitives in the output sketch, it may be preferred to remove both of these segments 860 and 865, and the final sketch remains only on the intersection line 820. In some implementations, the determined candidate segments can be evaluated to detect whether there are segment pairs with AB / BA boundary curve patterns, and whether the removal will reduce the number of primitives, thereby reducing the complexity of the sketch that can be converted from the input curve.

[0122] In some cases, AB / BA segment pairs should not be removed in cases such as the following: two small segments still make the sketch curve transition from the intersection point to the reserved region and then back to the intersection point, but the contour line moves away from the intersection line, so that removing the segments and letting the sketch follow the intersection point will not accurately reflect the input level set. Therefore, when defining rules for removing unnecessary segments, such pairs of segments can be considered for removal in cases where such pairs of segments are relatively small and have points close to the original boundary curve so that the intersection geometry is not removed. In addition, the boundary curve area between the two segments can be defined as continuing relatively close to the contour line (e.g., within a threshold range) to make it a good approximation. Such considerations for removing unnecessary segments can be configured with specific thresholds and applied when processing candidate segments.

[0123] In some implementations, rules for evaluating candidate segments and determining whether a candidate segment is an unnecessary segment can be implemented. The rules can include considering the currently viewed segment and one or more subsequent segments in the candidate segment list. In some implementations, when the input to the segmentation process 400 includes intersecting geometry, processing the candidate segment can include evaluating the next in-order segments in the segment specification list against the subsequent candidate segments, removing the corresponding candidate segments and the next in-order segments in response to determining that the segments are unnecessary based on the following determinations:

[0124] (i) the corresponding candidate segment starts at the same boundary geometry as the end position of the next in-order segment,

[0125] (ii) the distances between 1) points on the corresponding candidate line segments and points on the contour region between the candidate segments and 2) points on the original boundary geometry are within a threshold distance close enough to collapse the corresponding candidate segments, and

[0126] (iii) The distances between the sets of points sampled from the boundary geometry that lie between the contact endpoints of the corresponding candidate segment and the next in-order segment are within a threshold distance from a predefined point.

[0127] Collapse small segments and generate specifications including metadata

[0128] At 470 , the candidate segments are evaluated to see whether they include small segments that can be collapsed to zero length.

[0129] In some cases, these segments will not represent geometry in the final sketch, but may signal a trimming routine (if a trimming routine is included) to create joins and break and trim boundary curves at this time. In some implementations, segments of the candidate segments that are below a threshold length can be identified. For those subsets of segments, the boundary curves attached to each end can be determined, and it can be verified whether there are intersection points between the boundary curves. In other words, it can be determined whether there is an intersecting geometry that contacts the point between the endpoints of the corresponding small segment. In response to determining that the intersecting geometry contacts a point within a threshold distance from the midpoint of the corresponding segment, the corresponding segment can be folded at the contact point.

[0130] The segmentation process 400 can provide a segment specification list that includes metadata with information about each segment determined and selected from the candidate segments. In some implementations, metadata can be generated when a candidate segment is determined to meet the inclusion criteria, and an entry can be initialized into the segment specification list to include the metadata. For example, the metadata can include the following information:

[0131] Points on contour lines used to create segments (where endpoints are adjusted to touch adjacent boundary curves).

[0132] • Information about the start and end neighbors (the boundary curves attached to each end of the segment (described below)).

[0133] • Outside direction estimation, which describes which side of the curve is “outside” of the shape in terms of level sets.

[0134] The identity of the next segment found in this contour ring.

[0135] The index of the source contour ring.

[0136] In some implementations, the outside direction can be estimated by traversing along the contour and taking the cross product of the gradient of the level set with the vector connecting successive points (groups of points or individual points) on the contour. If the cross product is net positive, with an acceptable confidence level, then the outside is to the right when one stands at the starting point and looks along the segment, and vice versa. If the outside direction cannot be established at the required confidence level, it is left as "unknown".

[0137] The start and end neighbors each include some of the following information:

[0138] The type of boundary curve (reservation, intersection, or none).

[0139] ·Identification of boundary curves.

[0140] • Whether the tangent is available and stable as described above.

[0141] Contact snapping at intersections with boundary curves (see e.g. Figure 6 asterisk at the boundary curve at 610 of FIG. 1 ) and the event vector used in the tangency calculation.

[0142] • An isolated ring segment has its start and end neighbors with the type attribute set to "none".

[0143] In some implementations, method 400 includes providing segment specifications, wherein each segment specification includes: information associated with points on contour lines extracted from the level set representation, the points being used to determine a corresponding segment; information about start and end neighbor points on a boundary geometry that touches each end of the segment; a prediction of an outside direction defining a side of the contour line, the side being outside a shape defined according to the level set representation; an identification of a next segment found in the same contour ring; and an identity of a source contour ring that determines the corresponding segment.

[0144] Fig. 9 is a flow chart of an example of a method 900 for fitting a set of segments based on a segment specification according to an implementation of the present invention.

[0145] In automated modeling, the user can specify surfaces to be connected (also called keep-outs) and bodies to be avoided (also called obstacles). This information can be used to create a sketch that closely matches the user's requirements. As discussed previously, the curve geometry from the keep-outs can be extracted from the user's input. For example, Figure 2A , 3 The input created by the sketch described in 4A and 4B is a curve consisting of connected points and can be a polyline extracted from a two-dimensional level set. Figure 4A and 4B As discussed, the portion of the obtained input that coincides with the retention region curve can be replaced with the retention region curve based on segmentation (and optional trimming), while the free region can be approximated with the segmented fitting curve.

[0146] The problem of sketch creation can be broken down into two parts as shown below.

[0147] Extraction of preserved area curves. These are usually analytical curves such as lines, arcs, circles, etc.

[0148] Construction of curves that approximate the polylines connecting the retention region curves. These are called piecewise fitted curves.

[0149] At 910, a set of options is determined to fit the set of segments in the list to one or more 2D primitives. At 920, a set of scoring measures corresponding to the set of options is determined based on preset criteria, including a fit error for deviation from the obtained 2D curve, a usability ranking based on the type of 2D primitives for fitting the corresponding set of segments, obstacle proximity, and self-intersection properties. At 930, an option in the set of options is selected based on the determined set of scoring measures.

[0150] In some implementations, when fitting a set of segments as provided from a segmentation process, it may be iteratively determined whether to approximate a set of line segments that form a subset of connected segments of contour lines with a given type of primitive (e.g., line, arc, circle). The approximation may be done based on an evaluation of a predefined maximum error threshold measure corresponding to a respective one of the primitive types. In response to determining that approximating a successive set of segments with each of the primitive types in the group is associated with an error above a predefined maximum error threshold measure for the approximation, the successive set of segments may be approximated to a four-control point B-spline.

[0151] Primitives for piecewise fitting curves

[0152] In some implementations, when converting curves and predefined geometric shapes to sketches, as discussed throughout the application, a highly editable sketch can be constructed that includes primitives connecting the keep-out curves, where the number of primitives is minimized and the complexity of the sketch is kept low. In some implementations, a selection can be made for fitting such as from a segmentation process (e.g., Figure 4A and 4B The process 400 of the invention provides a selection of segmented primitives to construct a highly editable sketch. In some implementations, a single primitive or a combination of several primitives can be used to construct a segmented fitting curve.

[0153] Fig.10 An example of piecewise fitting using primitives including lines, arcs, a combination of lines and arcs, and splines according to the present disclosure is shown.

[0154] At 1000, an example of a line segment primitive is shown. At 1000, the reserved area curve is shown in dashed lines, and the input polyline is shown in solid lines. At 1020, a segmented fit curve is constructed for the input polyline and is also shown in solid lines. A segmented fit is constructed between points A, B and points C, D. The tangents at these points are along the vertical direction. As shown in 1020, the primitive used for fitting is a line. Using a line to perform this fitting is an example, where the fitting can be performed with other primitives, as shown in 1030, where the fitting relies on an arc primitive.

[0155] At 1040, for each of points A, B and points C, D, fitting is performed using two arcs and a line primitive. The primitive includes a line segment with arcs on both sides. The arc is always tangent to the connecting line. In this example, the arcs are constructed so that they have tangent continuity at the reserved area curve end, as shown in 1040. Therefore, the primitive of the two arcs and a line guarantees tangent continuity, while the line segment primitive and the arc primitive do not necessarily provide tangent continuity.

[0156] At 1050, primitives modeled with Bezier curves are used. Fitting is performed with splines that provide tangent continuity with the connecting holdout curves, as shown at 1050.

[0157] Construction of piecewise fitting curve

[0158] In some implementations, during piecewise curve fitting, line segment primitives can be constructed by joining the ends of the preserve curve.

[0159] Construction of arc primitives

[0160] There may be a number of possibilities to construct circular arcs connecting the reserved area curves and approximating the polylines connecting the reserved area curves. When circular arcs are to be used to fit a series of segments, the following algorithm presented in Table 1 may be used to construct the circular arcs.

[0161]

[0162] Table 1

[0163] Construction of two arcs and a line primitives

[0164] In some implementations, primitives may be constructed based on input information. When constructing such primitives (e.g., primitives of two arcs and a line), the primitives have a total of fourteen degrees of freedom. Since a line has four degrees of freedom and an arc has five degrees of freedom, two arcs have ten degrees of freedom, such as Fig.10 1040. In some cases, there may be some constraints that reduce the degrees of freedom to two. Such constraints may include:

[0165] 1. Each arc passes through the end of the reserved area curve - four constraints.

[0166] 2. Each arc has tangent continuity at the end of the reserved area curve - two constraints.

[0167] 3. Each arc ends at the endpoint of the line segment - four constraints.

[0168] 4. Each arc has tangent continuity at the line segment endpoints - two constraints.

[0169] In some implementations, primitives with two degrees of freedom may be constructed according to the algorithm presented at Table 2.

[0170]

[0171] Table 2

[0172] Construction of spline primitives

[0173] When using spline as primitive, cubic Bezier curve can be represented by four control points. In this example, the control polygon is formed by joining the control points of the curve in order and joining the last point to the first point. It is always guaranteed that the Bezier curve is tangent to the line joining the first and second control points and to the line joining the third and last control points. This property is used to ensure that the Bezier curve primitive has tangent continuity with the reserved area curve. The construction of this primitive is described in Table 3. The two-dimensional cubic Bezier curve has eight degrees of freedom because it needs four control points that can be specified independently. The curve passes through the endpoint of the reserved area curve, which reduces the degree of freedom to four. The curve is tangent continuous at the reserved area curve end, so the degree of freedom is reduced to two.

[0174]

[0175] Table 3

[0176] Best Fit Primitive

[0177] The above method provides a way to construct primitives based on input information, which is provided from the segmentation as described in the present disclosure. In some implementations, fitting includes performing selection on primitives to be used for fitting provided according to selection criteria. The polyline is provided with available tangent information at the end. There may be no tangent information at either end of the polyline. In some implementations, multiple primitive options for fitting can be constructed, and quality measures can be calculated for each primitive. For example, the quality measure can be calculated based on the quality function described in Table 4. According to the constructed primitives and the calculated quality measures for each primitive, a selection that meets the quality standard can be made as a selection criterion. After the candidate primitives are constructed, their quality measures are calculated by evaluating the properties listed in Table 4. For example, the properties can be evaluated as a whole based on addition, wherein in some cases, addition can also include weight factor considerations to provide a weight sum to calculate the quality measure and use it for comparison between different options.

[0178]

[0179] Table 4

[0180] Adaptive piecewise fitting algorithm

[0181] The above method provides an example way to construct primitives based on segmented specification information. In some implementations, a requirement for providing a final sketch as an output from a transformation of input information may be that the sketch shown does not intersect with obstacles. This requirement of not intersecting with obstacles may not be guaranteed by primitives alone. In order to address this requirement and provide a sketch that does not include intersections with obstacles, the algorithm in Table 5 may be used.

[0182]

[0183] Table 5

[0184] In some implementations, an adaptive fitting algorithm may be implemented where a composite curve with one or more primitives is provided to form a sketch, where the primitives satisfy the user's obstacle avoidance requirements while also generating a highly editable sketch.

[0185] Avoid self-intersection

[0186] The previously described method can provide a highly editable sketch, and as shown in Table 5, an algorithm can be used to avoid intersections of obstacles. However, it is possible that the curve can intersect other parts of the sketch. In some implementations, in order to overcome such potential problems, another algorithm can be used. The algorithm can be presented, for example, as shown in Table 6.

[0187]

[0188]

[0189] Table 6

[0190] Fig.11A and Fig. 11B 1 is a flow chart presenting an example trimming process 1100 according to an implementation of the present disclosure. The trimming process 1100 may be performed in a segmented process (e.g., as described with respect to Figure 4A and 4B ) and after performing the fit (e.g., as described with respect to Fig. 9 and 10 In some implementations, the trimming process may include executing an algorithm to split each boundary curve into segments (fragments) using the locations of the segment endpoints and selecting a subset of the segments to form a fixed portion of the final sketch. The trimming may be performed by sequentially connecting the end of one segment from the segment specification set provided from the segmentation process to the start of the next segment from the segmentation process and selecting intervening fragments to include in the final sketch.

[0191] Fig.11A and 11B A flow chart of the trimming algorithm is shown in .

[0192] At 1110, the process starts and receives input for trimming. In this example trimming process 1100, the Figure 4A and 4B The same boundary curves (i.e., lines and arcs representing the retained and intersecting regions) used in the segmentation process 400 of FIG. 1100 are used. The input to the trimming process 1100 includes the segments identified in the segmentation specification. In addition, in the case where the segmentation relies on a level set representation as input, the input can include a list of unused contour rings from the segmentation and the layer level sets originally provided as input.

[0193] At 1120, join points at the start and end points of each segment from the set of segments are identified.

[0194] Finding the Junction

[0195] Joint points are extracted from the list of segments as the start and endpoint of each segment (placeholder segments are collapsed into single points, so only one joint point is generated for a placeholder segment). Nearly overlapping joints can be merged as long as the two seams do not share common segments, and the endpoints of the segments can be updated to exactly match the final joint point (in case it moves slightly when the merge is done). The joint points form the nodes of the graph used throughout the trimming process. The graph edges initially consist only of segments (but are later expanded to include fragments of boundary curves; these are collectively called patches). The graph structure is doubly linked, that is, each joint point knows about the patches it touches, and each patch knows about the joint points that the patches touch at their ends.

[0196] At 1130, the boundary curve is split into fragments using joins. Some fragments that traverse areas farther on the interior of the level set may be marked as "interior" (see arrows at 1145). A graph may be constructed with joins as nodes and with segments and fragments of the preserved region and intersection geometry as edges (edges are collectively referred to as patches). A determination is made at 1140 as to whether the graph is valid. If the graph is not valid (i.e., there are nodes with fewer than two associated patches), the process restarts from the beginning, attaching segment endpoints to joins with a coarser tolerance (see arrows from 1140 to 1120). In some implementations, an iterative process may be performed on the segments. For each segment, all possible paths between the endpoint of the current segment and the starting point of the next segment are searched, traversing the graph with fragments and segments as edges and joins as nodes (at 1150). At Fig. 11B At 1160, each path is scored using a heuristic that attempts to prioritize the simple external set of trimmed boundary curve geometry, and the highest scoring paths are selected for inclusion in the final sketch (see (e)). Fig. 11BIn the plot (f) of , all selected (trimmed) boundary curves are shown. After processing all segments (at 1170), the geometry in some intersection regions may be optionally modified at 1180 to produce more reasonable joins (see (g)).

[0197] The output of trimming is a set of trimmed boundary curves that, when combined with the segmentation, form a closed sketch with no self-intersections or dangling edges. Other approaches to the trimming problem can be explored, including using a 2D CAD kernel that can find areas inside the untrimmed sketch and extract only the boundary curves necessary to keep the shape intact. In some implementations, the trimming step occurs after the segmentation is complete, but the trimming and fitting steps can be swapped without affecting the results.

[0198] Fragment creation

[0199] During the trimming process as discussed with respect to 1130, fragments are created by breaking boundary curves at join points. Boundary curves are organized into connected rings (except for boundary plate intersection regions, which are lines rather than rings). Each boundary curve is processed in turn and split by zero, one, or more join points. First, those join points that are close to touching the boundary curve are identified, for example, join points that are within a coincidence threshold (e.g., predefined or user-specified) distance from the boundary curve. If zero or one join points are identified, no fragments are generated and the boundary curve is considered an "untrimmed ring" and is not added to the fragment list or graph. The join points are then used to split the boundary curve into segments, and tiny curves that exist in the fragment are discarded if they exist. The fragment endpoints are then snapped to perfectly correspond to the nearest join points and the fragment is inserted into the graph.

[0200] Sometimes, an untrimmed loop in a reserved region should be retained as an isolated boundary loop (i.e., included in its entirety in the final sketch), while in other cases, the untrimmed loop should be discarded. All loops associated with a reserved region may be processed, and then the following logic may be applied to determine whether an untrimmed loop should be retained as an isolated boundary loop:

[0201] • Holes in trimmed protection zones: If some rings associated with a protection zone are trimmed / split, any remaining untrimmed rings should be stored as isolated boundary rings (eg, holes in protection zone tiles should be preserved even if not touching any segments).

[0202] Buried holes: If the preserved region consists of two rings, both untrimmed, and the base ring is near the boundary of the level set and the other ring is inside the level set, buried holes generated by the preserved region surface can be found. The base surface slice ring can be selected as an isolated boundary ring.

[0203] Floating Reserve: If the previous check does not pass, and all loops of the current reserve are untrimmed, each unused contour left from the segmentation can be checked, and if the distance between an untrimmed ring in the current reserve and an unused contour is small (less than 1.5 voxels), it is added as an isolated boundary ring. In this case, an isolated reserve exists in the contour, and its boundary should be retained in the final sketch.

[0204] In some implementations, for isolated boundary loops, no intersection regions need to be considered. At this point the graph data structure is checked to ensure that each junction (node) has at least two associated patches (edges). If a node is found to have fewer patches, the graph is not canonical and a valid sketch may not be created. To increase the likelihood of acceptable results, the process restarts at the find junction step with a looser tolerance for coincident points.

[0205] After the graph is finalized, the maximum internal distance from the level set boundary is calculated for each point on each patch (edge) in the graph. If the maximum internal distance exceeds a threshold (3 voxels), the maximum internal distance is marked as "inside". The maximum internal distance can also be cached for future use.

[0206] Fragment Selection (Step 1140)

[0207] In this step of the process, the segments are iterated and one or more fragments connecting the endpoints of the current segment with the starting point of the next segment are successively selected for inclusion in the final sketch. In each loop, segments are selected where the segment is not a collapsed segment from which the search started. All possible paths between the starting point and the endpoints can be determined, and the paths can then be scored to determine the path that meets the selection criteria.

[0208] Discovery Path (1150)

[0209] exist Fig.11A At 1150, the current segment end join and the next segment start join can be taken, and a path is selected that connects these joins using a small number of curves that are estimated to be toward the outside of the shape (rather than the inside). This path is a path that does not reuse fragments that have been selected by the previous path. To achieve this, a breadth-first search is performed to find all paths in the graph that connect two joins without traversing "used" edges. If no path can be found, the search is re-performed, allowing used paths to be traversed.

[0210] Scoring Path(1160)

[0211] Paths are scored by traversing the path from beginning to end and scoring each patch individually. The score of a path is the sum of the scores of its constituent patches. Patches are scored relative to their previous patch (which can be a boundary curve or a segment from a segmentation process) according to several heuristic methods described in Table 7 below. The goal is to have a path that is outside the sketch (i.e., a path that will help produce a final sketch without sub-loops) that reflects the intent of the input level set or contour line and does not interfere with the paths for other segment pairs in this design. Each component is weighted according to a heuristic method that is adjusted experimentally, and then added together to form the patch score.

[0212]

[0213] Table 7

[0214] The second score is calculated by traversing the path backwards, starting from the endpoint and returning to the beginning (see the next section). The final score of a path is the smaller of its forward score and its backward score. The path with the highest final score is selected to be included in the final sketch, and its component patches are marked as used. The destination segment is now connected to the patch chain and becomes the new starting segment for the next step of the retouching process.

[0215] Special treatment for placeholder segments

[0216] Most of the scoring logic described above requires that each patch has a previous patch with known properties (outside direction, incident direction to a join point, etc.), which are not available for placeholder segments that have been collapsed to zero length. To address this during trimming, once a placeholder segment has been connected to a patch chain, the placeholder segment is assigned a "proxy patch", which is the patch that immediately follows the placeholder in the chain. Placeholders that have not yet been connected have no proxies. When path discovery and scoring are performed starting from a placeholder segment, the placeholder always has a proxy. If path discovery and scoring use a placeholder segment as a destination, the placeholder segment may not have a proxy (in fact, the presence of a proxy is an indication that something went wrong), and in these cases, backward scoring is not performed.

[0217] Fig. 12A Examples 1200 , 1210 of simplified curves according to a process of simplifying polyline curves into a set of simple primitives are shown.

[0218] In some implementations, polyline curve fitting can be used in the following scenarios:

[0219] Preprocessing of the reserved area slices using polyline fitting with tight tolerances to approximate each segment of the reserved area slice with lines and arcs;

[0220] The fitting segmentation specification generated from the segmentation process (e.g., as described in relation to Figure 3 , 4A and 4B), which corresponds to a ring (which has no neighbors); and / or

[0221] As a fallback in the case where trimming and segmentation does not produce a segmentation specification and does not produce a trimmed boundary curve.

[0222] A polyline is a curve formed by joining a series of points with line segments. A polyline curve can be open or closed, as shown below.

[0223] In some implementations, a simplified polyline can be constructed according to the five parts presented below.

[0224] 1. Elimination of collinear points and coincident points

[0225] Detect and eliminate consecutive coincident points in a given polyline. Two points are coincident if the distance between them is less than a threshold distance. Next, identify and eliminate consecutive collinear points, for example, if there are three consecutive points on the same line, the midpoint can be eliminated.

[0226] 2. Circle Detection

[0227] This part checks whether the given polyline can be approximated as a complete circle. If the given input polyline is a closed loop, an approximate circle is constructed as described below, and if a valid and accurate circle can be constructed, a circle definition is returned. A circle definition consists of a center and its radius or three points on the circle.

[0228] In some implementations, the least squares circle fit is obtained by minimizing the norm of the error of a given point with respect to the circle to be constructed. In order to achieve efficient approximation of a set of points with a circle, the following two conditions may be enforced.

[0229] Condition 1: Root mean square error.

[0230] The root mean square error (rms error) of the circle relative to the input point is calculated, and the circle is considered valid only if this error is below a threshold. The following equation shows the rms error, where p k is the kth input point out of a total of N points, and c is the center of the circle, and r is its radius.

[0231]

[0232] A dimensionless threshold factor α is defined to control the validity of the circle calculation. When the rms error < αr, the circle is considered to be an accurate representation of the point. In this study, α is set to 0.02.

[0233] Condition 2: Area error

[0234] The area of ​​the polygon formed by the closed polyline is calculated and compared with the area of ​​the circle constructed using the above algorithm. A circle is considered valid only if the relative error of the closed polygon area with respect to the circle area is below a threshold. For the threshold, the same dimensionless threshold factor α defined above is used here. For a valid circle,

[0235] 3. Arc detection

[0236] This part detects whether a given polyline can be approximated as an arc. If the given polyline is not a closed loop, the algorithm described above is used to construct an approximate circle. A modification is made for condition 2. In this case, the area error is checked using the area of ​​the arc formed by joining the starting point and the endpoint. The starting point and the endpoint of the polyline are also joined via the center of the arc to form a closed polygon. If the two conditions as described above are met, the arc is extracted by using the starting point and the endpoint of the input polyline and the midpoint on this arc.

[0237] 4. Simplification using only lines

[0238] This section checks whether a given polyline can be approximated by line segments. Returns a simplified polyline. This method can use the Visvalingam-Whyatt algorithm for polyline simplification, which can include reference Fig. 12B The steps are shown in Table 8.

[0239]

[0240] Table 8

[0241] In some implementations, to automate the process, automatic calculation of the area threshold may be implemented and applied.

[0242] Area Threshold

[0243] For a given problem, the threshold is automatically calculated based on the following algorithm and Fig. 12C It is described in .

[0244] You can perform the following steps:

[0245] 1. Given a polyline (open or closed) and a parameter (sector count) that specifies the number of sectors a circle can be divided into. In this study, sector count = 36 was used. Fig. 12C , the given polyline is ABCDEFGH.

[0246] 2. For each point, calculate the area, perimeter, and ratio.

[0247] 3. Confirm the maximum area and maximum value of all points ratio.

[0248] 4. Calculate the circumscribed circle of the bounding box of all points in the polyline. Fig. 12C The circumscribed circle is shown by a dotted line.

[0249] 5. The circumscribed circle is divided into sectors. Each sector contains an arc of the circumscribed circle. A triangle can be formed by joining the endpoints and midpoints of this arc. Fig. 12C In , the triangle is represented by the point PQR. Calculate the area / perimeter of this triangle. This number is used as a measure for the threshold. This threshold varies with each problem, and therefore a generalized method for calculating the area threshold is specified.

[0250] 6. As described in step 3, to scale the number calculated above. This number has units of area and is used as the area threshold in the Visvalingam-Whyatt algorithm.

[0251] The area threshold can be characterized by some properties, such as:

[0252] The area threshold has area units.

[0253] When a point is selected for deletion, its area (the area formed by this point and its neighbors) is compared with the area threshold to determine whether the point needs to be deleted. Therefore, the unit of this threshold should be area.

[0254] When all points are scaled, the simplification behavior of the point set should remain unchanged. The area of ​​each point (the area formed by this point and its neighbors) changes in proportion to the square of the scale. Since the area threshold also changes in proportion to the area (proportional to the square of the scale), the simplification behavior of the point set does not change with scaling.

[0255] In some implementations, the simplification algorithm can be implemented as a two-step process, where an area threshold is first automatically calculated, and then the Visvalingam-Whyatt algorithm is applied to achieve the desired line simplification.

[0256] 5. Simplify using lines and arcs

[0257] Each line segment is connected to an adjacent arc or another line segment, and similarly, each arc is connected to an arc or a line segment. The following are the main steps of this algorithm.

[0258] 1. Use the pure line method to simplify the given polyline.

[0259] 2. Starting from the first point in the polyline, calculate the arc with the maximum number of points (details below). There are two possibilities here:

[0260] a. An arc of sufficient quality cannot be formed. In this case, a line segment is formed and the search for an arc begins at the next point in the polyline.

[0261] b. Form an arc. In this case, the arc is returned and the search for a new arc starts from the next point in the polyline.

[0262] 3. When the last point in the polyline has been processed, the process ends.

[0263] In the algorithm above, the longest arc can be constructed from the points in a given polyline based on the following algorithm:

[0264] 1. A polyline is given. This polyline can be a part of the original polyline, for example, if k points have been processed in the original polyline, then for this algorithm, the polyline is points k+1 to N, where N is the total number of points in the original polyline.

[0265] 2. Take the first three points of the polyline. These three points always form an arc (represented by retArc). Calculate the radius and center of this arc.

[0266] 3. Add the next point to the above points and construct a new arc formed by the new point and the previous two points (the new arc is represented by newArc).

[0267] 4. Check if the center and radius of newArc and retArc are within the threshold. An absolute threshold can be used here.

[0268] a. If retArc and newArc are within the threshold, the new point is considered to be part of retArc and the algorithm returns to step 3.

[0269] b. Otherwise, return retArc as the longest arc.

[0270] This method enables simplification of a given polyline into lines and arcs, and when used in sketching, the method allows easy editing.

[0271] Fig.13 1 is a schematic diagram of a data processing system including a data processing device 1300, which can be programmed as a client or programmed as a server. The data processing device 1300 is connected to one or more computers 1390 via a network 1380. Fig.13Only one computer is shown as data processing device 1300, but multiple computers can be used. Data processing device 1300 includes various software modules that can be distributed between application layer and operating system. These can include executable and / or interpretable software programs or libraries, including tools and services of one or more 3D modeling programs 1304 that implement sketch conversion logic, as described above. Therefore, 3D modeling program 1304 can be CAD program 604 (such as CAD program 116), and one or more level set-based methods can be implemented for shape and / or topology optimization and physical simulation operations (finite element analysis (FEA) or other), which are incorporated for converting curve representation and input predefined geometric shapes (for example, including boundary geometric shapes) into primitive sketching geometric shapes. In addition, program 1304 can potentially implement manufacturing control operations (for example, generating and / or applying tool path specifications to realize the manufacture of designed objects). The number of software modules used can vary depending on the implementation. In addition, software modules can be distributed on one or more data processing devices connected by one or more computer networks or other suitable communication networks.

[0272] The data processing device 1300 also includes hardware or firmware devices, including one or more processors 1312, one or more additional devices 1314, a computer-readable medium 1316, a communication interface 1318, and one or more user interface devices 1320. Each processor 1312 is capable of processing instructions for execution within the data processing device 1300. In some embodiments, the processor 1312 is a single-threaded or multi-threaded processor. Each processor 1312 is capable of processing instructions stored on a computer-readable medium 1316 or a storage device (such as one of the additional devices 1314). The data processing device 1300 uses a communication interface 1318 to communicate with one or more computers 1390, for example, via a network 1380. Examples of the user interface device 1320 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 device 1300 may store instructions implementing operations associated with the above-described programs on a computer-readable medium 1316 or one or more additional devices 1314 (eg, one or more of a hard disk device, an optical disk device, a magnetic tape device, and a solid-state memory device).

[0273] The embodiments of the subject matter and functional operations described in this specification may be implemented in digital electronic circuits, 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.

[0274] 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.

[0275] 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.

[0276] 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 circuits, 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).

[0277] 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.

[0278] 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.

[0279] 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).

[0280] 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.

[0281] 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.

[0282] 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.

[0283] Example

[0284] Although the present application is defined in the appended claims, it will be appreciated that the invention may also (additionally or alternatively) be defined according to the following examples:

[0285] Example 1: A computer-implemented method comprising:

[0286] Obtaining (i) a two-dimensional (2D) curve and (ii) a predefined geometric shape;

[0287] The 2D curves and predefined geometries are converted to primitive sketch geometries by approximating free regions such as segments from the 2D curves to a set of 2D primitives so as to minimize the number of 2D primitives used in the primitive sketch geometries, wherein the converted 2D curves include

[0288] processing a plurality of candidate segments determined based on segmenting the free region based on identified points on the 2D curve that satisfy a threshold of curve contact with a geometric shape among the predefined geometric shapes to determine a set of segments for the free region, and

[0289] Fitting the set of segments to the set of 2D primitives; and

[0290] Primitive sketch geometry is provided based on user input for rendering, editing and / or simulation at a computer-aided design program to construct a 3D model of the object for use in manufacturing the physical structure of the object using one or more computer-controlled manufacturing systems.

[0291] Example 2. A method according to Example 1, wherein the obtained predefined geometry includes a boundary geometry, the boundary geometry includes an input reserved area geometry set, and wherein obtaining the 2D curve and the predefined geometry includes obtaining a representation including a set of connected points describing the 2D curve.

[0292] Example 3. The method of any of the preceding examples, wherein converting the 2D curve and the predefined geometric shape comprises assembling the fitted set of segments and at least a portion of the predefined geometric shape to obtain a primitive sketch geometry.

[0293] Example 4. The method according to example 2, wherein the conversion of the 2D curve and the predefined geometric shape comprises:

[0294] Segmenting the representation into fixed regions and free regions, wherein the fixed regions are defined for the boundary geometry and wherein the free regions are evaluated to determine a set of segments to fit to the set of 2D primitives; and

[0295] Get the 2D primitives to fit the fixed region to,

[0296] The fitting of the segment set determined based on the segmentation includes

[0297] A 2D primitive of a certain primitive type is selected to approximate a series of segments of a representation of the 2D curve by minimizing an error measure associated with the selected 2D primitive.

[0298] Example 5. The method of example 2, wherein the conversion of the 2D curve and the predefined geometric shape comprises:

[0299] analyzing the connected point set by selecting a first area as a fixed area and selecting a second area identified as a free area, wherein the fixed area is to be replaced with an exact portion of a corresponding boundary geometry of the obtained predefined geometric shape, and wherein the free area is to be approximated with a set of 2D primitives including at least one of a line, an arc, and a circle;

[0300] processing the free region to determine a plurality of candidate segments based on segmenting and evaluating relative proximity between the determined segments and the boundary geometry according to an inclusion criterion;

[0301] The method further comprises determining a set of segments based on the plurality of candidate segments, wherein the determining comprises iteratively evaluating the plurality of candidate segments to perform at least one of the following:

[0302] identifying one or more segments to be removed from the plurality of candidate segments,

[0303] identifying additional segments to add to the plurality of candidate segments, and / or

[0304] identifying at least one segment to be collapsed into a single point; and

[0305] Generates a segment specification for the determined set of segments.

[0306] Example 6. The method according to Example 5,

[0307] The processing of free areas includes:

[0308] marking each point of the 2D curve based on a proximity of the corresponding point to a bounding geometry in the bounding geometry, wherein the proximity is determined according to a first threshold contact distance, wherein the represented point is marked as touching when the distance between the point and the bounding geometry is below the threshold contact distance;

[0309] Iteratively evaluating points on the 2D curve based on the markings of the points to determine a plurality of candidate segments of the 2D curve; and

[0310] Processing the determined plurality of candidate segments based on iterations of the points to iteratively extract accurate segments from the determined plurality of candidate segments that meet inclusion criteria, wherein the inclusion criteria specify that a candidate segment is to be selected for inclusion in the segment set when the candidate segment connects two different boundary geometries or includes a point marked as not in contact with the boundary geometry and a point marked as having a distance from the boundary geometry above a second threshold contact distance; and

[0311] The generation of segmentation specifications includes:

[0312] Metadata for the extracted segment set is generated to generate a segment specification list for the segment set, wherein the metadata generation includes:

[0313] Upon determining that a candidate segment satisfies the inclusion criteria, an entry into the segment specification list is initialized to include the generated metadata for the corresponding segment.

[0314] Example 7. The method of example 6, wherein iterative evaluation of points on the 2D curve comprises:

[0315] Determining a first candidate segment includes:

[0316] determining a starting point for the segment, the starting point being a point marked as touching a boundary geometry, where the next point on the representation either does not touch the boundary geometry or touches a different boundary geometry, and

[0317] determining an endpoint of a segment as points from successive iterations of touching boundary geometries of a connected point set, wherein a segment between a starting point and the endpoint is determined as a first candidate segment, and wherein a subsequent starting point is determined based on iterating a point subsequent to the endpoint as determined for the first candidate segment;

[0318] determining whether there is at least one isolated ring that satisfies a ring inclusion criterion, wherein the ring inclusion criterion defines a threshold distance from the boundary geometry above which each isolated ring is considered for inclusion in the plurality of candidate segments;

[0319] In response to determining that an isolated ring that satisfies the inclusion criteria exists, in response to determining that the isolated ring that satisfies the inclusion criteria encloses an area greater than a threshold area size to be added as a candidate segment, adding the isolated ring that satisfies the inclusion criteria to the plurality of candidate segments; and

[0320] A plurality of candidate segments are iteratively determined in response to the iterative evaluation.

[0321] Example 8. The method according to Example 6, wherein marking each point in the connected point set comprises:

[0322] Regions of the boundary geometry are classified as touchable and non-touchable based on inferences derived from the structure of the fixed region to exclude regions of the boundary geometry from contacting a segment of the plurality of candidate segments.

[0323] Example 9. The method according to example 6, wherein processing the determined plurality of candidate segments comprises:

[0324] modifying at least one of the plurality of candidate segments to ensure connectivity of the at least one segment to the boundary geometry, wherein the modifying comprises

[0325] For each entry in the segment specification list, determining whether the point marked as touching the boundary geometry is connected to the boundary geometry; and

[0326] When it is determined that an entry from the list includes a point marked as touching a boundary geometry that is not connected to the boundary geometry, the entry is modified to include a point that is actually in contact with the boundary geometry.

[0327] Example 10. The method of example 5, wherein the boundary geometry includes intersection geometry, and wherein processing the determined plurality of candidate segments includes:

[0328] Identifying a segment below a threshold length from a plurality of candidate segments; and

[0329] For each of the identified segments,

[0330] Determine if there is intersecting geometry with point contacts between the endpoints of the corresponding segments, and

[0331] In response to determining that the intersecting geometric shape contacts a point within a threshold distance from a midpoint of the corresponding segment, the corresponding segment is folded at the contact point.

[0332] Example 11. The method of example 6, wherein the boundary geometry includes intersection geometry, and wherein processing the determined plurality of candidate segments includes:

[0333] For each candidate segment in the segment specification list,

[0334] evaluating the next in-order segment of the segment specification list against subsequent candidate segments, and

[0335] The corresponding candidate segment and the next in-order segment are removed in response to the following determination:

[0336] (i) the corresponding candidate segment starts at the same boundary geometry as the end position of the next in-order segment,

[0337] (ii) the relative distance between the points on the corresponding candidate segment and the points on the fixed region of the boundary geometry is within a threshold distance close enough to collapse the corresponding candidate segment, and

[0338] (iii) The distances between the sets of points sampled from the boundary geometry that lie between the contact endpoints of the corresponding candidate segment and the next in-order segment are within a threshold distance from a predefined point.

[0339] Example 12. The method of example 5, wherein the set of connected points is sampled on a zero contour of a level set representation of a 2D contour of the plate (generated based on an automated modeling plate solver) to perform a shape synthesis process of a 3D geometry of the part according to boundary conditions, and wherein the method comprises:

[0340] Segment specifications are provided, wherein each segment specification includes: information associated with points on contours extracted from the level set representation, the points being used to determine a corresponding segment; information about start and end neighbor points on boundary geometry that touch each end of the segment; a prediction of an outside direction defining a side of the contour that lies outside a shape defined according to the level set representation; an identification of the next segment found in the same contour ring; and an identity of a source contour ring that determines the corresponding segment.

[0341] Example 13. The method of example 6, wherein fitting the set of segments is performed based on the segment specification list, and wherein fitting comprises:

[0342] determining a set of options for fitting the set of segments in the list to one or more 2D primitives;

[0343] determining a set of scoring measures corresponding to the set of options based on preset criteria, the preset criteria including fitting error for deviation from the obtained 2D curve, usability ranking based on the type of 2D primitives used to fit the corresponding set of segments, obstacle proximity, and self-intersection properties; and

[0344] An option is selected from a set of options based on a determined set of scoring measures.

[0345] Example 14. The method of example 13, wherein fitting the segment set comprises:

[0346] iteratively determining whether to approximate the sets of successive segments identified in the segment specification list with primitives of a type selected from the group consisting of lines, arcs, and circles based on evaluations of predefined maximum error threshold measures corresponding to types in the group of primitive types; and

[0347] In response to determining that approximating the set of successive segments with each of the primitive types in the group is associated with an error above a predefined maximum error threshold measure for approximation, the set of successive segments is approximated to a four-control point B-spline.

[0348] Example 15. The method of any of the preceding claims, wherein the predefined geometric shape comprises a boundary geometric shape, and wherein the conversion of the 2D curve and the predefined geometric shape comprises:

[0349] Fitting boundary geometry including intersection geometry and keep-out geometry to one or more 2D primitives, wherein the fitting comprises:

[0350] Approximate the intersection geometry by explicit approximation with lines or boxes, and

[0351] The keep-out geometry is approximated by arbitrary fitting to primitives from the group consisting of lines, arcs, and circles.

[0352] Operations and processes similar to those described in Examples 1 to 15 may be performed in a system including at least one processor and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions that, when executed, cause the at least one processor to perform operations. In addition, a non-transitory computer-readable medium may also be implemented that stores instructions that, when executed, cause the at least one processor to perform operations as described in any one of Examples 1 to 15.

Claims

1. A computer-implemented method, the method comprising: Obtaining (i) a two-dimensional (2D) curve and (ii) a predefined geometric shape; Converting the 2D curve and the predefined geometry into a primitive sketch geometry by approximating a free area as segmented from the 2D curve to a set of 2D primitives so as to minimize the number of 2D primitives used in the primitive sketch geometry, wherein converting the 2D curve comprises processing a plurality of candidate segments determined based on segmenting the free region based on identified points on the 2D curve that satisfy a threshold of curve contact with a geometric shape among the predefined geometric shapes to determine a set of segments for the free region, and Fitting the set of segments to a set of 2D primitives; as well as The primitive sketch geometry is provided based on user input for rendering, editing and / or simulation at a computer-aided design program to construct a 3D model of an object for use in manufacturing a physical structure of the object using one or more computer-controlled manufacturing systems.

2. The method of claim 1 , wherein the obtained predefined geometry comprises a boundary geometry comprising an input reserved region geometry set, and wherein obtaining the 2D curve and the predefined geometry comprises obtaining a representation comprising a set of connected points describing the 2D curve. 3 . The method of claim 1 , wherein converting the 2D curve and the predefined geometric shape comprises assembling a fitted set of segments and at least a portion of the predefined geometric shape to obtain the primitive sketch geometry.

4. The method of claim 2, wherein the conversion of the 2D curve and the predefined geometric shape comprises: segmenting the representation into a fixed region and the free region, wherein the fixed region is defined for the boundary geometry, and wherein the free region is evaluated to determine the set of segments to fit to the set of 2D primitives; and obtaining a 2D primitive to which the fixed region is fitted, wherein said fitting of said set of segments determined based on the segmentation comprises A 2D primitive of a certain primitive type is selected to approximate a series of segments of the representation of the 2D curve by minimizing an error measure associated with the selected 2D primitive.

5. The method of claim 2, wherein the conversion of the 2D curve and the predefined geometric shape comprises: analyzing the connected point set by selecting a first area as a fixed area and selecting a second area identified as a free area, wherein the fixed area is to be replaced with an exact portion of a corresponding boundary geometry of the obtained predefined geometric shape, and wherein the free area is to be approximated using the set of 2D primitives including at least one of a line, an arc, and a circle; processing the free region to determine the plurality of candidate segments based on segmenting and evaluating relative proximity between the determined segments and the boundary geometry according to an inclusion criterion; Determining the set of segments based on the plurality of candidate segments, wherein the determining comprises iteratively evaluating the plurality of candidate segments to perform at least one of: identifying one or more segments to be removed from the plurality of candidate segments, identifying additional segments to be added to the plurality of candidate segments, and / or identifying at least one segment to be collapsed into a single point; as well as Generates a segment specification for the determined set of segments.

6. The method according to claim 5, The processing of the free area includes: marking each point that is a 2D curve based on a proximity of the corresponding point to a boundary geometry of the boundary geometry, wherein the proximity is determined according to a first threshold contact distance, wherein the point of the representation is marked as touching when the distance between the point and the boundary geometry is below the threshold contact distance; iteratively evaluating the points on the 2D curve based on the markings of the points to determine the plurality of candidate segments of the 2D curve; as well as processing the determined plurality of candidate segments based on iterations of the points to iteratively extract precise segments from the determined plurality of candidate segments that meet inclusion criteria, wherein the inclusion criteria specifies that a candidate segment is to be selected for inclusion in the segment set when the candidate segment connects two different boundary geometries or includes a point marked as not in contact with the boundary geometry and a point marked as having a distance from the boundary geometry above a second threshold contact distance; as well as The generating of the segment specification comprises: Generating metadata for the extracted segment set to generate a segment specification list for the segment set, wherein the generating of the metadata comprises: Upon determining that a candidate segment satisfies the inclusion criteria, an entry into the segment specification list is initialized to include the generated metadata for the corresponding segment.

7. The method of claim 6, wherein the iterative evaluation of the points on the 2D curve comprises: Determining a first candidate segment includes: determining a starting point for a segment, the starting point being a point marked as touching a boundary geometry, wherein the next point on the representation either does not touch the boundary geometry or touches a different boundary geometry, and determining an endpoint of the segment as a point of successive iterations of touching boundary geometry from the connected point set, wherein the segment between the starting point and the endpoint is determined to be the first candidate segment, and wherein a subsequent starting point is determined based on iterating a point after the endpoint as determined for the first candidate segment; determining whether there is at least one isolated ring that satisfies a ring inclusion criterion, wherein the ring inclusion criterion defines a threshold distance from the boundary geometry above which each isolated ring is considered for inclusion in the plurality of candidate segments; In response to determining that there is an isolated ring that satisfies the inclusion criteria, in response to determining that the isolated ring that satisfies the inclusion criteria encloses an area greater than a threshold area size to be added as a candidate segment, adding the isolated ring that satisfies the inclusion criteria to the plurality of candidate segments; and The plurality of candidate segments are iteratively determined in response to the iterative evaluation.

8. The method of claim 6, wherein the marking of each point in the connected point set comprises: Regions of the boundary geometry are classified as touchable and non-touchable based on inferences drawn from the structure of the fixed region to exclude regions of the boundary geometry from contacting segments of the plurality of candidate segments.

9. The method of claim 6, wherein the processing of the determined plurality of candidate segments comprises: Modifying at least one of the plurality of candidate segments to ensure connectivity of the at least one segment to the boundary geometry, wherein the modifying comprises for each entry in the segment specification list, determining whether a point marked as touching the boundary geometry is connected to the boundary geometry; as well as When it is determined that an entry from the list includes a point marked as touching the boundary geometry, without being connected to the boundary geometry, the entry is modified to include a point that is actually in contact with the boundary geometry.

10. The method of claim 5, wherein the boundary geometry comprises an intersection geometry, wherein the processing of the determined plurality of candidate segments comprises: identifying a segment below a threshold length from the plurality of candidate segments; as well as For each of the identified segments, determining whether there is an intersection between boundary curves attached to each end of a respective identified segment, the intersection being located at a point within a threshold distance from a midpoint of the respective identified segment, and In response to determining that the intersection point is located at the point within the threshold distance from the midpoint of the respective identified segment, the respective identified segment is collapsed at the point.

11. The method of claim 6, wherein the boundary geometry comprises an intersection geometry, wherein the processing of the determined plurality of candidate segments comprises: For each candidate segment in the segment specification list, evaluating the next in-order segment of the segment specification list against subsequent candidate segments, and The corresponding candidate segment and the next in-order segment are removed in response to the following determination: (i) the corresponding candidate segment starts at the same boundary geometry as the end position of the next in-order segment, (ii) the distance between 1) the corresponding candidate line segments and the points on the contour area between the candidate segments and 2) the points on the boundary geometric shape is within a threshold distance close to collapse the corresponding candidate segments, and (iii) the distances between the sets of points sampled from the boundary geometry that are located between the contact endpoints of the corresponding candidate segment and the next in-order segment are within a threshold distance from a predefined point.

12. The method of claim 5, wherein the connected point set is sampled on a zero contour of a level set representation of a 2D contour of a plate generated based on an automated modeling plate solver to perform a shape synthesis process of a 3D geometry of a part according to boundary conditions, and wherein the method comprises: Segment specifications are provided, wherein each segment specification includes: information associated with points on contour lines extracted from the level set representation, the points being used to determine a corresponding segment; information about start and end neighbor points on boundary geometry that touch each end of the segment; an outside direction prediction defining a side of the contour line, the side being outside a shape defined according to the level set representation; an identification of the next segment found in the same contour ring; and an identity of a source contour ring that determines the corresponding segment.

13. The method of claim 6, wherein the fitting of the set of segments is performed based on the segment specification list, and wherein the fitting comprises: determining a set of options for fitting the set of segments in the list to one or more 2D primitives; determining a set of scoring measures corresponding to the set of options based on preset criteria, the preset criteria including fitting error for deviation from the obtained 2D curve, usability ranking based on the type of 2D primitives used to fit the corresponding set of segments, obstacle proximity, and self-intersection properties; as well as An option is selected from the set of options based on the determined set of scoring measures.

14. The method of claim 13, wherein the fitting of the set of segments comprises: iteratively determining whether to approximate a set of successive segments identified in the segment specification list with primitives of a type selected from the group consisting of a line, an arc, and a circle based on an evaluation of a predefined maximum error threshold measure corresponding to a type in the group of primitive types; as well as In response to determining that approximating the set of successive segments with each of the primitive types in the group is associated with an error above the predefined maximum error threshold measure for approximation, the set of successive segments is approximated to a four-control point B-spline.

15. The method of claim 1, wherein the predefined geometric shape comprises a boundary geometric shape, and wherein the transforming of the 2D curve and the predefined geometric shape comprises: Fitting the boundary geometry including the intersection geometry and the keep-out geometry to one or more 2D primitives, wherein the fitting comprises: approximating the intersection geometry by explicit approximation with lines or boxes, and The reserved region geometry is approximated by arbitrary fitting to primitives from the group consisting of lines, arcs and circles.

16. A system comprising: a non-transitory storage medium having instructions of a computer-aided design program stored thereon; as well as One or more data processing devices configured to execute the instructions of the computer-aided design program to perform operations comprising: Obtaining (i) a two-dimensional (2D) curve and (ii) a predefined geometric shape; Converting the 2D curve and the predefined geometry into a primitive sketch geometry by approximating a free area as segmented from the 2D curve to a set of 2D primitives so as to minimize the number of 2D primitives used in the primitive sketch geometry, wherein converting the 2D curve comprises processing a plurality of candidate segments determined based on segmenting the free region based on identified points on the 2D curve that satisfy a threshold of curve contact with a geometric shape among the predefined geometric shapes to determine a set of segments for the free region, and fitting the set of segments to the set of 2D primitives; and The primitive sketch geometry is provided based on user input for rendering, editing and / or simulation at a computer-aided design program to construct a 3D model of an object for use in manufacturing a physical structure of the object using one or more computer-controlled manufacturing systems.

17. The system of claim 16, wherein the obtained predefined geometry comprises a boundary geometry comprising an input reserved region geometry set, and wherein obtaining the 2D curve and the predefined geometry comprises obtaining a representation comprising a set of connected points describing the 2D curve.

18. The system of claim 17, wherein converting the 2D curve and the predefined geometry comprises assembling a fitted set of segments and at least a portion of the predefined geometry to obtain the primitive sketch geometry, wherein the converting of the 2D curve and the predefined geometry comprises: segmenting the representation into a fixed region and the free region, wherein the fixed region is defined for the boundary geometry, and wherein the free region is evaluated to determine the set of segments to fit to the set of 2D primitives; and obtaining a 2D primitive to which the fixed region is fitted, wherein said fitting of said set of segments determined based on the segmentation comprises A 2D primitive of a certain primitive type is selected to approximate a series of segments of the representation of the 2D curve by minimizing an error measure associated with the selected 2D primitive.

19. A non-transitory computer-readable medium encoding instructions operable to cause a data processing apparatus to perform operations comprising: Obtaining (i) a two-dimensional (2D) curve and (ii) a predefined geometric shape; Converting the 2D curve and the predefined geometry into a primitive sketch geometry by approximating a free area as segmented from the 2D curve to a set of 2D primitives so as to minimize the number of 2D primitives used in the primitive sketch geometry, wherein converting the 2D curve comprises processing a plurality of candidate segments determined based on segmenting the free region based on identified points on the 2D curve that satisfy a threshold of curve contact with a geometric shape among the predefined geometric shapes to determine a set of segments for the free region, and Fitting the set of segments to the set of 2D primitives; as well as The primitive sketch geometry is provided based on user input for rendering, editing and / or simulation at a computer-aided design program to construct a 3D model of an object for use in manufacturing a physical structure of the object using one or more computer-controlled manufacturing systems.

20. The non-transitory computer-readable medium of claim 19, wherein obtaining the 2D curve and the predefined geometric shape comprises obtaining a representation comprising a set of connected points describing the 2D curve, wherein the transformation of the 2D curve and the predefined geometric shape comprises: analyzing the connected point set by selecting a first area as a fixed area and selecting a second area identified as a free area, wherein the fixed area is to be replaced with an exact portion of a corresponding boundary geometry of the obtained predefined geometric shape, and wherein the free area is to be approximated using the set of 2D primitives including at least one of a line, an arc, and a circle; processing the free region to determine the plurality of candidate segments based on segmenting and evaluating relative proximity between the determined segments and the boundary geometry according to an inclusion criterion; determining the set of segments based on the plurality of candidate segments, wherein the determining comprises iteratively evaluating the plurality of candidate segments to perform at least one of: identifying one or more segments to be removed from the plurality of candidate segments, identifying additional segments to be added to the plurality of candidate segments, and / or identifying at least one segment to be collapsed into a single point; as well as Generates a segment specification for the determined set of segments.

Citation Information

Patent Citations

  • Conversion of geometry to boundary representation with facilitated editing for computer aided design and 2.5-axis subtractive manufacturing

    US20200151286A1