Automatic layout method, device, equipment and medium for engineering drawings

By dynamically obtaining view parameters and drawing types, and combining the engineering field knowledge graph to optimize view position and scale, the problem that the automatic layout method of engineering drawings in the existing technology cannot adapt to different drawing types, realizing the standardization and efficient layout of views.

CN120217473BActive Publication Date: 2025-09-02SHANDONG HUAYUN 3D TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510685616.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-09-02
Estimated Expiration
2045-05-27

AI Technical Summary

Technical Problem

The existing automatic layout method of engineering drawings cannot adapt to different drawing types, resulting in too large or overlapping views, unable to automatically select drawing types, and incomplete labeling information generation.

Method used

By dynamically obtaining view parameters and drawing types, establishing a mapping relationship library for layout parameters and drawing types, and optimizing view positions and proportions based on engineering field knowledge graphs to achieve adaptive layout.

Benefits of technology

Improve the standardization level of engineering drawings, eliminate view overflow or labeling misalignment problems, maximize view arrangement density, reduce invalid blank areas, and meet drawing specifications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120217473B_ABST
    Figure CN120217473B_ABST
Patent Text Reader

Abstract

The present application relates to the field of drawing technology, and discloses a method, apparatus, device, and medium for automatic layout of engineering drawings, including: obtaining the number of views, parameters of each view, and drawing type of the engineering drawing based on the drawing output rules; determining the layout parameters of the engineering drawing based on the drawing type; inputting the layout parameters and the number of views into pre-set constraints to determine the number of horizontal views and the number of vertical views; determining the position information of each view based on the layout parameters, the number of horizontal views, and the number of vertical views; and automatically laying out the engineering drawing based on the position information, layout parameters, and parameters of each view. By dynamically obtaining view parameters and drawing types, a library of mapping relationships between layout parameters and drawing types is established to achieve dynamic adaptation of layout parameters. This breaks through the limitations of traditional templates on drawing types, ensures that layout parameters strictly follow drawing type standards, eliminates view overflow or annotation misalignment problems caused by drawing type mismatch, and improves the standardization level of engineering drawings.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of drawing technology, and in particular to a method, device, equipment, and medium for automatic layout of engineering drawings. Background Art

[0002] Currently, the production of engineering drawings often requires manual view creation and position adjustment. For users in the same industry with a large number of models, the production process is largely repetitive, and the repetitive production process consumes a lot of users' time.

[0003] Existing automatic drawing layout methods typically create templates by presetting view positions and then importing them to generate drawings. This approach doesn't adapt to varying model sizes, as views generated at fixed positions can't adapt to the size of the views. This can result in excessive spacing or overlapping views. Furthermore, drawing types may not be automatically selected based on the model. Summary of the Invention

[0004] One or more embodiments of this specification provide a method, apparatus, device, and medium for automatically laying out an engineering drawing, which are used to solve the technical problems raised by the background art.

[0005] One or more embodiments of this specification adopt the following technical solutions:

[0006] One or more embodiments of this specification provide a method for automatically laying out an engineering drawing, the method comprising:

[0007] Based on pre-set drawing rules, obtain the number of views of the engineering drawing, the parameters of each view and the drawing type;

[0008] determining layout parameters of the engineering drawing based on the drawing type;

[0009] Inputting the layout parameters and the number of views into pre-set constraints to determine the number of horizontal views and the number of vertical views;

[0010] Determining position information of each of the views based on the layout parameters, the number of the horizontal views, and the number of the vertical views;

[0011] The engineering drawing is automatically laid out based on the position information, the layout parameters, and the parameters of each of the views.

[0012] It should be noted that the embodiments of this specification have the following beneficial effects through the above content:

[0013] Traditional template methods use fixed layout parameters (such as margins and view spacing), which cannot adapt to the standardized requirements of different drawing types (such as A3 / A4 / A0), resulting in poor layout compliance. This method dynamically obtains view parameters and drawing types, establishes a mapping relationship library between layout parameters and drawing types, and realizes dynamic adaptation of layout parameters. It breaks through the limitations of traditional templates on drawing types, ensures that layout parameters strictly follow drawing type standards, eliminates view overflow or annotation misalignment caused by drawing type mismatch, and improves the standardization level of engineering drawings. Moreover, this method can achieve coordinated optimization of the number of horizontal and vertical views, maximize the view arrangement density, reduce invalid blank areas, and improve space utilization while meeting the drawing size constraints.

[0014] Furthermore, determining the layout parameters of the engineering drawing based on the drawing type includes:

[0015] The layout parameters of the corresponding engineering drawing are set for each drawing type, and the layout parameters include the drawing width and drawing height, as well as the width, height and view scale of each view in three dimensions.

[0016] It should be noted that the embodiments of this specification have the following beneficial effects through the above content:

[0017] By mapping drawing types (such as A0's 841×1189mm dimensions) to 3D view parameters (width, height, and scale), for example, A4 drawings are restricted to landscape layouts. Dynamically compressing the 3D model projection size based on the view scale ensures that the view boundaries strictly fit the drawing format. This allows for standardized matching of view sizes and drawing types, eliminating issues such as element overflow or excessive blank space caused by disproportionate proportions, and ensuring that layouts comply with industry drafting standards.

[0018] Furthermore, inputting the layout parameters and the number of views into pre-set constraints to determine the number of horizontal views and the number of vertical views includes:

[0019] Input the layout parameters and the number of views into the constraints:

[0020] ;

[0021] ;

[0022] Determine the number of the horizontal views and the number of the vertical views; wherein,

[0023] n is the number of the horizontal views, m is the number of the vertical views, is the width of the view in row j and column i in three dimensions, is the view scale of the view in row j and column i in three dimensions, is the horizontal spacing between two adjacent views. The horizontal boundary distance between the first view and the nth view in each row is , is the drawing width, is the height of the view at row j and column i in three dimensions, The vertical spacing between views, the vertical boundary distance between the first view and the mth view in each column is , is the height of the drawing.

[0024] It should be noted that the embodiments of this specification have the following beneficial effects through the above content:

[0025] The above constraints ensure that any combination of view quantity and size strictly fits the drawing format, eliminating view overflow or excessive blank areas, and meeting the standardized compliance requirements of engineering drawing. They also enable precise mapping of 3D model parameters to 2D drawing layouts, avoiding misplaced annotations or view overlap caused by projection distortion, and improving the readability of multi-view collaborative presentations.

[0026] Furthermore, determining the position information of each view based on the layout parameter, the number of the horizontal views, and the number of the vertical views includes:

[0027] The width, height and view ratio of each view in three dimensions, the number of horizontal views, the number of vertical views, the horizontal boundary distance and the vertical boundary distance are input into the preset view center position formula P=( + * / 2, + * / 2), and obtain the center position of each view, where is the width of the view in row j and column i in three dimensions, is the height of the view at row j and column i in three dimensions, The view scale of the view at row j and column i in 3D.

[0028] It should be noted that the embodiments of this specification have the following beneficial effects through the above content:

[0029] The above method enables precise adaptive positioning of the view center, avoiding center offset issues caused by view scaling (such as overflow of view annotation areas or excessive blank areas), ensuring complete and readable annotation information. While meeting drafting specifications, it achieves global optimized allocation of drawing space, reduces invalid blank areas, and improves layout density.

[0030] Furthermore, the parameters of the view include the type of the view and the projection direction of the view.

[0031] Furthermore, the automatically laying out the engineering drawing based on the position information, the layout parameters, and the parameters of each view includes:

[0032] Obtain pre-built engineering domain knowledge graphs;

[0033] Training the engineering domain knowledge graph through a neural network;

[0034] Inputting the position information, the layout parameters, and the parameters of each view into the trained engineering domain knowledge graph to obtain adaptive adjustment parameters for automatic layout of the engineering drawing;

[0035] The engineering drawing is automatically laid out according to the adaptive adjustment parameters.

[0036] It should be noted that the embodiments of this specification have the following beneficial effects through the above content:

[0037] A structured knowledge graph is constructed based on engineering drawing domain knowledge (such as safety distances for annotated areas). Through training, a nonlinear mapping relationship is established between layout parameters (view position, scale) and rules in the knowledge graph. For example, the "view spacing" parameter is dynamically associated with the "safety spacing" rule in the knowledge graph. This allows for a deep integration of domain rules and mathematical models, preserving the spatial optimization capabilities of the force-guided algorithm while mitigating the risk of violating engineering drawing standards and improving layout compliance.

[0038] Furthermore, low-dimensional parameters such as view position and scale can be combined with high-dimensional semantic features from the knowledge graph to input into a neural network to generate dynamically adjusted parameters. For example, view spacing can be automatically compressed in densely wired areas to prioritize annotation readability. Parameter adjustment is driven by rule weights within the knowledge graph (e.g., "anti-interference" rules take precedence over "space utilization"). For example, in pipeline layout, key equipment areas can be prioritized for avoidance. This allows for adaptive optimization of layout parameters, balancing annotation integrity, space utilization, and drafting specifications in complex scenarios (such as the three-dimensional spatial layout of underground powerhouses), reducing the frequency of manual intervention.

[0039] Furthermore, before obtaining the pre-built engineering domain knowledge graph, the method further includes:

[0040] Storing industry standard layout rules in the engineering domain knowledge graph.

[0041] It should be noted that the embodiments of this specification have the following beneficial effects through the above content:

[0042] Natural language processing (NLP) technology can be used to convert natural language rules in industry standards (such as "the horizontal view margin is 5% of the drawing width") into structured triples (entity: view margin; relationship: constraint; attribute: 5% of the drawing width). Standard rules can be mapped into logical expressions in a knowledge graph (such as OWL axioms). For example, "views cannot overlap" can be converted into a disjoint class (DisjointClasses) constraint in the graph. This makes industry standards machine-readable, eliminating human interpretation errors. Layout parameters (such as view spacing and margins) can be enforced through logical axioms, ensuring 100% compliance of engineering drawings with industry standards.

[0043] Based on the drawing type (e.g., hydraulic engineering drawings), the knowledge graph can be used to call up the corresponding domain's standard rule subgraph. For example, hydraulic standards require that "sections must be vertically aligned with plan views," while architectural standards allow for staggered layouts. When multiple rules conflict (e.g., "maximizing view scale" conflicts with "margin safety threshold"), the optimal solution is automatically selected using the rule priority attributes in the graph (e.g., "safety rules > layout density rules"). This allows for precise adaptation of constraints to engineering scenarios, avoiding layout failures caused by misapplication of standards (e.g., view overflow caused by using the A0 standard on an A4 drawing), while ensuring critical compliance through rule priority.

[0044] One or more embodiments of this specification provide an automatic layout device for engineering drawings, including:

[0045] An acquisition unit, based on a preset drawing output rule, acquires the number of views of the engineering drawing, the parameters of each view, and the drawing type;

[0046] a layout parameter determination unit, configured to determine the layout parameters of the engineering drawing based on the drawing type;

[0047] a view number determination unit, inputting the layout parameters and the number of views into a pre-set constraint condition to determine the number of horizontal views and the number of vertical views;

[0048] a position information determining unit, configured to determine position information of each of the views based on the layout parameter, the number of the horizontal views, and the number of the vertical views;

[0049] An automatic layout unit automatically layouts the engineering drawing based on the position information, the layout parameters, and the parameters of each of the views.

[0050] One or more embodiments of this specification provide an automatic layout device for engineering drawings, including:

[0051] at least one processor; and,

[0052] a memory communicatively connected to the at least one processor; wherein,

[0053] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0054] Based on pre-set drawing rules, obtain the number of views of the engineering drawing, the parameters of each view and the drawing type;

[0055] determining layout parameters of the engineering drawing based on the drawing type;

[0056] Inputting the layout parameters and the number of views into pre-set constraints to determine the number of horizontal views and the number of vertical views;

[0057] Determining position information of each of the views based on the layout parameters, the number of the horizontal views, and the number of the vertical views;

[0058] The engineering drawing is automatically laid out based on the position information, the layout parameters, and the parameters of each of the views.

[0059] One or more embodiments of this specification provide a non-volatile computer storage medium storing computer-executable instructions. When executed by a computer, the computer-executable instructions can achieve:

[0060] Based on pre-set drawing rules, obtain the number of views of the engineering drawing, the parameters of each view and the drawing type;

[0061] determining layout parameters of the engineering drawing based on the drawing type;

[0062] Inputting the layout parameters and the number of views into pre-set constraints to determine the number of horizontal views and the number of vertical views;

[0063] Determining position information of each of the views based on the layout parameters, the number of the horizontal views, and the number of the vertical views;

[0064] The engineering drawing is automatically laid out based on the position information, the layout parameters, and the parameters of each of the views.

[0065] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:

[0066] Traditional template methods use fixed layout parameters (such as margins and view spacing), which cannot adapt to the standardized requirements of different drawing types (such as A3 / A4 / A0), resulting in poor layout compliance. This method dynamically obtains view parameters and drawing types, establishes a mapping relationship library between layout parameters and drawing types, and realizes dynamic adaptation of layout parameters. It breaks through the limitations of traditional templates on drawing types, ensures that layout parameters strictly follow drawing type standards, eliminates view overflow or annotation misalignment caused by drawing type mismatch, and improves the standardization level of engineering drawings. Moreover, this method can achieve coordinated optimization of the number of horizontal and vertical views, maximize the view arrangement density, reduce invalid blank areas, and improve space utilization while meeting the drawing size constraints. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are only some of the embodiments described in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without inventive work. In the drawings:

[0068] Figure 1 A schematic flow chart of an automatic layout method for an engineering drawing provided in one or more embodiments of this specification;

[0069] Figure 2 A schematic diagram of the engineering layout provided for one or more embodiments of this specification;

[0070] Figure 3 A schematic structural diagram of an automatic layout device for engineering drawings provided in one or more embodiments of this specification;

[0071] Figure 4 A schematic diagram of the structure of an automatic layout device for engineering drawings provided in one or more embodiments of this specification. DETAILED DESCRIPTION

[0072] The embodiments of this specification provide a method, apparatus, device, and medium for automatically laying out an engineering drawing.

[0073] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this specification without creative work should fall within the scope of protection of this specification.

[0074] Figure 1 This is a flow chart of a method for automatically laying out an engineering drawing according to one or more embodiments of this specification. The flow can be executed by an automatic layout system for engineering drawings. Certain input parameters or intermediate results in the flow can be manually adjusted to help improve accuracy.

[0075] The method steps of the embodiment of this specification are as follows:

[0076] S101, based on pre-set drawing rules, obtain the number of views of the engineering drawing, the parameters of each view and the drawing type.

[0077] In this embodiment of the present specification, the parameters of the view may include the type of the view and the projection direction of the view.

[0078] It should be noted that the acquisition of the above-mentioned number of views, view parameters and drawing types can be achieved through the following specific implementation plan:

[0079] 1. System Architecture Design

[0080] A hierarchical data processing architecture can be constructed based on the CrownCAD system and the national standard for engineering drawing (GB / T 14689);

[0081] Data layer: Integrates 3D model database (supports .prt / .sldprt / .ipt formats) and industry standard knowledge base (including GB / T 4458.1 view configuration rules).

[0082] The logical layer is as follows:

[0083] View parsing engine: Extracts model feature surfaces and hole and slot structures through geometric topology analysis (B-Rep model).

[0084] Parameter matching rule library: encodes the view spacing and margin requirements in the GB / T standard.

[0085] Execution layer: Calls the CAD software API (such as the DmdDrawing::CreatDrawingView method of the CrownCAD API) to implement view generation and parameter writing.

[0086] Output layer: Generate standardized view parameter configuration table (including view type, view projection direction) and drawing type.

[0087] 2. Core Function Implementation Process

[0088] 1. Dynamic determination of the number of views

[0089] The input conditions are as follows:

[0090] Model geometric complexity: Section view generation is triggered when the number of feature faces is ≥50;

[0091] Drawing size limit: A3 drawings support a maximum of 8 views (including main view, section view and partial magnification view);

[0092] Judgment rules:

[0093] Forced generation of main view: automatically identify the orthographic projection direction based on the maximum contour surface of the model;

[0094] Auxiliary view threshold control:

[0095] When the symmetry is ≥80%, only half views are generated;

[0096] Internal cavity structure triggers full section / step section view;

[0097] Upper limit constraint: Dynamically calculated based on the effective layout area (W×H - margin) specified in GB / T 14689.

[0098] 2. Intelligent extraction of view parameters

[0099] Type classification:

[0100] Basic views: front view (main view), top view, side view, automatically aligned based on the model coordinate system;

[0101] Derived View:

[0102] Sectional view: Automatically identify hole / cavity distribution and give priority to sectioning through the axis of symmetry;

[0103] Partial zoom view: triggers generation when detecting features (such as threads) with a size of ≤2mm;

[0104] Projection direction decision:

[0105] First viewing angle priority: in line with GB / T projection specifications (angle error ≤ 0.5°);

[0106] Oblique projection compensation: automatically enable axonometric projection for inclined features (such as 30° inclined holes);

[0107] 3. Adaptive matching of drawing types

[0108] Aspect selection algorithm:

[0109] Calculate the model's circumscribed cube dimensions (L×W×H) and scale factor (S=1:1 / 1:2);

[0110] Minimum compatible format: A3 horizontal format (420×297mm) can accommodate a maximum model size of 200×150×100mm.

[0111] S102: Determine layout parameters of the engineering drawing based on the drawing type.

[0112] In the embodiments of this specification, corresponding engineering drawing layout parameters can be set for each drawing type, and the layout parameters include drawing width and drawing height, as well as the width, height and view scale of each view in three dimensions.

[0113] It should be noted that the above layout parameters can be determined through the following specific implementation plan:

[0114] 1. Layout parameter settings for standard drawing types

[0115] 1. Drawing type and size mapping

[0116] Based on the national standard GB / T 14689, you can define A0-A4 drawing sizes (e.g. A1 is 594×841mm) and establish a type-size mapping library;

[0117] Supports custom drawing types (such as company-specific formats) and extends parameters (drawing width, height, margins, etc.) through XML configuration files;

[0118] Automatically match drawing types: Dynamically recommend the minimum compliant format based on the 3D model's circumscribed cube size and scale factor (1:1 / 1:2) (e.g., a 200×150mm model matches an A3 landscape version).

[0119] 2. View space allocation rules

[0120] Calculate the effective layout area: the drawing size minus the margins (A3 drawing margins are 5mm) and the title bar area (according to GB / T10609.1);

[0121] A grid layout algorithm (grid layout type) is used to define node spacing (120 mm) and layer spacing (150 mm) to avoid view overlap.

[0122] 2. 3D View Parameter Calculation

[0123] 1. 3D model feature analysis

[0124] Extract geometric features (holes, slots, threads) through the B-Rep model and identify key structures (symmetry axes, maximum profile surfaces);

[0125] Calculate the size of the model's circumscribed cube (L×W×H) as the visual Figure 3 Dimensional basis.

[0126] 2. Dynamic adjustment of view scale

[0127] The main view is forced to have a 1:1 scale, and the derived views (sections / partial magnifications) are automatically scaled according to feature density (for example, thread details use a 2:1 scale);

[0128] You can apply a spherical gravity layout (arf type) to optimize the spacing between views in dense areas using a repulsion coefficient (forceScale=5.0).

[0129] 3. Adaptive Adjustment of Layout Parameters

[0130] 1. Multi-scale view collaboration

[0131] Global scale and view scale are linked: when the global scale in the lower left corner of the drawing is modified, non-standard views (such as DETAIL B) are automatically scaled to maintain the readability of annotations;

[0132] Conflict resolution mechanism: When the view spacing violates the GB / T 4458.4 standard, the secondary view scale is compressed first (for example, the Z-axis compression coefficient of the axonometric view is ≤ 0.7).

[0133] 2. Dynamic constraint injection

[0134] Encode industry standards (such as pipeline avoidance rules) into SWRL logical expressions to verify layout parameter compliance in real time;

[0135] Supports parameter association equations (such as view height = model height × scale factor + safety distance) to achieve linked dimension updates.

[0136] 4. Parameterized Templates and Automation

[0137] 1. Construction of enterprise template library

[0138] Preset parameter templates (such as mechanical / architectural), including drawing size, view combination rules, and title block attributes (material, drawing number);

[0139] Historical data learning: Optimize recommendation strategies based on frequently used parameters of the enterprise (e.g., A3 drawings account for 70%).

[0140] 2. Batch processing script development

[0141] Use NX Open to write automated scripts to achieve batch processing of the entire process of drawing type matching, view generation, and scale calibration;

[0142] Support incremental updates: When standards are revised (such as the new BIM view rules in GB / T 2023), knowledge graph nodes are dynamically updated through SPARQL statements.

[0143] V. Compliance Assurance and Output

[0144] 1. Real-time pre-verification mechanism

[0145] Triggering the semantic reasoning engine during layout to intercept illegal operations (such as view overlap and annotation margin overflow);

[0146] Generate audit logs: record parameter modification traces to comply with AS9100 quality management requirements.

[0147] 2. Multi-format standardized output

[0148] Support 1:1 scale DWG / DXF export, activate the "scale output 1:1" option to uniformly scale the view;

[0149] Automatically fill in the title bar: Link to the PLM system to obtain material and heat treatment parameters, in compliance with the GB / T 18229-2000 font specification (Chinese characters size 5, letters size 3.5).

[0150] It should be noted that the embodiments of this specification have the following beneficial effects through the above content:

[0151] By mapping drawing types (such as A0's 841×1189mm dimensions) to 3D view parameters (width, height, and scale), for example, A4 drawings are restricted to landscape layouts. Dynamically compressing the 3D model projection size based on the view scale ensures that the view boundaries strictly fit the drawing format. This allows for standardized matching of view sizes and drawing types, eliminating issues such as element overflow or excessive blank space caused by disproportionate proportions, and ensuring that layouts comply with industry drafting standards.

[0152] S103 : Input the layout parameters and the number of views into pre-set constraints to determine the number of horizontal views and the number of vertical views.

[0153] In the embodiment of this specification, the layout parameters and the number of views may be input into the constraint conditions:

[0154] ;

[0155] ;

[0156] Determine the number of the horizontal views and the number of the vertical views; wherein,

[0157] n is the number of the horizontal views, m is the number of the vertical views, is the width of the view in row j and column i in three dimensions, is the view scale of the view in row j and column i in three dimensions, is the horizontal spacing between two adjacent views. The horizontal boundary distance between the first view and the nth view in each row is , is the drawing width, is the height of the view at row j and column i in three dimensions, The vertical spacing between views, the vertical boundary distance between the first view and the mth view in each column is , is the height of the drawing, where n and m are integer variables and the remaining parameters are known quantities.

[0158] Solution strategy:

[0159] Priority dimension traversal method: traverse n=1→n along the main projection direction (preferably horizontal) max , calculate the corresponding m max , select the (n, m) combination that meets the conditions.

[0160] Proportional compression optimization: When there is no feasible solution for the initial solution, the proportional compression algorithm is triggered:

[0161] For non-critical views (such as partial magnifications), the scale is gradually reduced (S←S×0.9) until the constraints are met.

[0162] Dynamically adjust the compression order based on view priority (main view > section view > detail view).

[0163] The dynamic layout adjustment mechanism is as follows:

[0164] Margin adaptation: When the drawing size changes (such as A3→A2), the margin parameters are automatically reset (ww new = W×5%,ll new = H × 5%). Supports enterprise-defined rules (for example, a company requires a fixed 80mm title bar area) to override the default margins.

[0165] Spacing elastic compensation: Establish the spacing-scale correlation equation: c = f(S). When the view scale is reduced, the spacing is allowed to increase appropriately (c max ≤15mm) to improve readability. Enable elastic grid layout for dense areas (number of views n≥4) and dynamically allocate row / column spacing.

[0166] It should be noted that the embodiments of this specification have the following beneficial effects through the above content:

[0167] The above constraints ensure that any combination of view quantity and size strictly fits the drawing format, eliminating view overflow or excessive blank areas, and meeting the standardized compliance requirements of engineering drawing. They also enable precise mapping of 3D model parameters to 2D drawing layouts, avoiding misplaced annotations or view overlap caused by projection distortion, and improving the readability of multi-view collaborative presentations.

[0168] S104 : Determine position information of each of the views based on the layout parameters, the number of the horizontal views, and the number of the vertical views.

[0169] In the embodiment of the present specification, the width, height and view ratio of each view in three dimensions, the number of horizontal views, the number of vertical views, the horizontal boundary distance and the vertical boundary distance can be input into the preset view center position formula P=( + * / 2, + * / 2), and obtain the center position of each view, where is the width of the view in row j and column i in three dimensions, is the height of the view at row j and column i in three dimensions, The view scale of the view at row j and column i in 3D.

[0170] It should be noted that the embodiments of this specification have the following beneficial effects through the above content:

[0171] The above method enables precise adaptive positioning of the view center, avoiding center offset issues caused by view scaling (such as overflow of view annotation areas or excessive blank areas), ensuring complete and readable annotation information. While meeting drafting specifications, it achieves global optimized allocation of drawing space, reduces invalid blank areas, and improves layout density.

[0172] S105 , automatically laying out the engineering drawing based on the position information, the layout parameters, and the parameters of each of the views.

[0173] In the embodiments of this specification, views can be placed according to the calculated position information, layout parameters, and parameters of each view. For views that need to be adjusted (such as views that cannot be perfectly placed due to space limitations), a dynamic adjustment algorithm is executed to find the optimal position.

[0174] Furthermore, when the engineering drawing is automatically laid out based on the position information, the layout parameters and the parameters of each of the views, a pre-constructed engineering domain knowledge graph can be obtained; the engineering domain knowledge graph is trained through a neural network; the position information, the layout parameters and the parameters of each of the views are input into the trained engineering domain knowledge graph to obtain adaptive adjustment parameters for automatic layout of the engineering drawing; and the engineering drawing is automatically laid out according to the adaptive adjustment parameters.

[0175] It's important to note that a structured knowledge graph is constructed based on engineering drawing domain knowledge (such as safety distances for annotated areas). Through training, a nonlinear mapping relationship is established between layout parameters (view position, scale) and rules in the knowledge graph. For example, the "view spacing" parameter is dynamically associated with the "safety spacing" rule in the knowledge graph. This allows for a deep fusion of domain rules and mathematical models, preserving the spatial optimization capabilities of the force-guided algorithm while mitigating the risk of violating engineering drawing standards and improving layout compliance.

[0176] Furthermore, low-dimensional parameters such as view position and scale can be combined with high-dimensional semantic features from the knowledge graph to input into a neural network to generate dynamically adjusted parameters. For example, view spacing can be automatically compressed in densely wired areas to prioritize annotation readability. Parameter adjustment is driven by rule weights within the knowledge graph (e.g., "anti-interference" rules take precedence over "space utilization"). For example, in pipeline layout, key equipment areas can be prioritized for avoidance. This allows for adaptive optimization of layout parameters, balancing annotation integrity, space utilization, and drafting specifications in complex scenarios (such as the three-dimensional spatial layout of underground powerhouses), reducing the frequency of manual intervention.

[0177] Furthermore, before obtaining the pre-built engineering domain knowledge graph, industry standard layout rules can be stored in the engineering domain knowledge graph.

[0178] It's important to note that natural language processing (NLP) technology can be used to convert natural language rules in industry standards (e.g., "The horizontal view margin is 5% of the drawing width") into structured triples (entity: view margin; relationship: constraint; attribute: 5% of the drawing width). Standard rules can be mapped into logical expressions (e.g., OWL axioms) in a knowledge graph. For example, "Views must not overlap" can be converted into a disjoint class (DisjointClasses) constraint in the graph. This makes industry standards machine-readable, eliminating human interpretation errors. It also enforces layout parameters (e.g., view spacing and margins) through logical axioms, ensuring 100% compliance of engineering drawings with industry standards.

[0179] Based on the drawing type (e.g., hydraulic engineering drawings), the knowledge graph can be used to call up the corresponding domain's standard rule subgraph. For example, hydraulic standards require that "sections must be vertically aligned with plan views," while architectural standards allow for staggered layouts. When multiple rules conflict (e.g., "maximizing view scale" conflicts with "margin safety threshold"), the optimal solution is automatically selected using the rule priority attributes in the graph (e.g., "safety rules > layout density rules"). This allows for precise adaptation of constraints to engineering scenarios, avoiding layout failures caused by misapplication of standards (e.g., view overflow caused by using the A0 standard on an A4 drawing), while ensuring critical compliance through rule priority.

[0180] It should be noted that the embodiments of this specification have the following beneficial effects through the above content:

[0181] Traditional template methods use fixed layout parameters (such as margins and view spacing), which cannot adapt to the standardized requirements of different drawing types (such as A3 / A4 / A0), resulting in poor layout compliance. This method dynamically obtains view parameters and drawing types, establishes a mapping relationship library between layout parameters and drawing types, and realizes dynamic adaptation of layout parameters. It breaks through the limitations of traditional templates on drawing types, ensures that layout parameters strictly follow drawing type standards, eliminates view overflow or annotation misalignment caused by drawing type mismatch, and improves the standardization level of engineering drawings. Moreover, this method can achieve coordinated optimization of the number of horizontal and vertical views, maximize the view arrangement density, reduce invalid blank areas, and improve space utilization while meeting the drawing size constraints.

[0182] It should be noted that current engineering drawing production requires manual view creation, view position and scale adjustment, and manual annotation of dimensions, materials, specifications, and other information. For users in the same industry with a large number of models, the production process is largely repetitive, and this repetitive process consumes a considerable amount of user time.

[0183] Existing automatic layout algorithms generally generate templates by presetting view positions, scales, and orientations, and then generate engineering drawings by importing models. This approach to generating drawings varies in model size, and views generated at fixed positions and scales cannot adapt to the size of the views, potentially resulting in excessive spacing or overlapping views. Drawing types cannot be automatically selected based on the model. Non-projected views such as sections, broken sections, and detail views cannot be automatically generated or accurately positioned. Furthermore, automatic annotations, with the exception of a few types like dimensions, centerlines, and centerline symbols, cannot be automatically generated.

[0184] Compared to existing automatic layout algorithms, this invention uses built-in rules, custom rules, and 3D feature recognition algorithms to propose a rule-based automatic layout algorithm. This algorithm automatically generates drawings, views, and annotations based on these rules. Pre-set rules determine the number, type, annotations, and tables of views, and then use this information to calculate information such as the drawing type, view scale, and position.

[0185] Specific implementation of the technology of the present invention:

[0186] Step 1: Set projection rules and annotation rules. Setting rules is used to combine different rules, so that a group of rules are merged into a larger rule, which is used for subsequent rule selection for drawing processing. The selection of these rules determines the type and number of subsequent views, which affects the calculation of the position and scale of subsequent views. Some specific drawing rules are as follows:

[0187] 1. The default drawing rule is to project the standard three views.

[0188] 2. Drawing selection rules: you can select several templates from a series of drawing templates as templates that can be used when outputting drawings. Whether there are multiple drawings in one file can be used to exclude uncommon drawings in some specific industries.

[0189] 3. View scale range and view size range, you can choose the scale range available when automatically outputting the drawing and the size range of the view on the drawing, which is used to limit the commonly used view scales in specific industries and adjust the view display size.

[0190] 4. View direction selection, you can select several fixed view types.

[0191] 5. The distance between the view and the drawing boundary, and the distance between views are set to adjust the overall layout when outputting the drawing.

[0192] 6. Projection angle adjustment rule: when the normal of the main surface of the projected view is not parallel to the projection direction, adjust it to be parallel.

[0193] 7. Display all parts. When other views cannot display all parts, hide instances, section views, and broken sections to display undisplayed parts. This is suitable for assemblies (sometimes projection may not be possible due to angle problems or parts being blocked inside the assembly. A model composed of multiple part models, such as the screenshot example in step 2, is an assembly, which contains separate screws, covers, and other parts).

[0194] 8. Read 3D information to create section views, break section views, and automatically generate views by reading 3D section information.

[0195] 9. Automatic dimensioning type selection, used to select whether to automatically generate dimensions, whether to inherit 3D dimensions and annotations, whether to automatically dimension centerlines and center symbol lines, whether to automatically dimension 3D information such as elevation, flow direction, material, etc., whether to display tables and table types.

[0196] 10. Other custom rules.

[0197] Select option 2 to set it to A0 drawing; set view scale range 3 to 1:5 to 5:1; select view direction 4 as front view, right view and parent view; set boundary distance ll=115, ww=82; choose to display all parts in sectional view, then at least three views are required, among which the projection direction of front view, right view and parent view is fixed and does not need to be adjusted. If there are parts that are not projected during the projection process, it is necessary to cut at the position of the unprojected parts to generate new views, then four views are required.

[0198] Step 2: Select the projection rule to calculate the drawings and projection data.

[0199] By setting and combining the projection rules in the previous step, the number of views, view types, view projection directions, drawing types, etc. can be calculated. Assume that the views arranged in the first row have a width of w1 to w in 3D. n , the view scale is S1 to S n The horizontal spacing between the views is c, the distance between the view and the drawing border is ww, and the views arranged in the first column are Figure 3 The height of the dimension is h1 to h m , the view scale is S1 to S m , the vertical spacing is l, the view and drawing boundary is ll, the drawing width is W, the drawing height is H, refer to Figure 2 The engineering drawing layout diagram is shown. Then:

[0200] ;

[0201] ;

[0202] The view ratio should meet the restrictions on view ratio and view size in the rules, and the parent and child views should have the same ratio. Figure 1 Generally, the scale is twice that of the parent view, subject to any other view scale restrictions imposed by other rules. If a view scale range is specified in the rule, only view scales within that range can be selected. If a custom rule specifies annotation or table placement, the W and H values ​​in the public notice should be reduced by the annotation and table size at that specific location.

[0203] The above formula means that any combination of views arranged in a column or row should not extend beyond the drawing border, provided all other rules are met. Drawing selection should begin with the smaller drawings. Once the drawing and view scales are determined, the view positions can be calculated. The first view is located at a distance of ll from the top edge of the drawing and ww from the left edge. The view center point of the first view is P1 = (ww + w1 * S1 / 2, ll + h1 * S1 / 2). The view positions are then calculated based on the view order and spacing.

[0204] If two views are horizontally aligned, the center point of the front view is P n-1 =(x n-1 ,y n-1 ), then the next view center point position is Pn=(x n-1 + (w n-1 * S n-1 + w n * S n ) / 2,y n-1 ).

[0205] Step 3: Project the view based on the calculated view data. Once the view's position, scale, and orientation are determined, it can be created.

[0206] Step 4: Automatic labeling.

[0207] Use general dimensions to mark view dimensions, and read 3D information to mark materials, elevations, grids, and other information required by rules. If centerlines and center mark lines need to be marked, circle and cylindrical projections are found in the view and automatically marked.

[0208] Step 5: Modify the rules and update the drawings and views.

[0209] If the output is not satisfactory, you can modify the rules and adjust the output structure until you get a better result. The current modified rule combination can be saved as a template for the next output.

[0210] Step 6: Manually adjust the view.

[0211] If the layout is still not ideal after adjusting the rules, you can open the engineering drawing and make manual adjustments.

[0212] Figure 3 A schematic structural diagram of an automatic layout device for engineering drawings provided in one or more embodiments of this specification includes: an acquisition unit 301, a layout parameter determination unit 302, a view quantity determination unit 303, a position information determination unit 304 and an automatic layout unit 305.

[0213] The acquisition unit 301 acquires the number of views of the engineering drawing, the parameters of each view, and the drawing type based on a preset drawing output rule;

[0214] A layout parameter determining unit 302 determines the layout parameters of the engineering drawing based on the drawing type;

[0215] A view quantity determination unit 303 inputs the layout parameters and the view quantity into a pre-set constraint condition to determine the number of horizontal views and the number of vertical views;

[0216] A position information determining unit 304 determines position information of each of the views based on the layout parameters, the number of the horizontal views, and the number of the vertical views;

[0217] The automatic layout unit 305 automatically layouts the engineering drawing based on the position information, the layout parameters, and the parameters of each of the views.

[0218] Figure 4 A schematic structural diagram of an automatic layout device for engineering drawings provided for one or more embodiments of this specification includes:

[0219] at least one processor; and,

[0220] a memory communicatively connected to the at least one processor; wherein,

[0221] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0222] Based on pre-set drawing rules, obtain the number of views of the engineering drawing, the parameters of each view and the drawing type;

[0223] determining layout parameters of the engineering drawing based on the drawing type;

[0224] Inputting the layout parameters and the number of views into pre-set constraints to determine the number of horizontal views and the number of vertical views;

[0225] Determining position information of each of the views based on the layout parameters, the number of the horizontal views, and the number of the vertical views;

[0226] The engineering drawing is automatically laid out based on the position information, the layout parameters, and the parameters of each of the views.

[0227] One or more embodiments of this specification provide a non-volatile computer storage medium storing computer-executable instructions. When executed by a computer, the computer-executable instructions can achieve:

[0228] Based on pre-set drawing rules, obtain the number of views of the engineering drawing, the parameters of each view and the drawing type;

[0229] determining layout parameters of the engineering drawing based on the drawing type;

[0230] Inputting the layout parameters and the number of views into pre-set constraints to determine the number of horizontal views and the number of vertical views;

[0231] Determining position information of each of the views based on the layout parameters, the number of the horizontal views, and the number of the vertical views;

[0232] The engineering drawing is automatically laid out based on the position information, the layout parameters, and the parameters of each of the views.

[0233] The various embodiments in this specification are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the device, apparatus, and non-volatile computer storage medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simplified. For relevant details, refer to the descriptions of the method embodiments.

[0234] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences from other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

[0235] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0236] In the embodiments provided in this application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0237] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0238] In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above units may be implemented in the form of hardware or software.

[0239] If the integrated module / unit is implemented as a software functional unit and sold or used as a standalone product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the process steps in the above-mentioned method embodiments by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content of the computer-readable medium can be appropriately increased or decreased based on the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.

[0240] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A method for automatic layout of engineering drawings, characterized in that: include: Based on pre-set drawing rules, obtain the number of views of the engineering drawing, the parameters of each view and the drawing type; determining layout parameters of the engineering drawing based on the drawing type; Inputting the layout parameters and the number of views into pre-set constraints to determine the number of horizontal views and the number of vertical views; Determining position information of each of the views based on the layout parameters, the number of the horizontal views, and the number of the vertical views; Automatically layout the engineering drawing based on the position information, the layout parameters, and the parameters of each of the views; Determining the layout parameters of the engineering drawing based on the drawing type includes: Setting corresponding engineering drawing layout parameters for each drawing type, the layout parameters including drawing width and drawing height, and width, height and view scale of each view in three dimensions; Inputting the layout parameters and the number of views into pre-set constraints to determine the number of horizontal views and the number of vertical views includes: Input the layout parameters and the number of views into the constraints: ; ; Determine the number of the horizontal views and the number of the vertical views; wherein, n is the number of the horizontal views, m is the number of the vertical views, is the width of the view in row j and column i in three dimensions, is the view scale of the view in row j and column i in three dimensions, is the horizontal spacing between two adjacent views. The horizontal boundary distance between the first view and the nth view in each row is , is the drawing width, is the height of the view at row j and column i in three dimensions, The vertical spacing between views, the vertical boundary distance between the first view and the mth view in each column is , is the height of the drawing; The automatically laying out the engineering drawing based on the position information, the layout parameters, and the parameters of each view includes: Obtain pre-built engineering domain knowledge graphs; Training the engineering domain knowledge graph through a neural network; Inputting the position information, the layout parameters, and the parameters of each view into the trained engineering domain knowledge graph to obtain adaptive adjustment parameters for automatic layout of the engineering drawing; Automatically layout the engineering drawing according to the adaptive adjustment parameters; The determining, based on the layout parameter, the number of the horizontal views, and the number of the vertical views, the position information of each view includes: Input the width, height, and view ratio of each view in 3D, the number of transverse views, the number of longitudinal views, the transverse boundary distance, and the longitudinal boundary distance into a preset view center position formula P=(ww+w_ij*S_ij / 2,ll+h_ij*S_ij / 2) to obtain the center position of each view, where w_ij is the width of the view in row j and column i in 3D, h_ij is the height of the view in row j and column i in 3D, and S_ij is the view ratio of the view in row j and column i in 3D; The parameters of the view include the type of the view and the projection direction of the view; Before obtaining the pre-built engineering domain knowledge graph, the method further includes: Storing industry standard layout rules in the engineering domain knowledge graph.

2. An automatic layout device for engineering drawings, characterized in that: include: An acquisition unit, based on a preset drawing output rule, acquires the number of views of the engineering drawing, the parameters of each view, and the drawing type; a layout parameter determination unit, configured to determine the layout parameters of the engineering drawing based on the drawing type; a view number determination unit, inputting the layout parameters and the number of views into a pre-set constraint condition to determine the number of horizontal views and the number of vertical views; a position information determining unit, configured to determine position information of each of the views based on the layout parameter, the number of the horizontal views, and the number of the vertical views; an automatic layout unit, configured to automatically layout the engineering drawing based on the position information, the layout parameters, and the parameters of each of the views; Determining the layout parameters of the engineering drawing based on the drawing type includes: Setting corresponding engineering drawing layout parameters for each drawing type, the layout parameters including drawing width and drawing height, and width, height and view scale of each view in three dimensions; Inputting the layout parameters and the number of views into pre-set constraints to determine the number of horizontal views and the number of vertical views includes: Input the layout parameters and the number of views into the constraints: ; ; Determine the number of the horizontal views and the number of the vertical views; wherein, n is the number of the horizontal views, m is the number of the vertical views, is the width of the view in row j and column i in three dimensions, is the view scale of the view in row j and column i in three dimensions, is the horizontal spacing between two adjacent views. The horizontal boundary distance between the first view and the nth view in each row is , is the drawing width, is the height of the view at row j and column i in three dimensions, The vertical spacing between views, the vertical boundary distance between the first view and the mth view in each column is , is the height of the drawing; The automatically laying out the engineering drawing based on the position information, the layout parameters, and the parameters of each view includes: Obtain pre-built engineering domain knowledge graphs; Training the engineering domain knowledge graph through a neural network; Inputting the position information, the layout parameters, and the parameters of each view into the trained engineering domain knowledge graph to obtain adaptive adjustment parameters for automatic layout of the engineering drawing; Automatically layout the engineering drawing according to the adaptive adjustment parameters; The determining, based on the layout parameter, the number of the horizontal views, and the number of the vertical views, the position information of each view includes: Input the width, height, and view ratio of each view in 3D, the number of transverse views, the number of longitudinal views, the transverse boundary distance, and the longitudinal boundary distance into a preset view center position formula P=(ww+w_ij*S_ij / 2,ll+h_ij*S_ij / 2) to obtain the center position of each view, where w_ij is the width of the view in row j and column i in 3D, h_ij is the height of the view in row j and column i in 3D, and S_ij is the view ratio of the view in row j and column i in 3D; The parameters of the view include the type of the view and the projection direction of the view; Before obtaining the pre-built engineering domain knowledge graph, the method further includes: Storing industry standard layout rules in the engineering domain knowledge graph.

3. An automatic layout device for engineering drawings, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Based on pre-set drawing rules, obtain the number of views of the engineering drawing, the parameters of each view and the drawing type; determining layout parameters of the engineering drawing based on the drawing type; Inputting the layout parameters and the number of views into pre-set constraints to determine the number of horizontal views and the number of vertical views; Determining position information of each of the views based on the layout parameters, the number of the horizontal views, and the number of the vertical views; Automatically layout the engineering drawing based on the position information, the layout parameters, and the parameters of each of the views; Determining the layout parameters of the engineering drawing based on the drawing type includes: Setting corresponding engineering drawing layout parameters for each drawing type, the layout parameters including drawing width and drawing height, and width, height and view scale of each view in three dimensions; Inputting the layout parameters and the number of views into pre-set constraints to determine the number of horizontal views and the number of vertical views includes: Input the layout parameters and the number of views into the constraints: ; ; Determine the number of the horizontal views and the number of the vertical views; wherein, n is the number of the horizontal views, m is the number of the vertical views, is the width of the view in row j and column i in three dimensions, is the view scale of the view in row j and column i in three dimensions, is the horizontal spacing between two adjacent views. The horizontal boundary distance between the first view and the nth view in each row is , is the drawing width, is the height of the view at row j and column i in three dimensions, The vertical spacing between views, the vertical boundary distance between the first view and the mth view in each column is , is the height of the drawing; The automatically laying out the engineering drawing based on the position information, the layout parameters, and the parameters of each view includes: Obtain pre-built engineering domain knowledge graphs; Training the engineering domain knowledge graph through a neural network; Inputting the position information, the layout parameters, and the parameters of each view into the trained engineering domain knowledge graph to obtain adaptive adjustment parameters for automatic layout of the engineering drawing; Automatically layout the engineering drawing according to the adaptive adjustment parameters; The determining, based on the layout parameter, the number of the horizontal views, and the number of the vertical views, the position information of each view includes: Input the width, height, and view ratio of each view in 3D, the number of transverse views, the number of longitudinal views, the transverse boundary distance, and the longitudinal boundary distance into a preset view center position formula P=(ww+w_ij*S_ij / 2,ll+h_ij*S_ij / 2) to obtain the center position of each view, where w_ij is the width of the view in row j and column i in 3D, h_ij is the height of the view in row j and column i in 3D, and S_ij is the view ratio of the view in row j and column i in 3D; The parameters of the view include the type of the view and the projection direction of the view; Before obtaining the pre-built engineering domain knowledge graph, the method further includes: Storing industry standard layout rules in the engineering domain knowledge graph.

4. A non-volatile computer storage medium, characterized in that The computer-executable instructions are stored, and when the computer-executable instructions are executed by a computer, they can achieve: Based on pre-set drawing rules, obtain the number of views of the engineering drawing, the parameters of each view and the drawing type; determining layout parameters of the engineering drawing based on the drawing type; Inputting the layout parameters and the number of views into pre-set constraints to determine the number of horizontal views and the number of vertical views; Determining position information of each of the views based on the layout parameters, the number of the horizontal views, and the number of the vertical views; Automatically layout the engineering drawing based on the position information, the layout parameters, and the parameters of each of the views; Determining the layout parameters of the engineering drawing based on the drawing type includes: Setting corresponding engineering drawing layout parameters for each drawing type, the layout parameters including drawing width and drawing height, and width, height and view scale of each view in three dimensions; Inputting the layout parameters and the number of views into pre-set constraints to determine the number of horizontal views and the number of vertical views includes: Input the layout parameters and the number of views into the constraints: ; ; Determine the number of the horizontal views and the number of the vertical views; wherein, n is the number of the horizontal views, m is the number of the vertical views, is the width of the view in row j and column i in three dimensions, is the view scale of the view in row j and column i in three dimensions, is the horizontal spacing between two adjacent views. The horizontal boundary distance between the first view and the nth view in each row is , is the drawing width, is the height of the view at row j and column i in three dimensions, The vertical spacing between views, the vertical boundary distance between the first view and the mth view in each column is , is the height of the drawing; The automatically laying out the engineering drawing based on the position information, the layout parameters, and the parameters of each view includes: Obtain pre-built engineering domain knowledge graphs; Training the engineering domain knowledge graph through a neural network; Inputting the position information, the layout parameters, and the parameters of each view into the trained engineering domain knowledge graph to obtain adaptive adjustment parameters for automatic layout of the engineering drawing; Automatically layout the engineering drawing according to the adaptive adjustment parameters; The determining, based on the layout parameter, the number of the horizontal views, and the number of the vertical views, the position information of each view includes: Input the width, height, and view ratio of each view in 3D, the number of transverse views, the number of longitudinal views, the transverse boundary distance, and the longitudinal boundary distance into a preset view center position formula P=(ww+w_ij*S_ij / 2,ll+h_ij*S_ij / 2) to obtain the center position of each view, where w_ij is the width of the view in row j and column i in 3D, h_ij is the height of the view in row j and column i in 3D, and S_ij is the view ratio of the view in row j and column i in 3D; The parameters of the view include the type of the view and the projection direction of the view; Before obtaining the pre-built engineering domain knowledge graph, the method further includes: Storing industry standard layout rules in the engineering domain knowledge graph.

Citation Information

Patent Citations

  • Power transformation and distribution station neural network identification method based on electrical industry knowledge graph

    CN116187175A

  • Three-dimensional model intelligent drawing method and system based on machine learning

    CN116306218A