Graph alignment techniques for dimensioning drawings automatically

One embodiment of the present invention sets forth a technique for adding dimensions to a target drawing. The technique includes generating a first set of node embeddings for a first set of nodes included in a target graph that represents the target drawing. The technique also includes receiving a second set of node embeddings for a second set of nodes included in a source graph that represents a source drawing, where one or more nodes included in the second set of nodes are associated with one or more source dimensions included in the source drawing. The technique further includes generating a set of mappings between the first and second sets of nodes based similarities between the first set of node embeddings and the second set of node embeddings, and automatically placing the one or more source dimensions within the target drawing based on the set of mappings.

FIELD OF THE VARIOUS EMBODIMENTS

Embodiments of the present disclosure relate generally to computer science and machine learning and, more specifically, to graph alignment techniques for dimensioning drawings automatically.

DESCRIPTION OF THE RELATED ART

Design documentation for a three-dimensional (3D) component commonly includes one or more two-dimensional (2D) drawings of the 3D component. Each 2D drawing includes different views of the 3D component placed within a drawing sheet as well as the dimensions required to manufacture or assemble the 3D component. For example, a 2D drawing could include top, front, side, isometric, section, detail, cutout, auxiliary, exploded, or other views of the 3D component. Each view could include dimensions for various lines, arcs, circles, ellipses, or other entities within the view.

Computer-aided design (CAD) programs include tools that expedite the creation of 2D drawings from models of 3D components. For example, a user could use a CAD program to create a model of a 3D component in the first instance, or a user could load a preexisting model of a 3D component into a CAD program. The user could then use a “smart template” provided by the CAD program to automatically generate multiple drawing sheets for the model that have predefined paper sizes, predefined formats, and predefined views. The smart template also can be used to generate a part lists from the model.

Despite the many ways CAD programs facilitate the creation of 2D drawings from models of 3D components, adding dimensions to a 2D drawing within a CAD program is still a time-consuming and tedious process. For example, a user could use a dimensioning tool provided by a CAD program to manually select dimensions from a model of a 3D component for insertion into a 2D drawing corresponding to the model. The user also could use the dimensioning tool to manually edit, format, place, orient, or otherwise adjust the appearance of each dimension within the 2D drawing. With this type of approach, the user has to continue adding dimensions to and adjusting existing dimensions within the 2D drawing via the dimensioning tool until all manufacturing, assembly, design, industry, company, vendor, documentation, readability, personal, and/or other requirements for the 2D drawing are met.

In an effort to reduce the time and effort associated dimensioning 2D drawings, some CAD programs provide “auto-dimensioning” tools that implement sets of rules for automatically extracting dimensions from a given model of a 3D component and adding the extracted dimensions to a 2D drawing created from the model. One drawback of auto-dimensioning tools is that these tools usually add all of the dimensions included in a model of a 3D component to a given 2D drawing instead of adding only the dimensions from the model that are necessary to manufacture the 3D component. This type of “over-dimensioning” within the 2D drawing can cause extension lines and text for the different dimensions to overlap within the 2D drawing, which negatively impacts the readability of the drawing and the usefulness of the dimensions within the 2D drawing.

As the foregoing illustrates, what is needed in the art are more effective techniques for adding dimensions to computer-generated 2D drawings of 3D components.

SUMMARY

One embodiment of the present invention sets forth a technique for adding dimensions to a target drawing. The technique includes generating a first set of node embeddings for a first set of nodes included in a target graph that represents the target drawing. The technique also includes receiving a second set of node embeddings for a second set of nodes included in a source graph that represents a source drawing, where one or more nodes included in the second set of nodes are associated with one or more source dimensions included in the source drawing. The technique further includes generating a set of mappings between the first set of nodes and the second set of nodes based on one or more similarities between the first set of node embeddings and the second set of node embeddings, and automatically placing at least one dimension included in the one or more source dimensions within the target drawing based on the set of mappings.

One technical advantage of the disclosed techniques relative to the prior art is that, with the disclosed techniques, the amount of time and user effort required to dimension drawings within a CAD program can be substantially reduced. In that regard, the disclosed techniques can be used to perform dimensioning of drawings within a CAD program in a more computationally efficient manner relative to prior art approaches of dimensioning drawings using CAD software. Another technical advantage is that, with the disclosed techniques, user-specified or standardized attributes of dimensions from one or more source drawings can be transferred to a target drawing. Accordingly, dimensions placed into a target drawing automatically via the disclosed techniques are able to conform to various design documentation requirements more readily relative to dimensions placed automatically via conventional rules-based auto-dimensioning tools. These technical advantages provide one or more technological improvements over prior art approaches.

DETAILED DESCRIPTION

In the following description, numerous specific details are set forth to provide a more thorough understanding of the various embodiments. However, it will be apparent to one of skill in the art that the inventive concepts may be practiced without one or more of these specific details.

System Overview

FIG.1illustrates a computing device100configured to implement one or more aspects of the present invention. Computing device100may be a desktop computer, a laptop computer, a smart phone, a personal digital assistant (PDA), tablet computer, or any other type of computing device configured to receive input, process data, and optionally display images, and is suitable for practicing one or more embodiments of the present invention. Computing device100is configured to run a graph generation engine122, a graph analysis engine124, and a mapping engine126that reside in a memory116. It is noted that the computing device described herein is illustrative and that any other technically feasible configurations fall within the scope of the present invention. For example, multiple instances of graph generation engine122, graph analysis engine124, and mapping engine126could execute on a set of nodes in a distributed and/or cloud computing system to implement the functionality of computing device100.

In one embodiment, computing device100includes, without limitation, an interconnect (bus)112that connects one or more processors102, an input/output (I/O) device interface104coupled to one or more input/output (I/O) devices108, memory116, a storage114, and a network interface106. Processor(s)102may be any suitable processor implemented as a central processing unit (CPU), a graphics processing unit (GPU), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), an artificial intelligence (AI) accelerator, any other type of processing unit, or a combination of different processing units, such as a CPU configured to operate in conjunction with a GPU. In general, processor(s)102may be any technically feasible hardware unit capable of processing data and/or executing software applications. Further, in the context of this disclosure, the computing elements shown in computing device100may correspond to a physical computing system (e.g., a system in a data center) or may be a virtual computing instance executing within a computing cloud.

In one embodiment, I/O devices108include devices capable of receiving input, such as a keyboard, a mouse, a touchpad, and/or a microphone, as well as devices capable of providing output, such as a display device and/or speaker. Additionally, I/O devices108may include devices capable of both receiving input and providing output, such as a touchscreen, a universal serial bus (USB) port, and so forth. I/O devices108may be configured to receive various types of input from an end-user (e.g., a designer) of computing device100, and to also provide various types of output to the end-user of computing device100, such as displayed digital images or digital videos or text. In some embodiments, one or more of I/O devices108are configured to couple computing device100to a network110.

In one embodiment, network110is any technically feasible type of communications network that allows data to be exchanged between computing device100and external entities or devices, such as a web server or another networked computing device. For example, network110could include a wide area network (WAN), a local area network (LAN), a wireless (WiFi) network, and/or the Internet, among others.

In one embodiment, storage114includes non-volatile storage for applications and data, and may include fixed or removable disk drives, flash memory devices, and CD-ROM, DVD-ROM, Blu-Ray, HD-DVD, or other magnetic, optical, or solid-state storage devices. Graph generation engine122, graph analysis engine124, and mapping engine126may be stored in storage114and loaded into memory116when executed.

In one embodiment, memory116includes a random access memory (RAM) module, a flash memory unit, or any other type of memory unit or combination thereof. Processor(s)102, I/O device interface104, and network interface106are configured to read data from and write data to memory116. Memory116includes various software programs that can be executed by processor(s)102and application data associated with said software programs, including graph generation engine122, graph analysis engine124, and mapping engine126.

Graph generation engine122, graph analysis engine124, and mapping engine126include functionality to perform automatic dimensioning of drawings. More specifically, graph generation engine122, graph analysis engine124, and mapping engine126may automatically add dimensions to a two-dimensional (2D) drawing instead of requiring a user to manually specify and format the dimensions within the 2D drawing. As described in further detail below, this automatic dimensioning includes converting the 2D drawing into a graph; generating embedded representations of entities, views, and/or other components of the 2D drawing; and using the embedded representations to identify one or more “similar” 2D drawings and add dimensions from the similar 2D drawing(s) into the 2D drawing.

Graph Alignment for Dimensioning Drawings Automatically

FIG.2includes more detailed illustrations of graph generation engine122, graph analysis engine124, and mapping engine126ofFIG.1, according to various embodiments. As mentioned above, graph generation engine122, graph analysis engine124, and mapping engine126operate to automatically perform dimension placements220of one or more dimensions within a target drawing202based on source dimensions218included in one or more source drawings212.

As shown inFIG.2, target drawing202includes a number of views208and a number of entities210associated with views208. For example, target drawing202could include one or more drawing sheets. Each drawing sheet could include top, front, side, isometric, section, detail, cutout, auxiliary, exploded, and/or other views208of a 3D component. Each view could include points, lines, arcs, circles, rays, splines, ellipses, and/or other geometric entities210that depict a 3D component within the view. In another example, target drawing202could include a floor plan, sketch, and/or another depiction of a 2D or 3D component or structure.

Graph generation engine122creates a graph204representing target drawing202. First, graph generation engine122adds a number of nodes214(1)-(3) representing entities210in target drawing202to graph204. Next, graph generation engine122adds a number of edges216(1)-(4) connecting pairs of nodes214within graph204. Each edge in graph204represents a spatial and/or semantic relationship between entities210represented by the corresponding pair of nodes214. Graph generation engine122further associates nodes214and edges216in graph204with attributes of the corresponding entities and relationships within target drawing202and/or a model associated with target drawing202.

For example, graph generation engine122could convert a drawing file that represents target drawing202and is in a binary, structured, or another format into a standardized format. The standardized format could include key-value pairs associated with views208, entities210, and/or other components of target drawing202. Next, graph generation engine122could convert iterate over views208within the standardized format. For each view, graph generation engine122could convert representations of entities210within the view into a set of nodes214in graph204. Each node could include attributes such as a unique identifier, a type of entity represented by the node (e.g., point, line, circle, ellipse, arc, ray, spline, material, manufacturing method, dimension, etc.), and/or one or more attributes related to the geometric entity (e.g., a center, end point, length, normal, start point, radius, angle, and/or another value describing the geometric entity in the view). When two entities210touch, overlap, cross, are connected, are contained within one another, are parallel, are perpendicular, are grouped under the same entity (e.g., an assembly, a view, etc.), have a parent-child relationship or dependency (e.g., one entity is a dimension for another entity, one entity is a material for another entity, one entity is a manufacturing method for another entity, etc.), or share another type of spatial or semantic relationship within the view, graph generation engine122could connect the corresponding nodes with an edge. The edge could include attributes such a unique identifier, two node identifiers for the nodes connected by the edge, the type of relationship represented by the edge, and/or one or more attributes related to the relationship (e.g., the amount of overlap between the two entities210, the distance between the two entities210, the points at which the two entities210touch or overlap, an angle between the two entities210, etc.).

Continuing with the above example, after sets of nodes214and edges216are created for all views208in target drawing202, graph generation engine122could merge the sets of nodes214and edges216into a single set of nodes and edges within an overall graph204for target drawing202. Within the overall graph204, each entity is represented by a single node, even if the entity is found in multiple views208. Graph generation engine122could also maintain a separate view-specific version of graph204for each view in target drawing202. Each view-specific version of graph204includes a subset of nodes214and edges216representing the entities and relationships in the corresponding view. Generation of graphs from multiple views in a drawing is described in further detail below with respect toFIGS.3A-3B.

In some embodiments, graph generation engine122also includes functionality to convert drawings with existing dimensions into graphs. For example, graph generation engine122could be used to convert drawings that have been manually dimensioned by users into graphs. As with target drawing202, graph generation engine122could convert each drawing from a binary, structured, and/or another format into a standardized format. The standardized format would include representations of dimensions in the drawing, in addition to representations of views, entities, and/or other components in the drawing. Graph generation engine122could use the standardized format to generate a graph with nodes and edges that represent the entities and relationships within the corresponding drawing. Graph generation engine122could also use the standardized format to add dimensions to the graph and associate the dimensions with nodes and/or edges representing the corresponding entities and/or relationships. Within the graph, each dimension could include a unique identifier, the value of the dimension, a unit associated with the dimension (e.g., inches, feet, meters, degrees, radians, etc.), the type of dimension (e.g., linear, angular, radial, ordinate, etc.), one or more attributes that describe the appearance of the dimension within the drawing (e.g., start point, end point, rotation, normal, etc.), and/or one or more attributes that describe the appearance of the dimension within the model (e.g., a start and end point of the dimension within the 3D space occupied by the model).

Graph analysis engine124uses an embedding model206to generate target node embeddings232representing nodes214in graph204. In some embodiments, embedding model206includes a graph neural network with an encoder and a core component. The encoder converts each node in a given graph into a node embedding that is a fixed-length vector representation of the node's attributes and/or associated edges in a lower-dimensional space. The core component performs a message passing procedure that iteratively updates each node embedding based on target node embeddings232for an increasing “radius” other nodes relative to the node until a certain number of updates is performed. The structure of embedding model206is described in further detail below with respect toFIG.4.

Graph analysis engine124also uses embedding model206and/or target node embeddings232to generate a target graph embedding234representing graph204and one or more target view embeddings236representing views208. In one or more embodiments, graph analysis engine124uses mean pooling, max pooling, and/or another aggregation operation to combine target node embeddings232for multiple nodes214in graph204into a single target graph embedding234representing graph204. Graph analysis engine124may also use the same aggregation operation or a different aggregation operation to combine target node embeddings232for nodes214in a view-specific version of graph204into a target view embedding representing the corresponding view.

Those skilled in the art will appreciate that graph analysis engine124may be configured to generate target node embeddings232, target graph embedding234, and target view embeddings236in other ways. For example, separate embedding models could be used to produce target node embeddings232, target graph embedding234, and/or target view embeddings236. In a second example, target node embeddings232, target graph embedding234, and/or target view embeddings236could be produced using convolutional kernels, attention mechanisms, and/or other types of deep learning or computer vision techniques. In a third example, graph analysis engine124could use a hierarchical graph embedding model206to generate target node embeddings232, target graph embeddings234, and target view embeddings236. The hierarchical graph embedding model206could include a differentiable graph pooling module that generates a hierarchical representation of an input graph by clustering embeddings generated by a given layer and aggregating the embeddings in each cluster into a single embedding that used as input into the next layer. The first layer of the hierarchical graph embedding model206could be used to generate target node embeddings232for nodes in a given version of graph204, and the last layer of the hierarchical graph embedding model206could be used to generate a single target graph embedding234representing the version of graph204. Thus, the hierarchical graph embedding model206could be applied to the overall graph204representing target drawing202to produce target node embeddings232that represent nodes214within the overall graph204and target graph embedding234. The hierarchical graph embedding model206could also be applied to each view-specific version of graph204to produce target node embeddings232that represent nodes214within the view-specific version and a target view embedding for the corresponding view.

After target node embeddings232, target graph embedding234, and target view embeddings236are produced, mapping engine126matches target graph embedding234to a number of source graph embeddings240representing source drawings212with existing dimensions. For example, mapping engine126could match target drawing202to a set of source drawings212from the same user, a set of source drawings212from users associated with a team or project, a set of source drawings212associated with a company or organization, a set of source drawings212associated with one or more tags or categories, a set of source drawings212with standardized components and dimensions, a set of source drawings212selected by the user creating target drawing202, a set of source drawings212available on a computer aided design (CAD) program, a manually curated set of source drawings212, and/or a set of source drawings212associated with another attribute. Mapping engine126could retrieve precomputed source graph embeddings240for source graphs representing source drawings212from a repository (e.g., after source graph embeddings are generated by graph analysis engine124and/or embedding model206). Mapping engine126could also, or instead, receive one or more source graph embeddings240from graph analysis engine124(e.g., if the source graph embedding(s) have not been precomputed or are not in the repository).

Next, mapping engine126determines graph similarities242between target graph embedding234and source graph embeddings240and uses graph similarities242to identify one or more source drawings212as source dimension candidates244from which source dimensions218can be retrieved and added to target drawing202. For example, mapping engine126could calculate graph similarities242as a cosine similarity, Euclidean distance, dot product, and/or another measure of vector similarity or distance between target graph embedding234and each source graph embedding. Mapping engine126could then rank source drawings212by descending graph similarity and use the ranked source drawings212to select, as source dimension candidates244, one or more source drawings212with the highest graph similarities242and/or one or more source drawings with graph similarities242that exceed a numeric or percentile threshold.

Mapping engine126then retrieves source node embeddings246for nodes in one or more source graphs representing source dimension candidates244and calculates node similarities248between target node embeddings232for nodes214in graph204and source node embeddings246. For example, mapping engine126could retrieve precomputed source node embeddings246from a repository and/or receive one or more sets of source node embeddings246for the source graphs from graph analysis engine124. Mapping engine126could calculate node similarities248as a cosine similarity, Euclidean distance, and/or another measure of vector similarity or distance between each of target node embeddings232and each of source node embeddings246. Thus, for m target node embeddings232and n source node embeddings246, mapping engine126would generate m×n node similarities248.

Mapping engine126uses node similarities248to generate node mappings250between nodes214in graph204and a corresponding set of nodes associated with a source drawing included in source dimension candidates244. As described in further detail below with respect toFIG.5, mapping engine126may use a bipartite alignment technique to generate node mappings250so that an “overall” similarity that is calculated by aggregating node similarities248between nodes214and the corresponding set of nodes mapped to nodes214is maximized. Mapping engine126may also, or instead, use one or more other techniques to generate node mappings250. These techniques include (but are not limited to) maximal matching, network flow, and/or sub-graph matching.

Finally, mapping engine126uses node mappings250and source dimensions218from the selected source drawing to generate dimension placements220within target drawing202. For example, mapping engine126could use node mappings250to identify, for a given entity in target drawing202, a source entity in the source drawing to which the entity is mapped. Mapping engine126could retrieve a source dimension for the source entity from the source drawing and place the source dimension as a target dimension for the entity in target drawing202. During placement of the target dimension in target drawing202, mapping engine126could copy the spacing, orientation, and/or other formatting related to the source dimension into the target dimension. To improve the quality and accuracy of dimension placements220, mapping engine126could also restrict dimension placements220to source dimensions218associated with node similarities248that exceed a threshold. In another example, mapping engine126could use node mappings250to identify, for a given target dimension in target drawing202that is represented by a node in graph204, a corresponding source dimension in the source drawing to which the target dimension is mapped. Mapping engine126could then copy the value of the source dimension and formatting related to the source dimension into the target dimension.

When multiple source dimension candidates244exist, mapping engine126may generate multiple sets of node mappings250between nodes214and multiple sets of nodes from source graphs representing source dimension candidates244. Mapping engine126may aggregate node similarities248associated with each set of node mappings250into an overall similarity between target drawing202and the corresponding source drawing to which entities210in target drawing202are mapped. Mapping engine126may then identify the source drawing with the overall similarity with the target drawing and use source dimensions218from the identified source drawing and node mappings250between the source drawing and target drawing202to perform dimension placements. Alternatively, mapping engine126may combine the overall similarity between each source dimension candidate and target drawing202with graph similarities242between the source dimension candidate and target drawing202into a similarity score between the source dimension candidate and target drawing202. Mapping engine126may also identify, within source dimension candidates244, a source drawing with the highest similarity score. Mapping engine126may then use source dimensions218from the identified source drawing and node mappings250between the source drawing and target drawing202to perform dimension placements220.

Mapping engine126may also, or instead, generate node mappings250and corresponding dimension placements220between target drawing202and multiple source drawings212. For example, mapping engine126could identify source dimension candidates244as a fixed number of source drawings with the highest graph similarities242and/or a variable number of source drawings with graph similarities242that exceed a threshold. Mapping engine126could calculate node similarities248between each of target node embeddings232and each of source node embeddings246for nodes in source graphs for source dimension candidates244. Mapping engine126could then generate node mappings250between each node included in nodes214and a corresponding node with the highest node similarity from the source graphs. Finally, mapping engine126could use node mappings250to perform dimension placements220of source dimensions216as target dimensions for the corresponding entities in target drawing202

In one or more embodiments, mapping engine126generates dimension placements220based on node similarities248and/or node mappings250between views208in target drawing202and corresponding views in a source drawing, in lieu of or in addition to performing dimension placements220based on node similarities248and/or node mappings250between target drawing202and the source drawing. For example, mapping engine126could calculate “view similarities” between target view embeddings236and a set of source view embeddings for a set of views in a source drawing. Mapping engine126could generate “view mappings” between views208and dimensioned views in the source drawing in a way that maximizes an aggregation of view similarities between views208and the dimensioned views. Mapping engine126could use the view mappings to generate node similarities248, node mappings250, and dimension placements220between a subset of nodes214in each view within target drawing202and a corresponding view in the source drawing to which the view is mapped. If mapping engine126has also performed dimension placements220based on node similarities248and/or node mappings250between target drawing202and the source drawing, mapping engine126could allow a user to select a target dimension for an entity in target drawing202from multiple source dimensions218associated with node mappings250with the entity. Mapping engine126could also, or instead, select a target dimension for the entity as the source dimension for a source entity that has the highest node similarity with the entity.

FIG.3Aillustrates an exemplar drawing of a component, according to various embodiments. As shown inFIG.3A, the drawing includes multiple views302-306of the component. For example, views302-306could include a top, front, and side view of the component.

Each view includes a number of entities that are connected via spatial relationships. View302includes entities A, F, K, and L. Within view302, entities A and F, A and L, L and K, and F and K are connected by lines.

View304includes entities A, B, C, D, E, F, G, H, and M. Within view304, entities A and B, C and D, E and F, and G and H are connected by lines. Entities B and C, D and E, F and G, and A and H are connected by arcs. Entity M includes a circle that is not connected to any other entity.

View306includes entities C, H, I, and J. Within view306, entities C and H, C and I, I and J, and J and H are connected by lines.

FIG.3Billustrates an exemplar graph308created from the drawing ofFIG.3A, according to various embodiments. Graph308includes nodes representing entities A, B, C, D, E, F, G, H, I, J, K, L, and M in the drawing. Graph308also includes edges between nodes that represent spatial relationships between the corresponding entities in the drawing.

Within graph308, nodes representing entities A and F, A and L, L and K, and F and K are connected by edges to represent lines between the corresponding entities in view302. Nodes representing entities A and B, C and D, E and F, and G and H are connected by edges to represent lines between the corresponding entities in view304. Nodes representing entities B and C, D and E, F and G, and A and H are connected by edges to represent arcs between the corresponding entities in view. The node representing entity M includes an edge that connects to itself to indicate that entity M has a spatial relationship with itself. Nodes representing entities C and H, C and I, I and J, and J and H are connected by edges to represent lines between the corresponding entities in view306.

Each edge in graph308is also associated with a pair of numeric values. The first numeric value indicates the view in which the relationship is found, with a value of 0 representing view302, a value of 1 representing view304, and a value of 2 representing view306. The second numeric value indicates the type of relationship represented by the edge, with a value of 1 indicating a line, a value of 2 indicating an arc, and a value of 3 indicating a circle.

As a result, graph308includes a “merged” representation of entities and relationships in all three views302-306. Each entity is represented by a single node in graph308, even if the entity appears in multiple views within the drawing. Graph308additionally includes edges representing spatial relationships between entities across all views302-306.

FIG.4is a more detailed illustration of the embedding model ofFIG.2, according to various embodiments. As shown inFIG.4, the embedding model includes an encoder402, a core404, and a decoder406. Encoder402converts an input graph408into a set of node embeddings410representing nodes in the input graph408. For example, encoder402could convert a set of features associated with each node in graph408(e.g., entity attributes from a drawing, representations of edges between the node and other nodes in graph408, etc.) into a corresponding node embedding.

Core404performs multiple rounds of iterative updates414-416to node embeddings410to produce a set of updated node embeddings412. Each update incorporates information from within a certain hop count of a given node into the node embedding for the node. For example, the first update414performed by core404could include pooling of node embeddings410for neighbors of the node in graph408and concatenation of the node's embedding with the pooled node embeddings410for the neighbors. The second update416performed by core404could include pooling of node embeddings410for second-degree neighbors of the node in graph408and concatenation of the pooled node embeddings410for the second-degree neighbors with the first update414. Each additional update would thus include additional pooling of node embeddings410for nodes that are the next hop count from the node in graph408, followed by concatenation of the pooled node embeddings with the previous update.

After core404has performed a certain number of updates to node embeddings410, updated node embeddings412from core404are inputted into decoder406, and decoder406converts updated node embeddings412into an output graph418. For example, decoder406could convert fixed-length vectors outputted by core404into a set of features associated with the corresponding nodes.

Encoder402, core404, and decoder406are additionally trained using a reconstruction loss420between graphs408and418. For example, a transform layer could be applied to the output of decoder406to generate feature representations of the set of nodes that can be compared with feature representations inputted into encoder402. Next, reconstruction loss420could be calculated to reflect the differences between the feature representations inputted into encoder402and the feature representations outputted by decoder406and/or the transform layer. Reconstruction loss420between multiple input and output graphs could then be propagated backward across layers of the transform layer, decoder406, core404, and encoder402until reconstruction loss420falls below a threshold.

After the embedding model is trained, encoder402and core404are used to generate updated node embeddings412for new input graphs. For example, encoder402and core404could be used to convert features associated with nodes214in graph204into updated node embeddings412representing target node embeddings232for entities210in target drawing202. Encoder402and core404could also be used to convert features associated with nodes in source graphs representing source drawings into updated node embeddings412representing source node embeddings246for the entities in the source drawings. Node embeddings for entities in a given drawing (or view) could additionally be aggregated into a graph embedding representing the drawing (or a view embedding representing the view), as discussed above.

Those skilled in the art will appreciate that the embedding model can be structured, trained, and/or executed in various ways. For example, decoder406could be omitted from the embedding model, and encoder402and/or core404could be trained in a task-driven manner to predict graph properties, node attributes or types, similarities between nodes and/or graphs, and/or other types of attributes. In another example, the embedding model could be trained using unsupervised, self-supervised, and/or semi-supervised approaches, such as (but not limited to) Barlow Twins, SimCLR, Bootstrap Your Own Latent (BYOL), Pretext-Invariant Representation Learning (PIRL), Swapping Assignments between Views (SwAV), and/or Momentum Contrast (MoCo). In a third example, node embeddings410and/or updated node embeddings412could be generated for a subset of nodes sampled from a graph of a geometrically complex entity (e.g., a spline), and a graph embedding for the entity could be generated from an aggregation of these node embeddings410and/or updated node embeddings412.

FIG.5illustrates how node similarities248and node mappings250between a set of source nodes S1, S2, S3, . . . in a source graph and a set of target nodes T1, T2, T3, . . . in a target graph are generated, according to various embodiments. As shown inFIG.5, node similarities248include pairwise node similarities248M11, M12, M13, M21, M22, M23, M31, M32, M33, . . . calculated between each source node and each target node. For example, each node similarity MXYcould include a measure of vector similarity between a first embedding representing a source node X and a second embedding representing a target node Y. Each node similarity could also, or instead, include a measure of local topological similarity between the source node and target node.

After node similarities248are calculated, node mappings250are generated between the source nodes and target nodes based on node similarities248. For example, a Hungarian technique could be used to assign a source node to each target node so that the sum of node similarities248associated with the assigned pairs of source nodes and target nodes is maximized.

FIG.6sets forth a flow diagram of method steps for automatically dimensioning a target drawing, according to various embodiments. Although the method steps are described in conjunction with the systems ofFIGS.1-4, persons skilled in the art will understand that any system configured to perform the method steps in any order falls within the scope of the present disclosure.

As shown, graph generation engine122creates602a target graph representing a target drawing. For example, graph generation engine122could create, within the target graph, a first set of nodes representing a set of entities (e.g., points, lines, arcs, circles, ellipses, dimensions, materials, manufacturing methods, assemblies, etc.) in the target drawing. Graph generation engine122could also add edges connecting pairs of nodes in the target graph. Each edge represents a spatial and/or semantic relationship between a corresponding pair of entities included in the target drawing. Graph generation engine122could further associate the nodes and edges with attributes of the corresponding entities and relationships.

Next, graph analysis engine124generates604a first set of node embeddings for the first set of nodes in the target graph and a target graph embedding for the target graph. For example, graph analysis engine124could apply an encoder in an embedding model to features (e.g., attributes, edges, etc.) for each node in the target graph to produce a node embedding for the node. Graph analysis engine124could also use a core component in the embedding model to iteratively update the node embedding based on node embeddings of nodes that are a certain hop count from the node in the graph. Graph analysis engine124could then aggregate the updated node embeddings for the first set of nodes into a target graph embedding for the target graph.

Mapping engine126matches606the target graph to a source graph based on a similarity between the target graph embedding and a source graph embedding for the source graph. For example, mapping engine126could compute a set of vector similarities between the target graph embedding and a set of source graph embeddings for source drawings with placed dimensions. Graph analysis engine124could then match the target graph to the source graph associated with the highest vector similarity within the set of vector similarities.

Mapping engine126also computes608pairwise node similarities between the first set of node embeddings and a second set of node embeddings for a second set of nodes in the source graph. For example, mapping engine126could receive the second set of node embeddings from graph analysis engine124, a repository, and/or another source. Mapping engine126could then calculate the pairwise node similarities as measures of vector similarity between each node embedding included in the first set of node embeddings and each node embedding included in the second set of node embeddings.

Mapping engine126then generates610a set of mappings between the first set of nodes and the second set of nodes based on the pairwise node similarities. For example, mapping engine126could use a bipartite alignment technique to generate the mappings in a way that maximizes the sum of pairwise node similarities associated with the mapped nodes.

Finally, mapping engine126automatically places612one or more dimensions in the source drawing within the target drawing based on the mappings. For example, mapping engine126could retrieve a source dimension for each source entity in the source drawing that is associated with a mapping generated in operation610. Mapping engine126could optionally verify that the pairwise node similarity associated with the mapping exceeds a threshold. Mapping engine126could then copy the source dimension and associated appearance (e.g., orientation, formatting, style, spacing, etc.) from the source entity in the source drawing to a target entity in the target drawing to which the source entity is mapped.

In sum, the disclosed techniques perform automatic dimensioning of drawings using machine learning and graph alignment. A target drawing is converted into a graph, with a first set of nodes in the graph representing entities in the target drawing and edges between pairs of nodes representing spatial and/or semantic relationships between the corresponding entities. One or more embedding models are used to generate a first set of node embeddings for the first set of nodes, a target graph embedding for the target drawing, and/or one or more view embeddings representing one or more views within the target drawing. Graph similarities are calculated between the target graph embedding and a set of source graph embeddings for a set of source drawings with placed dimensions, and a source drawing associated with the highest graph similarity (or another measure of similarity with the target drawing) is identified. Pairwise node similarities are then calculated between the first set of node embeddings and a second set of node embeddings for a second set of nodes in a source graph representing the source drawing, and mappings between the first set of nodes and second set of nodes are generated to maximize an aggregation of the corresponding node similarities. Dimensions for source entities in the source drawing are then added to entities in the target drawing to which the source entities are mapped.

One technical advantage of the disclosed techniques relative to the prior art is that, with the disclosed techniques, the amount of time and user effort required to dimension drawings within a CAD program can be substantially reduced. In that regard, the disclosed techniques can be used to perform dimensioning of drawings within a CAD program in a more computationally efficient manner relative to prior art approaches. Another technical advantage is that, with the disclosed techniques, user-specified or standardized attributes of dimensions from one or more source drawings can be transferred to a target drawing. Accordingly, dimensions placed into a target drawing automatically via the disclosed techniques are able to conform to various design documentation requirements more readily relative to dimensions placed automatically via conventional rules-based auto-dimensioning tools. These technical advantages provide one or more technological improvements over prior art approaches.

1. In some embodiments, a computer-implemented method for automatically adding dimensions to a target drawing comprises generating a first set of node embeddings for a first set of nodes included in a target graph that represents the target drawing, receiving a second set of node embeddings for a second set of nodes included in a source graph that represents a source drawing, wherein one or more nodes included in the second set of nodes are associated with one or more source dimensions included in the source drawing, generating a set of mappings between the first set of nodes and the second set of nodes based on one or more similarities between the first set of node embeddings and the second set of node embeddings, and automatically placing at least one dimension included in the one or more source dimensions within the target drawing based on the set of mappings.

2. The computer-implemented method of clause 1, further comprising generating the first set of nodes within the target graph based on a set of entities included in the target drawing, and generating a first set of edges within the target graph, wherein each edge included in the first set of edges connects a pair of nodes included in the first set of nodes and represents a spatial relation between a pair of entities included in the target drawing that correspond to the pair of nodes.

3. The computer-implemented method of clauses 1 or 2, further comprising performing one or more operations on the target graph via an embedding model to generate a target graph embedding, and matching the target graph to the source graph based on a similarity between the target graph embedding and a source graph embedding associated with the source drawing.

4. The computer-implemented method of any of clauses 1-3, wherein matching the target graph to the source graph comprises retrieving a plurality of source graph embeddings for a plurality of source graphs, wherein each source graph shares one or more attributes with the target graph, computing a plurality of graph embedding similarities between the target graph embedding and the plurality of source graph embeddings, and matching the target graph to the source graph associated with a greatest graph embedding similarity included in the plurality of graph embedding similarities.

5. The computer-implemented method of any of clauses 1-4, wherein performing the one or more operations on the target graph comprises applying the embedding model to the first set of nodes to generate the first set of node embeddings, and generating the target graph embedding based on the first set of node embeddings.

6. The computer-implemented method of any of clauses 1-5, wherein the first set of node embeddings is generated by applying an encoder to the target graph.

7. The computer-implemented method of any of clauses 1-6, wherein generating the first set of node embeddings comprises iteratively updating a node embedding for a first node based on one or more node embeddings for one or more nodes that reside within a hop count from the first node in the target graph.

8. The computer-implemented method of any of clauses 1-7, wherein generating the set of mappings between the first set of nodes and the second set of nodes comprises computing a set of pairwise node similarities between the first set of node embeddings and the second set of node embeddings, and generating the set of mappings based on one or more pairwise node similarities included in the set of pairwise node similarities that maximize an overall similarity between the first set of node embeddings and the second set of node embeddings.

9. The computer-implemented method of any of clauses 1-8, wherein the one or more source dimensions comprise at least one of a linear dimension, an angular dimension, an ordinate dimension, or a radial dimension.

10. The computer-implemented method of any of clauses 1-9, wherein the first set of nodes represents at least one of a point, a line, an arc, a circle, or an ellipse.

11. In some embodiments, one or more non-transitory computer readable media storing instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of generating a first set of node embeddings for a first set of nodes included in a target graph that represents a target drawing, receiving a second set of node embeddings for a second set of nodes included in a source graph that represents a source drawing, wherein one or more nodes included in the second set of nodes are associated with one or more source dimensions included in the source drawing, generating a set of mappings between the first set of nodes and the second set of nodes based on one or more similarities between the first set of node embeddings and the second set of node embeddings, and automatically placing at least one dimension included in the one or more source dimensions within the target drawing based on the set of mappings.

12. The one or more non-transitory computer readable media of clause 11, wherein the instructions further cause the one or more processors to perform the steps of generating the first set of nodes within the target graph based on a set of entities included in the target drawing, and generating a first set of edges within the target graph, wherein each edge included in the first set of edges connects a pair of nodes included in the first set of nodes and represents a spatial relation between a pair of entities included in the target drawing that correspond to the pair of nodes.

13. The one or more non-transitory computer readable media of clauses 11 or 12, wherein adding the first set of nodes to the target graph comprises generating a second set of nodes representing a second set of entities in a first view of the target drawing, generating a third set of nodes representing a third set of entities in a second view of the target drawing, and merging the second set of nodes and the third set of nodes into the first set of nodes, wherein each node included in the first set of nodes corresponds to an entity included in one or more views of the target drawing.

14. The one or more non-transitory computer readable media of any of clauses 11-13, wherein the instructions further cause the one or more processors to perform the step of matching the target graph to the source graph based on a similarity between a target graph embedding associated with the target graph and a source graph embedding associated with the source drawing.

15. The one or more non-transitory computer readable media of any of clauses 11-14, wherein the instructions further cause the one or more processors to perform the step of generating the target graph embedding for the target graph based on an aggregation of the first set of node embeddings.

16. The one or more non-transitory computer readable media of any of clauses 11-15, wherein matching the target graph to the source graph comprises applying a threshold to the similarity between the target graph embedding and the source graph embedding.

17. The one or more non-transitory computer readable media of any of clauses 11-16, wherein generating the set of mappings between the first set of nodes and the second set of nodes comprises matching a first view of the target drawing to a second view of the source drawing based on a similarity between a first view embedding for the first view and a second view embedding for the second view, and generating the set of mappings between the first set of nodes included in the first view and the second set of nodes included in the second view.

18. The one or more non-transitory computer readable media of any of clauses 11-17, wherein automatically placing the at least one dimension within the target drawing comprises associating a first entity in the target drawing with a dimension included in the one or more dimensions based on a mapping between a first node representing the first entity and a second node representing a second entity associated with the dimension in the source drawing.

19. The one or more non-transitory computer readable media of any of clauses 11-18, wherein automatically placing the at least one dimension within the target drawing further comprises verifying that a similarity between a first node embedding for the first node and a second node embedding for the second node exceeds a threshold prior to associating the first entity with the dimension.

20. In some embodiments, a system comprises a memory that stores instructions, and a processor that is coupled to the memory and, when executing the instructions, is configured to generate a first set of node embeddings for a first set of nodes included in a target graph that represents a target drawing, receive a second set of node embeddings for a second set of nodes included in a source graph that represents a source drawing, wherein one or more nodes included in the second set of nodes are associated with one or more source dimensions included in the source drawing, generate a set of mappings between the first set of nodes and the second set of nodes based on one or more similarities between the first set of node embeddings and the second set of node embeddings, and automatically place at least one dimension included in the one or more source dimensions within the target drawing based on the set of mappings.