End-to-end generation system and method from two-dimensional vector engineering drawings to three-dimensional cad models

CN122549162APending Publication Date: 2026-08-11SUZHOU UNIV OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-24
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

1)设计流程偏离,目前大部分CAD生成方法未能遵循以工程制图为起点的标准设计规范,导致生成结果与下游制造环节的衔接性较差;

Benefits of technology

[0017]本发明与现有技术相比具有显著的优点和有益效果,具体体现在以下方面:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122549162A_ABST
    Figure CN122549162A_ABST
Patent Text Reader

Abstract

This invention relates to an end-to-end system and method for generating 3D CAD models from 2D vector engineering drawings. The system includes: an SVG file import module that receives and reads externally imported SVG format vector engineering files; an SVG file parsing module that converts the SVG file content into PyG graph data objects; a model weight loading module that loads and reads pre-trained model parameters; a model inference module that performs the core inference task, encoding, correcting, and decoding the parsed graph structural features to predict CAD operation command sequences and their corresponding geometric parameters; a CAD reconstruction module that reconstructs the CAD solid model using the CAD operation command sequence; and a CAD model export module that exports the reconstructed CAD solid model as a standard industrial format file. Using SVG vector graphics as the input modality, it interfaces with a standard industrial design workflow from 2D engineering sketches to 3D models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an end-to-end generation system and method for converting two-dimensional vector engineering drawings into three-dimensional CAD models based on vector graphic structure representation. Background Technology

[0002] In the field of modern industrial design and manufacturing, Computer-Aided Design (CAD) is a core tool for product development. Parametric CAD modeling, through constrained operation sequences and parameter control, enables designers to rapidly modify and iterate models, and has become the mainstream paradigm in industrial practice. In standard industrial design processes, design activities typically begin with two-dimensional engineering drawings, often presented in vector formats such as Scalable Vector Graphics (SVG). Because SVG can accurately encode geometric primitives and their spatial relationships, it has a natural advantage in expressing engineering semantics and maintaining geometric accuracy, making it an ideal information foundation for achieving high-quality CAD modeling.

[0003] Although deep learning-based CAD generation methods based on modalities such as point clouds, meshes, images, and text descriptions have emerged in recent years, they still have the following limitations in practical engineering applications: 1) Deviation in design process: Most current CAD generation methods fail to follow standard design specifications that start with engineering drawings, resulting in poor connection between the generated results and downstream manufacturing processes; 2) The semantic expression of engineering is vague. Text-based generation methods are limited by the ambiguity of natural language and cannot accurately express complex geometric constraints. This leads to the loss of design intent during the conversion process and fails to meet engineering-level requirements. 3) Loss of geometric features and topological distortion: Current sketch-to-CAD methods mostly rely on raster image input. Limited by pixel discretization, it is difficult to handle scale transformations and accurate geometric reasoning, and line width changes, key point coordinates, and topological connectivity are easily lost during the conversion process, resulting in insufficient reconstruction accuracy.

[0004] 4) Redundancy of computational resources and inference latency: Currently, model frameworks generally suffer from excessively large numbers of parameters, resulting in high computational costs and slow generation speed, making it difficult to meet the needs of real-time iteration and large-scale application in industrial scenarios.

[0005] Currently, the automatic generation of CAD models suffers from defects such as process disconnect, weak topology awareness, high geometric ambiguity, and large computational overhead. There is a need to develop a CAD model reconstruction system for engineering-grade SVG vector graphics. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the existing technology and provide an end-to-end generation system and method for converting two-dimensional vector engineering drawings into three-dimensional CAD models based on vector graphic structure representation.

[0007] The objective of this invention is achieved through the following technical solution: An end-to-end generation system from 2D vector engineering drawings to 3D CAD models, including SVG file import module, SVG file parsing module, model weight loading module, model inference module, CAD reconstruction module, and CAD model export module; The SVG file import module receives and reads externally imported SVG format vector project files; The SVG file parsing module converts the SVG file content into a PyG graph data object; The model weight loading module loads and reads the pre-trained model parameters; The model inference module performs the core inference task, which uses the parsed graph structure features to encode, correct and decode, and predict the CAD operation command sequence and its corresponding geometric parameters. The CAD reconstruction module reconstructs the CAD solid model through a sequence of CAD operation commands. The CAD model export module exports the reconstructed CAD entity model as a standard industrial format file.

[0008] Furthermore, in the aforementioned end-to-end generation system from two-dimensional vector engineering drawings to three-dimensional CAD models, the SVG file import module is used to receive and read externally imported SVG format vector engineering files and load them into memory.

[0009] Furthermore, in the aforementioned end-to-end generation system from two-dimensional vector engineering drawings to three-dimensional CAD models, the SVG file parsing module includes a file parsing module, a feature extraction module, and a graph data encapsulation module. The file parsing module performs structured parsing on the SVG file imported by the SVG file import module; the feature extraction module extracts the path, key point coordinates, and geometric element features of the SVG file content; and the graph data encapsulation module encapsulates the extracted key point coordinates and geometric features into a PyG graph data object.

[0010] Furthermore, in the aforementioned end-to-end generation system from two-dimensional vector engineering drawings to three-dimensional CAD models, the model weight loading module reads pre-trained deep learning model parameters from the storage medium and dynamically loads the corresponding model weights according to the requirements of the current task.

[0011] Furthermore, in the aforementioned end-to-end generation system from two-dimensional vector engineering drawings to three-dimensional CAD models, the model inference module includes an encoding module, a correction module, and a decoding module. The encoding module, after receiving knowledge parameters from the model weight loading module, processes the PyG graph data output by the SVG file parsing module using a GraphSAGE graph encoder. It extracts geometric and topological features using multi-layer neighborhood aggregation and global attention pooling mechanisms to generate highly expressive latent vectors. The correction module introduces a geometric consistency correction mechanism for isometric views, optimizing the consistency of the three-view latent representations through a feature correction network and an adaptive gating fusion mechanism. The decoding module generates CAD operation command sequences and their associated geometric parameters from the global latent vectors generated by the graph encoder by introducing a command complexity modeling and dual predictor dynamic fusion mechanism.

[0012] Furthermore, in the aforementioned end-to-end generation system from two-dimensional vector engineering drawings to three-dimensional CAD models, the CAD reconstruction module executes the CAD operation command sequence generated by the model reasoning module in three-dimensional space. By constructing sketches and contours and completing extrusion modeling operations, the conversion from the CAD operation command sequence to a CAD solid model is achieved.

[0013] Furthermore, in the aforementioned end-to-end generation system from two-dimensional vector engineering drawings to three-dimensional CAD models, the CAD model export module converts the CAD entity model generated by the CAD reconstruction module into a standard industrial format file.

[0014] The present invention provides an end-to-end method for generating a 3D CAD model from a 2D vector engineering drawing, comprising the following steps: S1) Select the input mode and import the SVG format vector project file. The input modes include isometric single view, orthographic three view, and four view combining three view and isometric view. S2) Perform structured parsing on the imported SVG file, traverse the SVG file content, extract the path, line, and circle graphic primitives and their path parameters, and obtain the key point coordinate information; based on the extracted points, edges and related features, use the PyG framework to construct a graph structure representation, realizing the conversion from vector data to PyG graph data; S3) Load the pre-trained model weights corresponding to the input settings, input the PyG graph data into the model inference module, capture local geometric features and their topological relationships through the graph encoder based on GraphSAGE, and introduce a geometric consistency correction mechanism based on isometric view to alleviate the inherent structural ambiguity in multi-view orthographic projection input. The latent vector is processed by the adaptive dual predictive decoder to generate CAD operation command sequences and their associated geometric parameters. S4) The instruction sequence predicted by the model is reconstructed in three-dimensional space to create a sketch circuit, and solids are generated through surface construction and extrusion operations to realize the conversion of CAD operation instructions into three-dimensional CAD solid models. S5) Export the generated CAD solid model as a standard industrial format file and display it on the front-end interface.

[0015] Furthermore, the aforementioned end-to-end generation method from 2D vector engineering drawings to 3D CAD models involves the following steps: An SVG file import module interactively imports SVG format vector engineering files in batches from the front-end interface; an SVG file parsing module performs structured parsing on the imported SVG files, converting the vector data into PyG graph data; a model weight loading module loads pre-trained model weights corresponding to the input settings; a model inference module inputs the PyG graph data into a GraphSAGE-based graph encoder to generate highly expressive latent vectors, while mitigating inherent structural ambiguities in multi-view orthographic projection input through a geometric consistency correction mechanism based on isometric views; an adaptive dual-predictive decoder processes the latent vectors to generate CAD operation command sequences and their associated geometric parameters; a CAD reconstruction module reconstructs the CAD solid model in 3D space using the generated CAD operation command sequences; and a CAD model export module exports the generated CAD solid model as a standard industrial format file.

[0016] Furthermore, the aforementioned end-to-end generation method from two-dimensional vector engineering drawings to three-dimensional CAD models involves the SVG file import module interactively importing SVG format vector engineering files from the front-end interface in batches and loading them into memory. The imported SVG file is structured and parsed by the SVG file parsing module. The feature extraction module of the SVG file parsing module traverses the SVG file content, extracts each SVG path, and further extracts the two-dimensional coordinates of all key control points. Each control point is a graph node, and its feature vector is: in, Represents the normalized relative position along the path, with start / end as binary markers; directed edges are constructed between consecutive points to capture both the topology and the path direction. The graph data encapsulation module of the SVG file parsing module merges all path-level subgraphs into a single view-level graph, represented in PyTorch Geometric format, with node features as follows: The edges are connected as This is then encapsulated as PyG graph data; The model weight loading module loads the pre-trained model weights according to the selected input mode. The encoding module of the model inference module processes the PyG graph data, employing a GraphSAGE-based graph encoder to capture local geometric features and their topological relationships, generating highly expressive latent vectors. The encoder consists of four stacked GraphSAGE convolutional layers. Each convolutional layer is followed by a batch normalization layer, a ReLU non-linear activation function, and a Dropout layer to stabilize the training process and alleviate overfitting, emphasizing structurally important nodes while maintaining the inductive power of GraphSAGE. A global attention pooling module is introduced to adaptively weight and aggregate node features to highlight key nodes that contribute significantly to the overall structure of the sketch, addressing the feature dilution problem in multi-primitive scenarios and generating compact and semantically consistent latent representations. The correction module of the model inference module uses isometric views as auxiliary supervision signals. By constructing a feature correction network and an adaptive gating fusion mechanism, it utilizes the multi-dimensional geometric correlation information provided by the isometric view to explicitly correct the residual bias in the orthographic projection latent space. While ensuring training stability, it enhances the topological consistency of the cross-view latent space and improves the reconstruction accuracy of complex geometries. The decoding module of the model inference module employs an adaptive dual-prediction decoder. Using latent vectors as conditional input, it models global contextual information through a Transformer decoder and generates sequence-aware latent representations. Then, a lightweight feature enhancement module normalizes and performs nonlinear transformations on the latent representations. Based on this, the decoder constructs two branches in parallel: command prediction and parameter prediction. In the command prediction branch, the latent vector at each time step is modeled based on the progressively decoded features. To characterize the modeling difficulty of different CAD commands, a complexity command estimator is introduced, which predicts continuous scalars at each time step through linear transformation, nonlinear activation functions, and the sigmoid function. This is used to characterize the complexity of the instructions and serve as a conditional signal for generating subsequent parameters. A dual predictor structure is further constructed, including a single-layer predictor and a multi-layer predictor. The single-layer predictor uses a linear mapping to model high-frequency and relatively simple command patterns, while the multi-layer predictor uses a multilayer perceptron with nonlinear activation to characterize complex geometric relationships and constraints. Simultaneously, an adaptive fusion gating is introduced, using two linear transformations and a Softmax function to calculate the adaptive prediction weights for each time step. The dual-path outputs are dynamically weighted and fused to obtain the final command type prediction result: In the parameter prediction branch, the command complexity scalar c is concatenated with the corresponding decoding features to obtain... The data is then input into the complexity feature fusion module, where linear transformation, layer normalization, and nonlinear activation are used to adaptively modulate the parameter features under different complexity conditions. A multi-layer predictor then generates command parameter prediction results. The CAD reconstruction module reconstructs the sketch outline and identifies closed loops in three-dimensional space based on the CAD operation command sequence generated by the model reasoning module, simulating the CAD software modeling process. It generates surfaces from points and lines and constructs CAD solid models from surfaces by creating surfaces based on sketches and extrusion instance operations. The CAD model export module exports the reconstructed CAD solid model as a standard industrial format file, which is then displayed on the front-end interface.

[0017] Compared with the prior art, the present invention has significant advantages and beneficial effects, specifically reflected in the following aspects: ① This invention converts the geometric elements, connectivity relationships, and engineering constraints in 2D engineering drawings into a PyG standard graph data structure and combines it with a GraphSAGE-based graph encoder. A multi-layer neighborhood aggregation mechanism is designed for 2D-to-3D reconstruction tasks, effectively capturing both local geometric details and global topological connections in the drawings. It fully leverages the inherent advantages of graph data in capturing the topological relationships of engineering drawings, effectively avoiding topological breaks and view ambiguities that are prone to occur with traditional pixel-level methods, ensuring the stability and structural consistency of the 3D CAD reconstruction process. Simultaneously, by utilizing the inductive learning characteristics of GraphSAGE, the inference speed for large-size, complex engineering drawings is significantly improved. ② This invention introduces isometric views as auxiliary supervision signals. The cross-view geometric consistency correction mechanism assisted by isometric views constructs a cross-view feature correction network and an adaptive gating fusion mechanism. It utilizes the multi-dimensional geometric correlation information provided by isometric views to explicitly correct the residual bias in the orthographic projection latent space. While ensuring training stability, it significantly enhances the topological consistency of the cross-view latent space and effectively improves the reconstruction accuracy of complex geometries. ③ Design a complexity-aware adaptive dual-path decoder; in the command prediction branch, use dynamic scheduling of "simple command path" and "complex command path" for parallel modeling and weight fusion; in the parameter prediction branch, based on the predicted complexity factor c, by adopting a unified parameter generation strategy and coordinating with complexity factor c modulation, the parameter prediction branch can explicitly perceive the geometric attributes of the command, thus solving the prediction instability and parameter estimation bias caused by the long-tail distribution in CAD operation sequences.

[0018] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing specific embodiments of the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 : A schematic diagram of the module architecture of the system of this invention; Figure 2 : A schematic flowchart of the method of the present invention; Figure 3 : Schematic diagram of the architecture principle of the SVG file parsing module; Figure 4 : Schematic diagram of the architecture principle of the model inference module; Figure 5 : Schematic diagram of the architecture principle of the CAD reconstruction module; Figure 6 : A two-dimensional engineering sketch of the part; Figure 7 A schematic diagram illustrating the specific process of SVG file parsing and graph structuring; Figure 8 Schematic diagram of the three-dimensional solid model of the part. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0022] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, directional and ordinal terms are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0023] like Figure 1 As shown, the end-to-end generation system from two-dimensional vector engineering drawings to three-dimensional CAD models includes SVG file import module 1, SVG file parsing module 2, model weight loading module 3, model inference module 4, CAD reconstruction module 5, and CAD model export module 6. SVG file import module 1 receives and reads externally imported SVG format vector project files and loads them into memory; SVG file parsing module 2 converts the SVG file content into PyG (PyTorch Geometric) graph data objects; Model weight loading module 3 loads and reads the parameters of the pre-trained model; Model inference module 4 performs the core inference task, which uses the parsed graph structure features to predict the CAD operation command sequence and its corresponding geometric parameters through encoding, correction and decoding. CAD Reconstruction Module 5 reconstructs CAD solid models through a sequence of CAD operation commands; CAD Model Export Module 6 exports the reconstructed CAD solid model as a standard industrial format file.

[0024] Among them, such as Figure 3 The SVG file parsing module 2 includes a file parsing module 201, a feature extraction module 202, and a graph data encapsulation module 203. The file parsing module 201 performs structured parsing on the SVG file imported by the SVG file import module 1; the feature extraction module 202 extracts the path, key point coordinates, and geometric element features of the SVG file content; and the graph data encapsulation module 203 encapsulates the extracted key point coordinates and geometric features into a PyG graph data object.

[0025] Model weight loading module 3 reads pre-trained deep learning model parameters from the storage medium; and dynamically loads the corresponding model weights according to the needs of the current task (such as multi-view settings).

[0026] like Figure 4The model inference module 4 includes an encoding module 401, a correction module 402, and a decoding module 403. The encoding module 401, after receiving the knowledge parameters from the model weight loading module 3, processes the PyG graph data output by the SVG file parsing module 2 based on the GraphSAGE graph encoder, extracts geometric and topological features using a multi-layer neighborhood aggregation and global attention pooling mechanism, and generates a latent vector with high expressiveness. The correction module 402 introduces a geometric consistency correction mechanism for isometric views, and optimizes the consistency of the latent representation of the three views through a feature correction network and an adaptive gating fusion mechanism, eliminating structural ambiguity in the orthographic projection view and improving cross-view geometric consistency. The decoding module 403 generates a CAD operation command sequence and its associated geometric parameters from the global latent vector generated by the graph encoder by introducing a command complexity modeling and dual predictor dynamic fusion mechanism.

[0027] like Figure 5 The CAD reconstruction module 5 executes the CAD operation command sequence generated by the model reasoning module 4 in three-dimensional space. By constructing sketches and contours and completing extrusion modeling operations, it realizes the conversion from the CAD operation command sequence to the CAD solid model.

[0028] CAD Model Export Module 6 converts the CAD solid model generated by CAD Reconstruction Module 5 into a standard industrial format file.

[0029] like Figure 2 The present invention provides an end-to-end method for generating a three-dimensional CAD model from a two-dimensional vector engineering drawing, comprising the following steps: S1) Select the input mode and import the SVG format vector project file. The input modes include isometric single view, orthographic three view, and four view combining three view and isometric view. S2) Perform structured parsing on the imported SVG file, traverse the SVG file content, extract the path, line, and circle graphic primitives and their path parameters, and obtain the key point coordinate information; based on the extracted points, edges and related features, use the PyG framework to construct a graph structure representation, realizing the conversion from vector data to PyG graph data; S3) Load the pre-trained model weights corresponding to the input settings, input the PyG graph data into the model inference module, capture local geometric features and their topological relationships through the graph encoder based on GraphSAGE, and introduce a geometric consistency correction mechanism based on isometric view to alleviate the inherent structural ambiguity in multi-view orthographic projection input. The latent vector is processed by the adaptive dual predictive decoder to generate CAD operation command sequences and their associated geometric parameters. S4) The instruction sequence predicted by the model is reconstructed in three-dimensional space to create a sketch circuit, and solids are generated through surface construction and extrusion operations to realize the conversion of CAD operation instructions into three-dimensional CAD solid models. S5) Export the generated CAD solid model as a standard industrial format file and display it on the front-end interface.

[0030] The system is structured as follows: SVG file import module 1 imports SVG format vector engineering files in batches interactively from the front-end interface; SVG file parsing module 2 performs structured parsing on the imported SVG files, converting the vector data into PyG graph data; Model weight loading module 3 loads pre-trained model weights corresponding to the input settings; Model inference module 4 inputs the PyG graph data into a GraphSAGE-based graph encoder to generate highly expressive latent vectors, while mitigating inherent structural ambiguities in multi-view orthographic projection input through a geometric consistency correction mechanism based on isometric views; Adaptive dual-predictive decoder processes the latent vectors to generate CAD operation command sequences and their associated geometric parameters; CAD reconstruction module 5 reconstructs the CAD solid model in 3D space using the generated CAD operation command sequences; and CAD model export module 6 exports the generated CAD solid model as a standard industrial format file.

[0031] The SVG file import module 1 imports SVG format vector project files in batches from the front-end interface and loads them into memory. The imported SVG file is structured and parsed by the file parsing module 201 of the SVG file parsing module 2; The feature extraction module 202 of the SVG file parsing module 2 traverses the content of the SVG file, extracts each SVG path, and further extracts the two-dimensional coordinates of all key control points. Each control point is a graph node, and its feature vector is: in, Represents the normalized relative position along the path, with start / end as binary markers; directed edges are constructed between consecutive points to capture both the topology and the path direction. The graph data encapsulation module 203 of the SVG file parsing module 2 merges all path-level subgraphs into a single view-level graph, which is represented in PyTorch Geometric format, with node features as follows: The edges are connected as This is then encapsulated as PyG graph data; The model weight loading module 3 loads the pre-trained model weights according to the selected input mode. The PyG graph data is processed by the encoding module 401 of the model inference module 4. A graph encoder based on GraphSAGE is used to capture local geometric features and their topological relationships to generate latent vectors with high expressiveness. The encoder consists of four stacked GraphSAGE convolutional layers. Each convolutional layer is followed by a batch normalization layer, a ReLU nonlinear activation function, and a Dropout layer, with p=0.1, to stabilize the training process and alleviate overfitting. While maintaining the inductive ability of GraphSAGE, it emphasizes structurally important nodes. A global attention pooling module is introduced to adaptively weight and aggregate node features to highlight key nodes that contribute highly to the overall structure of the sketch, solve the feature dilution problem in multi-primitive scenarios, and generate compact and semantically consistent latent representations. The correction module 402 of the model inference module 4 uses isometric views as auxiliary supervision signals. By constructing a feature correction network and an adaptive gating fusion mechanism, it utilizes the multi-dimensional geometric correlation information provided by the isometric view to explicitly correct the residual bias in the orthographic projection latent space. While ensuring training stability, it enhances the topological consistency of the cross-view latent space and improves the reconstruction accuracy of complex geometries. The decoding module 403 of the model inference module 4 employs an adaptive dual-prediction decoder. Using the latent vector as conditional input, it models global contextual information through a Transformer decoder and generates sequence-aware latent representations. Then, a lightweight feature enhancement module normalizes and performs nonlinear transformations on the latent representations to improve feature discriminativeness and training stability. Based on this, the decoder constructs two branches in parallel: command prediction and parameter prediction. In the command prediction branch, the latent vector at each time step is modeled based on the progressively decoded features. To characterize the modeling difficulty of different CAD commands, a complexity command estimator is introduced, which predicts continuous scalars at each time step through linear transformation, nonlinear activation functions, and the sigmoid function. This is used to characterize the complexity of the instructions and serve as a conditional signal for generating subsequent parameters. A dual predictor structure is further constructed, including a single-layer predictor and a multi-layer predictor. The single-layer predictor uses a linear mapping to model high-frequency and relatively simple command patterns, while the multi-layer predictor uses a multilayer perceptron with nonlinear activation to characterize complex geometric relationships and constraints. Simultaneously, an adaptive fusion gating is introduced, using two linear transformations and a Softmax function to calculate the adaptive prediction weights for each time step. The dual-path outputs are dynamically weighted and fused to obtain the final command type prediction result: In the parameter prediction branch, the command complexity scalar c is concatenated with the corresponding decoding features to obtain... The data is then input into the complexity feature fusion module, where linear transformation, layer normalization, and nonlinear activation are used to adaptively modulate the parameter features under different complexity conditions. A multi-layer predictor then generates command parameter prediction results. The CAD reconstruction module 5 reconstructs the sketch outline and identifies closed loops in three-dimensional space based on the CAD operation command sequence generated by the model reasoning module, simulating the CAD software modeling process. It generates surfaces from points and lines and constructs CAD solid models from surfaces by creating surfaces based on sketches and extrusion instance operations. The CAD model export module 6 exports the reconstructed CAD solid model as a standard industrial format file and displays it on the front-end interface.

[0032] In practical applications, such as Figures 6-7 The process involves importing a batch of 2D engineering drawings (SVG format) of mechanical support parts containing through holes and stepped structures into the front-end interface, selecting the input mode. First, the imported SVG file undergoes structured parsing, traversing each path element to extract geometric command parameters such as line segments and arcs, and calculating the coordinates of key points (e.g., endpoints, control points, and center points). Based on this, key points are used as nodes, and geometric relationships as edges to construct graph structure data containing attributes such as position and type. The PyG framework is then used to convert the SVG vector representation to graph data representation. Subsequently, according to the input mode, the corresponding pre-trained model weights are loaded, and the constructed graph data is input into the model inference module. Finally, a graph encoder based on GraphSAGE is used. The process involves feature aggregation of neighboring nodes to extract local geometric features and their topological relationships. Simultaneously, an isometric view is introduced as a global geometric constraint. A feature correction network and an adaptive gating fusion mechanism are used to correct structural ambiguities in the orthographic projection view, thereby improving overall spatial consistency. Based on this, an adaptive dual-predictive decoder parses the latent representation: one path predicts the sequence of CAD operation commands, and the other path regresses the corresponding geometric parameters, achieving collaborative modeling of commands and parameters. Further, based on the predicted CAD operation sequence, the sketch outline is reconstructed sequentially in 3D space, closed loops are identified, and 2D sketches are generated. Subsequently, modeling operations such as surface construction and extrusion are performed to gradually generate a complete 3D solid model, such as... Figure 8 For this mechanical support part, its step structure can be correctly reconstructed, and through-hole features can be generated at specified locations to obtain a three-dimensional model that meets engineering constraints. Finally, the generated CAD solid model is exported as a standard industrial format file and displayed on the front-end interface, supporting user interaction for viewing and verification.

[0033] In summary, this invention addresses the problems of disjointed processes, insufficient topology awareness, geometric ambiguity, and high computational overhead in existing automatic CAD model generation. It provides an end-to-end generation method from 2D vector engineering drawings to 3D CAD models. Using SVG vector engineering drawings as input, it achieves seamless integration with the industrial design process through structured analysis and graph representation modeling, avoiding information loss and semantic ambiguity. A lightweight graph encoder based on GraphSAGE is constructed to capture geometric and topological features, and isometric constraints and cross-view correction mechanisms are combined to improve structural consistency. Simultaneously, a complexity-aware adaptive dual-prediction decoding structure is introduced to achieve collaborative prediction of CAD commands and parameters, and a composite loss function enhances the modeling capability of long-tail commands. Compared to existing technologies, this invention significantly improves geometric reconstruction accuracy and topological consistency, while reducing computational overhead, increasing inference efficiency, and possessing stronger generalization ability and engineering applicability.

[0034] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the scope of protection of the invention. It should be noted that similar reference numerals and letters in the following figures denote similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0035] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

[0036] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. An end-to-end generation system for converting two-dimensional vector engineering drawings into three-dimensional CAD models, characterized by: It includes an SVG file import module (1), an SVG file parsing module (2), a model weight loading module (3), a model inference module (4), a CAD reconstruction module (5), and a CAD model export module (6). The SVG file import module (1) receives and reads externally imported SVG format vector project files; The SVG file parsing module (2) converts the SVG file content into a PyG graph data object; The model weight loading module (3) loads and reads the pre-trained model parameters; The model reasoning module (4) performs the core reasoning task, and through encoding, correction and decoding of the parsed graph structure features, predicts the CAD operation instruction sequence and its corresponding geometric parameters. The CAD reconstruction module (5) reconstructs the CAD solid model through a sequence of CAD operation commands. The CAD model export module (6) exports the reconstructed CAD entity model as a standard industrial format file.

2. The end-to-end generation system from two-dimensional vector engineering drawings to three-dimensional CAD models according to claim 1, characterized in that: The SVG file import module (1) is used to receive and read externally imported SVG format vector project files and load them into memory.

3. The two-dimensional vector engineering drawing to three-dimensional CAD model end-to-end generation system of claim 1, wherein: The SVG file parsing module (2) includes a file parsing module (201), a feature extraction module (202), and a graph data encapsulation module (203). The file parsing module (201) performs structured parsing on the SVG file imported by the SVG file import module (1). The feature extraction module (202) extracts the path, key point coordinates, and geometric element features of the SVG file content. The graph data encapsulation module (203) encapsulates the extracted key point coordinates and geometric features into a PyG graph data object.

4. The two-dimensional vector engineering drawing to three-dimensional CAD model end-to-end generation system of claim 1, wherein: The model weight loading module (3) reads the pre-trained deep learning model parameters from the storage medium and dynamically loads the corresponding model weights according to the needs of the current task.

5. The two-dimensional vector engineering drawing to three-dimensional CAD model end-to-end generation system of claim 1, wherein: The model inference module (4) includes an encoding module (401), a correction module (402), and a decoding module (403). The encoding module (401), after receiving the knowledge parameters from the model weight loading module (3), processes the PyG graph data output by the SVG file parsing module (2) based on the graph encoder of GraphSAGE, and extracts geometric and topological features using a multi-layer neighborhood aggregation and global attention pooling mechanism to generate a latent vector with high expressive power. The correction module (402) introduces a geometric consistency correction mechanism for isometric views, and optimizes the consistency of the latent representation of the three views through a feature correction network and an adaptive gating fusion mechanism. The decoding module (403) generates a CAD operation command sequence and its associated geometric parameters from the global latent vector generated by the graph encoder by introducing a command complexity modeling and dual predictor dynamic fusion mechanism.

6. The two-dimensional vector engineering drawing to three-dimensional CAD model end-to-end generation system of claim 1, wherein: The CAD reconstruction module (5) executes the CAD operation command sequence generated by the model reasoning module (4) in three-dimensional space. By constructing sketches and contours and completing the extrusion modeling operation, it realizes the conversion from the CAD operation command sequence to the CAD solid model.

7. The end-to-end generation system from two-dimensional vector engineering drawings to three-dimensional CAD models according to claim 1, characterized in that: The CAD model export module (6) converts the CAD entity model generated by the CAD reconstruction module (5) into a standard industrial format file.

8. An end-to-end method for generating 3D CAD models from 2D vector engineering drawings, characterized by: Includes the following steps: S1) Select the input mode and import the SVG format vector project file. The input modes include isometric single view, orthographic three view, and four view combining three view and isometric view. S2) Perform structured parsing on the imported SVG file, traverse the SVG file content, extract the path, line, and circle graphic primitives and their path parameters, and obtain the key point coordinate information; based on the extracted points, edges and related features, use the PyG framework to construct a graph structure representation, realizing the conversion from vector data to PyG graph data; S3) Load the pre-trained model weights corresponding to the input settings, input the PyG graph data into the model inference module, capture local geometric features and their topological relationships through the graph encoder based on GraphSAGE, and introduce a geometric consistency correction mechanism based on isometric view to alleviate the inherent structural ambiguity in multi-view orthographic projection input. The latent vector is processed by the adaptive dual predictive decoder to generate CAD operation command sequences and their associated geometric parameters. S4) The instruction sequence predicted by the model is reconstructed in three-dimensional space to create a sketch circuit, and a solid is generated through surface construction and extrusion operations, thereby realizing the conversion of CAD operation instructions into a three-dimensional CAD solid model. S5) Export the generated CAD solid model as a standard industrial format file and display it on the front-end interface.

9. The 2D vector engineering drawing to 3D CAD model end-to-end generation method of claim 8, wherein: The SVG file import module (1) imports SVG format vector engineering files in batches from the front-end interface; the SVG file parsing module (2) performs structured parsing on the imported SVG files and converts the vector data into PyG graph data; the model weight loading module (3) loads the pre-trained model weights corresponding to the input settings; the model inference module (4) inputs the PyG graph data into the graph encoder based on GraphSAGE to generate latent vectors with high expressive power, and at the same time alleviates the inherent structural ambiguity in the multi-view orthographic projection input through the geometric consistency correction mechanism of the isometric view; the latent vectors are processed by the adaptive dual prediction decoder to generate CAD operation command sequences and their associated geometric parameters; the CAD reconstruction module (5) reconstructs the CAD entity model in three-dimensional space using the generated CAD operation command sequences; and the CAD model export module (6) exports the generated CAD entity model as a standard industrial format file.

10. The 2D vector engineering drawing to 3D CAD model end-to-end generation method of claim 9, wherein: The SVG file import module (1) imports SVG format vector project files in batches from the front-end interface and loads them into memory. The imported SVG file is structured and parsed by the file parsing module (201) of the SVG file parsing module (2); The feature extraction module (202) of the SVG file parsing module (2) traverses the content of the SVG file, extracts each SVG path, and further extracts the two-dimensional coordinates of all key control points. Each control point is a graph node. Its eigenvector is: wherein, represents the normalized relative position along the path, start / end are binary markers; directed edges are constructed between consecutive points to capture both the topology and the path direction; The graph data encapsulation module (203) of the SVG file parsing module (2) merges all path-level subgraphs into a view-level graph, which is represented in PyTorch Geometric format, with node features as follows: The edges are connected as This data is then encapsulated into PyG graph data. The model weight loading module (3) loads the pre-trained corresponding model weights according to the selected input mode; The PyG graph data is processed by the encoding module (401) of the model inference module (4). The graph encoder based on GraphSAGE is used to capture local geometric features and their topological relationships to generate potential vectors with high expressive power. The encoder consists of four stacked GraphSAGE convolutional layers. Each convolutional layer is followed by a batch normalization layer, a ReLU nonlinear activation function and a Dropout layer to stabilize the training process and alleviate overfitting. While maintaining the inductive ability of GraphSAGE, it emphasizes structurally important nodes. A global attention pooling module is introduced to adaptively weight and aggregate node features to highlight key nodes that contribute highly to the overall structure of the sketch, solve the feature dilution problem in multi-primitive scenarios, and generate compact and semantically consistent potential representations. The correction module (402) of the model inference module (4) uses the isometric view as an auxiliary supervision signal. By constructing a feature correction network and an adaptive gating fusion mechanism, it uses the multi-dimensional geometric correlation information provided by the isometric view to explicitly correct the residual deviation in the orthographic projection latent space. While ensuring training stability, it enhances the topological consistency of the cross-view latent space and improves the reconstruction accuracy of complex geometry. The decoding module (403) of the model inference module (4) adopts an adaptive dual-prediction decoder. With the latent vector as the conditional input, it models the global context information through the Transformer decoder and generates a sequence-aware latent representation. Then, the latent representation is normalized and nonlinearly transformed through a lightweight feature enhancement module. On this basis, the decoder constructs two branches in parallel: command prediction and parameter prediction. In the command prediction branch, the latent vector at each time step is modeled based on the progressively decoded features. To characterize the modeling difficulty of different CAD commands, a complexity command estimator is introduced, which predicts continuous scalars at each time step through linear transformation, nonlinear activation functions, and the sigmoid function. This is used to characterize the complexity of the instructions and serve as a conditional signal for generating subsequent parameters. A dual predictor structure is further constructed, including a single-layer predictor and a multi-layer predictor. The single-layer predictor uses a linear mapping to model high-frequency and relatively simple command patterns, while the multi-layer predictor uses a multilayer perceptron with nonlinear activation to characterize complex geometric relationships and constraints. Simultaneously, an adaptive fusion gating is introduced, using two linear transformations and a Softmax function to calculate the adaptive prediction weights for each time step. The dual-path outputs are dynamically weighted and fused to obtain the final command type prediction result: In the parameter prediction branch, the command complexity scalar c is concatenated with the corresponding decoding features to obtain and input into the complexity feature fusion module. Through linear transformation, layer normalization and non-linear activation, the parameter features under different complexity conditions are adaptively modulated, and the command parameter prediction results are generated through multi-layer predictors: The CAD reconstruction module (5) reconstructs the sketch outline and identifies closed loops in three-dimensional space according to the CAD operation command sequence generated by the model reasoning module, simulates the CAD software modeling process, generates surfaces from points and lines by creating surfaces based on the sketch and extrusion instance operations, and constructs CAD solid models from surfaces. The CAD model export module (6) exports the reconstructed CAD entity model as a standard industrial format file and displays it on the front-end interface.