Segmentation of three-dimensional model of mechanical component

The hierarchical segmentation method efficiently segments discrete 3D models of mechanical parts by identifying simple geometric primitives, CAD features, and free-form surfaces, addressing inefficiencies in existing methods and improving accuracy.

JP2025013280APending Publication Date: 2025-01-24DASSAULT SYSTEMES SA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024111390
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-11
Filing Date
2024-07-11
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

Existing methods for segmenting discrete 3D models of mechanical parts are inefficient and inaccurate, particularly in identifying and separating simple geometric primitives, CAD features, and free-form surfaces, often requiring post-processing to recover lost CAD features.

Method used

A hierarchical segmentation method that includes three stages: identifying simple geometric primitives, CAD features, and free-form surfaces, using graph-based clustering and feature fitting techniques to ensure accurate and robust segmentation without the need for post-processing.

Benefits of technology

The method provides efficient and accurate segmentation of discrete 3D models, effectively identifying and separating different types of surfaces, reducing the number of unrelated elements and improving the overall segmentation efficiency by directly identifying simple primitives and CAD features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025013280000001_ABST
    Figure 2025013280000001_ABST
Patent Text Reader

Abstract

To provide a computer-implemented method that segments a discrete three-dimensional model.SOLUTION: A computer-implemented method of the present disclosure comprises steps of: obtaining a discrete three-dimensional model and applying a hierarchical segmentation to the discrete three-dimensional model. The hierarchical segmentation includes: a first segmentation that comprises identifying first segments among discrete three-dimensional model elements, each of the first segments corresponding to a primitive exhibiting at least one slippable motion; a second segmentation that comprises identifying second segments among unidentified elements of the discrete three-dimensional model, each of the second segments corresponding to a surface generated by a CAD feature; and a third segmentation that comprises identifying third segments among the unidentified elements of the discrete three-dimensional model, each of the third segments corresponding to a freeform surface of the discrete three-dimensional model.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to the field of computer programs and systems, and more particularly to methods, systems, and programs for segmenting discrete 3D models representing mechanical parts. [Background technology]

[0002] Several systems and programs are on the market for the design, engineering and manufacturing of objects. CAD is an acronym for Computer-Aided Design, e.g. for software solutions for designing objects. CAE is an acronym for Computer-Aided Engineering, e.g. for software solutions for simulating the physical behavior of future products. CAM is an acronym for Computer-Aided Manufacturing, e.g. for software solutions for defining manufacturing processes and operations. In the above computer-aided design systems, the graphical user interface plays a key role with regard to the efficiency of the technique. The techniques just mentioned may be embedded within Product Lifecycle Management (PLM) systems. PLM refers to a business strategy that helps companies to share product data, apply common processes and leverage enterprise knowledge for the development of a product from conception to the end of its useful life, across the concept of the extended enterprise. The PLM solutions offered by Dassault Systèmes (under the trademarks CATIA, ENOVIA, and DELMIA) provide an "Engineering Hub" that organizes product engineering knowledge, a "Manufacturing Hub" that manages manufacturing engineering knowledge, and an "Enterprise Hub" that enables enterprise integration and connectivity to both the Engineering Hub and the Manufacturing Hub. Together, the systems provide an open object model that connects products, processes, and resources to enable dynamic knowledge-based product creation and decision support that drives optimized product definition, manufacturing preparation, production, and service.

[0003] In these and other situations, processing CAD 3D models is of increasing general importance, and in particular, segmenting discrete 3D models, e.g. meshes or point clouds representing mechanical parts, is of particular importance.

[0004] European patent application EP21305195.6, filed on February 16, 2021, discloses a hierarchical segmentation of a 3D modeled object, comprising a first segmentation and a second segmentation. Each of the first segments obtained by the first segmentation corresponds to a simple geometric surface of the 3D modeled object. Each of the second segments obtained by the second segmentation corresponds to a freeform surface of the 3D modeled object.

[0005] Within the context of the just described, there remains a need for improved methods for segmenting discrete 3D models representing mechanical parts. Summary of the Invention

[0006] Therefore, a computer-implemented method for segmenting a discrete 3D model representing a mechanical part is provided. The method includes obtaining a discrete 3D model and applying a hierarchical segmentation to the discrete 3D model. The hierarchical segmentation includes a first segmentation including identifying first segments among elements of the discrete 3D model. Each of the first segments corresponds to a primitive exhibiting at least one slippable motion. The hierarchical segmentation then includes a second segmentation including identifying second segments among unidentified elements of the discrete 3D model. Each of the second segments corresponds to a surface generated by a CAD feature. The hierarchical segmentation then includes a third segmentation including identifying third segments among unidentified elements of the discrete 3D model. Each of the third segments corresponds to a freeform surface of the discrete 3D model.

[0007] The method may include one or more of the following.

[0008] The method includes obtaining a predetermined set of CAD features, and in a second segmentation, the identifying step includes searching for and merging neighboring unidentified elements of the discrete 3D model according to an order of increasing distance based on one or more respective feature distances that quantify a geometric similarity between pairs of geometric surface portions of the CAD features; discarding each surface represented by a cluster of elements resulting from the merging, each fitting of the CAD feature to the surface resulting in a fitting error greater than a predefined fitting threshold; - the second segmentation further comprises discarding each fitted CAD feature having a size smaller than a predefined size threshold; The method further comprises iteratively aggregating neighboring pairs of non-discarded clusters of elements, and at each iteration, the method comprises optimizing a fitting error, the optimization being of the following type:

[0009]

number

[0010] where N1 and N2 represent two neighboring surfaces, and score(f) measures the similarity between feature f and the union N1∪N2 of N1 and N2. - one or more feature distances penalize the discrepancy in mean curvature between the surfaces and / or penalize the irregularities of the merged surfaces, - A feature distance is of the following type:

[0011]

number

[0012] where N1 and N2 represent neighboring surfaces,

[0013]

number

[0014] is N j represents the average maximum curvature, where

[0015]

number

[0016] where P N represents the perimeter of N, and A N represents the area of ​​N,

[0017]

number

[0018] teeth,

[0019]

number

[0020] represents clamping to N i is N i Let,α,denote a hyper-parameter that defines the reduced influence for small surfaces, and,ε,be a parameter,. the method further comprises rescaling one or more segments resulting from the third segmentation and applying a hierarchical segmentation to the rescaled one or more segments respectively, The hierarchical segmentation is based on one or more tolerance thresholds, each of which is a function of: o A level of inaccuracy of a discrete 3D model, where the tolerance threshold increases as the level of inaccuracy increases; the discretization level (number of triangles or density of points) of a discrete 3D model, where the tolerance threshold increases as the discretization level decreases, and / or ○ Diameter of discrete 3D models, the tolerance threshold increases as the diameter increases, - the method stops the second segmentation when a minimum of the one or more respective feature distances is higher than at least one of the one or more tolerance thresholds; - the first segmentation further includes following a decreasing order of surface size for each surface resulting from the merging; - Fitting canonical primitives to surfaces; Calculating the fitting error; if the fitting error is lower than a predefined fitting threshold, aggregating into the surface neighboring surfaces whose fitting error is sufficiently lower than the predefined fitting threshold, and optionally the first segmentation further comprises filtering the fitted canonical primitives by discarding each primitive that fits into a local canonical region of the freeform surface, and further optionally the first segmentation further comprises discarding fitted primitives having a size smaller than another predefined size threshold, - in the second segmentation, the searching and merging are based on the constraint that surfaces connected by boundaries corresponding to known geometrical extent determinations between the parts of the discrete 3D model cannot be merged, and / or - Discrete 3D models are derived from physical measurements of machine parts.

[0021] Further provided is an algorithm configured to run on a computer for segmenting a discrete 3D model representing a mechanical part. The algorithm includes the steps of obtaining a discrete 3D model and applying a hierarchical segmentation to the discrete 3D model. The hierarchical segmentation includes a first segmentation, then a second segmentation, and then a third segmentation. The first segmentation includes identifying first segments among the elements of the discrete 3D model, each corresponding to a primitive exhibiting at least one slippable movement. The second segmentation includes identifying second segments among the unidentified elements of the discrete 3D model, each corresponding to a surface generated by a CAD feature. The third segmentation includes identifying third segments among the unidentified elements of the discrete 3D model, each corresponding to a freeform surface of the discrete 3D model.

[0022] Further provided is an algorithm configured to execute and / or be implemented in a computer for segmenting a discrete 3D model representing a mechanical part. The algorithm includes means for obtaining a discrete 3D model and means for applying a hierarchical segmentation to the discrete 3D model. The hierarchical segmentation includes a first segmentation, then a second segmentation, and then a third segmentation. The first segmentation includes identifying first segments among elements of the discrete 3D model, each corresponding to a primitive exhibiting at least one slippable movement. The second segmentation includes identifying second segments among unidentified elements of the discrete 3D model, each corresponding to a surface generated by a CAD feature. The third segmentation includes identifying third segments among unidentified elements of the discrete 3D model, each corresponding to a freeform surface of the discrete 3D model.

[0023] Further provided is a computer program comprising instructions for carrying out the method.

[0024] Further provided is a computer readable recording medium having a computer program recorded thereon.

[0025] A system is further provided that includes a processor coupled to a memory, the memory storing a computer program. [Brief description of the drawings]

[0026] [Figure 1] An example of the method is given below. [Diagram 2] An example of the method is given below. [Diagram 3] An example of the method is given below. [Figure 4A] An example of the method is given below. [Figure 4B] An example of the method is given below. [Figure 5A] An example of the method is given below. [Figure 5B] An example of the method is given below. [Figure 6A] An example of the method is given below. [Figure 6B] An example of the method is given below. [Figure 7] An example of the method is given below. [Figure 8A] An example of the method is given below. [Figure 8B] An example of the method is given below. [Figure 9] An example of a system is shown. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0027] A computer-implemented method for segmenting a 3D model is proposed. The discrete 3D model represents a mechanical part. The method includes obtaining a discrete 3D model and applying a hierarchical segmentation to the discrete 3D model. The hierarchical segmentation includes a first segmentation, then a second segmentation, and then a third segmentation. The first segmentation includes identifying first segments among elements of the discrete 3D model. Each of the identified first segments corresponds to a primitive exhibiting at least one slippable motion. The second segmentation includes identifying second segments among unidentified elements of the discrete 3D model (i.e., among unidentified elements in the first segmentation). Each of the identified second segments corresponds to a surface generated by a CAD feature. The third segmentation includes identifying third segments among the unidentified elements of the discrete 3D model (i.e., among the unidentified elements in the first segmentation and the second segmentation), each of the identified third segments corresponding to a freeform surface of the discrete 3D model.

[0028] What has just been described is an improved method for segmenting discrete 3D model objects, i.e. discrete 3D models representing mechanical parts.

[0029] In particular, the method segments the 3D model by identifying segments corresponding to simple geometric surfaces (i.e., the first segment), segments corresponding to surfaces generated by CAD features (i.e., the second segment), and segments corresponding to freeform surfaces (i.e., the third segment), i.e., providing a set of segments each corresponding to a portion of the 3D model. In this way, the method provides a robust and accurate segmentation of a discrete 3D model. In fact, the method does not just identify segments corresponding to simple geometric surfaces, but also identifies segments corresponding to surfaces generated by CAD features and freeform surfaces, which may be segments that are complex to identify (i.e., fitting geometric primitives or features to the segments may be complex). Hence, the overall segmentation (i.e., the resulting set of first and second segments) is particularly accurate.

[0030] Moreover, the method provides a multi-stage hierarchical segmentation that improves the efficiency and robustness of the segmentation. Indeed, the method first performs a first segmentation that identifies segments that correspond to simple geometric primitives. Thereby, the method effectively relies on the consideration that initially, simple geometric primitives may be efficiently identified in the discrete 3D model (i.e., the 3D modeled object), and thus the method identifies them through the first segmentation. Thus, at the end of the first segmentation, the method already produces a partial segmentation of the 3D modeled object, and segments that correspond to simple geometric surfaces have already been identified. This allows identifying segments that correspond to CAD features and freeform surfaces, the method does through second and third segmentations. The discrete 3D model includes at least one surface generated by a CAD feature (e.g., extrusion). The method then applies a second segmentation to the remaining unsegmented portion to identify second segments, each corresponding to a surface generated by a CAD feature. Such surfaces are more complex than the primitives identified in the first segmentation. In other words, the method starts with the least complex segments, followed by segments corresponding to CAD features, until it reaches a segment corresponding to a freeform surface, which is the most complex to identify due to the shape of that freeform surface, but the method identifies these segments in only a portion of the 3D modeled object, since the remainder of the 3D modeled object is composed of the already identified first and second segments. Hence, the multi-segmentation approach provides efficiency and robustness.

[0031] The method is for segmenting a discrete 3D model representing a mechanical part. Hence the method is a method of 3D segmentation. As explained above, given a discrete 3D model (e.g. a mesh), 3D segmentation generally consists in dividing / splitting the surfaces of the 3D model into a number of connected clusters called segments, where each segment maximizes its internal coherence while minimizing its similarity with respect to other segments, and the clusters / segments are the result of the segmentation and will be called "segmentations".

[0032] Compared to existing solutions in the prior art (e.g. the already cited European patent application EP 21305195.6), the present method constitutes a particularly improved solution by performing a second segmentation of the surfaces corresponding to the CAD features. In other words, the method separates the segmentation of such surfaces generated by the CAD features from the general free-form surfaces. The surfaces identified in the second segmentation may constitute a significant part of the segmentation. In other words, for parts that contain only small surfaces generated by CAD features, or a significant amount of them, the second segmentation allows to keep them separated, whereas the third segmentation step would have merged some of them together to form the free-form surface. In a complete CAD reconstruction pipeline, it is usually important to accurately segment the surfaces corresponding to the CAD features. On the other hand, the second segmentation (i.e. identifying the second segments, each corresponding to a surface generated by a CAD feature) allows to recover (i.e. identify) the CAD features that would be lost during the third segmentation step (if the second step is not performed). For example, it helps to reduce the number and / or size (e.g., area of ​​the mesh) of freeform segments. Because the method performs a hierarchical segmentation where segmentations are performed in sequence and each (first, second, and third) segmentation identifies a respective segment among unidentified elements of the discrete 3D model in the previous segmentation, the separation of the second segmentation from the third segmentation significantly reduces the number of unidentified elements remaining in the third segmentation. This improves the efficiency of the hierarchical segmentation of the method by reducing freeform segmentations as much as possible. Furthermore, the method directly identifies simple primitives and CAD features and does not require a post-processing step of CAD feature identification after segmentation.

[0033] The method implements this general segmentation framework. In particular, the method takes as input a discrete 3D model object provided / obtained by the method, and outputs a set of segments. The set of segments may be referred to as a "segmentation output / produced by the method" (i.e. of the discrete 3D model), or simply a "segmentation". In the case of the method, the set of segments consists of a first segment identified by the first segmentation, a second segment identified by the second segmentation, and a third segment identified by the third segmentation. Optionally, the set of segments may undergo post-processing before being output by the method as an output segmentation. Although implementing a general segmentation framework, the method is clear in that the overall segmentation performed by the method, which is a hierarchical segmentation, includes a first segmentation, a second segmentation, and a third segmentation. In other words, the set of segments output by the method is identified by a multi-stage hierarchical segmentation, as described above, i.e., three segmentations performed in a specific order (i.e., the first before the second, the second before the third, etc.).

[0034] Each segment identified by the method, whether a first segment, a second segment, or a third segment, is a portion of the discrete 3D model that constitutes a surface that forms a geometrically coherent portion of the shape of the discrete 3D model. Each segment identified by the method tends to maximize its internal consistency while minimizing similarity to other segments, while having clear boundaries relative to other segments. For example, each segment may form an underlying surface of the discrete 3D model that can be represented (e.g., fitted and / or parameterized) by a single CAD feature (e.g., a CATIA feature).

[0035] Each segment may form a geometrically coherent surface from the point of view of manufacturing the machine part. In other words, a machine part may be partitioned in the real world into parts, each part having a respective geometry requiring or adapted to a respective manufacturing process (e.g., molding, additive manufacturing or machining), and each part being represented in the segmentation output by the method by one or more segments. In yet another way, the set of segments output by the method may be in subsets, each of which is one or more segments, and for each subset, one or more segments of the subset represent, as a whole, a surface shape (i.e., material layout) of a part of the machine part that is coherent from the point of view of manufacturing, i.e. requiring or adapted to a particular manufacturing process (e.g., which may be selected among a plurality of suitable manufacturing processes). For example, one or more such subsets may represent respective parts of a machine part to be manufactured by machining and each having a shape (i.e., geometry) adapted to be a path of a machining tool. Additionally or alternatively, the one or more other subsets may each represent a respective portion of a machine part to be manufactured by molding and each having a shape (i.e., geometry) corresponding to the shape (i.e., geometry) of a coherent portion of the mold. The mold may itself be manufactured by machining, and each such portion may be given a shape (i.e., geometry) adapted to be a path of a machining tool. Additionally or alternatively, the one or more other subsets may each represent a respective portion of a machine part to be manufactured by additively manufacturing and each having a shape (i.e., geometry) corresponding to the shape (i.e., geometry) of a final outer layer formed by an additive manufacturing process. Thus, the method allows for identifying portions of a machine part that are coherent with respect to manufacturing.

[0036] In an example, the discrete 3D model is derived from physical measurements of the mechanical part. In the above example, the method may obtain the discrete 3D model via a 3D scanning process. In other words, the method may include performing a scanning process on a real-world sample of the mechanical product before obtaining the discrete 3D model. The 3D scanning process may form or be part of a 3D reconstruction process. The 3D reconstruction process may include providing a mechanical part, providing one or more physical sensors, each configured to obtain a respective physical signal, and obtaining the one or more respective physical signals by operating the one or more physical sensors on the mechanical part (i.e., scanning the mechanical part with each sensor). The scanning process may output a point cloud or a mesh representing said mechanical part. The method may convert the point cloud into a mesh. In the above example, the method may form or be part of a process for obtaining a CAD model of a physical object via a scanning process. In the above application, the method may further include, after segmentation, detecting a volume (or a portion of a volume) corresponding to the segment. The mould may be particularly relevant for producing replicas from measured prototypes or for preparing mass production stages. The above application is particularly relevant for reverse engineering, where a sample of a physical object is used but without access to the details of the manufacture of said object. For example, the method may be used to produce mock-ups of already existing manufactured products.

[0037] The method will be further described shortly.

[0038] Obtaining (i.e., providing) the discrete 3D model may include, for example, retrieving said 3D model from a (e.g., remote) database or memory in which said discrete 3D model was further stored (e.g., via a reconstruction process as described above) after its creation or acquisition or retrieval. For example, retrieving may include accessing a database or memory and downloading the discrete 3D model. Alternatively, obtaining the discrete 3D model may include taking physical measurements on the mechanical part and determining the discrete 3D model from the physical measurements, for example, via a 3D reconstruction process. Providing the discrete 3D model may alternatively include creating said 3D model, for example, by sketching, for example, by a user.

[0039] In addition to obtaining the discrete 3D model, the method includes performing a hierarchical segmentation of the discrete 3D model. The hierarchical segmentation includes three segmentations: a first segmentation, a second segmentation, and a third segmentation. The first segmentation takes as input the provided discrete 3D model and outputs a partial segmentation thereof, i.e., a first segment. The second segmentation takes as input a portion of the discrete 3D model that has not yet been segmented as a result of the first segmentation, i.e., the provided discrete 3D model without the set of first segments, and outputs a segmentation thereof, i.e., a second segment. The third segmentation takes as input the provided discrete 3D model without the parts of the discrete 3D model that have not yet been segmented as a result of the first segmentation and the second segmentation, i.e. the union of the first set of segments and the second set of segments, and outputs its segmentation, i.e. the third segments. The union of the first set of segments, the second set of segments and the third set of segments forms a set of segments that is a result of the hierarchical segmentation. The set of segments forms a segmentation of the provided discrete 3D model.

[0040] The first segmentation includes identifying first segments among the surfaces of the discrete 3D model, each of which corresponds to a simple geometric surface of the discrete 3D model. In other words, the first segmentation finds among the surfaces of the discrete 3D model that form a simple geometric surface and identifies them as first segments. A simple geometric surface is a primitive that exhibits at least one slippable motion. A slippable motion is a linear combination of translation and rotation. In other words, a simple geometric surface is a primitive that is invariant by at least one linear combination of translation or rotation and may be fitted by a canonical surface (e.g., a plane, a cylinder, a cone, a sphere, or a torus). The concept of slippable motion is known from the reference Gelfand N. and Guibas LJ, Shape Segmentation Using Local Slippage Analysis, Eurographics Symposium on Geometry Processing, 2004, which is incorporated herein by reference. In particular, the contents of section 2 of the just-mentioned document, which provides a definition and a method for calculating slippable motion, are incorporated herein by reference. The first segmentation may identify a first segment using any method for identifying a surface in the discrete 3D model that is a simple geometric surface.

[0041] In an example, identifying the first segment includes exploring and merging neighboring surfaces of the discrete 3D model. By exploring and merging, it is meant that the first segmentation iteratively visits neighboring surfaces of the discrete 3D model and merges them as long as their merging can form or contribute to the formation of the first segment. Each surface is an outer part of the discrete 3D model. Any surface can be the result of two surfaces being merged in the past. Immediately, the discrete 3D model can be a 3D mesh. In such a case, the surface is a mesh face (e.g., a triangle if the mesh is a triangular mesh), or a union of mesh faces resulting from a previous merge or iteratively resulting from a previous merge. In such a case, exploring and merging may use the mesh structure to iteratively visit neighboring mesh faces, or unions thereof, and merge them when appropriate. Alternatively, the discrete 3D model can be a 3D point cloud, in which case the surface is a surface defined by the points of the point cloud. In such cases, the searching and merging may use the point cloud structure by searching and clustering nearby point cloud points, and directly search and merge nearby surfaces defined by the point cloud points. In such cases, at the start of the searching and merging, the points may be considered as a surface for the purposes of performing the searching and merging.

[0042] The searching and merging follow an increasing distance order based on one or more first distances. In other words, the searching and merging are based on data including, for each first distance, a value of each first distance between neighboring surface portions, where the surface portion is part of the surface. The data may be updated along the searching and merging as the surfaces are iteratively merged to form new neighboring surfaces with new first distance values. The searching and merging follow an increasing distance order based on one or more first distances, i.e., the searching and merging tend to search for first neighboring surfaces that are close according to one or more first distances. Now, each first distance quantifies the shape similarity between the simple geometric surface portions, i.e., between neighboring simple geometric surface portions, since the method uses the first distance between neighboring portions (such that the neighboring surfaces are to be merged). Thereby, each first distance quantifies whether the neighboring surfaces contain neighboring portions that form part of one simple geometric surface as a whole (i.e., when merged), during searching and merging, and if so, they tend to be merged. Any of the above first distances can be used.

[0043] In an example, the method may include obtaining a predetermined set of CAD features. Then, in the second segmentation, the identification includes searching and merging neighboring unidentified elements of the discrete 3D model according to a sequence. The aforementioned sequence is an order of increasing distance based on one or more respective feature distances. What has just been said is that the second searching and merging follows an order of increasing distance based on one or more respective feature distances, i.e., the searching and merging tends to search for first neighboring surfaces that are close according to one or more feature distances. The one or more respective feature distances quantify the shape similarity between pairs of geometric surface parts of the CAD features. By "shape similarity" it is meant that each feature distance quantifies the extent to which the neighboring parts, if merged, form a geometrically consistent simple geometric surface or part thereof, e.g. with relatively constant curvature and / or normal. Furthermore, the second segmentation discards each surface represented by a cluster of elements resulting from the merging. For each of the discarded surfaces, each fitting of a CAD feature to said surface results in a fitting error greater than a predefined fitting threshold.

[0044] The first segmentation may further include filtering the canonical primitives that are fitted. By "discarding" the fitted primitives, we mean that the surfaces corresponding to the fitted primitives are not added to the first segment. What has just been said improves the robustness of the method. In fact, the searching, merging, fitting and aggregating may result in cases of too many primitives that prevent the method from outputting a satisfactory segmentation. There are some CAD feature surfaces that contain many local regions that could be fitted by canonical primitives, but they should not be fitted because they are not simple geometric surfaces / primitives. The filtering discards the local regions if they are fitted. The discarded surfaces are the unidentified surfaces, whereas the non-discarded surfaces are the identified surfaces.

[0045] The second segmentation may further include discarding each fitted CAD feature having a size smaller than a predefined size threshold. By "discarding" a fitted CAD feature, it is meant that the surface corresponding to the fitted CAD feature is not added to the second segment. The size of the fitted CAD feature indicates the characteristic size of the corresponding surface, for example, the surface area or diameter for the surface. Discarding small features allows for accurate identification or discarding of surfaces that were not correctly merged / clustered by searching and merging, further improving the robustness of the method.

[0046] The method may further comprise iteratively aggregating neighboring pairs of non-discarded clusters of elements. For such aggregation, the method iteratively searches for elements (faces in case of a 3D mesh, vertices in case of a 3D point cloud) of the graph of the provided 3D model that are neighbors of elements belonging to the fitted CAD feature. In such an example, at each iteration, the method comprises optimizing a fitting error, the optimization being of the following type:

[0047]

number

[0048] where N1 and N2 represent two neighboring surfaces, and score(f) measures the similarity between feature f and the union N1∪N2 of N1 and N2. The minimization is solved among candidate feature f fitted to the union N1∪N2. The score function represents the fitting error of feature f to the faces in the union N1∪N2. The score function just mentioned can be different for each type of feature, and different explicit forms can be used for features of a single type. For example, the method may use a difference score function for extrusion, revolve, and fillet. For example, for extrusion, the score function can be of the following type: score(f) = min{J S (u)|u∈R 3 ,|u|=1}

[0049]

number

[0050] where n p is the normal to the extrusion surface S, and A S are the respective surface areas.

[0051] In an example, one or more second distances are in a feature distance that penalizes the inconsistency of the mean curvature between the surfaces and / or penalizes the irregularity of the merged surfaces; in other words, a feature distance may include a first term that penalizes the inconsistency of the mean curvature between the surfaces and / or a second term that penalizes the irregularity of the merged surfaces. Alternatively, the second term may promote the smoothness of the boundary between the neighboring surfaces. The distance may be, for example, a multiplication of two terms. A feature distance may be of the following type:

[0052]

number

[0053] where N1 and N2 represent neighboring surfaces,

[0054]

number

[0055] is N j represents the average maximum curvature of

[0056]

number

[0057] where P N represents the perimeter of N, and A N represents the area of ​​N,

[0058]

number

[0059] teeth,

[0060]

number

[0061] represents clamping to N i is N i Let,α,denote a hyper-parameter that defines the reduced influence for small surfaces, and,ε,be,parameter.

[0062] The method may further include rescaling one or more segments resulting from the third segmentation and applying hierarchical segmentation to the rescaled one or more segments, respectively. The rescaling may include performing the method with a modified tolerance threshold.

[0063] The hierarchical segmentation may be based on one or more tolerance thresholds. Each tolerance threshold may be a function of the inaccuracy level (e.g., sag or noise) of the discrete 3D model. Such tolerance thresholds may increase as the level of inaccuracy increases. Alternatively or additionally, each tolerance threshold may be a function of the discretization level (e.g., the number of triangles of a mesh or the point density of a point cloud) of the discrete 3D model. Such tolerance thresholds may increase as the discretization level decreases. Further, alternatively or additionally, each tolerance threshold may be a function of the diameter of the discrete 3D model. Such tolerance thresholds may increase as the diameter increases. Each of the above tolerance thresholds may be a linear function of the noise level.

[0064] The method may stop the second segmentation when a minimum of the one or more respective feature distances is higher than at least one of the one or more tolerance thresholds.

[0065] In addition to the first and second segmentations, the implementation of the hierarchical segmentation then includes a third segmentation. The third segmentation includes identifying third segments among the unidentified surfaces of the discrete 3D model, each of which corresponds to a free-form surface of the model. A free-form surface is any surface that is not a simple geometric surface. Thus, a free-form surface cannot be fitted or parameterized by simple primitives or surfaces generated by CAD features (e.g., using any CAD feature of a predetermined set), but may still be parameterized using an appropriate tool (e.g., NURBS). The identification of the third segment may include searching and merging neighboring unidentified surfaces of the discrete 3D model. What has just been said is distinguished from the first and second segmentations by calling it "third search and merge" to refer to the search and merge of the third segmentation. Searching and merging means that the second segmentation iteratively visits neighboring unidentified surfaces of the 3D model and merges them as long as their merging can form or contribute to the formation of a third segment. As explained above, each surface may be an outer part of the 3D model and may be the result of a previous merging of two surfaces. As explained above, the 3D model may be a 3D mesh, in which case the surface is a mesh face (e.g., a triangle if the mesh is a triangular mesh), or a union of mesh faces resulting from a previous merging or iteratively resulting from a previous merging. In such a case, the second searching and merging may use the mesh structure to iteratively visit neighboring mesh faces, or unions thereof, and merge them when appropriate. As explained above, alternatively, the 3D model may be a 3D point cloud, in which case the surface is a surface defined by the points of the point cloud.In such a case, the second searching and merging may use the point cloud structure by searching and clustering nearby point cloud points, and directly search and merge nearby surfaces defined by the point cloud points. In such a case, at the start of the second searching and merging, the points may be considered as surfaces. Prior to the second searching and merging, the method may include marking the first segment as identified so that it will not be searched by the second searching and merging.

[0066] The third search and merge follows an increasing distance order based on one or more second distances. In other words, the third search and merge is based on data including, for each second distance, a value of each second distance between neighboring surface portions, where the surface portion is part of the surface. The data may be updated along the third search and merge as the surfaces are iteratively merged to form new neighboring surfaces with new second distance values. The third search and merge follows an increasing distance order based on one or more second distances, i.e., the search and merge tends to search for first neighboring surfaces that are close according to one or more second distances. Now, each second distance quantifies the shape similarity between the free-form surface portions, i.e. between neighboring free-form surface portions, since the method uses the distance between neighboring portions (where the neighboring surfaces are to be merged). Thereby, each second distance quantifies, during the third search and merge, whether the neighboring surfaces include neighboring portions that form a geometrically coherent portion of the free-form surface, and if so, they tend to be merged. In other words, by "shape similarity" it is meant that in the case of the second distance, the second distance quantifies the extent to which neighboring portions, if merged, would form a geometrically coherent free-form geometric surface or portion thereof. Any of the above second distances can be used.

[0067] The first segmentation may further include (further after searching and merging) following an order of decreasing surface size (e.g., surface area) for each surface resulting from the merging (i.e., the surfaces of the mesh as output by the merging); - fitting canonical primitives to a surface, a canonical primitive being a primitive that exhibits at least one slippable motion, the notion of slippable motion being defined and described above; - calculating the fitting error; if the fitting error is less than a predefined fitting threshold, aggregating into the surface neighboring surfaces whose fitting error is also less than a predefined fitting threshold; - Discard the surface if the fitting error is larger than a predefined threshold.

[0068] What has just been said allows for accurately identifying or discarding surfaces that were not correctly merged / clustered by search and merge S200, further improving the robustness of the method.

[0069] By "in order of decreasing size" it is meant that the method searches for surfaces resulting from merging in order of decreasing size (e.g. area) and performs fitting and possibly aggregation on these surfaces in this order. The search may be limited to surfaces with sufficient size (e.g. area), e.g. surfaces larger than a predefined threshold. What has just been said allows for efficient aggregation of small merged / clustered surfaces / regions corresponding to larger geometric primitives before attempting fitting.

[0070] Fitting may include, given the surface resulting from merging, corresponding to the clustered nodes in the case of the implementation described above, attempting to fit one or more canonical primitives, for example selected from a set of regular canonical geometric primitives, to the surface using known primitive fitting techniques, such as quartic fitting or BFGS optimization, or any of the primitive fitting techniques described in reference A, Kaiser, A survey of Simple Geometric Primitives Detection Methods for Captured 3D data, Computer Graphics Forum 38(4), 2018, or reference T, Birdal et. al., Generic Primitive Detection in Point Clouds Using Novel Minimal Quadric Fits, IEEE Transactions on Pattern Analysis and Machine Intelligence, 2019, both of which are incorporated herein by reference. The method then calculates a fitting error for each primitive tried, and the primitive with the smallest fitting error is selected to be fitted to the surface. The set of regular canonical geometric primitives may include a plane, a cylinder, a cone, and a sphere.

[0071] If the fitting error of the just mentioned primitive is lower than a predefined fitting threshold, e.g., if a given percentage of the surface's elements (e.g., mesh elements if the discrete 3D model is a 3D mesh, or point cloud points if the discrete 3D model is a 3D point cloud) are closer to the primitive in distance (e.g., Euclidean distance) than a threshold, then the surface, or in the case of the aforementioned implementation, the corresponding clustered nodes, are considered to correspond to the fitted primitive. If this is the case, then the method aggregates S220 neighboring surfaces into the surface whose fitting error is also lower than the predefined fitting threshold. In other words, the aggregation involves iteratively searching for neighboring surfaces of the surface and aggregating / merging them into the surface as long as their distance to the primitive is lower than a given threshold. In the embodiment described above, the aggregation S220 may perform any well-known sequential neighborhood aggregation technique that iteratively searches for elements of the graph of the provided discrete 3D model (faces in case of a 3D mesh, or vertices in case of a 3D point cloud) that are neighbors of elements belonging to the fitted geometric primitive, and adds them to the set of primitive elements if their distance to the primitive is also less than a given threshold, for example using a region-growing based approach. What has just been described allows to accurately classify all elements belonging to each geometric primitive, even if they were not correctly clustered due to, for example, boundary curvature calculation problems.

[0072] In the second segmentation, the searching and merging may be based on the constraint that surfaces connected by boundaries that correspond to known geometric extent determinations between parts of the 3D modeled object cannot be merged.

[0073] As is widely known in the field of manufacturing CAD, the segmentation, such as the segmentation output by the method, may be used in various applications or processes that require or demand segmentation at some step. Manufacturing CAD refers to a software solution that supports the design and manufacturing process, where the objective is to manufacture a physical product that corresponds to the designed CAD 3D model. "Designing a manufacturing product / machine part / mechanical product" refers to any operation or series of operations that is at least part of a process that details a modeled object (2D or 3D) of a manufacturing product / machine part / mechanical product. A method may form a process or form at least part of a process. In this context, the CAD model represents a manufacturing product (which is a mechanical part) that may be manufactured downstream of the design (e.g. by a design process that includes the method). Thus, the method may be included in a manufacturing CAD process, including a design process (i.e. of the mechanical part represented by the CAD 3D model) and / or a manufacturing process (i.e. of the mechanical part upon completion of the design by editing the CAD 3D model).

[0074] The segmentation of the discrete 3D modeled object by the method provides an improved representation of the outer surface of the 3D modeled object and may be used in many applications. Furthermore, the segments may be parameterized and editable in CAD tools, further allowing the segments to be manipulated (e.g., edited) and may be used in many applications. By "parameterized" it is meant that each segment is precisely fitted to a three-dimensional geometric object represented by a parametric equation or function, thus including one or more parameters, which may each take on values ​​in a respective continuous range. The 3D parameterized geometric object allows for easy manipulation and / or editability and / or efficient storage in memory, as opposed to non-parameterized 3D geometric objects, such as discrete representations (e.g., point clouds, meshes, voxel representations). The method is generally used to segment measured discrete 3D modeled objects and process them into editable data structures.

[0075] The method may for example form or be part of a step of CAD feature acquisition in the design process, a step of feature tree construction, i.e. a step of constructing a tree of CAD features underlying the CAD model. The concept of feature tree is well known in manufacturing CAD. The method thus generally operates on modeled objects, for example finite CAD models output by the method. A modeled object is any object defined by data, for example stored in a database. By extension, the expression "modeled object" designates the data itself. Depending on the type of system, a modeled object may be defined by different kinds of data. In fact, a system may be any combination of a CAD system, a CAE system, a CAM system, a PDM system, and / or a PLM system. In the different systems, a modeled object is defined by corresponding data. Thus, one may speak of CAD objects, PLM objects, PDM objects, CAE objects, CAM objects, CAD data, PLM data, PDM data, CAM data, CAE data. However, a system does not exclude one of the others, since a modeled object may be defined by corresponding data in any combination of systems. Thus, the system may be a CAD system, a CAE system, a PLM system, and / or a CAM system, as provided below, as is clear from the definitions.

[0076] By CAD solution (e.g. CAD system or CAD software) is further meant any system, software or hardware adapted to at least design a modeled object, based on a graphical representation of the modeled object and / or its structural representation (e.g. feature tree), such as for example CATIA. In this case, the data defining the modeled object comprises data enabling the representation of the modeled object. A CAD system may for example provide a representation of a CAD modeled object using edges or lines, possibly faces or surfaces. The lines, edges or surfaces may be represented in various ways, for example NURBS (non-uniform rational B-spline). In particular, a CAD file contains the specifications, enabling a geometry to be generated and then a representation to be generated. The specifications of the modeled object may be stored in a single CAD file or in multiple files. Typical sizes of files representing modeled objects based on a CAD system are in the range of one megabyte per part. And the modeled object may usually be an assembly of thousands of parts.

[0077] In the context of CAD, a modeled object may be a 2D or 3D modeled object that typically represents, for example, a product, such as a part or an assembly of parts or possibly an assembly of a product. The 2D or 3D modeled object may be a manufactured product, i.e. a product that is to be manufactured. By "3D modeled object" is meant any object that has been modeled by data that allows a 3D representation. The 3D representation allows a view of the part from all corners. For example, a 3D modeled object, once represented in 3D, may be manipulated and rotated around any axis of the object or around any axis of the screen on which the representation is displayed. In particular, we exclude 2D icons that are not 3D models. The display of 3D representations expedites design (i.e. increases the speed with which designers statistically accomplish a task). What has just been said speeds up the manufacturing process in industry, since the design of the product is part of the manufacturing process.

[0078] The 2D or 3D modeled object may represent, for example, the geometry of a (e.g., mechanical) part or assembly of parts (or equivalently, an assembly of parts, such that the assembly of parts may be viewed as a part itself from the perspective of the method, or such that the method may be applied independently to each part of the assembly), or more generally, any assembly of rigid bodies (e.g., moving mechanisms), such as a product to be manufactured in the real world following completion of a virtual design by, for example, a CAD / CAE software solution or CAD / CAE system. CAD / CAE software solutions enable the design of products in various and limitless industrial sectors, including aerospace, architecture, construction, consumer goods, high tech devices, industrial equipment, transportation, marine, and / or offshore oil / gas production or transportation. Thus, the 3D models designed by the present method may represent any mechanical part, for example, industrial products which may include parts of ground vehicles (including, for example, automobiles and light truck equipment, racing cars, motorcycles, trucks and motor equipment, trucks and buses, trains), parts of air vehicles (including, for example, airframe equipment, aerospace equipment, propulsion equipment, defense products, aviation equipment, space equipment), parts of naval vessel parts (including, for example, naval equipment, merchant marine, offshore equipment, yachts and workboats, marine equipment), general mechanical parts (including, for example, industrial manufacturing machinery, heavy vehicle machinery or equipment, installed equipment, industrial equipment products, fabricated metal products, tire manufacturing products), electric machinery or electronic parts (including, for example, consumer electronics products, security and / or control and / or instrumentation products, computer and communication equipment, semiconductors, medical equipment and devices), consumer goods (including, for example, furniture, home and garden products, leisure products, fashion products, hard goods retailer products, soft goods retailer products), packaging (including, for example, food and beverage and tobacco, beauty and personal care, household product packaging).

[0079] CAD systems can be history-based. In this case, the modeled object is further defined by data including the history of geometric features. In practice, the modeled object may be designed by a physical person (i.e., designer / user) using standard modeling functions (e.g., extrude, revolute, cut, and / or round) and / or standard surfacing functions (e.g., sweep, blend, loft, fill, deform, and / or smooth). Many CAD systems that support the above modeling functions are history-based systems. What has just been said means that the creation history of design features is preserved, usually through acyclic data flows that link the aforementioned geometric features together through input and output links. The theoretical framework of history-based modeling has been well known since the beginning of the 80s. The modeled object is described by two persistent data representations: the history and the B-rep (i.e., boundary representation). The B-rep is the result of the calculations defined in the history. The shape of a part that appears on a computer screen when a modeled object is rendered is a B-rep (i.e., a tessellation of B-reps). The history of a part is the design intent. Essentially, the history collects information about the operations that a modeled object has undergone. B-reps are sometimes saved along with the history to make it easier to view complex parts. History is sometimes saved along with the B-reps to allow design changes to the part to conform to the design intent.

[0080] Moreover, by PLM system we mean any system adapted for the management of modeled objects that represent physically manufactured products (or products to be manufactured). In a PLM system, the modeled objects are therefore defined by data suitable for the manufacture of physical objects. What is mentioned can usually be dimensional and / or tolerance values. In fact, it is better to have the above values ​​for the object to be manufactured correctly.

[0081] By CAE solution is meant any solution, software as well as hardware, adapted to analyze the physical behavior of a modeled object. A well-known and widely used CAE is the Finite Element Model (FEM), hereafter equivalently called CAE model. FEM usually involves the division of the modeled object into elements, i.e. into a finite element mesh, so that the physical behavior can be calculated and simulated by means of equations. Said CAE solution is offered by Dassault Systemes under the trademark SIMULIA. Another growing CAD approach involves the modeling and analysis of complex systems, including multiple components from different disciplines of physics, without CAD geometry data. CAE solutions allow the simulation and thus the optimization, refinement and validation of the products to be manufactured. Said CAE solution is offered by Dassault Systemes under the trademark DYMOLA. CAE may be used to verify that various structural requirements (such as, but not limited to, mass, stiffness, strength, durability, etc.) are achieved by the new CAD model. Some of these requirements may be called key performance indicators (KPIs). In many industrial products (e.g., automobiles, airplanes, consumer packaged goods, high-tech products), these KPIs are in conflict, e.g., lower mass usually results in lower stiffness, so optimization methods are often applied to find the best tradeoff between the KPIs.

[0082] By CAM solution is meant any solution, hardware or software, adapted to manage the manufacturing data of a product. The manufacturing data generally includes data about the product to be manufactured, the manufacturing process and the necessary resources. CAM solutions are used to plan and optimize the entire manufacturing process of a product. For example, they may provide the CAM user with information about the feasibility, the duration of the manufacturing process, the number of resources, e.g. robots, that may be used in a particular step of the manufacturing process, thus allowing decisions in management or necessary investments. CAM is a process that follows a CAD process and potentially a CAE process. For example, a CAM solution may provide information about the processing parameters or the forming parameters associated with the extrusion features provided in the CAD model. The above CAE solutions are provided by Dassault Systemes under the trademarks CATIA, Solidworks or DELMIA.

[0083] Therefore, CAD and CAM solutions are closely related. Indeed, CAD solutions focus on the design of a product or part, while CAM solutions focus on how to make it. Designing a CAD model is the first step towards computer-aided manufacturing. Indeed, CAD solutions offer important functionalities, such as for example Feature-Based Modeling and Boundary Representation (B-Rep), to reduce the risk of errors and loss of precision during the manufacturing process, which CAM solutions address. Indeed, the CAD model is intended to be manufactured. It is therefore a virtual twin of the object to be manufactured, also called a Digital Twin, with two objectives: - checking the correct behavior of the object to be manufactured in a specific environment, and - Guaranteeing the production capacity of the objects to be produced.

[0084] PDM stands for Product Data Management. By PDM solution we mean any solution, hardware or software, adapted to manage any kind of data related to a specific product. PDM solutions may be used by all the stakeholders involved in the product's lifecycle, including mainly engineers but also project managers, financers, salespeople, and buyers. PDM solutions are generally based on a product-oriented database. They allow stakeholders to share consistent data about the product, thus preventing them from using divergent data. The above mentioned PDM solution is offered by Dassault Systemes under the trademark ENOVIA.

[0085] The modeled object obtained as input by the method is a (3D) discrete geometric representation of a manufacturing product / mechanical product / mechanical part. A discrete geometric representation is a data structure that includes a discrete collection of portions of data. Each portion of data specifies an element of the product / mechanical part and may be called a discrete element. A discrete geometric representation may be 3D or alternatively 2D. Subsequently, or alternatively, a discrete geometric representation may be both 3D and 2D, i.e., may include 3D portions that are 3D discrete geometric representations and 2D portions that are discrete geometric representations, such as, for example, hybrid 3D-2D meshing (for modeling a product that includes both thin parts modeled with 2D parts and thick parts modeled with 3D parts). A discrete geometric representation may include a number of the above portions of data that is, for example, 100, 1000, or higher than 10000.

[0086] In the case of a 3D discrete geometric representation, the 3D discrete geometric representation may be, for example, a solid / volume 3D discrete geometric representation of the product / mechanical part, such as a solid 3D finite element model (FEM) or a 3D volume mesh (e.g., a 3D tetrahedral mesh). In the above case, each piece of data may represent a respective geometric entity located in 3D space such that the pieces of data form a solid representation of the mechanical product / product (i.e., a "solid 3D discrete geometric representation"). Each geometric entity may represent a respective location (i.e., material point) of the 3D object (in other words, each part of the material that makes up the solid represented by the 3D object). The collection (i.e., combination or juxtaposition) of the geometric entities collectively represents the 3D object as a solid / volume. Alternatively, the 3D discrete geometric representation may be, for example, a skin 3D discrete geometric representation, such as a 3D surface mesh (e.g., a triangular surface mesh), or a tessellation, representing the skin of the product / mechanical product. In the above case, each portion of data may represent a respective geometrical entity located in 3D space such that the portions of data form a representation of the skin of the mechanical product (i.e., a "skin 3D discrete geometric representation"). In the above case, each geometrical entity represents a respective location (i.e., material point) of the exterior surface of the three-dimensional object (in other words, each portion of the exterior surface of the volume occupied by the material that constitutes the solid represented by the object). The collection (i.e., union or juxtaposition) of the geometrical entities together represents at least a portion of the exterior surface of the object.

[0087] In the case of a 2D discrete geometric representation, each portion of the data may represent a respective geometric entity located in 2D space. The 2D discrete geometric representation may be a 2D finite element mesh, or any 2D mesh. The discrete geometric representation may be associated with one or more thickness value(s), e.g., a distribution of thickness values ​​across its finite elements. For example, the 2D discrete geometric representation may represent a generally flat product, such as, for example, a stamping part (e.g., having a constant thickness value) or a composite part (e.g., having different thickness values). The segmentation output by the method may be or form a CAD model, for example including or present in a feature tree and / or B-rep. The model may originate from a CAE model and result from a CAE to CAD conversion process, the method may include, for example, in an earlier stage.

[0088] The CAD model may be feature-based (e.g., may include a corresponding B-rep included in a feature tree and optionally obtained by executing the feature tree). The feature-based 3D model allows for detection and automatic resolution of geometric errors in the CAD model, such as collisions that may affect the manufacturing process (e.g., during the determination of manufacturing or CAM files as described herein below). A collision is when two parts of the 3D model interfere with each other, e.g., due to relative motion. Furthermore, this collision may only be detected by a finite element analysis based on the CAD feature-based model. Hence, the resolution of the collisions may be performed together with the CAD solution or automatically, by iteratively modifying the parameters of the features and performing a finite element analysis.

[0089] As another example, feature-based 3D models allow for the automatic creation of tool paths for machines via computer numerical control (CNC) (e.g., during the determination of manufacturing files or CAM files as described herein below). With CNC, each object to be manufactured gets a custom computer program that is stored and executed on a microcomputer attached to the machine, the machine control unit. The program contains instructions and parameters that the machine tool will follow. Mills, lathes, routers, grinders, lasers are examples of common machine tools whose operations can be automated by CNC.

[0090] A key feature of CAD models is that they may be precisely and unambiguously designed by chaining a small number of high-level, parameterized design operations (e.g., including but not limited to, sketching, extrusion, and chamfering) and may be edited by modifying the high-level parameters. This is an important distinction from polyhedral representations, such as triangular surface meshes, which may represent any 3D shape but do not offer the modification or parameterization capabilities required in an industrial design context.

[0091] Since a CAD model is a parameterized model of a part / product, it is lighter in terms of memory footprint than other models, e.g. CAE models. Indeed, instead of storing a collection of discrete geometric elements, e.g. finite elements, a CAD model can store a list of features and parameters, which is lighter in terms of storage and memory footprint. Hence, working with a CAD model reduces the memory requirements of the underlying system compared to e.g. CAE models, further facilitating the editing of the model. What has just been said is that in fact the CAE to CAD conversion process compresses the CAE model into a CAD model that is lighter in terms of memory requirements (e.g. footprint), in addition to converting the CAE model into a CAD model that is easier to edit.

[0092] The generation of custom computer programs from CAD files may be automated, and therefore may be errorproof, ensuring perfect reproduction of the CAD model in the manufactured product. CNC is believed to offer greater precision, complexity, and repeatability than manual machining. Other benefits include improved accuracy, speed, and flexibility, as well as capabilities such as contour machining, which allows for milling of contour shapes, including those produced in 3D designs.

[0093] A B-rep (i.e., boundary representation) is a 3D representation of a mechanical part. Specifically, a B-rep is a persistent data representation that describes a 3D modeled object that represents the mechanical part. A B-rep can be the result of a calculation and / or a series of operations that were performed during the design phase of the 3D modeled object that represents the mechanical part. The shape of the mechanical part that is displayed on a computer screen in representing the modeled object is (e.g., a tessellation of the B-rep). In an example, a B-rep represents a portion of a model object.

[0094] B-Rep includes topological and geometric entities. Topological entities are faces, edges, and vertices. Geometric entities are 3D objects such as surfaces, planes, curves, lines, points, etc. By definition, a face is a boundary part of a surface named supporting surface. An edge is a boundary part of a curve called supporting curve. A vertex is a point in 3D space. They are related to each other as follows: A boundary part of a curve is defined by two points (vertices) lying on the curve. A boundary part of a surface is defined by a boundary, which is a set of edges lying on the surface. The boundaries of edges of a face are connected by sharing a vertex. A face is connected by sharing an edge. Two faces are adjacent if they share an edge. Similarly, two edges are adjacent if they share a vertex. In a CAD system, B-Rep collects the "bounded by" relationship, the relationship between topological entities and supporting geometry, and the mathematical description of the supporting geometry in an appropriate data structure. An interior edge of a B-Rep is just an edge shared by two faces. By definition, boundary edges are not shared and only touch one face. By definition, a boundary face is bounded by at least one boundary edge. A B-Rep is said to be closed if all its edges are interior edges. A B-Rep is said to be open if it contains at least one boundary edge. Closed B-reps are used to model 3D volumes that have thickness, since they define the interior portion of a material that (imaginarily) encloses a space. Open B-reps are used to model 3D skins, which represent 3D objects that are small enough that their thickness can be ignored.

[0095] An important advantage of B-rep over other representation types used in CAD modeling is its ability to accurately represent any shape. All other representations used, for example point clouds, distance fields and meshes, make approximations of the shape they represent by discretization. B-Rep, on the other hand, contains surface equations that represent the exact design and therefore constitutes a true "master model" for further manufacturing, whether that be the generation of toolpaths for CNC or discretization to the correct sample density for a given 3D printer technology. In other words, by using B-rep, the 3D model can be an accurate representation of the object to be manufactured. Furthermore, B-Rep is also advantageous for simulating the behavior of the 3D model. It can support local refinement of the simulation mesh to capture physical phenomena, for stress, thermal, electromagnetic or other analyses, and in kinematics, true contact modeling between curved surfaces. Finally, B-Rep allows for a small memory and / or file footprint. First, because the representation contains surfaces based only on parameters. In other representations, e.g. meshes, the equivalent surface may contain up to several thousand triangles. Secondly, B-Reps do not contain history-based information.

[0096] The method may be included in a production process, which may include, after carrying out the method, producing a physical product corresponding to the modeled object designed / processed / output by the method. The manufacturing process may include the following steps: - obtaining a CAE model comprising one or more segments by applying the method (e.g. automatically); - Use the obtained CAD model to manufacture the part / product.

[0097] Using a CAD model to manufacture refers to any real-world action or series of actions that are involved / participate in the manufacture of the product / part represented by the CAD model. Using a CAD model to manufacture may include, for example, the following steps: - Editing the CAD model that has been obtained, - carrying out one or more simulations based on the CAD model or on the corresponding CAE model (e.g. a CAE model derived from the CAD model after a CAE-to-CAD conversion process), such as for example simulations (e.g. structural simulations, thermodynamic simulations, aerodynamic simulations) for the validation of mechanical properties and / or constraints, usage properties and / or constraints, and / or manufacturing properties and / or constraints, - Editing the CAD model based on the results of the simulation(s); - optionally (e.g. automatically) determining manufacturing / CAM files based on the (e.g. edited) CAD model for the production / manufacturing of the manufactured product (i.e. depending on the manufacturing process used, the manufacturing of the mechanical product may or may not include this step), - Sending CAD and / or manufacturing / CAM files to the factory, and / or - Producing / manufacturing (e.g. automatically) the machine product originally represented by the model output by the method based on the determined manufacturing file / CAM file or CAD model. What has just been said may involve (e.g. automatically) feeding the manufacturing file / CAM file and / or CAD file to a machine(s) performing the manufacturing process.

[0098] The last step of production / manufacturing just mentioned may be called the manufacturing or production step. The just mentioned step is, for example, to manufacture / produce a part / product based on the CAD model and / or CAM file, once the CAD model and / or CAD file are fed to one or more manufacturing machines or computer system(s) controlling the machine(s). The manufacturing step may include any known manufacturing process or sequence of manufacturing processes, for example one or more additive manufacturing steps, one or more cutting steps (e.g. laser cutting or plasma cutting steps), one or more stamping steps, one or more forging steps, one or more bending steps, one or more deep drawing steps, one or more forming steps, one or more machining steps (e.g. milling steps) and / or one or more punching steps. As the design methodology improves the design of the model (CAE or CAD) representing the part / product, the manufacturing and its productivity are also improved. Editing a CAD model may include making edits of one or more of the CAD models by a user (i.e., a designer), for example, by using a CAD solution. The modification of the CAD model may include one or more modifications of the geometry and / or parameters of the CAD model. The modification may include any modification or set of modifications made in the feature tree of the model (e.g., modification of feature parameters and / or specifications) and / or modifications made in the displayed representation (e.g., B-rep) of the CAD model. The modification is a modification that maintains the technical functionality of the part / product, i.e., the user makes modifications that may affect the geometry and / or parameters of the model, but only with the purpose of making the CAD model more technically suitable for downstream use and / or manufacturing of the part / product. Said modification may include any modification or set of modifications that technically adapts the CAD model to the specifications of the machine(s) used in the downstream manufacturing process. Said modification may also or alternatively include a modification or set of modifications that technically adapts the CAD model for further use of the product / part once manufactured, said modification or set of modifications being based, for example, on the results of a simulation(s).

[0099] The CAM file may include a manufacturing step-up model obtained from the CAD model. The manufacturing step-up may include all data necessary to manufacture the machine product to have a geometry and / or distribution of materials corresponding to those captured by the CAD model, possibly up to manufacturing tolerance errors. Determining the production file may include applying any CAM (Computer-Aided Manufacturing) or CAD-CAM solution (e.g. any automated CAD-CAM conversion algorithm) for determining (e.g. automatically) the production file from the CAD model. The above CAM or CAD-CAM solution may include one or more of the following software solutions that enable the automatic generation of manufacturing instructions and tool paths for a given manufacturing process based on a CAD model of the product to be manufactured: - Fusion 360, - Free CAD, - CATIA, - SOLIDWORKS, - Dassault Systèmes NC Shop Floor Programmer, as exemplified by https: / / my.3dexperience.3ds.com / welcome / fr / compass-world / rootroles / nc-shop-floor-programmer - A Dassault Systèmes NC Mill Turn Machine Programmer, such as the one listed here: https: / / my.3dexperience.3ds.com / welcome / fr / compass-world / rootroles / nc-mill-turn-machine-programmer, and / or - Powder Bed Machine Programmer from Dassault Systèmes, as exemplified at https: / / my.3dexperience.3ds.com / welcome / fr / compass-world / rootroles / powder-bed-machine-programmer.

[0100] The product / part may be an additively manufacturable part, i.e. a part to be manufactured by additive manufacturing (i.e. 3D printing). In this case, the production process does not include a step of determining a CAM file, but proceeds directly to the production / manufacturing step by directly (e.g. automatically) feeding the CAD model to the 3D printer. The 3D printer is configured to receive a CAD model representing the mechanical product (e.g. by the 3D printer operator initiating 3D printing) and directly and automatically 3D print the mechanical product according to the CAD model. In other words, the 3D printer receives the CAD model fed (e.g. automatically), reads the CAD model (e.g. automatically), and prints the part (e.g. automatically) by adding material together, e.g. layer by layer, to reproduce the geometry and / or distribution of material captured by the CAD model. The 3D printer adds material to reproduce in reality exactly the geometry and / or distribution of material captured by the CAD model, up to the resolution of the 3D printer and optionally with or without tolerance errors and / or manufacturing corrections. Manufacturing may include determining the above manufacturing corrections and / or tolerances, for example, by a user (e.g., an operator of the 3D printer) or automatically (e.g., by the 3D printer or a computer system controlling it), for example, by modifying the CAD file to match the specifications of the 3D printer. Additionally or alternatively, the manufacturing process may include determining from the CAD model (e.g., automatically by the 3D printer or a controlling computer system), print direction (as described in EP 3327593, incorporated herein by reference), for example, minimizing overhang volume, layer slicing (i.e., determining the thickness of each layer, and the layer-wise path / trajectory), and other characteristics for the 3D printer head (e.g., for a laser beam, e.g., path, speed, intensity / temperature, and other parameters).

[0101] Alternatively, the product / part may be a machined part (i.e. a part manufactured by machining), for example a milled part (i.e. a part manufactured by milling), etc. In the above case, the production process may include a step of determining a CAM file. The just mentioned step may be performed automatically by any suitable CAM solution that automatically obtains the CAM file from a CAD model of the machined part. The determination of the CAM file may include (e.g. automatically) checking whether the CAD model has geometric peculiarities (e.g. errors or artifacts) that may affect the production process, and (e.g. automatically) correcting said peculiarities. For example, if the CAD model still contains sharp edges, machining or milling based on the CAD model may not be performed (because the machining or milling tool cannot create sharp edges), in which case the determination of the CAM file may include (e.g. automatically) rounding or filleting said sharp edges (e.g. with a corresponding round or fillet radius, substantially equal to the tolerances and radii of the cutting head of the machining tool) so that machining or milling based on the CAD model can be performed. More generally, the determination of the CAM file may include automatically rounding or filleting geometry in the CAD model that is incompatible with the radius of the machining or milling tool to enable machining / milling. The inspection and possible corrections just mentioned (e.g., rounding or filleting geometry) may be performed automatically as previously described, but may also be performed by a user (e.g., a machining engineer) making the corrections manually in the CAD and / or CAM solution, e.g., a solution that forces the user to make corrections to conform the CAD model to the specifications of the tool used in the machining process.

[0102] Upon further inspection, determining the CAM file may include determining (e.g., automatically) a machining or milling path, i.e., a path to be performed by the machining tool to machine the product. The path may include a set of coordinates and / or a parameterized trajectory to be followed by the machining tool for machining, and determining the path may include calculating (e.g., automatically) the coordinates and / or trajectory based on a CAD model. The calculation may be based on the calculation of the boundaries of the Minkowski subtraction of the CAD model by the CAD model representation of the machining tool, for example, as discussed in European Patent Application EP21306754.9, filed on December 13, 2021 by Dassault Systemes, and incorporated herein by reference. It will be understood that the path may be, for example, a single path that the tool follows continuously without breaking contact with the material to be cut. Alternatively, the path may be a concatenation of a series of sub-paths that the tool follows in a certain order, for example, each of which may be followed continuously by the tool without breaking contact with the material to be cut. Optionally, determining the CAM file may then include (e.g., automatically) setting machine parameters including, for example, cut speed, cut / pierce height, and / or mold opening stroke based on the determined path and machine specifications. Optionally, determining the CAM file may include (e.g., automatically) configuring a nesting where the CAM solution determines the optimal orientation of the part to maximize machining efficiency.

[0103] In the case of a machined or milled part, determining the CAM file thus results in and outputs a CAM file containing the machining path and, optionally, the machine parameters that have been set and / or the nesting specifications that have been configured. The output CAM file may then be (e.g., directly or automatically) fed to a machining tool and / or the machining tool may then be (e.g., directly or automatically) programmed by reading the file, and the production process includes a producing / manufacturing step in which a machine performs machining of the product according to the production file, e.g., by directly or automatically executing the production file. The machining process includes a machining tool cutting a block of material in the real world to reproduce the geometry and / or distribution of material captured by the CAD model, e.g., to within tolerances (e.g., tens of microns for milling).

[0104] Alternatively, the product / part may be a molded part, i.e. a part produced by molding (e.g. injection molding). In the above case, the production process may include a step of determining a CAM file. The just mentioned step may be performed automatically by any suitable CAM solution that automatically obtains the CAM file from a CAD model of the molded part. Determining the CAM file may include (e.g. automatically) performing a series of molding inspections based on the CAD model to check that the geometry and / or distribution of the material captured by the CAD model is compatible with the molding and to make (e.g. automatically) appropriate corrections if the CAD model is not compatible with the molding. The inspection and making the appropriate corrections (if any) may be performed automatically or alternatively by a user (e.g. a molding engineer) using a CAD and / or CAM solution that for example allows the user to make appropriate corrections of the CAD model but forces corrections that make the CAD model compatible with the specifications of the molding tool(s). The inspection may include checking that the virtual product represented by the CAD model matches the dimensions of the mold and / or checking that the CAD model includes all the draft angles necessary to demold the product as known per se from the mold. Determining the CAM file may then further include determining, based on the CAD model, the amount of liquid material to be used for molding and / or the time for the liquid material to harden / settle in the mold and outputting a CAM file containing these parameters. The production process then includes (e.g., automatically) performing molding based on the output file, where the mold molds the liquid material for the determined hardening time into a shape that corresponds to the geometry and / or distribution of the material captured by the CAD model, for example up to tolerance errors (e.g., incorporating draft angles or correcting draft angles for demolding).

[0105] Alternatively, the product / part may be a stamped part, possibly also called a "stamped part", i.e. a part manufactured in a stamping process. In this case, the production process may include (e.g. automatically) determining a CAM file based on a CAD model. The CAD model represents the stamped part, for example, possibly with one or more flanges if the part is to include some, and possibly with the extra material removed to form the developed state of the flange or flanges of the part, as known per se from stamping. The CAD model thus includes a part (possibly a whole part) representing the part without the flange, and possibly an outer extra patch part representing the flange possibly including the extra material (if any). The extra patch part may give a g2 continuity at one length and then a g1 continuity at another length.

[0106] Determining the CAM file may include, in the case of stamping just mentioned, determining (e.g. automatically) the parameters of the stamping machine, e.g. the size of the stamping die or punch and / or the stamping force, based on the geometry and / or distribution of the material of the virtual product as captured by the CAD model. If the CAD model also includes a representation of the excess material to be removed to form the developed state of one or more flanges of the part, the excess material to be removed may be cut off, e.g. by machining, and determining the CAM file may also include determining the corresponding machining CAM file, e.g. as discussed above. If there are one or more flanges, determining the CAM file may include determining the geometric specifications of the g2 and g1 continuations that allow the process of folding the flanges along the g2 continuation length towards the inner surface of the stamped part after the stamping itself and the removal of the excess material. The CAM file determined thereby may include the parameters of the stamping tool, the specifications (if any) for optionally folding the flanges, and the machining production file (if any) for optionally removing the excess material.

[0107] The stamping production process may then output the CAM file, for example directly and automatically, and perform the stamping process (e.g., automatically) based on the file. The stamping process may include stamping (e.g., punching) the portion of material to form the product as represented in the CAD file, i.e., the unfolded flange and excess material (if any). If appropriate, the stamping process may then include cutting off the excess material based on the machining production file and folding the flange based on the specifications for folding the flange, thereby folding the flange at its g2 continuous length to provide smooth sides to the outer boundary of the part. In this latter case, while the CAD model shows the excess material removed and the flange folded, the manufactured shape differs from the virtual part because the excess material is removed and the flange is represented in an unfolded state.

[0108] The method is computer-implemented. What has just been said means that the steps of the method (or substantially all steps) are performed by at least one computer, or any similar system. Hence, the method steps are performed by a computer, possibly fully automatically or semi-automatically. In an example, triggering of at least some of the method steps may be done through user-computer interaction. The level of user-computer interaction required depends on the level of automaticity expected and may be balanced against the need to implement the user's wishes. In an example, the just-mentioned levels may be user-defined and / or predefined.

[0109] A typical example of a computer implementation of the method is performing the method by a system adapted for the purposes just mentioned. The system may include a processor coupled to a memory and a graphical user interface (GUI), the memory having recorded thereon a computer program including instructions for performing the method. Additionally, the memory may store a database. The memory is any hardware adapted for such storage, possibly including several physically distinct parts (e.g. one for the program and possibly one for the database).

[0110] FIG. 9 shows an example of a system in which the system is a client computer system, such as a user's workstation.

[0111] The example client computer includes a central processing unit (CPU) 1010 connected to an internal communication BUS 1000, a random access memory (RAM) 1070 further connected to the BUS. In addition, the client computer is provided with a graphics processing unit (GPU) 1110 associated with a video random access memory 1100 connected to the BUS. Furthermore, the video RAM 1100 is also known to those skilled in the art as a frame buffer. A mass storage device controller 1020 manages access to mass memory devices, such as a hard drive 1030. Mass memory devices suitable for tangibly embodying computer program instructions and data include all forms of non-volatile memory, including, by way of example, semiconductor memory devices such as EPROM, EEPROM, and flash memory devices, magnetic disks, such as internal hard disks and removable disks, magneto-optical disks. Any of the foregoing may be supplemented by or incorporated in specially designed ASICs (Application Specific Integrated Circuits). A network adapter 1050 manages access to a network 1060. Additionally, the client computer may also include a haptic device 1090, such as, for example, a cursor control device, keyboard, or the like. The cursor control device is used in the client computer to allow a user to selectively place a cursor at any desired location on the display 1080. In addition, the cursor control device allows a user to select various commands and input control signals. The cursor control device includes some signal generating device to input control signals to the system. Typically, the cursor control device is a mouse, and the buttons of the mouse may be used to generate the signals. Alternatively or additionally, the client computer system may include a sensitive pad and / or a sensitive screen.

[0112] A computer program includes instructions executable by a computer, and the instructions may include means for causing the system to perform the method. The program may be recordable on any data storage medium, including the memory of the system. The program may be implemented, for example, in digital electronic circuitry, or in computer hardware, firmware, software, or a combination thereof. The program may be implemented as an apparatus, for example, as an article of manufacture tangibly embodied in a machine-readable storage device for execution by a programmable processor. The method steps may be performed by a programmable processor by operating on input data and generating output, a program of instructions that performs the functions of the method. Thus, the processor may be programmable and coupled to receive data and instructions from, and transmit data and instructions to, a data storage system, at least one input device, and at least one output device. The application program may be implemented in a high-level procedural or object-oriented programming language, or in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. The program may be a full installation or update program. The application of the program to the system results in instructions for performing the method in any case. The computer program may alternatively be stored and executed on a server in a cloud computing environment, the server being in communication with one or more clients via a network, in which case the method is performed in the cloud computing environment by a processing unit executing the instructions contained by the program.

[0113] Further provided is an algorithm configured to run on a computer for segmenting a discrete 3D model representing a mechanical part. The algorithm includes the steps of obtaining a discrete 3D model and applying a hierarchical segmentation to the discrete 3D model. The hierarchical segmentation includes a first segmentation, then a second segmentation, and then a third segmentation. The first segmentation includes identifying first segments among the elements of the discrete 3D model, each corresponding to a primitive exhibiting at least one slippable movement. The second segmentation includes identifying second segments among the unidentified elements of the discrete 3D model, each corresponding to a surface generated by a CAD feature. The third segmentation includes identifying third segments among the unidentified elements of the discrete 3D model, each corresponding to a freeform surface of the discrete 3D model.

[0114] The algorithm may be part of a manufacturing CAD process, as described above for a method in which a mechanical part is intended to be manufactured upon segmentation of a discrete 3D model of the mechanical part. Alternatively or additionally, the algorithm may be part of a 3D scan process, as described above for a method in which a model of the mechanical part originates from a scan and the algorithm processes the model by segmenting it to obtain a segmentation thereof.

[0115] Still further, an algorithm configured to execute and / or be implemented in a computer for segmenting a discrete 3D model representing a machine part is provided. The algorithm includes means for obtaining a discrete 3D model and means for applying a hierarchical segmentation to the discrete 3D model. The hierarchical segmentation includes a first segmentation, then a second segmentation, and then a third segmentation. The first segmentation includes identifying first segments among the elements of the discrete 3D model, each corresponding to a primitive exhibiting at least one slippable movement. The second segmentation includes identifying second segments among the unidentified elements of the discrete 3D model, each corresponding to a surface generated by a CAD feature. The third segmentation includes identifying third segments among the unidentified elements of the discrete 3D model, each corresponding to a freeform surface of the discrete 3D model.

[0116] By "algorithm" we mean a (finite) sequence of instructions for performing a method. By "algorithm configured to be executed in a computer" we mean an algorithm, said instructions being in a format (e.g. a computer language) and / or convertible (e.g. with a compiler) into said executable format recognizable by a computer. The algorithm may be an algorithm configured to be implemented in a computer. Said computer may be configured to execute the algorithm upon compiling the implementation. The algorithm may form a computer-implemented algorithm. More specifically, the algorithm may further comprise instructions for performing any of the examples of the computer-implemented methods mentioned above. By "means for obtaining a discrete 3D model" or "means for applying a hierarchical segmentation to a discrete 3D model" we mean any manner (hardware and / or software) technically suitable for obtaining a discrete 3D model or for applying a hierarchical segmentation, respectively.

[0117] An implementation of the method for segmenting discrete 3D models is now presented.

[0118] The implementations relate to the fields of 3D shape processing and computational geometry. More specifically, the implementations are directed to segmenting manifold 3D meshes or point clouds that represent 3D CAD parts, i.e., 3D models. 3D models are typically composed of both simple geometric features or primitives (e.g., cylinders, planes, extrudes, etc.) and free-form features (e.g., fillets, sweeps, etc.) as designed in CAD software.

[0119] The implementation develops a computationally efficient hierarchical clustering algorithm in five major steps:

[0120] In the first step, only simple geometric primitives are segmented. Then, the mentioned primitives are detected and fitted to the corresponding regions, similar to a region growing process, to filter out the erroneous primitives and extend the remaining primitives to the neighboring faces. Then, the primitive nodes are frozen.

[0121] In the second step, CAD features are segmented. Then features are detected and fitted to regions. Next, adjacent matching features are merged, and finally incorrectly matching features are filtered. Similar to the geometric primitives in the first step, feature nodes are then frozen.

[0122] In the third step, the remaining freeform surface is segmented.

[0123] In a fourth step, the obtained segmentation is post-processed to remove small regions or isolated faces and to merge compatible geometric primitives.

[0124] In the fifth step, all previous steps are reapplied to the freeform surface until there are no more regions that can be further segmented. What has just been described makes it possible to capture primitives and features at a smaller scale.

[0125] The implementation's hierarchical clustering is based on graph topology. The implementation employs the formulation of a dual graph for mesh inputs, or a nearest neighbor graph for point cloud inputs. The distance between two connected regions is based on the curvature of their faces (or points), as well as a shape factor that favors smooth boundaries. Furthermore, the implementation uses an additional distance that describes the smoothness of the boundaries of two connected regions to prevent merging of two similar regions separated by a sharp boundary.

[0126] The implementation provides a fast and robust framework for CAD segmentation of both point clouds and meshes. The framework provided is capable of segmenting not only simple geometric primitives, but also CAD features (extrusions, revolves, fillets) as well as free-form surfaces (e.g. NURBS). The implementation is also able to take into account sharp edges of the input model.

[0127] The main advantages of the just described segmentation framework, which is amenable to implementation, are the following: - Useful hyperparameters are automatically inferred, - An automatic segmentation pipeline that would be able to ease the process of searching the CAD feature tree since CAD features are directly segmented. - Allows capturing geometric primitives and features at different scales, - It does not rely on any machine learning techniques.

[0128] An example pipeline of the graph-based segmentation framework according to the implementation will now be described in more detail. Figure 3 presents an example of the complete pipeline.

[0129] The segmentation framework is based on hierarchical graph clustering as in European Patent Application EP21305195.6, filed February 16, 2021 by Dassault Systèmes, which is incorporated herein by reference. The framework may have the same implementation as the cited patent application to ensure a fast segmentation algorithm. The segmentation may take a point cloud or a mesh as input. Figure 2 presents an example of a segmentation framework based on hierarchical graph clustering.

[0130] The segmentation involves a set of hyperparameters to be configured. The configuration of these hyperparameters in the implementation will be described shortly.

[0131] The set of hyperparameters may include one or more of a stopping threshold for hierarchical clustering, a tolerance for canonical fitting, and a minimal canonical region. The set just described enables the pipeline to handle different types of inputs (e.g., tessellated meshes, or noisy inputs) and different levels of noise and discretization.

[0132] To facilitate the user's configuration of these hyperparameters, the implementation defines two high-level hyperparameters, based on which the implementation calculates the remaining hyperparameters. Thus, instead of configuring the full set of hyperparameters, the user may only configure the aforementioned two high-level hyperparameters, and the implementation will automatically calculate the rest.

[0133] Two high-level hyperparameters that are used to compute other useful hyperparameters can be sag for tessellated meshes, or noise level for other types of inputs (such as point clouds and noisy meshes), and level of discretization. The implementation of these two high-level hyperparameters will be described shortly.

[0134] For tessellated meshes, sag represents the maximum fixed distance between the discretized mesh and the exact surface it approximates. This parameter should be given by the user. The value can be in the range [0.01,0.05].

[0135] For an input, noise is defined as a random variable applied to the elements of the input, e.g. during acquisition by a scanner. For a point cloud, noise represents the distance between a point and the surface on which the point is assumed to be. The implementation defines the noise level as the standard deviation of the random variable just mentioned. The implementation may then use several techniques to estimate this noise level for a given input. The following is an example of how this noise level could be estimated:

[0136] The first approach consists of applying RANSAC to find key geometric canonicals of the 3D input. Then, the noise level is the fitting error of said key canonicals. Furthermore, to distinguish the noise from real noise, which we want to have small curvatures, the implementation calculates the correlation between the noise of neighboring points in the fitted canonicals.

[0137] Considering the 2D sketches 3010, 3020 given in Fig. 3, sketch 3010 gives a noisy curve while sketch 3020 is noise-free. However, the same line 3030 may be fitted with the same noise level to both 3010 and 3020. The main difference between the noisy and smooth cases is that the noise of the neighboring points is independent for the noisy curve 3010 but not for the curve 3020.

[0138] An implementation may instead use spectral mesh processing to evaluate the noise level of a mesh. The idea is to calculate the average Laplacian coordinates of the mesh before and after applying Laplacian smoothing (which is a mesh smoothing technique), and then calculate the shift between those coordinates. What we just said will be more robust than just comparing the initial mesh with the mesh after Laplacian smoothing, since Laplacian smoothing shrinks the mesh.

[0139] For discretization level estimation, the implementation computes the discretization level by considering the geometric properties of the input. For example, for an input mesh, the implementation computes the geometric property as the ratio of the average area of ​​the faces to the scale of the mesh (defined by the radius of the bounding sphere of the mesh). For an input point cloud, the implementation computes the geometric property by computing the density of the points.

[0140] For the computation of the aforementioned geometric attributes, the implementation may compute some geometric attributes before the segmentation process, such as, for example, the boundary before using normals, curvatures, dihedral angles, or the maximum distance to the surface with respect to the tessellation mesh.

[0141] Segmentation using hierarchical graph clustering is presented shortly.

[0142] Segmentation of Simple Geometric Primitives The implementation may use segmentation of simple geometric primitives. In this case, the first step of the segmentation consists in segmenting a simple geometric primitive (e.g., a plane, a cylinder, or a sphere). In this step, the nodes are first clustered considering geometric distances based on curvature and normals, then a canonical is fitted, aggregated, and filtered. The stopping threshold of the hierarchical clustering distance, the tolerance of the fitting error, and the minimal canonical size can be calculated given the high-level parameters defined above.

[0143] The stopping threshold can be determined using a linear function of the noise level, and is determined to interpolate between an empirical value for a noise-free mesh and another empirical value for the noisiest mesh. The fitting error tolerance can be the noise level. For minimal canonical sizes, the implementation considers relevant canonicals when they have at least 10 input elements, and then calculates the minimal canonical size as the average size of all elements times 10. The simple geometric primitives are then frozen during the next step of segmentation.

[0144] CAD Feature Segmentation The second stage of segmentation is the segmentation of CAD features. The implementation can consider all types of CAD features that can be fitted to a mesh or point cloud, such as extrusions, revolutions, or fillets.

[0145] Feature Clustering First, for the canonical case, the implementation needs to first do a hierarchical clustering to group the nodes. To do so, the implementation uses the following distance between two adjacent nodes N1 and N2:

[0146]

number

[0147] where ε is a small enough tolerance (e.g., 10) to avoid division by 0. -8 ).

[0148] The distance just mentioned amounts to comparing the relative deviation between the average maximum curvatures of the regions, weighted by a term that attempts to regularize the shape factor of the merged regions. In an example, the shape factor can be of the following type:

[0149]

number

[0150] where P N represents the perimeter of N, and A N represents the area of ​​N,

[0151]

number

[0152] teeth,

[0153]

number

[0154] represents clamping to N i is N i ∈{N1,N2} for all nodes that are not N1,N2, and α denotes a hyperparameter that defines the reduced influence of relatively small nodes. Other possible distances may be employed, e.g., Ward distance.

[0155] The distance just mentioned is weighted by the relative size of the nodes, penalizing the increase in non-circularity (i.e., how far the shape deviates from a circular regularity) resulting from the merging of two nodes compared to that of the two initial nodes, so as not to unduly penalize the merging of large irregular nodes with small regular nodes. Since the implementation does not require all segmented regions to be circular, but does seek to favor merging that improves instead of worsens the regularity of a region, the implementation considers the increase in non-circularity, and not the non-circularity value itself.

[0156] Another example of a form factor distance could be one that promotes smoothness of region boundaries, for example in a mesh, by penalizing the sum of the angles between adjacent edges.

[0157] Furthermore, to improve robustness, before clustering the non-canonical surfaces of a 3D shape, the implementation recalculates the curvature of elements of the 3D shape that do not belong to the canonical set, using only other non-canonical elements as their average-over-canonical neighbors.

[0158] This results in more accurate curvature values ​​around the intersections of non-canonical surfaces with canonical primitive surfaces.

[0159] Clustering is stopped when the minimum distance between pairs of nodes is higher than a threshold, which can be calculated using high-level hyper-parameters. As in the canonical segmentation step, this threshold can be determined using a linear function of the noise level, interpolating between the empirical values ​​of the noise-free mesh and the noisiest mesh. Figures 4A-B illustrate the clustering. The colored area 410 in Figure 4A represents the frozen canonical.

[0160] Feature Fitting Once the clustering is complete, the implementation fits CAD features to each resulting node. To that end, given a clustered node, the implementation seeks to fit all desired CAD features to that element using feature fitting techniques. Some examples of feature fitting techniques are detailed in European Patent Application EP21306184.9 filed by Dassault Systèmes on August 31, 2021 for extrusions, European Patent Application EP21305763.1 filed by Dassault Systèmes on June 04, 2021 for rotations, and European Patent Application EP22306451.0 filed by Dassault Systèmes on September 29, 2022 for fillets, which are incorporated herein by reference. For each feature, the implementation then calculates the fitting error and keeps only those features whose error exceeds a given threshold. This threshold depends on the noise level and can be a linear function of the noise level, which is determined to interpolate between the empirical values ​​for the noise-free mesh and the noisiest mesh.

[0161] Figures 5A-B illustrate this step when using extrusion, revolve, and fillet. The white nodes 410 in Figure 5B are frozen nodes, while the other nodes represent regions that are CAD features.

[0162] Feature Aggregation The implementation does early stopping during hierarchical clustering, so it is possible that some neighboring nodes are part of the same feature. Hence, after the first feature fitting step, the implementation does another hierarchical clustering step with the following distances:

[0163]

number

[0164] The distance just mentioned grows infinitely large for all neighboring nodes for which it is not possible to fit features to the union of both nodes, to prevent the implementation from merging both nodes. This makes it possible to stop the hierarchical clustering only when neighboring nodes are no longer merging, i.e., when the distances of all neighboring nodes become infinitely large. What has just been mentioned improves the method, since it is not necessary to determine a stopping threshold for stopping the hierarchical clustering, or the final number of clusters.

[0165] Further, to avoid this costly distance calculation, implementations may use fast feature aggregation techniques that quickly provide a fitting score along with feature parameters for the reunion of nodes. Examples of extrusion techniques can be found in previously cited European Patent Application EP21306184.9, filed by Dassault Systèmes on August 31, 2021. Figures 6A-B illustrate feature aggregation.

[0166] Feature Filtering Feature clustering can result in more feature nodes than actually desired due to the fact that only small local regions can be fitted by features. Hence, the implementation removes fitted features that are smaller than a threshold (the same as for the canonical).

[0167] However, for some types of features (e.g. fillets), it may be possible that some desired nodes are smaller than the previous threshold, so for such features other filtering techniques specific to each feature should be used.

[0168] An example of a filtering technique in a mesh for fillets will be given shortly.

[0169] The problem with fillets is that any region that represents just a band of triangles, for example region 710 in FIG. 7, can be considered as a fillet. The region results in a fillet with a large radius. An implementation may then filter fillets that have a high value of radius, but will filter valid fillets that have a large radius. To distinguish valid fillets from non-valid fillets because fillets are thread-like (i.e., thick in one direction of curvature and thin in the other), an implementation calculates the thread width of the region by the following formula:

[0170]

number

[0171] For rectangular regions, the thread width is exactly the width of the rectangle. 2 Since -16*area can be negative, the implementation filters areas where this term is negative. Such regions are usually close to disks, which is not a desirable shape for a fillet.

[0172] Finally, we filter fillets whose radius to thread width ratio is greater than a threshold (values ​​that can be in the range [1,10] for example). Figures 8A-B illustrate the feature filtering process, where region 810 is filtered / discarded by the implementation from the segmentation by being a non-feature region, resulting in white region 820 in Figure 8B. The feature node is then frozen during the next step of the segmentation.

[0173] Freeform surface segmentation Even though the canonical and features are segmented, it is still possible that there are some unsegmented elements. Therefore, the implementation merges all unsegmented regions using region growing to group them into a free-form surface. The implementation may give the user control over this step, using a clustering distance (e.g., as in the previously cited European patent application EP 4044116) that gives control over where the clustering stops.

Claims

1. 1. A computer-implemented method for segmenting a discrete 3D model representing a mechanical part, comprising: - obtaining said discrete 3D model; applying a hierarchical segmentation to said discrete 3D model, said hierarchical segmentation comprising: a first segmentation comprising identifying, among elements of said discrete 3D model, first segments, each corresponding to a primitive exhibiting at least one slippable movement; a second segmentation comprising identifying second segments among unidentified elements of the discrete 3D model, each corresponding to a surface generated by a CAD feature; and a third segmentation comprising identifying, among unidentified elements of the discrete 3D model, third segments, each corresponding to a freeform surface of the discrete 3D model. Including, 23. A method comprising:

2. obtaining a predetermined set of CAD features, wherein in the second segmentation: said identifying comprises searching and merging neighboring unidentified elements of said discrete 3D model according to an order of increasing distance based on one or more respective feature distances quantifying a geometric similarity between pairs of geometric surface portions of CAD features; - discarding each of said surfaces represented by a cluster of elements resulting from said merging, and for which each fitting of a CAD feature to a surface results in a fitting error greater than said predefined fitting threshold; 2. The method of claim 1 .

3. The method of claim 2 , wherein the second segmentation further comprises discarding each fitted CAD feature having a size smaller than a predefined size threshold.

4. and iteratively aggregating neighboring pairs of non-discarded clusters of elements, and optimizing a fitting error at each iteration, said optimization comprising: [0010] where N 1 and N 2 represents two neighboring surfaces, and score(f) represents the feature f and N 1 and N 2 The union N of 1 ∪N 2 Measure the similarity between 4. The method according to claim 2 or 3.

5. 5. The method according to claim 2, wherein the one or more feature distances consist in a feature distance that penalizes discrepancies in mean curvature between surfaces and / or that penalizes irregularities in the merged surface.

6. The one feature distance is of type [0025] is the feature distance of N 1 and N 2 represents the neighboring surfaces, [0030] is N j represents the average maximum curvature of [0045] where P N represents the perimeter of N, and A N represents the area of ​​N, [0050] teeth, [006] represents clamping to N i is N i Nodes that are not ∈{N 1 , N 2 }, α represents a hyperparameter that defines the reduced influence of small surfaces, and ε is a parameter 6. The method of claim 5 .

7. - rescaling one or more segments resulting from said third segmentation; applying said hierarchical segmentation to each rescaled segment or segments; The method according to any one of claims 1 to 6, further comprising:

8. The hierarchical segmentation is based on one or more tolerance thresholds, each tolerance threshold being: a level of inaccuracy of the discrete 3D model, the tolerance threshold increasing as the level of inaccuracy increases, a discretization level (number of triangles or density of points) of said discrete 3D model, said tolerance threshold increasing as said discretization level decreases, and / or a diameter of the discrete 3D model, the tolerance threshold increasing as the diameter increases; 8. The method according to claim 1, wherein the function of

9. 9. The method of claim 8, further comprising: stopping the second segmentation when a minimum of the one or more respective feature distances is higher than at least one of the one or more tolerance thresholds.

10. The first segmentation includes, for each surface resulting from the merging, in order of decreasing surface size: - fitting canonical primitives to said surface; - calculating the fitting error; if the fitting error is lower than a predefined fitting threshold, aggregating to said surface neighboring surfaces whose fitting error is sufficiently lower than said predefined fitting threshold, optionally said first segmentation further comprising filtering said fitted canonical primitives by discarding each primitive that fits into a local canonical region of a freeform surface, and optionally said first segmentation further comprising discarding fitted primitives having a size smaller than another predefined size threshold; 10. The method according to any one of claims 1 to 9, further comprising:

11. 11. The method according to claim 2, wherein in the second segmentation, the searching and merging is based on the constraint that surfaces connected by boundaries corresponding to known geometric extent determinations between parts of the discrete 3D models cannot be merged.

12. 12. The method according to any one of claims 1 to 11, wherein the discrete 3D model is derived from physical measurements of the mechanical part.

13. A computer program comprising instructions for carrying out the method according to any one of claims 1 to 12.

14. A computer-readable data recording medium having the computer program according to claim 13 recorded thereon.

15. 14. A computer comprising a processor coupled to a memory, the memory having stored thereon a computer program as claimed in claim 13.

16. 1. An algorithm configured to run on a computer for segmenting a discrete 3D model representing a mechanical part, the algorithm comprising: - obtaining said discrete 3D model; applying a hierarchical segmentation to said discrete 3D model, said hierarchical segmentation comprising: a first segmentation comprising identifying, among elements of said discrete 3D model, first segments, each corresponding to a primitive exhibiting at least one slippable movement; a second segmentation comprising identifying second segments among unidentified elements of the discrete 3D model, each corresponding to a surface generated by a CAD feature; and a third segmentation comprising identifying, among unidentified elements of the discrete 3D model, third segments, each corresponding to a freeform surface of the discrete 3D model. Including, An algorithm comprising the steps of:

17. 1. An algorithm configured to run on a computer for segmenting a discrete 3D model representing a mechanical part, the algorithm comprising: - means for obtaining said discrete 3D model; - means for applying a hierarchical segmentation to said discrete 3D model, said hierarchical segmentation comprising: a first segmentation comprising identifying, among elements of said discrete 3D model, first segments, each corresponding to a primitive exhibiting at least one slippable movement; a second segmentation comprising identifying second segments among unidentified elements of the discrete 3D model, each corresponding to a surface generated by a CAD feature; and a third segmentation comprising identifying, among unidentified elements of the discrete 3D model, third segments, each corresponding to a freeform surface of the discrete 3D model. means for 16. An algorithm comprising: