A method for realizing line three-dimensional to two-dimensional vector layout diagram in web page
By parsing the semantic information of 3D models on web pages, dividing the hierarchical structure, and generating intelligent annotations, the problem of low efficiency and insufficient accuracy in the conversion from 3D to 2D in existing technologies is solved, and efficient generation of 2D vector layout diagrams and cross-device collaborative design are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI PAI RUI INFORMATION TECH CO LTD
- Filing Date
- 2026-05-09
- Publication Date
- 2026-07-14
AI Technical Summary
Existing technologies suffer from problems such as low efficiency, insufficient accuracy, cluttered information, inability to achieve local updates, and difficulty in cross-device collaboration in the conversion from 3D models to 2D vector layout diagrams, and cannot meet the needs of modern industrial distributed collaborative design.
The method for converting a 3D production line layout into a 2D vector layout on a web page involves parsing the semantic information of the 3D model, dividing the hierarchical structure, configuring the feature extraction granularity, generating intelligent annotations, and monitoring modifications to the 3D model in real time to achieve local conversion and updates, establish mapping relationships, and generate a 2D vector layout that conforms to industrial drawing standards.
It improves the readability and usability of drawings, shortens the design cycle, enhances design iteration efficiency, supports cross-device distributed collaborative design, and ensures consistency between 3D models and 2D layout drawings.
Smart Images

Figure CN122391384A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer graphics processing and industrial digitalization technology, specifically relating to a method for converting a 3D production line into a 2D vector layout diagram on a web page. Background Technology
[0002] With the comprehensive deepening of industrial digital transformation, intelligent manufacturing and digital twin technology have been widely used in the manufacturing industry. 3D digital models have become the core data carrier for the entire life cycle of industrial production line design, planning, transformation and upgrading, operation and maintenance management. 3D models can accurately restore the spatial layout, equipment form and assembly relationship of the production line, providing intuitive visualization support for production line design and effectively reducing communication costs and error risks in the design stage.
[0003] Two-dimensional vector layout diagrams, as legally mandated delivery documents for industrial production, engineering construction, and on-site operation and maintenance, have always been the core basis for the implementation of production line design results. Currently, in the industrial field, the conversion from 3D models to 2D vector layout diagrams mainly relies on two mainstream methods: The first is to manually redraw the 3D model in desktop industrial design software. This method has significant efficiency bottlenecks. For a medium-sized production line containing hundreds of devices, it takes several weeks of collaborative work by multiple engineers to complete the 2D layout diagram. Moreover, the production line design process requires dozens of iterations and modifications on average, and each modification requires simultaneous adjustments to the 2D drawings, which easily leads to inconsistencies between the drawings and the 3D model, significantly lengthening the design cycle and increasing the probability of errors. The second method is to use dedicated desktop conversion tools. These tools are mostly deployed in a single-machine mode, which has problems such as high licensing costs, difficulties in cross-device collaboration, and stringent requirements for operating hardware, and cannot meet the needs of modern industrial distributed collaborative design.
[0004] Existing automatic conversion technologies generally suffer from several technical shortcomings. First, existing technologies employ a single, fixed-granularity overall conversion mode, which cannot adapt to differentiated conversion accuracy based on the functional positioning of different levels of the production line. At the production line overview level, a large amount of irrelevant detailed information is generated, resulting in messy drawings and excessively large file sizes. At the equipment detail level, key features are missing, failing to meet the accuracy requirements of different usage scenarios. Second, the conversion process only focuses on simple projection mapping of geometric shapes, completely ignoring the inherent process flow logic and hierarchical relationships of the production line. The generated two-dimensional drawings are merely a disordered stacking of independent equipment shapes, failing to reflect the production operation process and functional zoning of the production line. Engineers need to spend a lot of time re-organizing the production line logic.
[0005] Furthermore, the 2D drawings generated by existing technologies are independent static files, without any association or mapping relationship with the original 3D model. When the 3D model undergoes local adjustments, the entire model must be converted and all annotation information re-added, making local incremental updates impossible and severely impacting design iteration efficiency. The generated drawings only contain basic geometric outline information and lack core information such as equipment parameters, process requirements, and safety specifications required for production, manufacturing, and on-site construction. Engineers need to spend hours or even days on secondary editing and adding annotations. At the same time, existing technologies do not classify and manage different types of information in a hierarchical manner. Various contents such as geometric figures, dimensions, process information, and safety warnings are mixed and superimposed, requiring users in different positions to sift through massive amounts of information to find the required content, which greatly reduces the efficiency of drawing use. Summary of the Invention
[0006] To address the aforementioned problems in the existing technology, this invention provides a method for converting a 3D production line layout diagram to a 2D vector layout on a web page. The objective of this invention can be achieved through the following technical solution: include: S1: Load the 3D model of the production line to be converted on the web page, parse the semantic information contained in the 3D model of the production line; extract the physical connection relationship and process flow logic between the structural units of the production line, divide the production line hierarchical structure and assign corresponding identifiers to each structural unit; S2: Based on the preset transformation rules of each level, configure the corresponding feature extraction granularity for structural units of different levels; based on the feature extraction granularity corresponding to each structural unit, extract key geometric features and structural lines, and convert each structural unit and its connection relationship into a set of two-dimensional projection elements; S3: Extract the process attribute information of the 3D model of the production line, bind and associate the process attribute information with the corresponding 2D projection elements, and generate intelligent annotations corresponding to the 2D projection elements; manage all 2D projection elements and intelligent annotations in layers according to information type, and switch the display status of any layer according to actual needs; S4: Establish the mapping relationship between the 3D model elements and the 2D projection elements of the production line, and record the geometric parameters and attribute information of each element; monitor the modification operation of the 3D model of the production line in real time, and when a local modification of the 3D model of the production line is detected, perform local transformation and update on the corresponding elements involved in the modification; automatically adjust the associated annotations and connection relationships, and finally generate a 2D vector layout diagram.
[0007] Specifically, the process of analyzing the semantic information contained in the 3D model of the production line is as follows: Read the native node data of the production line 3D model line by line, extract the inherent attributes of each node, extract the relationship between nodes, and filter out redundant data related to the rendering of the production line 3D model. The extracted attributes are validated for consistency, invalid data with incorrect format is removed, and the valid information is organized into a structured manner according to the node hierarchy.
[0008] Specifically, the process of dividing the production line hierarchy and assigning corresponding identifiers to each structural unit is as follows: Based on the production process and functional layout of the production line, the hierarchy is divided into overall functional zones, production sections, and independent structural units, and a globally corresponding identifier is automatically generated for each structural unit of each level. The process of generating identifiers is carried out simultaneously with the parsing of the 3D model of the production line, and the identifiers are bound and stored with the semantic information of the corresponding structural units.
[0009] Specifically, the process of configuring corresponding feature extraction granularity for structural units at different levels is as follows: Based on the usage requirements of the production line drawings and the functional positioning of each level, the corresponding feature extraction granularity is configured for the overall functional zoning level, while retaining the regional boundaries and main logistics connection features. Configure corresponding feature extraction granularity for the production section level to retain the main outline and interface features of the equipment, and configure corresponding feature extraction granularity for the independent structural unit level to retain complete geometric details and key features. The granularity parameters can be flexibly adjusted according to the actual use scenario.
[0010] Specifically, the process of extracting key geometric features and structural lines is as follows: Analyze the surface geometry changes of structural units point by point to identify regions of abrupt geometric changes; The core structural lines are extracted from the geometric abrupt region, and key feature points are extracted at the same time. The features and lines that are repeatedly extracted are deduplicated and simplified and optimized. The extracted lines are then connected at breakpoints to eliminate line breaks caused by inaccuracies in the 3D model of the production line.
[0011] Specifically, the process of converting each structural unit and its connection relationship into a set of two-dimensional projection elements is as follows: A unified top-down projection angle and a horizontal projection reference plane are preset, and the projection reference plane is kept parallel to the horizontal working plane of the production line; It also provides a projection method selection interface, allowing users to choose side view projection, isometric projection, or multi-view combination projection, and remembers the optimal projection configuration for each production line type; The key geometric features and structural lines of each structural unit are projected onto the reference plane according to the rules of orthogonal projection, and the connection and flow logic between structural units is converted into corresponding projected connection lines. Maintain the relative positional relationship between each structural unit during the projection process consistent with the three-dimensional model of the production line, and integrate all projected elements to form a complete set of two-dimensional projected elements.
[0012] Specifically, the process of generating intelligent annotations corresponding to the two-dimensional projection elements is as follows: Extract the process attribute information of the production line structural unit corresponding to the two-dimensional projection element, and automatically plan the annotation position according to the outline shape of the projection element and the surrounding space. The process attribute information is converted into annotation content that conforms to industrial drawing standards. The annotation content is then associated and bound with the corresponding two-dimensional projection elements, and the annotation style is unified to form intelligent annotation.
[0013] Specifically, the process of hierarchically managing all two-dimensional projection elements and intelligent annotations according to information type is as follows: Two-dimensional projection elements are divided into four functional categories: production execution, logistics transmission, auxiliary support, and infrastructure; and intelligent annotation is divided into four information categories: dimension annotation, process parameters, equipment information, and safety prompts. Create independent layers for each type of element and label, group elements and labels of the same category into the corresponding layers for unified management, set independent editing permissions for each layer, and support individual modification operations on a single layer.
[0014] Specifically, the process of switching the display state of any layer according to actual needs is as follows: A visual layer control interface is provided on the web page. The interface displays all layers in a list format and receives layer display control commands from users through click or checkbox operations. Locate the corresponding target layer according to the instructions, modify the visibility attribute of the target layer, and render and present the adjusted layer display effect in real time; The interface labels the content type corresponding to each layer, allowing for quick location of the target layer, while other untouched layers retain their original display state.
[0015] Specifically, the process of establishing the mapping relationship between the three-dimensional model elements and the two-dimensional projection elements of the production line is as follows: Obtain the unique identifier of each production line structural unit and the internal identifier of the corresponding two-dimensional projection element; The identifiers of the 3D model elements of the production line are matched one-to-one with the internal identifiers of the 2D projection elements, and the matched correspondence is stored as a structured mapping table. The mapping table is stored in the form of key-value pairs, allowing for quick retrieval of corresponding elements by either identifier.
[0016] Specifically, the process of modifying the 3D model of the production line in real time is as follows: An event listener mechanism is established in the 3D rendering engine of the web page to continuously listen for the editing operations performed by the user on the 3D model. The editing operations include translation, rotation, scaling, parameter change, deletion, and modification of connection relationships. When a modification operation is detected, the unique identifier and specific modification content of the production line structural unit involved in the modification operation are immediately obtained. Continuously occurring modification operations of the same type are merged and an update lock is set to prevent cyclic triggering. The modification information is transmitted to the subsequent update processing flow in real time.
[0017] Specifically, the process of generating the final two-dimensional vector layout diagram is as follows: All processed 2D projection elements and associated smart annotations are integrated and arranged according to the preset layer overlay order; The integrated content undergoes line smoothing and redundant node cleanup, and the optimized graphic data is converted into an industrially common vector graphic format while retaining the independent editing attributes of each layer. Generate a 2D vector layout map containing complete layer information and annotation information.
[0018] The beneficial effects of this invention are as follows: (1) By setting up a production line hierarchical structure division and differentiated feature extraction mechanism, combined with information hierarchical management and intelligent automatic annotation technology, it can adapt the corresponding feature extraction granularity according to the functional positioning of different levels of the production line, effectively filter unnecessary redundant information while ensuring the integrity of key area details, automatically generate intelligent annotations that conform to industrial drawing standards and perform hierarchical management according to function and information type, greatly improve the readability and usability of drawings, completely eliminate the tedious process of manual secondary editing annotation, and shorten the production line design cycle; (2) By setting up a one-to-one mapping relationship between 3D model elements and 2D projection elements and a real-time incremental update mechanism, it can continuously monitor various editing operations of the 3D model, accurately locate the corresponding elements involved in the modification and perform local conversion and update only on them, automatically synchronize and adjust the associated annotation content and connection relationship, always maintain the consistency between the 3D model and the 2D layout diagram, effectively avoid the waste of computing resources caused by repeated conversion, greatly improve the efficiency of production line design iteration, and support cross-device distributed collaborative design on the Web terminal. Attached Figure Description
[0019] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings.
[0020] Figure 1 This is a flowchart illustrating a method for converting a 3D production line layout into a 2D vector layout on a web page, according to the present invention. Figure 2This is a data flow diagram of a method for converting a 3D production line layout diagram to a 2D vector layout diagram on a web page, according to the present invention. Detailed Implementation
[0021] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided.
[0022] Please see Figure 1-2 A method for converting a 3D production line layout diagram to a 2D vector layout diagram on a web page; include: S1: Load the 3D model of the production line to be converted on the web page, parse the semantic information contained in the 3D model of the production line; extract the physical connection relationship and process flow logic between the structural units of the production line, divide the production line hierarchical structure and assign corresponding identifiers to each structural unit; S2: Based on the preset transformation rules of each level, configure the corresponding feature extraction granularity for structural units of different levels; based on the feature extraction granularity corresponding to each structural unit, extract key geometric features and structural lines, and convert each structural unit and its connection relationship into a set of two-dimensional projection elements; S3: Extract the process attribute information of the 3D model of the production line, bind and associate the process attribute information with the corresponding 2D projection elements, and generate intelligent annotations corresponding to the 2D projection elements; manage all 2D projection elements and intelligent annotations in layers according to information type, and switch the display status of any layer according to actual needs; S4: Establish the mapping relationship between the 3D model elements and the 2D projection elements of the production line, and record the geometric parameters and attribute information of each element; monitor the modification operation of the 3D model of the production line in real time, and when a local modification of the 3D model of the production line is detected, perform local transformation and update on the corresponding elements involved in the modification; automatically adjust the associated annotations and connection relationships, and finally generate a 2D vector layout diagram.
[0023] In this embodiment, semantic information refers to all structured information in the 3D model of the production line that can describe the essential characteristics and interrelationships of the structural units of the production line, except for pure geometric coordinate data. Specifically, it includes: the inherent attribute information of each structural unit, the association information between each structural unit, the functional zoning and production process information of the production line as a whole, and all non-rendering metadata built into the model file. Physical connection relationships and process flow logic refer to the objective spatial connection relationships between structural units of the production line and the inherent logical relationships of material flow during the production process. Together, they constitute the complete topology of the production line, specifically including: mechanical connection between equipment and conveyor belt, fluid connection between pipes and valves, electrical connection between cables and control cabinets, spatial connection between workstations and enclosures, sequential execution order of processes, input and output direction of materials, branching and return logic of the production process, and collaborative relationships between different work sections. Key geometric features and structural lines refer to the smallest set of geometric elements that can completely and accurately represent the shape and position of the production line structural unit. They are the core geometric information that needs to be retained during the 3D to 2D conversion process. Specifically, they include: the endpoints and intersections of the outer contour of the structural unit, the center and quadrant points of the circular structure, the center point of the equipment interface, the turning point of the connecting pipeline, the outer contour line of the structural unit, the center line of symmetry, the boundary line of different components, the connecting pipeline between equipment, and the boundary line of the area. Process attribute information refers to all non-geometric attribute information directly related to production line manufacturing, construction and installation, and operation and maintenance management. It is the core data source for generating intelligent annotations. Specifically, it includes: basic equipment information such as equipment number, equipment name, model and specifications, manufacturer, and installation date; process parameter information such as processing accuracy, production cycle, operating temperature, working pressure, and conveying speed; operation and maintenance management information such as maintenance cycle, responsible person, equipment status, and fault records; and safety specification information such as protection level, hazard level, safety distance requirements, and operation precautions. Information type refers to the basis for classifying and hierarchically managing two-dimensional projection elements and intelligent annotations. It is divided into two major categories according to the functional attributes and content attributes of the information, specifically including: functional types of two-dimensional projection elements such as production execution, logistics transmission, auxiliary support, and infrastructure; and content types of intelligent annotations such as dimension annotation, process parameter, equipment information, and safety prompts. Geometric parameters and attribute information refer to the core data stored in the mapping table used to realize the association and matching of three-dimensional and two-dimensional elements and incremental updates. Specifically, they include geometric parameters that describe the shape and position of elements, such as coordinate values, length, width, height, angle, area, and relative position offset, as well as non-numerical information that describes the essential characteristics of elements, such as the inherent attribute information of each structural unit. Native node data refers to the original data structure that comes with the production line 3D model file itself without any modification. It is the starting point for all data processing in this invention. Each independent production line structural unit corresponds to an independent native node in the 3D model, which specifically includes: the node's unique identification code, the node's geometric vertex data and topology data, all attribute data of the node, the subordinate relationship data between the node and its parent and child nodes, and the connection relationship data between the node and other nodes.
[0024] Specifically, the process of analyzing the semantic information contained in the 3D model of the production line is as follows: Read the native node data of the production line 3D model line by line, extract the inherent attributes of each node, extract the relationship between nodes, and filter out redundant data related to the rendering of the production line 3D model. The extracted attributes are validated for consistency, invalid data with incorrect format is removed, and the valid information is organized into a structured manner according to the node hierarchy.
[0025] Specifically, the process of dividing the production line hierarchy and assigning corresponding identifiers to each structural unit is as follows: Based on the production process and functional layout of the production line, the hierarchy is divided into overall functional zones, production sections, and independent structural units, and a globally corresponding identifier is automatically generated for each structural unit of each level. The process of generating identifiers is carried out simultaneously with the parsing of the 3D model of the production line, and the identifiers are bound and stored with the semantic information of the corresponding structural units.
[0026] Specifically, the process of configuring corresponding feature extraction granularity for structural units at different levels is as follows: Based on the usage requirements of the production line drawings and the functional positioning of each level, the corresponding feature extraction granularity is configured for the overall functional zoning level, while retaining the regional boundaries and main logistics connection features. Configure corresponding feature extraction granularity for the production section level to retain the main outline and interface features of the equipment, and configure corresponding feature extraction granularity for the independent structural unit level to retain complete geometric details and key features. The granularity parameters can be flexibly adjusted according to the actual use scenario.
[0027] Specifically, the process of extracting key geometric features and structural lines is as follows: Analyze the surface geometry changes of structural units point by point to identify regions of abrupt geometric changes; The core structural lines are extracted from the geometric abrupt region, and key feature points are extracted at the same time. The features and lines that are repeatedly extracted are deduplicated and simplified and optimized. The extracted lines are then connected at breakpoints to eliminate line breaks caused by inaccuracies in the 3D model of the production line.
[0028] Specifically, the process of converting each structural unit and its connection relationship into a set of two-dimensional projection elements is as follows: A unified top-down projection angle and a horizontal projection reference plane are preset, and the projection reference plane is kept parallel to the horizontal working plane of the production line; It also provides a projection method selection interface, allowing users to choose side view projection, isometric projection, or multi-view combination projection, and remembers the optimal projection configuration for each production line type; The key geometric features and structural lines of each structural unit are projected onto the reference plane according to the rules of orthogonal projection, and the connection and flow logic between structural units is converted into corresponding projected connection lines. Maintain the relative positional relationship between each structural unit during the projection process consistent with the three-dimensional model of the production line, and integrate all projected elements to form a complete set of two-dimensional projected elements.
[0029] Specifically, the process of generating intelligent annotations corresponding to the two-dimensional projection elements is as follows: Extract the process attribute information of the production line structural unit corresponding to the two-dimensional projection element, and automatically plan the annotation position according to the outline shape of the projection element and the surrounding space. The process attribute information is converted into annotation content that conforms to industrial drawing standards. The annotation content is then associated and bound with the corresponding two-dimensional projection elements, and the annotation style is unified to form intelligent annotation.
[0030] Specifically, the process of hierarchically managing all two-dimensional projection elements and intelligent annotations according to information type is as follows: Two-dimensional projection elements are divided into four functional categories: production execution, logistics transmission, auxiliary support, and infrastructure; and intelligent annotation is divided into four information categories: dimension annotation, process parameters, equipment information, and safety prompts. Create independent layers for each type of element and label, group elements and labels of the same category into the corresponding layers for unified management, set independent editing permissions for each layer, and support individual modification operations on a single layer.
[0031] Specifically, the process of switching the display state of any layer according to actual needs is as follows: A visual layer control interface is provided on the web page. The interface displays all layers in a list format and receives layer display control commands from users through click or checkbox operations. Locate the corresponding target layer according to the instructions, modify the visibility attribute of the target layer, and render and present the adjusted layer display effect in real time; The interface labels the content type corresponding to each layer, allowing for quick location of the target layer, while other untouched layers retain their original display state.
[0032] Specifically, the process of establishing the mapping relationship between the three-dimensional model elements and the two-dimensional projection elements of the production line is as follows: Obtain the unique identifier of each production line structural unit and the internal identifier of the corresponding two-dimensional projection element; The identifiers of the 3D model elements of the production line are matched one-to-one with the internal identifiers of the 2D projection elements, and the matched correspondence is stored as a structured mapping table. The mapping table is stored in the form of key-value pairs, allowing for quick retrieval of corresponding elements by either identifier.
[0033] Specifically, the process of modifying the 3D model of the production line in real time is as follows: An event listener mechanism is established in the 3D rendering engine of the web page to continuously listen for the editing operations performed by the user on the 3D model. The editing operations include translation, rotation, scaling, parameter change, deletion, and modification of connection relationships. When a modification operation is detected, the unique identifier and specific modification content of the production line structural unit involved in the modification operation are immediately obtained. Continuously occurring modification operations of the same type are merged and an update lock is set to prevent cyclic triggering. The modification information is transmitted to the subsequent update processing flow in real time.
[0034] Specifically, the process of generating the final two-dimensional vector layout diagram is as follows: All processed 2D projection elements and associated smart annotations are integrated and arranged according to the preset layer overlay order; The integrated content undergoes line smoothing and redundant node cleanup, and the optimized graphic data is converted into an industrially common vector graphic format while retaining the independent editing attributes of each layer. Generate a 2D vector layout map containing complete layer information and annotation information.
[0035] In this embodiment, the specific process of parsing the semantic information contained in the 3D production line model is as follows: the GLTF and GLB format 3D production line models are loaded using the GLTFLoader of Three.js, the native node data of the model is read line by line, the geometric vertices, topological connection inherent attributes of the nodes, and the hierarchical and physical connection relationships between nodes are extracted, redundant data such as texture coordinates, normal vectors, and lightmap rendering are filtered out, MD5 consistency verification is performed on the extracted attributes, invalid data with mismatched hash values are removed, and the valid information is organized into a semantic dataset in JSON format according to the parent-child hierarchy of nodes.
[0036] In this embodiment, the specific process of dividing the production line hierarchy and assigning corresponding identifiers to each structural unit is as follows: Based on the production process and functional layout of the production line, it is divided into three levels: workshop-level overall functional area, production line-level production section, and workstation-level independent structural unit. A globally unique identifier is generated by using a hierarchy prefix plus a hexadecimal auto-incrementing sequence. The workshop-level prefix is A, the production line-level prefix is A01, and the workstation-level prefix is A0101. Identifier generation and model parsing are performed synchronously, and the identifier and corresponding semantic information are bound and stored in the IndexedDB local database.
[0037] In this embodiment, the specific process of configuring corresponding feature extraction granularity for structural units at different levels is as follows: Based on the usage requirements of production line drawings, the feature extraction granularity is configured for the overall functional area of the workshop level, retaining only the area boundary and the connection features of the main conveyor belt, with a feature point retention ratio of 10%; the feature extraction granularity is configured for the production line level production section, retaining the outer contour and interface features of the equipment, with a feature point retention ratio of 30%; the feature extraction granularity is configured for the independent structural unit at the workstation level, retaining complete geometric details and mounting hole features, with a feature point retention ratio of 80%. The granularity parameter can be adjusted in the range of 5% to 95% using the slider control on the Web platform.
[0038] In this embodiment, the specific process of extracting key geometric features and structural lines is as follows: a curvature calculation algorithm is used to analyze the surface geometry of the structural unit point by point, a curvature threshold of 0.5 radians is set, and abrupt geometric morphological changes with curvature greater than the threshold are identified. From this region, the outer contour line, center line, and core structural line of the component intersection are extracted. At the same time, the intersection points and endpoint key feature points of the structural lines are extracted. The Ramer-Douglas-Peucker algorithm is used to simplify duplicate features. A distance threshold of 1 pixel is set, and the endpoint distance of the broken lines is matched and connected. If the matching distance is less than 3 pixels, the connection is automatic.
[0039] In this embodiment, the specific process of converting each structural unit and its connection relationship into a set of two-dimensional projection elements is as follows: preset the top-view projection angle, set the horizontal projection reference plane to coincide with the Z=0 plane of the production line ground, provide side-view and isometric projection options, memorize the optimal projection configuration of the automobile assembly and electronic assembly production lines, use an orthogonal projection matrix to project features and structural lines onto the reference plane, convert the conveyor belt connection and material flow logic between equipment into solid and dashed projection lines, keep the relative position error of each unit not exceeding 0.1mm, and integrate all projection elements to form a set of two-dimensional projection elements.
[0040] In this embodiment, the specific process of generating intelligent annotations corresponding to two-dimensional projection elements is as follows: extract equipment number and production cycle process attributes from semantic dataset, calculate the bounding rectangle of two-dimensional projection elements, reserve a 20-pixel blank area in the upper right corner of the rectangle as the annotation position, convert the process attributes into annotation content conforming to GB / T 4457.3-2002 standard, set the font to SimSun and the font size to 12, associate and bind the annotations with the corresponding two-dimensional elements through unique identifiers, automatically detect the overlapping of annotations, and offset the overlapping annotations to the adjacent blank area.
[0041] In this embodiment, the specific process of hierarchically managing all two-dimensional projection elements and intelligent annotations according to information type is as follows: the two-dimensional projection elements are divided into four functional categories: production execution, logistics transmission, auxiliary support, and infrastructure; the intelligent annotations are divided into four information categories: dimension annotation, process parameters, equipment information, and safety prompts; eight independent layers are created and stacked in the following order: infrastructure layer, logistics transmission layer, production execution layer, auxiliary support layer, dimension annotation layer, process parameter layer, equipment information layer, and safety prompt layer; each layer is set with independent visibility and editability switches, and locking of individual layers is supported.
[0042] In this embodiment, the specific process of switching the display state of any layer according to actual needs is as follows: A visual layer control interface is set on the right side of the web page, displaying all layers in the form of a collapsed list. A checkbox is set in front of each layer to receive the display control command issued by the user when clicking the checkbox. The opacity attribute of the target layer is modified according to the command, set to 1 when checked and 0 when unchecked. The adjusted effect is rendered in real time through WebGL. Each layer in the interface is labeled with its corresponding content type, and the target layer can be quickly located through the search box.
[0043] In this embodiment, the specific process of establishing the mapping relationship between the 3D model elements and the 2D projection elements of the production line is as follows: obtain the hexadecimal unique identifier of each production line structural unit and the internal auto-incrementing ID of the corresponding 2D projection element, match the 3D identifier and the 2D ID one by one, generate a JSON mapping table in the form of key-value pairs, where the key is the 3D element identifier and the value is the 2D element ID, store the mapping table in the backend MySQL database, and realize millisecond-level retrieval of either identifier through the primary key index. The mapping table is automatically updated synchronously as the model is modified.
[0044] In this embodiment, the specific process of real-time monitoring of modifications to the production line's 3D model is as follows: Register an Object3D change event listener in the Three.js 3D rendering engine to continuously listen for translation, rotation, scaling, parameter changes, deletion, and connection relationship modification / editing operations. When a modification is detected, immediately obtain the unique identifier of the element involved and its coordinate parameters before and after the modification. Set a 300ms time window to merge consecutive modifications of the same type, and set a 500ms update lock to prevent cyclic triggering. Push the modification information to the backend update processing flow in real time via WebSocket.
[0045] In this embodiment, the specific process for generating the final two-dimensional vector layout diagram is as follows: all two-dimensional projection elements and associated annotations are integrated and arranged according to the preset layer order; the Bézier curve fitting algorithm is used to smooth the lines; redundant nodes with an adjacent distance of less than 0.5 pixels are cleaned up; the Canvas bitmap data is converted into SVG vector format using the Canvas2SVG library; the independent editing attributes of each layer are retained; and a two-dimensional vector layout diagram containing complete layer and annotation information is generated. It also supports exporting to DWG and DXF industrial common formats, and the exported files can be directly imported into AutoCAD and SolidWorks software for editing.
[0046] In this embodiment, taking the SMT assembly line of an electronics factory as an example, the specific process is as follows: a is the curvature threshold, b is the feature simplification distance threshold, c is the line breakpoint matching distance threshold, d is the projection relative position error threshold, e is the size of the annotation reserved blank area, f is the modification merge time window, and g is the update lock duration. The specific process of S1 is as follows: Load the GLTF format SMT production line 3D model (including core equipment such as printers, pick-and-place machines, reflow soldering machines, and conveyor belts), read the model's native node data, extract the inherent attributes of the nodes and the relationships between nodes, filter and render redundant data, perform consistency checks on the extracted attributes and remove invalid data, and organize the valid information into a structured semantic dataset according to the node hierarchy; divide the production line into three levels according to the production process and functional layout, generate a globally unique identifier for each level of structural unit, and perform identifier generation and model parsing synchronously, binding and storing the identifier with the corresponding semantic information; The specific process of S2 is as follows: Based on the requirements of the production line drawings, the corresponding feature extraction granularity is configured for each of the three levels, retaining the core features required by different levels; the curvature calculation algorithm is used to analyze the surface morphology of the equipment, and a curvature threshold 'a' is set to identify areas of abrupt geometric changes, from which core structural lines and key feature points are extracted; a simplification algorithm is used to optimize the deduplication of duplicate features, a distance threshold 'b' is set to complete line simplification, and a matching threshold 'c' is set to automatically connect broken lines; a unified top-down projection view and reference plane are preset, and an orthogonal projection matrix is used to project features and structural lines onto the reference plane, converting the connection between equipment and the logic of material flow into corresponding projection lines, keeping the relative position error of each piece of equipment within the threshold 'd', and integrating all projection elements to form a two-dimensional projection element set; The specific process of S3 is as follows: Extract the process attribute information (such as equipment number and production cycle) of the corresponding equipment from the semantic dataset; calculate the bounding rectangle of the two-dimensional projection element; reserve a blank area of size e at a preset position as the annotation position; convert the process attributes into annotation content that conforms to industrial drawing standards; set a unified annotation style; associate and bind the annotation with the corresponding two-dimensional element; automatically detect and avoid annotation overlap problems; divide the two-dimensional projection element and intelligent annotation into multiple categories according to information type; create an independent layer for each category of content and overlay them in a preset order; set an independent control switch for each layer; provide a visual layer control interface on the web page to receive user operation commands and adjust the layer display status in real time; The specific process of S4 is as follows: Obtain the corresponding identifiers of 3D devices and 2D projection elements, establish a one-to-one mapping relationship between them and store it as a structured mapping table. The mapping table supports fast retrieval and is updated synchronously with model modifications. An event listening mechanism is established in the 3D rendering engine to continuously monitor user editing operations on the 3D model (such as device translation and conveyor belt length adjustment). When a modification is detected, the identifiers of the involved elements and the modified content are immediately obtained. A time window of duration f is set to merge consecutive modifications of the same type. Simultaneously, an update lock of duration g is set to prevent cyclic triggering. Only the corresponding 2D elements involved in the modification are re-converted, and the associated annotations and connection relationships are automatically adjusted synchronously. All processed content is integrated and arranged in layer order, lines are smoothed and redundant nodes are cleaned up, and converted to an industrial-grade vector format to generate a 2D vector layout diagram of the SMT production line containing complete layer and annotation information.
[0047] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A method for converting a 3D production line layout diagram to a 2D vector layout on a web page, characterized in that, include: S1: Load the 3D model of the production line to be converted on the web page, parse the semantic information contained in the 3D model of the production line; extract the physical connection relationship and process flow logic between the structural units of the production line, divide the production line hierarchical structure and assign corresponding identifiers to each structural unit; S2: Based on the preset transformation rules of each level, configure the corresponding feature extraction granularity for structural units of different levels; based on the feature extraction granularity corresponding to each structural unit, extract key geometric features and structural lines, and convert each structural unit and its connection relationship into a set of two-dimensional projection elements; S3: Extract the process attribute information of the 3D model of the production line, bind and associate the process attribute information with the corresponding 2D projection elements, and generate intelligent annotations corresponding to the 2D projection elements; manage all 2D projection elements and intelligent annotations in layers according to information type, and switch the display status of any layer according to actual needs; S4: Establish the mapping relationship between the 3D model elements and the 2D projection elements of the production line, and record the geometric parameters and attribute information of each element; The system monitors modifications to the production line's 3D model in real time. When a local modification is detected, it performs local transformations and updates on the corresponding elements involved in the modification. It also automatically adjusts the associated annotations and connections, ultimately generating a 2D vector layout diagram.
2. The method according to claim 1, characterized in that, The specific process of analyzing the semantic information contained in the 3D model of the production line is as follows: Read the native node data of the production line 3D model line by line, extract the inherent attributes of each node, extract the relationship between nodes, and filter out redundant data related to the rendering of the production line 3D model. The extracted attributes are validated for consistency, invalid data with incorrect format is removed, and the valid information is organized into a structured manner according to the node hierarchy.
3. The method according to claim 1, characterized in that, The specific process of dividing the production line hierarchy and assigning corresponding identifiers to each structural unit is as follows: Based on the production process and functional layout of the production line, the hierarchy is divided into overall functional zones, production sections, and independent structural units, and a globally corresponding identifier is automatically generated for each structural unit of each level. The process of generating identifiers is carried out simultaneously with the parsing of the 3D model of the production line, and the identifiers are bound and stored with the semantic information of the corresponding structural units.
4. The method according to claim 1, characterized in that, The specific process of configuring corresponding feature extraction granularity for structural units at different levels is as follows: Based on the usage requirements of the production line drawings and the functional positioning of each level, the corresponding feature extraction granularity is configured for the overall functional zoning level, while retaining the regional boundaries and main logistics connection features. Configure corresponding feature extraction granularity for the production section level to retain the main outline and interface features of the equipment, and configure corresponding feature extraction granularity for the independent structural unit level to retain complete geometric details and key features. The granularity parameters can be flexibly adjusted according to the actual use scenario.
5. The method according to claim 1, characterized in that, The specific process for extracting key geometric features and structural lines is as follows: Analyze the surface geometry changes of structural units point by point to identify regions of abrupt geometric changes; The core structural lines are extracted from the geometric abrupt region, and key feature points are extracted at the same time. The features and lines that are repeatedly extracted are deduplicated and simplified and optimized. The extracted lines are then connected at breakpoints to eliminate line breaks caused by inaccuracies in the 3D model of the production line.
6. The method according to claim 1, characterized in that, The specific process of converting each structural unit and its connection relationship into a set of two-dimensional projection elements is as follows: A unified top-down projection angle and a horizontal projection reference plane are preset, and the projection reference plane is kept parallel to the horizontal working plane of the production line; It also provides a projection method selection interface, allowing users to choose side view projection, isometric projection, or multi-view combination projection, and remembers the optimal projection configuration for each production line type; The key geometric features and structural lines of each structural unit are projected onto the reference plane according to the rules of orthogonal projection, and the connection and flow logic between structural units is converted into corresponding projected connection lines. Maintain the relative positional relationship between each structural unit during the projection process consistent with the three-dimensional model of the production line, and integrate all projected elements to form a complete set of two-dimensional projected elements.
7. The method according to claim 1, characterized in that, The specific process for generating intelligent annotations corresponding to two-dimensional projection elements is as follows: Extract the process attribute information of the production line structural unit corresponding to the two-dimensional projection element, and automatically plan the annotation position according to the outline shape of the projection element and the surrounding space. The process attribute information is converted into annotation content that conforms to industrial drawing standards. The annotation content is then associated and bound with the corresponding two-dimensional projection elements, and the annotation style is unified to form intelligent annotation.
8. The method according to claim 1, characterized in that, The specific process of hierarchically managing all two-dimensional projection elements and intelligent annotations according to information type is as follows: Two-dimensional projection elements are divided into four functional categories: production execution, logistics transmission, auxiliary support, and infrastructure; and intelligent annotation is divided into four information categories: dimension annotation, process parameters, equipment information, and safety prompts. Create independent layers for each type of element and label, group elements and labels of the same category into the corresponding layers for unified management, set independent editing permissions for each layer, and support individual modification operations on a single layer.
9. The method according to claim 1, characterized in that, The specific process of switching the display state of any layer according to actual needs is as follows: A visual layer control interface is provided on the web page. The interface displays all layers in a list format and receives layer display control commands from users through click or checkbox operations. Locate the corresponding target layer according to the instructions, modify the visibility attribute of the target layer, and render and present the adjusted layer display effect in real time; The interface labels the content type corresponding to each layer, allowing for quick location of the target layer, while other untouched layers retain their original display state.
10. The method according to claim 1, characterized in that, The specific process for establishing the mapping relationship between the 3D model elements and the 2D projection elements of the production line is as follows: Obtain the unique identifier of each production line structural unit and the internal identifier of the corresponding two-dimensional projection element; The identifiers of the 3D model elements of the production line are matched one-to-one with the internal identifiers of the 2D projection elements, and the matched correspondence is stored as a structured mapping table. The mapping table is stored in the form of key-value pairs, allowing for quick retrieval of corresponding elements by either identifier.
11. The method according to claim 1, characterized in that, The specific process for modifying the 3D model of the production line in real-time monitoring is as follows: An event listener mechanism is established in the 3D rendering engine of the web page to continuously listen for the editing operations performed by the user on the 3D model. The editing operations include translation, rotation, scaling, parameter change, deletion, and modification of connection relationships. When a modification operation is detected, the unique identifier and specific modification content of the production line structural unit involved in the modification operation are immediately obtained. Continuously occurring modification operations of the same type are merged and an update lock is set to prevent cyclic triggering. The modification information is transmitted to the subsequent update processing flow in real time.
12. The method according to claim 1, characterized in that, The specific process for generating the final two-dimensional vector layout diagram is as follows: All processed 2D projection elements and associated smart annotations are integrated and arranged according to the preset layer overlay order; The integrated content undergoes line smoothing and redundant node cleanup, and the optimized graphic data is converted into an industrially common vector graphic format while retaining the independent editing attributes of each layer. Generate a 2D vector layout map containing complete layer information and annotation information.