Machine learning for assembling machine parts

A neural network-based method predicts mating compatibility and axes for machine parts, addressing the challenge of assembling mechanical parts efficiently and ensuring strong mechanical properties in the resulting assemblies.

JP2026057503APending Publication Date: 2026-04-02DASSAULT SYSTEMES SA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-09-11
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

Existing systems lack efficient methods for assembling machine parts based on mating scores and mating axes, which are crucial for ensuring compatibility and alignment during the design and manufacturing phases.

Method used

A machine learning method using a neural network to predict mating compatibility scores and axes between mechanical parts represented by boundary representations (B-Reps), enabling the assembly of parts by iteratively applying the neural network to pairs of B-Reps and optimizing the assembly process.

Benefits of technology

This method allows for the rapid generation of new assemblies with improved mechanical properties, such as rigidity, by aligning parts on optimal mating axes, facilitating efficient manufacturing of assemblies with strong mechanical properties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026057503000001_ABST
    Figure 2026057503000001_ABST
Patent Text Reader

Abstract

This invention provides a computer implementation method, system, and program for machine learning to assemble mechanical parts based on mating scores and mating axes. [Solution] The method includes the step of providing a dataset of pairs of B-Reps, each containing at least one boundary representation (B-Rep) representing an assembly of mechanical parts. The pairs are labeled with mating compatibility data and, if the B-Reps of the pair are compatible according to the mating compatibility data, with mating axis compatibility data. The method also includes the step of training a neural network on the dataset. The neural network outputs mating scores for pairs of single embeddings, where each single embedding represents a B-Rep, and mating scores representing a score of mating compatibility between the mechanical parts represented by the pair, and data defining the mating axis if the B-Reps are compatible according to the mating score.
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 specifically, to a machine learning method, system, and program for assembling machine parts.

Background Art

[0002] Numerous systems and programs are available on the market for the design, engineering, and manufacturing of objects. CAD is an acronym for Computer-Aided Design, and refers to software solutions for designing objects, for example. CAE is an acronym for Computer-Aided Engineering, and refers to software solutions for simulating the physical behavior of future products, for example. CAM is an acronym for Computer-Aided Manufacturing, and refers to software solutions for defining manufacturing processes and operations, for example. In such computer-aided design systems, graphical user interfaces play a crucial role in the efficiency of the technology. These technologies may be integrated into Product Lifecycle Management (PLM) systems. PLM, across the extended enterprise concept, refers to a business strategy in which companies share product data, apply common processes, and leverage corporate knowledge to support product development from conception to the end of the product lifecycle. The PLM solutions offered by Dassault Systèmes (under the trademarks CATIA, ENOVIA, and DELMIA) provide an engineering hub for systematizing product engineering knowledge, a manufacturing hub for managing manufacturing engineering knowledge, and an enterprise hub that enables enterprise integration and connectivity to both the engineering and manufacturing hubs. Overall, the system provides an open object model that links products, processes, and resources, enabling dynamic, knowledge-based product creation and decision support, and driving optimized product definition, manufacturing readiness, production, and service.

[0003] In this situation, improved solutions for assembling machine parts are still needed. [Overview of the Initiative]

[0004] Accordingly, a computer implementation method for machine learning to assemble mechanical parts based on mating scores and mating axes is provided. The method includes the step of providing a dataset of pairs of boundary representations (B-Reps) representing mechanical parts. Each pair contains at least one B-Rep representing an assembly of mechanical parts. Each pair is labeled with mating compatibility data. If the B-Reps of a pair are compatible according to the mating compatibility data, the pair is labeled with mating axis compatibility data. The mating compatibility data represents the degree of mating compatibility between the mechanical parts represented by the pair. The mating axis compatibility data represents the degree of compatibility between the mechanical parts represented by the pair along the mating axis defined by the pair of B-Rep entities of the pair's B-Reps. The method also includes the step of training a neural network based on the dataset. The neural network is configured to take pairs of B-Reps, each representing a mechanical part or an assembly of mechanical parts, as input. The neural network is also configured to output mating scores for a pair of single embeddings. Each single embedding represents a pair of B-Reps. The mating score represents the mating compatibility score between mechanical parts represented by a pair. The neural network is also configured to output data defining the mating axis when the B-Reps of a pair are compatible according to the mating score.

[0005] This method may include one or more of the following: • Neural networks, An embedding network is applied to each pair of B-Reps and configured to output a single embedding for each B-Rep in the pair, A mating compatibility score network configured to take a concatenation of single-embedding pairs as input and output a mating score, An axis network configured to be applied to each pair of B-Reps and output data defining the mating axis of the pair, Including; The embedded network includes a Siamese encoder configured to take a pair of B-Rep inputs, and the output of the Siamese encoder is passed as input to the mating-compatible score network and axis network; The neural network includes a pooling module applied to the output of a Sham encoder; and / or The embedded network, mating compatibility score network, and axis network are trained simultaneously using loss, and the loss is... For each pair of B-Rep in the dataset, the mismatch between the mating compatibility data of the B-Rep pair and the mating score output by the neural network for the B-Rep pair; and / or A mismatch between the mating axis compatibility data for a pair of B-Rep models and the data defining the mating axis for the pair, as output by a neural network. To impose penalties.

[0006] Furthermore, a neural network that can be trained according to this method is provided.

[0007] Furthermore, a method for using the neural network is provided. This method includes the step of obtaining a set of B-Reps, each B-Rep being associated with a single embedding obtained by applying the neural network to the B-Rep. The method also includes the step of determining the assembly of parts based on the set by iteratively applying the neural network to pairs, each containing a B-Rep from the set and an assembly obtained from a previous iteration.

[0008] This method of use may include one or more of the following: • The decision is further based on data defining the mating axis output by the neural network; This method of use further includes the step of applying optimization to the assembly, where the optimization fixes the degrees of freedom between the parts of the assembly; The iteration stops when a predetermined number of parts are reached and / or when all possible compatible parts in the set have been searched; The iteration is initiated by the user selecting a set of B-Reps, or by the system automatically selecting a set of B-Reps based on predetermined criteria; and / or This method of use further includes the step of computing the B-Rep embedding of a set by applying a neural network.

[0009] Furthermore, a computer program is provided that, when executed by a computer, includes instructions that cause the computer to perform the Method and / or the Method of Use thereof.

[0010] Furthermore, a computer-readable storage medium on which a computer program and / or a neural network is recorded is provided.

[0011] Furthermore, a system comprising a processor and memory is provided, the memory containing computer programs and / or neural networks.

[0012] Furthermore, a device is provided comprising a data storage medium on which computer programs and / or neural networks are recorded. The device may form or function as a non-temporary computer-readable medium, for example, in a SaaS (Software as a Service), another server, or a cloud-based platform. Alternatively, the device may comprise a processor coupled to the data storage medium. Thus, the device may form all or part of a computer system (for example, the device is a subsystem of the entire system). The system may further comprise a graphical user interface coupled to the processor. [Brief explanation of the drawing]

[0013] [Figure 1]A flowchart illustrating one example of this method is shown. [Figure 2] An example of the system is shown. [Figure 3] This is a diagram illustrating this method. [Figure 4] This is a diagram illustrating this method. [Figure 5] This is a diagram illustrating this method. [Figure 6] This is a diagram illustrating this method. [Modes for carrying out the invention]

[0014] Referring to the flowchart in Figure 1, a computer implementation method (also called a “training method”) of machine learning for assembling mechanical parts is proposed. Assembly is based on mating scores and mating axes. The method includes step S10, which provides a dataset of pairs of boundary representations (B-Reps) representing mechanical parts. Each pair contains at least one B-Rep representing an assembly of mechanical parts. Each pair is labeled with mating compatibility data. If the B-Reps of a pair are compatible according to the mating compatibility data, the pair is also labeled with mating axis compatibility data. The mating compatibility data represents the degree of mating compatibility between the mechanical parts represented by the pair. The mating axis compatibility data represents the degree of compatibility between the mechanical parts represented by the pair along the mating axis. A mating axis is defined by a pair of B-Rep entities of the pair's B-Reps. The method also includes step S20, which trains a neural network based on the dataset. The neural network is configured to take pairs of B-Reps as input. Each B-Rep in a pair represents a machine part or an assembly of machine parts. The neural network is also configured to output mating scores for a pair of single embeddings. Each single embedding represents a B-Rep in a pair. The mating score represents the mating compatibility score between the machine parts represented by the pair. The neural network is also configured to output data defining the mating axis when the B-Reps in a pair are compatible according to the mating score.

[0015] Such methods form an improved machine learning solution for assembling mechanical parts. In fact, a neural network is configured (i.e., trained) to output a mating compatibility score between mechanical parts represented by pairs, and data defining the mating axis. Since the mating score represents the mating compatibility score between mechanical parts represented by pairs, the neural network is trained to determine how well the mechanical parts represented by pairs of B-Reps can be assembled together. Furthermore, simultaneously with the mating score, the data defining the mating axis represents the degree of compatibility between the mechanical parts represented by pairs along the mating axis defined by the pair of B-Rep entities of the pair. Thus, the neural network is trained to determine how well the mechanical parts represented by pairs can be aligned along the mating axis defined by the pair. In other words, the neural network not only predicts whether two B-Reps represent parts that can be assembled / matted, but if the method predicts mating compatibility (e.g., a positive result, or a result indicating mating compatibility), the neural network further predicts the mating axis on which the parts can be assembled.

[0016] Therefore, this method and neural network form a solution that assists designers in assembling B-Rep pairs of mechanical parts to be mated during the design phase of corresponding assemblies of mechanical parts. Thus, this method enables designers to explore multiple possible assemblies given a set of CAD parts and / or subassemblies before assembling mechanical parts in the real world.

[0017] Thereby, the trained neural network may be used to assemble mechanical parts based on data defining a fitting score and a fitting axis. In other words, the assembly of mechanical parts in the real world may be performed by simultaneously considering the fitting score and the fitting axis as a reference. For example, the method may obtain a B-Rep representing an assembly of a pair of B-Reps. Thus, the assembly represents the topological and geometrical constraints of the pair of B-Reps while respecting the alignment in which the B-Reps are to be assembled. Thus, the obtained B-Rep represents a mechanical assembly that can be efficiently manufactured in the real world (and thus an assembly that a CAD user would likely design).

[0018] Furthermore, there is provided a computer-implemented neural network data structure having weights of a neural network trained according to the method (e.g., trained according to a training method), i.e., a neural network trained by the method. In other words, the weights of the neural network may be deterministically set (i.e., without further post-processing of such weights) after performing the training by the method..

[0019] Furthermore, there is provided a method of using the neural network (i.e., after being trained according to the method). The method of use includes the step of obtaining a set of B-Reps. The set of B-Reps may be obtained from non-volatile storage, e.g., from a database. This set may represent a catalog of parts to be assembled into an assembly (at least for those subsets thereof) to form mechanical parts. Each B-Rep is associated with a single embedding obtained by applying the neural network to the B-Rep (e.g., at an initial stage).

[0020] This method also includes the step of determining the assembly of parts based on a set. In other words, this method determines the assembly of at least a subset of parts in a set. To do this, this method iteratively applies a neural network to pairs, each containing a B-Rep of a set and an assembly obtained from a previous iteration. As described below, the determination of part assembly based on a set may further depend on data defining the mating axes output by the neural network (if the B-Reps of a pair are compatible according to their mating score). In other words, if the B-Reps of a pair are compatible according to their mating score, for example, if the mating score exceeds a predetermined threshold, the assembly may also include considering the mating axes output by the neural network. Iterations may be started by a user selecting B-Reps of a set. Alternatively, the system may automatically select B-Reps of a set (e.g., randomly) based on predetermined criteria. Iterations may be stopped when a predetermined number of parts are reached and / or when all possible compatible parts of the set have been explored. In other words, the method may stop iterating when it determines that a predetermined number of parts to be assembled has been reached (e.g., two or more parts in a set of B-Reps), or when all possible compatible parts in a set have been explored (e.g., when all parts in a set of B-Reps have been selected such that the mating score meets a predetermined threshold when assembled on a mating axis defined by the data).

[0021] For example, this method may include selecting an initial part from the set, e.g., a part containing the most B-Rep entities. Alternatively, this method may include selecting an initial part via user input. In the first iteration, this method may include calculating all mating scores between all possible pairs of B-Reps in the set. This is done by applying a neural network to all possible pairs. Alternatively, this application of the neural network may be done at an earlier stage. Alternatively, this method may calculate these scores for only some pairs, i.e., exclude pairs that are known to be incompatible beforehand. The first iteration then optionally includes ranking one or more B-Reps in descending order of their mating scores with the initial B-Reps, thereby prioritizing the retrieved B-Reps that are more relevant to mating with the initial B-Reps. The first iteration may then include selecting a B-Rep that has the highest mating score with the initial B-Rep, or selecting one of the K B-Reps that have the highest mating score with the initial B-Rep (for example, randomly or by the user), where K is a predetermined integer.

[0022] The first iteration also involves assembling the initial parts with the selected B-Rep based on data defining the mating axis. This involves applying a neural network to find the mating axis and assembling the B-Rep along this axis (by any appropriate CAD software assembly function / method).

[0023] In the second iteration, the method of use may proceed in the same manner as in the first iteration. From the remaining B-Reps in the set (i.e., B-Reps not selected in the first iteration), select the B-Rep (or one of the K B-Reps with the highest mating score) that has the highest mating score with the assembly obtained from the first iteration. This may involve applying the neural network to all possible pairs of the assembly and each of the other remaining B-Reps to find their mating scores and performing the selection according to these mating scores as described above. Alternatively, this may involve selecting the remaining B-Rep (or one of the remaining B-Reps as described above) that has the highest mating score with one of the B-Reps that already form the assembly, according to the mating scores already calculated.

[0024] A second iteration also includes assembling the assembly from the previous iteration with the selected B-Rep, based on data defining the mating axis of the pair consisting of the assembly and the selected B-Rep. This may include applying a neural network to this pair, or to the pair consisting of the selected B-Rep and one of the B-Reps that have already formed an assembly, in order to find the axis.

[0025] This method of use may continue iterations until there are no other compatible B-Reps according to the mating score, or when the maximum number of B-Reps in the set is reached.

[0026] In alternative examples, the iterative application of neural networks may include the following:

[0027] In the first iteration, a pair of B-Reps is selected from the set. The selection of the pair may be performed randomly and / or via user action, for example, at least one B-Rep may be selected via user action and the other randomly selected from the set, or both B-Reps may be randomly selected from the set. The first iteration also includes applying the neural network to the pair of B-Reps and outputting a mating score. If the B-Reps of the pair are compatible according to the mating score (e.g., the mating score exceeds a predetermined threshold), the neural network also outputs data defining the mating axis. The first iteration also includes assembling a pair of B-Reps. If the B-Reps of the pair are not compatible according to the mating score (e.g., the mating score falls below a predetermined threshold), the first iteration may include selecting another pair of B-Reps. For example, if one of the B-Reps of the pair is selected via user action, the first iteration may randomly select another B-Rep and repeat the above steps.

[0028] In the second iteration, the method may select a pair containing an assembly obtained from the first iteration (i.e., the previous iteration) and another B-Rep selected from the set (e.g., randomly). The second iteration also includes applying the neural network to the pair of B-Reps and outputting a mating score. If the B-Reps of the pair are compatible according to the mating score (e.g., the mating score exceeds a predetermined threshold), the neural network also outputs data defining the mating axis. The second iteration also includes assembling a pair of B-Reps.

[0029] This method may continue to perform iterations until a stopping criterion is reached. For example, iterations may be performed until there are no more B-Reps in the set with a mating score exceeding a predetermined threshold, or until a predetermined number of iterations is reached. This method may include tracking the order in which parts are assembled during iterations.

[0030] In all of the above examples, this method of use ensures that the resulting assembly can effectively mate along various mating axes defined by the data. The resulting assembly has the result of improved rigidity, for example, because mating occurs on the best possible axis and between the most compatible individual parts.

[0031] This method is data-driven because it leverages a dataset in which a neural network has been trained to acquire assemblies. Furthermore, because this method iteratively applies the neural network, it enables the rapid generation of assemblies of mechanical parts resulting from a set of 3D parts. In fact, the neural network allows this method to create new assemblies (where multiple parts are assembled together) without needing to know the final assembly state in advance. Thus, assemblies manufactured in the real world may be completely new while retaining strong mechanical properties when assembled.

[0032] This method of use may further include applying optimization to the assembly. The optimization may include fixing the degrees of freedom between the parts of the assembly represented by the B-Rep. The optimization may also include suppressing the assembly from containing cut or mis-oriented parts, thereby fixing the degrees of freedom. The optimization may include an objective function that fixes the degrees of freedom according to a given constraint or physical criterion, e.g., how two parts should be oriented relative to each other, or how they may be arranged for assembly. Thus, the optimization facilitates that parts assembled along the mating axes of the B-Rep entities are fully constrained to have only one connected assembly.

[0033] Furthermore, a process is provided that includes performing this method and / or usage. The performance of the training method may also be called the “offline stage,” and the performance of the usage may also be called the “online stage.” The offline stage and the online stage may be performed by different systems, different entities, or in different locations.

[0034] The training method or usage method may further include computing the embeddings of a set of B-Reps by applying a neural network. In other words, the method may compute the embeddings in an offline stage, or the usage method may compute the embeddings in an online stage. Computing the embeddings in an offline stage may include applying a neural network to pairs of B-Reps, outputting their respective embeddings, and storing the pairs of B-Reps in association with their respective embeddings.

[0035] Furthermore, a manufacturing process is provided for producing a physical product corresponding to an assembly of mechanical parts. The manufacturing process may include obtaining a trained neural network, for example, by performing the method described herein. The process may determine an assembly of parts by performing the usage method on a set. For example, the usage method may start with initial parts (e.g., provided by the user and / or designer) and obtain the assembly described above. Optionally, the manufacturing process may include applying the aforementioned optimization to the assembly. The optimization fixes the degrees of freedom between the parts of the assembly represented by the B-Rep. In other words, the optimization facilitates the complete constraint of the parts of the assembly. This allows for the improvement of desired physical properties, such as stiffness, by using stiffness for optimization purposes, for example. The manufacturing process may also include outputting a B-Rep representing the assembly of parts obtained from the determination. The manufacturing process may also include using the obtained B-Rep to manufacture a physical product.

[0036] Using an output B-Rep to manufacture a part assembly specifies any real-world action or set of actions that are involved in / participate in the manufacture of the part assembly represented by the acquired B-Rep. Using an acquired B-Rep to manufacture a part assembly may include, for example, the following steps: • Edit the acquired B-Rep considering the manufacturing process. • Performing simulations based on acquired B-Rep and / or corresponding feature trees, for example, simulations for verifying mechanical use and / or manufacturing properties and / or constraints (e.g., structural simulations, thermodynamic simulations, aerodynamic simulations). Optionally, edit the B-Rep (or its feature tree) obtained based on the simulation results and reapply optimizations to the edited results. Optionally (i.e., depending on the manufacturing process used, the production of the mechanical product may or may not include this step), the manufacturing file / CAM file for the production / manufacturing of the manufactured product is determined (e.g., automatically) based on the (e.g., edited) B-Rep (or its feature tree). The manufacturing file optionally includes a list of parts that make up the assembly (optionally in the order found during iterations when the usage is performed) and mating axis data information. • Send the acquired B-Rep (e.g., in CAD file format) and / or manufacturing files / CAM files to the factory. and / or • To produce / manufacture (e.g., automatically) an assembly of parts originally represented by the acquired B-Rep, based on the determined manufacturing file / CAM file or B-Rep. This may include (e.g., automatically) supplying the manufacturing file / CAM file and / or CAD file to the machine performing the manufacturing process.

[0037] This final production / manufacturing step may be called a manufacturing step or production step. This step manufactures / produces an assembly of parts based on its CAD model (e.g., B-Rep) and / or CAM file, for example, when the CAD model and / or CAD file is supplied to one or more manufacturing machines or computer systems controlling the machines. The manufacturing step may include performing any known manufacturing process or set 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.

[0038] Therefore, the manufacturing process leverages this method for improved real-world production, as it enables the rapid generation of new assemblies based on each B-Rep pair obtained. The assembly of parts obtained by assembling these machine parts exhibits improved physical performance, particularly improved mating strength. In fact, since manufacturing is based on a file containing parts and mating shafts, the manufactured assembly consists of machine parts identified as best suited for mating along the mating shaft.

[0039] The method of this disclosure is computer-implemented. This means that the steps (or substantially all steps) of the method are performed by at least one computer, or any similar system. Thus, the steps of the method are performed by the computer, possibly fully automatically or semi-automatically. In the example, the triggering of at least some steps of the method may be performed through user-computer interaction. The required level of user-computer interaction may depend on the anticipated level of automation and may be balanced with the need to implement user preferences. In the example, this level may be user-defined and / or predefined.

[0040] A typical computer implementation of the method of this disclosure is to perform the method on a system adapted for this purpose. The system may comprise a processor and a processor coupled to memory (and optionally a graphical user interface (GUI)), the memory which stores a computer program containing instructions for performing the method. The memory may also store a database. The memory is any hardware adapted for such storage and may include several physically distinct parts (e.g., a part for the program and possibly a part for the database).

[0041] Figure 2 shows an example of a system, where the system is a client computer system, such as a user's workstation.

[0042] The client computer in this example comprises a central processing unit (CPU) 2010 connected to an internal communication bus (BUS) 2000, and random access memory (RAM) 2070 also connected to the bus. The client computer further comprises a graphical processing unit (GPU) 2110 associated with video random access memory 2100 connected to the bus. The video RAM 2100 is also known in the art as a frame buffer. A mass storage controller 2020 manages access to mass storage devices such as a hard drive 2030. Mass storage devices suitable for tangibly executing computer program instructions and data include all forms of non-volatile memory, including, for example, semiconductor memory devices such as EPROMs, EEPROMs, and flash memory devices, magnetic disks such as internal hard disks and removable disks, and magneto-optical disks. Any of the above may be supplemented or incorporated by specially designed application-specific integrated circuits (ASICs). A network adapter 2050 manages access to the network 2060. The client computer may also include tactile devices 2090 such as a cursor control device and a keyboard. A cursor control device is used in a client computer to allow the user to selectively position the cursor at any desired location on the 2080 display. Furthermore, the cursor control device allows the user to select various commands and input control signals. The cursor control device includes many signal generating devices for input control signals to the system. Typically, the cursor control device may be a mouse, with mouse buttons used to generate signals. Alternatively or additionally, the client computer system may include a sensitive pad and / or a sensitive screen.

[0043] A computer program may include instructions that can be executed by a computer, and the instructions include means for causing the system to execute the Method. The program may be recordable on any data storage medium, including the system's memory. The program may be implemented, for example, in digital electronic circuits, or in computer hardware, firmware, software, or a combination thereof. The program may be implemented as a device, for example, as a product tangibly implemented in a machine-readable storage device for execution by a programmable processor. The steps of the Method may be executed by a programmable processor that executes a program of instructions for performing the functions of the Method by manipulating input data and producing outputs. Thus, the processor may be programmable and coupled to receive data and instructions from a data storage system, at least one input device, and at least one output device, and to transmit data and instructions to them. The application program may be implemented in a high-level procedural or object-oriented programming language, or optionally in assembly or machine language. In any case, the language may be a compiled or interpreted language. The program may be a full installation program or an update program. In any case, the application of the program on the system results in instructions for executing the Method. Alternatively, the computer program may be stored and executed on a server in a cloud computing environment, which communicates with one or more clients over a network. In such a case, the processing unit executes the instructions contained in the program, thereby enabling this method to be executed in the cloud computing environment.

[0044] This method is a machine learning method (also called a "training method") for assembling machine parts. In other words, the training method leverages machine learning to provide a solution for assembling machine parts. The assembly is based on the mating score and mating axis of B-Rep pairs. In other words, the mating score and mating axis serve as criteria for determining the assembly of the machine parts.

[0045] As is known from the field of machine learning, processing input by a neural network involves applying an operation to the input, and the operation is defined by data containing weight values. Therefore, training a neural network involves determining weight values ​​based on a dataset (configured for such training), and such a dataset is sometimes called a training dataset. For this purpose, a dataset contains data pieces, each of which forms a training sample. A training sample represents the variety of situations in which the neural network will be used after it has been trained. A dataset may contain 100, 1000, 10000, or more (e.g., 25000), or more than 100000 training samples.

[0046] The training method includes step S10 of providing a dataset. Step S10 of providing a dataset may include obtaining such a dataset from a data storage medium and / or downloading it from a remote location. Alternatively, step S10 of providing a dataset may include creating a dataset, which may include annotating B-Reps as described further below.

[0047] Such a dataset is a pair of boundary representations (B-Reps). Any B-Rep described herein represents a machine part. Specifically, a B-Rep is a persistent data representation of a machine part. A B-Rep may be the result of calculations and / or a series of operations performed during the design phase of the machine part being represented. The shape of the machine part as displayed on a computer screen when the modeled object is represented may be a B-Rep (e.g., a tessellation of a B-Rep). Each pair is labeled with mating compatibility data and mating shaft compatibility data. In other words, each pair of B-Reps is associated within the dataset with data corresponding to mating compatibility data and mating shaft compatibility data.

[0048] B-Rep includes entities such as topological entities and geometric entities. Topological entities (also referred to in this disclosure as B-Rep entities) are faces, edges, and vertices. Geometric entities are 3D objects, surfaces, curves, and points. By definition, a face is the bounded portion of a surface called a supporting surface. An edge is the bounded portion of a curve called a supporting curve. A vertex is a point in 3D space. They relate to each other as follows: The bounded portion of a curve is defined by two points (vertices) on the curve. The bounded portion of a surface is defined by its boundary, which is a set of edges on the surface. The boundaries of multiple edges of a face are connected by sharing vertices. Faces are connected by sharing edges. Two faces are adjacent if they share an edge. Similarly, two edges are adjacent if they share a vertex. In CAD systems, a B-Rep collects the "is bounded by" relationships, the relationships between topological entities and supporting geometry, and the mathematical descriptions of the supporting geometry into an appropriate data structure. An internal edge of a B-Rep is an edge shared by exactly two faces. By definition, boundary edges are not shared and are bound by only one face. By definition, boundary faces are bound by at least one boundary edge. A B-Rep is said to be closed if all of its edges are internal edges. A B-Rep is said to be open if it contains at least one boundary edge. Closed B-Reps are used to model thick 3D volumes to define the interior portion of the space that (virtually) encloses a material. Open B-Reps are used to model 3D skins, which represent 3D objects that are small enough that their thickness is negligible.

[0049] A key advantage of B-Rep over any other type of representation used in CAD modeling is its ability to accurately represent arbitrary shapes. All other representations used, such as point clouds, distance fields, and meshes, perform approximations of the shape they represent through discretization. B-Rep, on the other hand, includes surface equations that represent the exact design and therefore constitute a true "master model" for further manufacturing, whether it's for generating toolpaths for a CNC or discretizing to the correct sample density for a given 3D printing technology. In other words, by using B-Rep, a 3D model can be an accurate representation of the manufactured object. B-Rep is also advantageous for simulating the behavior of 3D models. In terms of stress, heat, electromagnetics, or other analyses, it supports local refinement of simulation meshes to capture physical phenomena, and for kinematics, it supports true contact modeling between surfaces. Finally, B-Rep allows for a small memory and / or file footprint. In fact, this is because the representation includes surfaces based only on parameters. In other representations such as meshes, an equivalent surface would contain up to several thousand triangles. Furthermore, this is because B-Rep does not include any historical information.

[0050] A B-Rep may also be represented by a B-Rep graph. Such a graph represents both the geometry and topology of the B-Rep because it includes graph nodes representing the elements of the B-Rep (such as B-Rep entities) and graph edges representing the topological relationships between elements, which are represented by nodes connected by graph edges. In the example, each graph node may represent each edge and each face. This means that for each edge of the B-Rep, there is a graph node, and for each face of the B-Rep, there is a graph node. In other examples, the B-Rep graph may include graph nodes representing only the faces and edges of the B-Rep. Alternatively, the B-Rep graph may include graph nodes representing only the edges of the B-Rep. Each graph node may further include geometric and / or topological features associated with (i.e., attached to) the graph node. A feature is a vector (also called a feature vector) that describes data, such as geometric and / or topological data associated with a node and characterized by a B-Rep element represented by a graph node.

[0051] A B-Rep may be converted to a B-Rep graph by loading the B-Rep's parts using a CAD backend and extracting the relevant features. For example, the conversion to a B-Rep graph may involve mapping the edges and faces (i.e., topological entities) of the B-Rep to graph nodes (i.e., graph vertices) and mapping the adjacencies of these topological entities to graph edges. Vertex features encode the geometric properties of the corresponding entities. In other examples, the conversion may also involve passing an additional adjacency matrix showing the adjacent entities for each type of topological entity. One widely used open format for representing B-Reps is the STEP data format, which has an ASCII structure and is therefore easy to read.

[0052] B-Rep may represent the geometry of a mechanical part or an assembly of parts (or equivalently, an assembly of parts, for an assembly of parts may be considered a part in itself from the perspective of this method, or this method may be applied independently to each part of the assembly), or more generally, an assembly of any rigid body (e.g., a mobile mechanism). Therefore, B-Rep may represent any industrial product such as machine parts, for example, parts for land vehicles (e.g., passenger car and light truck equipment, racing cars, motorcycles, truck and motor equipment, trucks and buses, trains), parts for aircraft vehicles (e.g., airframe equipment, aerospace equipment, propulsion equipment, defense products, aircraft equipment, space equipment), parts for marine vehicles (e.g., naval equipment, merchant ships, offshore equipment, yachts and workboats, marine equipment), general machine parts (e.g., industrial manufacturing machinery, large mobile machinery or equipment, installation equipment, industrial equipment products, metalworking products, tire manufacturing products), electrical machinery or electronic components (e.g., home appliances, security and / or control and / or measuring products, computing and communication equipment, semiconductors, medical equipment and devices), consumer goods (e.g., furniture, home and garden products, leisure goods, fashion products, hard goods retailer products, soft goods retailer products), packaging (e.g., food and beverages and tobacco, beauty and personal care, household goods packaging).

[0053] Mating compatibility data represents the degree of mating compatibility between mechanical parts represented by a pair. “Mating compatibility” means any indicator (e.g., a value) of the degree to which the mechanical parts represented by both B-Reps can mate (i.e., assemble) together. Therefore, mating compatibility data may have a value indicating whether the mechanical parts represented by both B-Reps can mate together, for example, 1 if they can mate and 0 if they cannot. Mating compatibility data may also include intermediate values ​​between 0 and 1. For example, mating compatibility data with a value of 0 may indicate that there is no mating compatibility between the two mechanical parts represented by the pair, while a value of 1 may indicate that the mechanical parts represented by the pair of B-Reps are fully compatible to mate together. It should be understood that the above numbers are examples, and other numbers or ranges may be used (e.g., 0 and 10 instead of 0 and 1, or the range [0,10] instead of [0,1]). In the example, the mating compatibility data may have a higher mating compatibility value (closer to 1) for pairs of B-Rep parts that can be mated under constraints that significantly reduce degrees of freedom (e.g., cylindrical constraints or slider constraints), and a lower compatibility value for pairs of parts that can be mated under constraints that still allow many degrees of freedom of motion (e.g., planar constraints).

[0054] Mating axis compatibility data represents the degree of compatibility between the mechanical parts represented by the pair, along the mating axis defined by the pair of B-Rep entities of the pair. “Mating axis compatibility” means any indicator of the degree to which the mechanical parts represented by both B-Reps may be aligned along the same mating axis, for example, within a coordinate frame. The mating axis relates to the pair of B-Rep entities (e.g., topological entities such as faces, edges, and vertices, and / or geometric entities, as defined above) of each B-Rep in the pair. The mating axis may define the origin and axis vectors of the coordinate frame indicating the direction and orientation in which the parts represented by the pair's B-Reps should be mated. The mating axis may also follow physical constraints, for example, regarding how the mechanical parts represented by the pair should be assembled. The mating axis compatibility data may include the respective axes for each B-Rep entity of the corresponding B-Reps in the pair. Mating axis compatibility data may include indicators on each axis for each B-Rep entity, e.g., each origin defined for each B-Rep entity, and each direction vector (e.g., normal vector) for each B-Rep entity. A mating axis is one in which, for each B-Rep entity, each pair of axes (i.e., each axis of the two entities) can align with the mating axis when the two B-Reps are mated together. Each origin and each direction vector may be defined according to physical constraints on how the mechanical parts represented by the pair should be assembled.

[0055] For example, for any B-Rep entity having the shape of a planar surface in this specification / disclosure, the origin of each may be the centroid of the planar surface, and the direction vector of each may be the normal to the plane. For a B-Rep entity having the shape of a cylindrical surface, the origin of each may be the origin of the coordinate system (e.g., located at the central axis of the cylinder) (e.g., in Cartesian coordinates), and the direction vector of each may be the axis of the torsion (e.g., perpendicular to the base of the cylinder). For a B-Rep entity having the shape of a conical surface, the origin of each may be the origin of the coordinate system (e.g., located at the center of the base of the conical surface), and the direction vector of each may be the axis of the torsion (e.g., perpendicular to the base of the cone). For a B-Rep entity having the shape of a spherical surface, the origin of each may be the origin located at the center of the sphere, and the direction vector of each may be the axis of rotation, e.g., the z-axis in Cartesian coordinates (relative to the origin). For B-Rep entities having a torus surface shape, each origin may be the origin located at the center of the torus, and each direction vector may be oriented in the direction of rotation of the torus (for example, with respect to the origin, e.g., the axis of rotation of the torus). For B-Rep entities having an elliptic cylindrical surface shape, each origin may be the origin of the coordinate system (for example, located at the central axis of the cylinder), and each direction vector may be an axial vector in the torsional direction (for example, perpendicular to the bottom surface of the surface). For B-Rep entities having an elliptic cone surface shape, each origin may be the origin of the coordinate system (for example, located at the center of the bottom surface of the elliptic cone surface), and each direction vector may be an axial vector in the torsional direction (for example, perpendicular to the bottom surface of the cone). For B-Rep entities having a line curve shape, each origin may be the starting point (for example, the end of the line, or any other point in the line), and each direction vector may be a line parallel to the line.For B-Rep entities with an arc curve shape, their origin may be the center of the arc, and their direction vectors may be perpendicular to the arc. For B-Rep entities with a circle curve shape, their origin may be the center of the circle's arc, and their direction vectors may be perpendicular to the arc. For B-Rep entities with an elliptical curve shape, their origin may be the center of the elliptical curve's arc, and their direction vectors may be perpendicular to the elliptical curve. For B-Rep entities with an elliptical curve shape, their origin may be the center of the elliptical curve's arc, and their direction vectors may be normal vectors to the elliptical curve.

[0056] Step S10, which provides the dataset, may include annotating pairs of B-Rep with mating compatibility data and / or mating shaft compatibility data. For example, step S10, which provides the dataset, may include obtaining pairs of B-Rep (e.g., representing machine parts) from an existing dataset (without previous mating compatibility data and / or mating shaft compatibility data).

[0057] Annotating a given pair of B-Reps in an existing dataset may include positively labeling the pair (i.e., creating mating compatibility data with a value of 1 or greater than a predetermined threshold) if the pair has mated together at least once in the existing dataset. Alternatively, annotation may include negatively labeling the pair (i.e., creating mating compatibility data with a value of 0 or less than a predetermined threshold) by randomly selecting two parts from the existing dataset that have never mated together in an assembly. Thus, the dataset may include negatively labeled pairs in addition to positively labeled pairs. This improves the robustness of training. Annotating a positively labeled pair of B-Reps may further include adding information about mating axis compatibility data, such as mating axes that define the origin and axis vectors of a coordinate frame indicating the direction and orientation in which the pair of B-Reps should be mated.

[0058] The dataset contains pairs of B-Rep labeled with mating compatibility data. A subset of B-Rep pairs may be labeled with mating compatibility data that includes information indicating that such pairs of B-Rep cannot mate together. In other words, such a subset of B-Rep pairs are “negative” pairs that cannot mate together along any axis. The dataset may also contain a subset of B-Rep labeled with mating compatibility data that includes information indicating that the pairs can mate together. In such a case, the B-Rep pairs are compatible according to the mating compatibility data. Such a subset of B-Rep is also labeled with mating axis compatibility data. In other words, such a subset of B-Rep pairs are “positive” pairs. The training method may take any proportion of the negative or positive B-Rep pair subsets to enable accurate learning of pairs that can mate together.

[0059] The training method involves training a neural network based on a dataset. A neural network is a function that contains a set of connected nodes, also called “neurons.” Each neuron receives an input and outputs the result to other neurons connected to it. Neurons and the connections linking each of them have weights, which are adjusted through training. In the context of this disclosure, “training a neural network based on a dataset” means that the dataset is the training / learning dataset for the neural network, and that the values ​​of the neural network’s weights are set based on it. In other words, training determines the values ​​of the neural network’s weights based on the variability of pairs of B-Reps labeled with mating compatibility data and mating axis compatibility data (where such data exists if the pair of B-Reps are compatible according to the mating compatibility data), as represented by the samples contained in the provided dataset.

[0060] Training may be supervised training. The training method may be configured so that a portion of the dataset's data is used as ground truth data. Thus, the dataset is used to train the neural network in supervised mode. As is known from the field of machine learning, the neural network may therefore compare its output to the ground truth data, and the weights of the neural network may be adjusted through training so that the neural network's output matches the ground truth data.

[0061] The neural network is configured to take pairs of B-Reps (B-Rep) representing machine parts or assemblies of machine parts as input. The pairs of B-Reps may be taken as input in any way. In the example, the neural network may take the B-Rep graph representations of each B-Rep in the pair as input (i.e., the neural network takes the graphs of both B-Reps as input). In other words, the neural network may take the graph representation of each B-Rep in the pair as input. The graph representation may represent the topological relationships between elements represented by graph nodes connected by graph edges.

[0062] The neural network is configured to output mating scores for a pair of single embeddings. The mating score represents the mating compatibility between the mechanical parts represented by the pair. The score may be a non-negative value representing the mating compatibility between the mechanical parts represented by the pair of single embeddings. In other words, the mating score output by the training method is a value that represents how well the mechanical parts represented by both single embeddings can be assembled together. The mating score may take a value of 1 if the parts can be mated and a value of 0 if they cannot. The mating score may also take a value between 0 and 1, thereby indicating the relative mating compatibility of the two parts. For example, the mating score may have a value that exceeds a predetermined threshold. A pair with a mating score that exceeds a predetermined threshold may be considered compatible for mating from the perspective of this method. It should be understood that the above numbers are examples and other numbers or ranges may be used (e.g., 0 and 10 instead of 0 and 1, or the range [0,10] instead of [0,1]). Each single embedding represents the B-Rep of the pair. A single embedding of a B-Rep is a vector representation of a B-Rep encoded by a neural network, and is known from machine learning. Since a single embedding represents a B-Rep, it captures the topology and geometry of the B-Rep.

[0063] The neural network is also configured to output data defining mating axes. The data defining mating axes may include any indicators of the reference frame for at least one B-Rep entity of each B-Rep in the pair (e.g., all B-Rep entities), such as data including an origin and direction vector indicating the direction and orientation in which the parts represented by the pair of B-Reps should be mated. The data defining mating axes may include data indicating the direction and orientation in which the parts represented by the pair of B-Reps should be mated. The mating axes may also be subject to physical constraints regarding how the mechanical parts represented by the pair should be assembled. For example, the data may include, for each B-Rep entity, an axis on each B-Rep entity (e.g., defined by the origin and direction axis for each B-Rep entity) and data indicating how the B-Rep entities are assembled along the two axes, such as a measure of collinearity between the axes when the first B-Rep entity and the second B-Rep entity are mated together along the mating axis. For example, if both axes are collinear (or substantially collinear), these two axes may define a unique (common) mating axis. For example, the first B-Rep of a pair may include a first B-Rep entity having the shape of a torus surface. The second entity may include a second B-Rep entity having the shape of a cylindrical surface. For the first B-Rep of a pair, the data may include a first axis defining the origin located at the center of the torus and their respective direction vectors oriented in the direction of rotation. The data also includes, for the second B-Rep of a pair, a second axis defining the origin located at the central axis of the cylinder and an axial vector normal to the bottom of the cylinder. The data may include data indicating that the first and second axes are collinear, thereby indicating that the first and second B-Rep entities are compatible for mating together.

[0064] Training determines the values ​​of the neural network's weights based on the dataset, so the neural network leverages the B-Rep geometry and the accompanying mating compatibility data and / or mating axis compatibility data (if such data exists when the pair of B-Reps are compatible according to the mating compatibility data) to output a mating score and data defining the mating axis (if the pair of B-Reps are compatible according to the mating score). In other words, the outputting mating score depends on the values ​​of the neural network's weights set during training. In fact, since the neural network is trained on pairs of B-Reps labeled with mating compatibility data and mating axis compatibility data, the mating score matches the degree of mating compatibility and mating axis compatibility captured in the training dataset. This allows for the implementation of supervised training, where pairs of B-Reps labeled with mating compatibility data and mating axis compatibility data form ground truth data that the neural network is trained to respect when predicting the mating score. This allows the neural network's weights to be trained so that the neural network's output (i.e., the data defining the mating score and mating axis) matches the ground truth data (i.e., the value composed of the mating compatibility data and mating axis compatibility data).

[0065] Therefore, the training method improves machine learning for assembling mechanical parts. In fact, combining the mating scores of a pair of single embeddings with data defining the mating axis provides an objective indicator that mechanical parts represented by a pair can be mated along the corresponding parts of the mechanical parts (represented by the corresponding pair of B-Rep entities of the B-Rep pair). In other words, a neural network trained with the training method outputs an indicator of the mating compatibility of mechanical parts along the mating axis defined by the pair of B-Reps, which effectively shows the mechanical efficiency of the mechanical parts corresponding to the pair of B-Reps when assembled. Thus, mechanical parts with high compatibility (in terms of mating scores together with the data defining the mating axis) are guaranteed to be assembled together in a manner that respects mechanical constraints, and therefore the designer obtains a realistic and efficient assembly from a mechanical standpoint. In fact, thanks to the neural network taking into account the mating scores and the data defining the mating axis, the neural network enables the designer to obtain an assembly of mechanical parts with improved mechanical properties thanks to effectively mated mechanical parts.

[0066] The neural network may include an embedding network. The embedding network is applied to each pair of B-Reps and is configured to output a single embedding for each B-Rep in the pair. The embedding network may be a neural network that is configured (i.e., trained) to determine the mapping (also called encoding) (between the original input space of the dataset (i.e., the space of B-Reps) and a lower-dimensional space known as the embedding space or latent space). The embedding network is configured to output a single embedding for each B-Rep in the pair. The single embedding may be a vector representing B-Rep entities such as faces and / or edges for each B-Rep in the pair. In other words, the neural network encoder outputs one single embedding for each input B-Rep representing a B-Rep entity.

[0067] A single embedding refers to any data, such as a (multidimensional) vector, that has values ​​representing the B-Rep entities of a pair of B-Reps, for example, the faces and / or edges of the B-Reps. In other words, a single embedding may be any data that enables the identification of the faces and / or edges of a pair of B-Reps.

[0068] The neural network may also include a mating-compatible score network. A mating-compatible score network may be a deep neural network model configured to output a mating score based on its input. The score neural network is configured to take a concatenation of single-embedding pairs as input and output a mating score. In other words, the score neural network is configured to take a concatenated single-embedding as input and output a mating score, which is a vector that regroups two vectors, each representing a different single-embedding.

[0069] The neural network may also include an axis network. The axis network is configured to be applied to each pair of B-Reps. The axis network is configured to output data defining the mating axis of a pair if the pair of B-Reps are compatible according to the mating compatibility data. During training, the training method may take each pair of B-Reps (labeled with mating compatibility data and mating axis compatibility data) and output data defining the mating axis. In the example, the method may discard input from the dataset of B-Reps of pairs that are not labeled with mating axis compatibility data. In other words, the method skips training the axis network for negative pairs. Therefore, once trained, the axis network cannot be applied to pairs whose mating score predicted by the mating compatibility score neural network is less than a given threshold. The weights of the axis network may be updated depending on whether the pair of B-Reps are mated along the mating axis. Each mating axis is defined on each B-Rep entity of each B-Rep of the pair. In other words, the training method involves training an axis network to infer whether pairs of B-Reps can be mated based on mating axis compatibility data, and to infer data defining the mating axis. In the example, the inference by the axis network may be a multi-class classification problem (in which case the ground truth score may be equal to 1 only if pairs of B-Reps are mated along a mating axis) or a binary classification problem (in which case the ground truth score may be equal to 1 if the mating axis is collinear with an axis defined on the two B-Reps when the B-Reps are mated). In the example, the axis network may include an MLP neural network.

[0070] The neural network may also include a Siam encoder. The Siam encoder is configured to take a pair of B-Rep as input, and the output of the Siam encoder is passed as input to the mating-compatible score network and the axis network.

[0071] The Siam encoder may be a neural network encoder that is applied twice to each B-Rep of an input pair. In other words, in the implementation, in each training iteration, the training method feeds the first B-Rep of the pair to the Siam encoder, and then the training method feeds the second B-Rep of the pair as input.

[0072] A Sham encoder may be configured to take a pair of B-Reps as input. A Sham encoder may also be a graph neural network that takes node-level vector representations of a pair of B-Reps as input. A training method may provide a B-Rep graph corresponding to the input B-Reps as input to the graph neural network. In the example, the input B-Rep graph may be a hierarchical graph G=(N,E) having a node feature matrix F. To obtain the B-Rep graph, the training method can perform any kind of data processing on the input pair of B-Reps to the Sham encoder, for example, by applying a STEP parser to the B-Reps if they are in STEP format.

[0073] The output of the Siamese encoder is passed as input to the mating compatibility score and axis network. To complete the training iterations, the training method updates the weights of the Siamese encoder, mating compatibility score network, and axis network by backpropagation of the loss function, for example, as described below. In any case, the training method applies the Siamese encoder twice during a single training iteration, but the weights are updated only once at the end of the iteration. Thus, by applying the same network twice, the same weights are applied to both parts. To put it another way, the term "Siamese" simply indicates that there are two different inputs, but a single network is applied. The weights of the Siamese graph neural network encoder (set during training) may also be applied to the nodes and edges of the graph of each input B-Rep (listing its B-Rep entities, their geometric features, and / or adjacencies) to compute their respective single embeddings. In the example, training updates the weights of the Siamese encoder by backpropagating the results of the loss after both input B-Reps have been processed. In the example, the output of the Sham encoder may be a high-dimensional node-level embedding. The node-level embedding may contain information about each node in the B-Rep graph representation of the input B-Rep and their surroundings (e.g., adjacent faces and / or vertices that each node shares). In the example, the output of the Sham encoder may also be an entity-level embedding matrix V.

[0074] The neural network may also include a pooling module. The pooling module may be trainable (i.e., trainable by a training method) or pre-trained (in which case the weights of the pooling module are set). The pooling module may be applied to the output of a sham encoder. In other words, the pooling module takes single embeddings of input B-Rep pairs output by the sham encoder as input. The pooling module may include a pooling layer that downsamples the output of the sham encoder. In the example, the pooling module may include concatenating the single embeddings and applying a graph pooling layer to the concatenation. The graph pooling layer may include a Max Pooling layer and / or an Average Pooling layer. In the example, the pooling module may take an entity-level matrix V output by the sham encoder (representing the arrangement of single embeddings of B-Rep entities for a single B-Rep) as input and output a global embedding vector Vglob.

[0075] The use of a pooling module ensures that the output of the Siam encoder is a low-dimensional representation, which results in improved accuracy and efficiency for determining mating compatibility. This significantly reduces memory requirements.

[0076] The embedded network, mating compatibility score network, and axis network may be trained simultaneously using loss.

[0077] "Trained simultaneously" means that the training method uses a loss to adjust the weights of the embedding network, mating compatibility score network, and axis network simultaneously (i.e., in the same training process). In the example, the embedding network may include a sham encoder (e.g., consisting of ), the axis network may include an MLP neural network (e.g., consisting of ), and the loss may adjust the weights of the sham encoder and MLP neural network simultaneously along with the weights of the score neural network. For example, the loss may output a value (e.g., indicating mating compatibility and / or mating axis compatibility) and backpropagate the value to adjust the weights of the sham encoder, axis network, and score neural network.

[0078] The loss may penalize each pair of B-Rep in the dataset for the discrepancy between the mating compatibility data of the B-Rep pair and the mating score output by the neural network for the B-Rep pair.

[0079] In the example, the loss may penalize the mismatch between the mating compatibility data of the B-Rep pairs and the mating score output by the neural network for the B-Rep pairs with a binary cross-entropy loss. In other words, the training method trains the neural network to infer mating compatibility between B-Rep pairs as a binary classification problem by penalizing the mismatch with the binary cross-entropy loss. The binary cross-entropy loss may take the following form:

number

[0080] The inference result output by the binary cross-entropy loss (BCE) may be a probability score between 0 and 1, where 0 means the B-Rep pairs used in training cannot mate, and 1 means the pairs can mate. N represents the total number of pairs, and yi represents the ground truth score.

number

[0081] Additionally or alternatively, the loss may penalize each pair of B-Reps in the dataset for discrepancies between the mating axis compatibility data for the B-Rep pair and the data defining the mating axis output by the neural network for the pair.

[0082] In this example, the method may skip training the mating axis network for pairs of B-Reps from datasets that are incompatible according to the mating compatibility data. This improves training efficiency because the complexity of the mating axis network can increase exponentially as the size of the mechanical assembly represented by the B-Reps increases, and therefore, skipping training for pairs that cannot mate together allows for an improvement in the overall training time.

[0083] The loss may penalize the discrepancy between the mating axis compatibility data of the B-Rep pair and the data defining the mating axis output by the neural network for the pair using the binary cross-entropy loss described above. The inference result output by the binary cross-entropy loss BCE (output by the loss) may be a probability score between 0 and 1, where 1 means that the axis pair is collinear with the axis pair to which the two objects are mated.

[0084] Alternatively, the loss may penalize the discrepancy between the mating axis compatibility data for a pair of B-Rep models and the data defining the mating axes output by the neural network for the pair using a mean squared error (MSE) loss. In other words, the training method trains the neural network using the loss and infers the mating axis data as a multi-class classification problem (for pairs of B-Rep models that are compatible according to the mating compatibility data), where the ground truth score is equal to 1 only if the two objects can mate along this pair of axes. The mean squared loss may take the following form:

number

number

[0085] This further improves machine learning or the assembly of machine parts. In fact, the losses may be mated together. The losses may be mated when optimizing pair inference, and the losses penalty mismatches between the mating axis compatibility data of the pair of B-Rep and the data defining the mating axis output by the neural network for the pair. Optimize the mating axis inference of the pair of B-Rep. In other words, the losses may be mated along the mating axis. Optimize the pair of B-Rep.

[0086] Examples of the methods described herein are illustrated with reference to Figures 3-6.

[0087] This implementation relates to a learning-based framework 3000 for automatically generating assembly graphs of 3D mechanical assemblies from a set of CAD parts. CAD parts are represented by boundary representations (B-Rep). Figure 3 is referenced to illustrate the learning-based framework, which is divided into a training stage 3100 (also referred to as "offline learning") and an online stage (also referred to as "online assembly"). The training stage of the framework is based on deep learning techniques, i.e., the training method. The training steps are performed on a training dataset containing B-Rep assemblies. The online stage of the framework is based on usage.

[0088] Next, we will explain training stage 3100.

[0089] Training stage 3100 includes a provided dataset 3110 of training samples. The training samples are pairs of B-Rep 3111 and 3112 representing machine parts. The pairs 3111 and 3112 are labeled with mating compatibility data 3113 and mating shaft compatibility data 3114.

[0090] Training stage 3100 also includes a graph representation module 3120 that preprocesses the B-Rep3111,3112 pair as a graph, as described below. The neural network includes the following: i) A Sham B-Rep encoder 3130 that takes a pair of B-Rep 3111 and 3112 graph representations as input and outputs an entity-level embedding matrix. ii) An embedding merge module 3140 that takes an entity-level embedding matrix as input and outputs a data-level embedding 3150 that aggregates topological and geometrical information of the input B-Rep data. iii) A score DNN module 3160 that takes pairs of data-level embeddings as input and outputs a compatibility score. iv) Axis DNN module 3170 that takes a pair of entity-level embedding matrices as input and outputs a mating axis in which the two input data are aligned.

[0091] Training is end-to-end. The loss module calculates both compatibility score loss and mating axis loss, then backpropagates the errors to adjust the weights of the learnable module.

[0092] The neural network outputs a mating score 3180 and data 3190 that defines the mating axis.

[0093] The training method may also include the following subtasks prior to training in the training stage: a) Annotation of dataset 3110. The training method may obtain dataset 3110 from a database containing B-Reps representing raw 3D mechanical assemblies, i.e., unlabeled mechanical parts. Pairs containing subassemblies / parts and single parts are sampled from the database. The training method may generate both positive pairs (i.e., matable pairs) and negative pairs (i.e., non-mating pairs) to perform training. The training method may generate ground truth labels during sampling. An example of annotation is given below. b) Data preprocessing of B-Rep pairs 3111 and 3112 by graph representation module 3120. B-Rep parts and B-Rep assemblies are represented as graphs for processing by a neural network. c) Design of a neural network including a Siam B-Rep encoder 3130, an embedded merge module 3140, a score DNN module 3160, and an axis DNN module 3170, as described above. d) Design of the loss function. The loss function 3170 should optimize the distance between the predicted score and the ground truth score for all pairs, and the distance between the predicted mating axis and the ground truth mating axis for positive pairs. e) Training strategy. The training method involves performing training on a dataset for complex 3D mechanical assemblies.

[0094] Next, I will explain online stage 3200.

[0095] The online stage 3200 aims to generate assembly proposals from the B-Rep database 3210. B-Rep parts are encoded into data-level embeddings using a trained B-Rep encoder 3120 and an embedded merge module.

[0096] Starting with any part from the B-Rep database 3210 as the current subassembly, the online stage may follow an iterative process. The iterative process may run until there are no more parts left in the database, or until the current subassembly meets certain user-defined criteria.

[0097] The iterative process may include the following: I) Pair the current subassembly with the remaining parts in the database and calculate compatibility using the trained score DNN module 3160. Select the mating parts from the top K pairs. II) For the parts to be mated with the current subassembly, calculate the mating axes using the trained axis DNN module 3190. III) Update the current subassemblies and B-Rep database.

[0098] The iterative process may output multiple suggestions for the user to choose from, and an optional optimization module may be applied to generate a 3D assembly with valid mating from the 3D assembly graph.

[0099] Next, we will describe an example of how to provide dataset 3110.

[0100] To train a Sham neural network, this method generates sets of positive and negative pairs. "Positive" means that a pair of CAD parts / subassemblies can mate along a specific mating axis, while "negative" means that the pair cannot mate along any mating axis.

[0101] To generate the data, the training method uses a dataset containing CAD assemblies with the following information for each assembly: (1) B-Rep models of all related parts, and (2) mating axes of all mated part pairs.

[0102] Given such a dataset, the training method takes one assembly and first generates a part-level assembly graph, i.e., a graph connecting all pairs of mated parts, where nodes are related parts and edges are connected parts. The training method then extracts subgraphs (i.e., connection graphs with fewer nodes than the assembly graph) as subassemblies, pairing positive pairs with other connected parts if needed, and negative pairs with other unconnected parts if needed.

[0103] Figure 4 shows an example of a B-Rep pair from the dataset.

[0104] Assembly 4010 may be used to generate assembly graph 4020. The pair may include a first part 4030 and a second part 4040. In this case, they can mate, so the pair is a positive pair. The first part 4030 and the other part 4050 are a negative pair because the pair cannot mate.

[0105] The training method may take into account the following implementation parameters for generating data. • Size of the subassembly. • The total number of pairs generated. • The balance between positive and negative pairs within a training set.

[0106] Next, we will discuss data preprocessing for training.

[0107] Data preprocessing depends on the architecture of the B-Rep encoder. This method constructs an entity-level graph for a single B-Rep, where nodes are topological entities (i.e., faces / edges / co-edges / vertices) and edges represent topological connectivity. Each node is assigned a feature vector that describes both its geometric features (e.g., edge length, face area, etc.) and topological features (e.g., edge type, face type, etc.).

[0108] To extend the graph representation to subassemblies, this method uses a hierarchical graph that constructs an entity-level assembly graph by connecting two entity-level nodes where pairs of parts are mated.

[0109] Figure 5 shows an example of a graph representation. B-Reps (also called parts) 5010-5050 are represented by B-Rep graphs (also called part graphs) 5110-5150. The B-Rep graphs may be assembled as an assembly graph 5200 (as the output of a trained neural network), for example, by establishing edges that connect the B-Rep graphs. The assembly may be represented as B-Rep 5300.

[0110] Next, we will explain the design of neural networks.

[0111] This framework offers high flexibility in designing the deep learning architecture used in the training method. Table 1 below lists the inputs and outputs of each component and details the options. Table 1 The B-Rep encoder may be any graph neural network that learns the node-level vector representation of CAD objects in B-Rep format. UV-Net (Jayaraman, Pradeep Kumar, Aditya Sanghi, Joseph G. Lambourne, Karl DD Willis, Thomas Davies, Hooman Shayani, and Nigel Morris. Disclosed as “Uv-net: Learning from boundary representations.” In Proceedings of the IEEE / CVF conference on computer vision and pattern recognition, pp. 11703-11712. 2021.), B-RepNet (Lambourne, Joseph SB-GCN (Jones, Benjamin, Dalton), Karl DD Willis, Pradeep Kumar Jayaraman, Aditya Sanghi, Peter Meltzer, and Hooman Shayani. “B-Repnet: A topological message passing system for solid models.” Hildreth, Duowen Chen, Ilya Baran, Vladimir G. Kim, and Adriana Schulz. “Automate: A dataset and learning approach for automatic mating of cad assemblies.” ACM Transactions on Graphics (TOG) 40, no.Recently proposed networks, including JoinABLe (disclosed as 6 (2021): 1-18) and JoinABLe (Willis, Karl DD, Pradeep Kumar Jayaraman, Hang Chu, Yunsheng Tian, ​​Yifei Li, Daniele Grandi, Aditya Sanghi et al. “Joinable: Learning bottom-up assembly of parametric cad joints.” In Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition, pp. 15849-15860. 2022), may be used. The network takes a graph with initialized features as input and generates high-dimensional node-level embeddings that include both node information and its surroundings.

[0112] The embedded merge module may be a layer or block with or without learnable parameters, depending on the size of the dataset. For small datasets, one might consider graph pooling layers without learnable parameters, such as max pooling or average pooling. For large datasets, one might consider transformer-based blocks followed by pooling layers.

[0113] The score DNN module may also be a multilayer perceptron (MLP) that takes global embedding vectors for two objects and predicts whether the two objects can be mated. If sufficient training data is available, more complex architectures can be considered.

[0114] The axial DNN module may also be a multilayer perceptron (MLP) that takes local embedding vectors of entity pairs from two objects and predicts whether these objects are matable along a given entity axis. If sufficient training data is available, more complex architectures can be considered.

[0115] Next, I will explain losses.

[0116] The training loss measures the distance between the prediction and the ground truth, and therefore determines the optimization objective of the neural network. The design of the loss affects both data annotation and the training strategy.

[0117] In this example, the training method uses two losses. The first loss optimizes the inference of compatibility scores. The second loss optimizes the inference of mating axes for pairs of matable objects (parts / subassemblies).

[0118] Loss for optimizing compatibility score inference. Inferring compatibility between pairs of objects can be viewed as a binary classification problem. In this case, the result of the inference is a probability score between 0 and 1, where y is the ground truth score (i.e., 1 for matable pairs, 0 for non-mating pairs).

number

number

[0119] Loss for optimizing mating axis inference. Mating axis inference can be considered as either a multi-class classification problem (ground truth score is equal to 1 only if two objects are mated along this pair of axes) or a binary classification problem (ground truth score is equal to 1 if the pair of axes is collinear with the pair of axes on which the two objects are mated). For binary classification problems, the training method adapts the binary cross-entropy loss described above. For multi-class classification problems, this method uses mean squared error loss, where y is the ground truth score.

number

number

[0120] Next, I will explain an example of training.

[0121] The complexity of the axial DNN module increases exponentially as the assembly size increases or the part geometry becomes more complex. To efficiently train the neural network, this method may skip training the axial DNN module when using negative pairs. For positive pairs, instead of training the axial DNN module for all possible combinations of entity pairs, the training method may sample pairs while maintaining a good balance between matable and non-mating pairs. In this example implementation, the training method took 40 hours to train the neural network based on 230,000 assemblies.

[0122] Next, we will describe an example of an online stage.

[0123] The design of this stage is highly flexible to adapt to multiple application scenarios. In this implementation example, the pipeline takes a set of CAD parts to be mated together as input and starts the assembly with the part containing the most entities. It can also start the assembly with the part with the largest volume, or with a user-selected part. At each step of the assembly, we can select the part with the highest confidence score, or probabilistically select a part from the top K proposals in terms of their confidence scores. The assembly stops when there are no more matable parts or when the maximum number of parts is reached. In this example, the inference took 2.5 seconds.

[0124] Figure 6 shows an example of B-Rep6100 input to a neural network and assembly 6200 output depending on how it is used.

[0125] As a result of the training method, each input (part or subassembly) is encoded into a single embedding vector, taking into account its faces, edges, and their respective embeddings in their neighborhoods. Furthermore, the neural network infers compatibility scores between each pair of inputs. The neural network also infers the mating axes of each pair, for example, from the top K pairs with the highest scores.

[0126] Next, each pair is mated based on the predicted mating axis to create a graph assembly. The process is repeated until all pairs of parts or subassemblies with a mating compatibility score exceeding a predetermined threshold are mated.

[0127] Neural networks are trained on well-annotated datasets.

[0128] In addition, the training method achieves automation and time efficiency: it enables the rapid generation of a 3D assembly graph from a set of 3D parts represented as B-Rep.

[0129] The usage is data-driven. In fact, the training method allows for the use of the B-Rep assembly dataset being trained.

[0130] Therefore, considering the manufacturing of mechanical assemblies represented from 3D assemblies, efficient automatic generation of 3D assemblies from a set of 3D parts is achieved.

Claims

1. A computer-implemented machine learning method for assembling mechanical parts based on mating scores and mating axes, (S10) A step of providing a dataset of pairs of boundary representations (B-Reps) representing machine parts, wherein each pair includes at least one B-Rep representing an assembly of machine parts, and each pair is labeled with mating compatibility data and, if the B-Reps of the pair are compatible according to the mating compatibility data, mating axis compatibility data, wherein the mating compatibility data represents the degree of mating compatibility between the machine parts represented by the pair, and the mating axis compatibility data represents the degree of compatibility between the machine parts represented by the pair along the mating axis defined by the pair of B-Rep entities of the B-Reps of the pair, Step (S20) to train a neural network based on the dataset, wherein the neural network takes a pair of B-Rep, each representing a machine part or an assembly of machine parts, as input, A mating score for a pair of single-embedded components, wherein each single-embedded component represents the B-Rep of the pair, and the mating score represents the mating compatibility score between the machine parts represented by the pair, If the B-Rep of the pair is compatible according to the mating score, then the data defining the mating axis and A step configured to output, Computer-implemented methods including those mentioned above.

2. The aforementioned neural network, An embedding network is applied to each pair of B-Reps and configured to output a single embedding for each B-Rep in the pair, A mating compatibility score network configured to take the concatenation of the single embedded pair as input and output the mating score, An axis network configured to be applied to each pair of B-Reps and to output data defining the mating axis of the pair, A computer-implemented method according to claim 1, including the following:

3. The embedded network includes a sham encoder configured to take the pair of B-Reps as inputs, and the output of the sham encoder is passed as input to the mating compatibility score network and the axis network. The method according to claim 2.

4. The method according to claim 3, wherein the neural network includes a pooling module applied to the output of the Siam encoder.

5. The embedding network, the mating compatibility score network, and the axis network are trained simultaneously using loss, and the loss is calculated for each pair of B-Reps in the dataset. A mismatch between the mating compatibility data of the pair of B-Reps and the mating score output by the neural network for the pair of B-Reps, and / or The mismatch between the mating axis compatibility data of the pair in the B-Rep and the data defining the mating axis output by the neural network for the pair. Penalize The method according to any one of claims 2 to 4.

6. A neural network trainable according to any one of claims 1 to 5.

7. A step of obtaining a set of B-Reps, wherein each B-Rep is associated with a single embedding obtained by applying the neural network to the B-Rep; The steps include: determining the assembly of parts based on the set by iteratively applying the neural network to pairs including the B-Rep of the set and the assembly obtained from the previous iteration; A method of using a neural network according to claim 6, including the following:

8. The aforementioned decision is further based on the data defining the mating axis output by the neural network. The method of use described in claim 7.

9. The further step includes applying optimization to the assembly, wherein the optimization fixes the degrees of freedom between the parts of the assembly. The method of use according to claim 7 or 8.

10. The iteration stops when a predetermined number of parts is reached and / or when all possible compatible parts of the set have been searched. The method of use according to any one of claims 7 to 9.

11. The iteration is initiated by the user selecting the B-Rep from the set, or by the system automatically selecting the B-Rep from the set based on predetermined criteria. The method of use according to any one of claims 7 to 10.

12. The step further includes calculating the embedding of the B-Rep of the set by applying the neural network described above. The method according to any one of claims 1 to 5 or 7 to 11.

13. A computer program that, when executed by a computer, includes instructions causing the computer to perform the method according to any one of claims 1 to 5 and / or the method of use according to any one of claims 7 to 12.

14. A computer-readable storage medium on which the computer program described in claim 13 and / or the neural network described in claim 6 is recorded.

15. A system comprising a processor and memory, wherein the memory stores the computer program described in claim 13 and / or the neural network described in claim 6.