A CAD-based door and window parameterization intelligent identification and redrawing method and system
By combining disjoint-set connectivity analysis and vertical penetration detection algorithms with data classification and quantitative grid construction, parametric intelligent identification and redrawing of building curtain wall detailed design is realized, solving the problems of low efficiency and accuracy in existing technologies, improving design efficiency and supporting digital delivery.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG GAD
- Filing Date
- 2026-04-02
- Publication Date
- 2026-07-31
AI Technical Summary
The current detailed design of building curtain walls relies heavily on manual labor and lacks parametric linkage mechanisms. Existing automated identification and reverse analysis have low efficiency and accuracy, and cannot achieve parametric linkage and structured storage, resulting in low design efficiency and easy introduction of annotation errors, which cannot meet the digital delivery requirements of modern building curtain wall projects.
By combining disjoint-set connectivity analysis and vertical penetration detection algorithms with data classification, quantitative grid construction, qualitative topology recognition, and data serialization, the system achieves parameterized intelligent recognition and redrawing of doors and windows. It adopts a JSON block storage mechanism and a parameterized redrawing engine to generate door and window blocks with semantic information.
It enables automated conversion from geometric figures to semantic models, significantly improving design efficiency, shortening modeling time, reducing annotation error rate, ensuring complete data transfer between different design stages and collaborating units, and supporting subsequent structural calculations and digital production.
Smart Images

Figure CN122492785A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of architectural design technology, and in particular to a CAD-based parametric intelligent recognition and redrawing method and system for doors and windows. Background Technology
[0002] As a key external envelope structure of modern large-scale public buildings, the detailed design of building curtain walls currently relies primarily on computer-aided design (CAD) technology. In current mainstream engineering practice, curtain wall detailed design generally adopts a digital operation mode based on a general-purpose CAD platform (such as AutoCAD). In this mode, designers use CAD software to draw basic geometric elements such as straight lines, polylines, and blocks in virtual space to express the design intent of the curtain wall's facade segmentation, beam and column arrangement, and detailed node specifications.
[0003] Specifically, the typical workflow for existing curtain wall detailed design includes: First, based on the architectural design, two-dimensional or three-dimensional graphic representations of each part of the curtain wall are constructed in the CAD environment by drawing and editing geometric lines; second, when the architectural facade design is partially adjusted, the designer needs to manually select and edit the corresponding geometric elements, such as updating the lines through translation, trimming, or extension operations; finally, after completing the graphic drawing, the dimensions of the elements are measured manually, the quantities are counted, and non-graphical attributes such as profile grades, glass configurations, and hardware specifications are manually entered into spreadsheets (such as Excel) or enterprise resource planning (ERP) systems to generate a bill of materials (BOM) for procurement and production.
[0004] In exploring automated identification of component relationships to achieve auxiliary functions, existing technologies employ bounding box intersection detection algorithms. This algorithm determines the overlap of the minimum axial bounding boxes (projected onto the X and Y axes) of two geometric entities. Its mathematical logic is as follows: for two rectangles R1(min1, max1) and R2(min2, max2), if (min...)... 1X ≤max 2X )∧(max 1X ≥min 2X )∧(min 1y ≤max 2y )∧(max 1y ≥min 2y If the intersection is found to be 0, it is determined to be intersecting. This algorithm, due to its fast computation speed and ease of implementation, has been initially applied to simple interference checks or graphic search scenarios. For related technical background, please refer to the basic discussion of spatial partitioning and collision detection in computer graphics.
[0005] Furthermore, according to national standards such as "Terminology for Building Curtain Walls" (GB / T34327-2017) and "Technical Specification for Glass Curtain Wall Engineering" (JGJ102), curtain wall design not only requires precise geometric dimensions, but also requires accurate expression and transmission of physical properties (such as fire resistance performance and airtightness rating) and structural calculation diagrams.
[0006] For the detailed design of large-scale building curtain wall projects, the existing methods based on general CAD platforms and centered on geometric drawing have many inherent defects.
[0007] From a work mode perspective, this method exhibits a high degree of reliance on manual labor and a lack of parametric linkage mechanisms. Designers must manually perform repetitive operations such as offsetting centerlines, drawing sub-frames, and reading panel areas, resulting in enormous time consumption for individual units and a high likelihood of introducing annotation errors. When local adjustments are made to the building facade, related lines must be manually trimmed, extended, or translated one by one. This inefficient maintenance method consumes most of the time required for detailed design, forcing senior engineers into tedious data transfer and verification work, severely limiting their energy for optimizing core engineering aspects such as structural safety and waterproofing.
[0008] Current automated solutions face dual bottlenecks in efficiency and accuracy at the levels of automated identification and reverse analysis. Traditional bounding box intersection detection algorithms judge primitive overlap only at a purely geometric level, failing to understand the physical connection semantics of curtain wall components. They are highly susceptible to interference from non-physical graphics such as offset handles of operable sashes, leading to incorrect interference judgments. Furthermore, conventional methods rely on collision detection algorithms, and when processing large projects containing hundreds of windows, the calculation of traversing line segments and arc entities can take several minutes. For non-orthogonal irregular grids or T-shaped and cross-shaped nodes, the lack of analytical ability regarding overlap relationships makes it impossible to accurately calculate the extension length of beams or the breakpoints of columns, rendering the generated bill of materials completely unusable.
[0009] Analysis of data architecture and capacity reveals serious data redundancy, inconsistency, and capacity limitations in existing solutions. Most methods directly store door and window geometry as discrete primitive attributes, failing to separate topological structure from physical dimensions. This results in insufficient parameterization and an inability to automatically adjust setback dimensions when profile cross-sections or glass offsets change. The current model is no longer sufficient to meet the digital delivery requirements of modern building curtain wall engineering.
[0010] In line with national standards such as "Terminology for Building Curtain Walls" (GB / T34327-2017) and "Technical Specification for Glass Curtain Wall Engineering" (JGJ102), the industry's requirements for design deliverables have shifted from simple geometric figures to digital models that carry complete physical properties and structural logic. Because the existing model cannot establish a persistent, interconnected update mechanism, the drawings remain in an isolated, static geometric set, making it difficult to directly use the output for subsequent structural calculations, performance analysis, and digital production.
[0011] Therefore, developing a curtain wall and window detailing system capable of parametric linkage, high-precision analysis, and structured storage has become a pressing technical problem for the industry. Summary of the Invention
[0012] The purpose of this invention is to provide a CAD-based parametric intelligent recognition and redrawing method and system for doors and windows. This invention addresses the problems of inaccurate geometric recognition, lack of data persistence, and lack of parametric linkage in existing technologies through disjoint-set connectivity analysis and vertical penetration detection algorithms.
[0013] The technical solution of this invention:
[0014] A CAD-based parametric intelligent recognition and redrawing method for doors and windows includes the following steps:
[0015] S1. Data Classification: Extract the outer frame polyline, grid annotation, mullion geometric segment and open line from the CAD selection set, and perform strong type distribution based on layer and geometric feature, classifying them into outer frame set, axis set, annotation set and open line set respectively;
[0016] S2. Quantitative Grid Construction: Using the boundary coordinates of the grid markings as the absolute size reference, generate ascending-order horizontal cutting point sequences XStops and vertical cutting point sequences YStops respectively. Construct a grid using these sequences through calculations. A quantitative grid array consisting of atomic grid cells, each atomic grid cell having precise physical dimensions based on grid annotations;
[0017] S3. Qualitative Topology Recognition: Using mullion geometric segments as blocking features, the connectivity between adjacent atomic meshes is determined by the disjoint-set data structure algorithm, and the connected mesh sets are qualitatively merged into independent panel objects.
[0018] S4. Data serialization and storage: The identified door and window topology, construction parameters and panel attributes are encapsulated into WindowData objects, serialized into JSON strings, and stored in the extended data XData defined by the CAD block through a block segmentation mechanism.
[0019] S5, Driven Redraw: Reads data from XData and automatically generates door and window blocks with semantic information in CAD through a parametric redraw engine.
[0020] In the aforementioned CAD-based parametric intelligent recognition and redrawing method for doors and windows, the quantitative grid construction described in step S2 specifically includes:
[0021] S2.1 Extract the coordinates of the boundary endpoints of horizontal and vertical annotations, and eliminate redundant annotations by filtering with direction vectors and detecting collinear conflicts to ensure the uniqueness of the benchmark reference;
[0022] S2.2 Project the processed boundary coordinates onto the X and Y axes respectively to generate an ascending sequence of segmented docking points.
[0023] ,
[0024] ;
[0025] S2.3. Perform a double traversal of XStops and YStops to discretize the space of the door and window outer frame. Each atomic grid cell, GridCell[i,j], is synchronously initialized in memory with a disjoint-set data structure of equal size. Each atomic grid cell is treated as an independent topological node. The root node pointer ID of the initialized atomic grid cell points to itself.
[0026] In the aforementioned CAD-based parametric intelligent recognition and redrawing method for doors and windows, the qualitative topology recognition described in step S3 specifically includes:
[0027] S3.1. Perform layer mask filtering on the internal primitive set to delineate blocking primitives. With functional primitives Two types of semantic sets, the blocking primitives The functional primitives are geometric entities with physical separation properties, including solid line layers, mullion layers, and frame center lines. The geometric structure representing logical attributes includes open lines; the set of internal primitives is the set of outer frame, axis, annotation and open lines after strong type distribution in step S1;
[0028] S3.2. Using the midpoint penetration detection method, traverse the common boundary of adjacent atomic grid cells; if no common boundary is detected on the centroid line connecting adjacent atomic grid cells... If any primitive in the set has a geometric intersection, the adjacent pair is considered to be connected; otherwise, if a physical collision is detected, the pair is considered to be isolated.
[0029] S3.3 Based on the connectivity determination in S3.2, the disjoint-set data structure algorithm is used to characterize the set of semantically connected atomic grid cells as an independent panel object.
[0030] S3.4, based on the panel object in S3.3, performs a spatial inclusion query on the closed region covered by each panel. If a query is found that matches the geometric features... Determine the opening direction of the opening line and set the direction of the opening sector;
[0031] S3.5 Based on the opening direction of S3.4, different types of opening fans are constructed, including multiple opening directions and double opening.
[0032] In the aforementioned CAD-based parametric intelligent recognition and redrawing method for doors and windows, the specific content of the midpoint penetration detection method is as follows:
[0033] Establish a sampling area of a preset length at the center point of the panel object to avoid corner interference;
[0034] A probe ray is emitted perpendicular to the grid line, and combined with coarse measurement of the AABB bounding box and fine measurement of physical intersection, it is determined whether there are primitives that block the entity.
[0035] In the aforementioned CAD-based parametric intelligent recognition and redrawing method for doors and windows, the block-based mechanism described in step S4 is as follows:
[0036] The generated JSON string is physically split according to a preset byte threshold to generate an ordered sequence of substrings;
[0037] By utilizing the CAD result buffer, the substring sequence is written sequentially into multiple DXF1000 group codes to overcome the length limit of a single XData string.
[0038] The aforementioned CAD-based parametric intelligent recognition and redrawing method for doors and windows also includes an intelligent setback calculation step, the details of which are as follows:
[0039] Based on the topological position of the panel object in the grid array, automatically determine its boundary attribute as "along the wall border" or "along the center mullion inner frame";
[0040] The corresponding setback formula is applied based on the boundary attributes to automatically calculate the clear production dimensions of the panel. The setback dimensions take into account the profile cross-sectional width, glass offset, and construction process clearance.
[0041] The aforementioned CAD-based parametric intelligent recognition and redrawing method for doors and windows also includes a model reverse reconstruction step. The key feature is that this model reverse reconstruction step responds to drawing loading or entity change events, triggers the reconstruction logic of the Window aggregate root by deserializing the WindowData object, dynamically restores its internal mesh topology and panel instances using a panel reconstruction algorithm, and drives all associated annotations and axis components to update synchronously with the data state, thereby achieving the transformation from static geometric lines to a parametric model with engineering semantics. The specific content of the model reverse reconstruction step is as follows:
[0042] Call the mesh system constructor to convert the stored interval size sequence into cutting line coordinates XStops and YStops, and regenerate the atomic mesh cell matrix;
[0043] Execute the topology mapping algorithm, traverse the two-dimensional matrix topology relationship in the WindowData object, assign the panel index (PanelIndex) to the corresponding atomic grid cell, and restore the identity of the atomic grid cell;
[0044] The panel reconstruction algorithm is executed to cluster and group the data according to the panel index held by each atomic grid cell. A logical grouping dictionary is generated with the panel index as the key and the grid cell set as the value. The physical boundary is calculated in combination with the backoff algorithm, and the panel object is instantiated and injected into the form aggregate root.
[0045] The aforementioned CAD-based parametric intelligent recognition and redrawing method for doors and windows also includes a parametric editing method based on WindowData objects, the specific content of which is as follows:
[0046] Dynamically read and display JSON text parameters stored in XData in the GUI interface, and provide a structured parameter editing interface;
[0047] In response to a user's parameter modification command, update the WindowData object and write it back to the block definition;
[0048] Simultaneously triggering the redraw engine to execute the clear-rebuild process:
[0049] The original geometric entities within the block definition are deleted, and quantitative mesh construction, qualitative topology identification, and geometry generation are re-executed based on the updated WindowData to achieve adaptive reproduction of annotations and parametric updates of blocks.
[0050] A CAD-based parametric intelligent recognition and redrawing system for doors and windows, the system adopts a three-layer architecture design, including a command interaction module, a domain analysis module, and an infrastructure module. The command interaction module, the domain analysis module, and the infrastructure module communicate with each other through interfaces and data transfer objects (DTOs).
[0051] The command interaction module includes a user interaction submodule, a CAD database transaction management submodule, and a graphic element classification and distribution submodule.
[0052] The domain analysis module includes a grid analysis unit and a panel recognition engine, which are used to perform geometric logic operations and topology reconstruction.
[0053] The infrastructure module includes an XData serialization engine and a graphics driver engine. The XData serialization engine is used for a block storage mechanism to achieve persistence of WindowData objects. The graphics driver engine is used to respond to data change events, clear and rebuild the geometric entities within the block definition, and achieve parametric redrawing.
[0054] In the aforementioned CAD-based door and window parametric intelligent recognition and redrawing system, the input content of the CAD database transaction management submodule is the set of heterogeneous primitives selected by the user in the CAD interface, and the output content is a set of strongly typed objects after type classification.
[0055] The primitive classification and distribution submodule adopts a strong type precise distribution mechanism, which filters the selection set into outer frame set, axis set, annotation set and open line set according to the layer and geometric features.
[0056] Compared with the prior art, the beneficial effects of this application are as follows:
[0057] 1) Using labeled primitives as docking points on a one-dimensional number axis effectively avoids geometric errors caused by non-standard drawing, such as misaligned endpoints, slight overlap of line segments or non-closed polylines, and situations where designers have not considered the actual door and window structure; the test results show that the grid size generated by this invention matches the design intent completely accurately; at the same time, the panel recognition engine, combined with the midpoint penetration detection method, can accurately identify glass panel grids in different areas and complex structures such as T-shaped mullion nodes;
[0058] 2) It realizes the automated transformation from geometric graphics to semantic models; in traditional detailed design, designers need to manually calculate the grid dimensions, draw the opening sashes and make annotations; by adopting this invention, through the closed-loop process of box selection recognition, data modeling and automatic redrawing, the modeling and drawing detailing time of a single door and window model is shortened from an average of fifteen minutes to less than ten seconds, and the overall production efficiency is improved by more than ten times.
[0059] 3) The JSON block storage mechanism enables complex door and window information (multi-layer grid topology, glass specifications, etc.) to be fully embedded inside the blocks, ensuring the complete transfer of data between different design stages and collaborating units without relying on external databases; at the same time, based on the XDATA model, the system can read door and window information, reconstruct door and window annotations, and redraw door and window blocks.
[0060] 4) Regarding system maintenance costs and scalability, the domain analysis layer of this invention is developed using pure C# and does not rely on a computer-aided design platform. The algorithm logic can be independently unit tested and iterated. This enables the system to quickly adapt to various computer-aided design environments, and the maintenance cost of the core logic is reduced by 40%. At the same time, the structured data generated by this invention lays the foundation for subsequent automatic material list statistics, processing data export, and smooth migration to the building information modeling platform. Attached Figure Description
[0061] Figure 1 This is a schematic diagram of the system architecture of the present invention;
[0062] Figure 2 This is the panel generation logic diagram of the present invention;
[0063] Figure 3 This is a diagram illustrating the principle of annotation-based quantitative grid segmentation.
[0064] Figure 4 This is a schematic diagram illustrating the principle of the vertical penetration detection algorithm;
[0065] Figure 5 This is a flowchart of the reverse reconstruction process. Detailed Implementation
[0066] The present invention will be further described below with reference to the accompanying drawings and embodiments, but this should not be construed as limiting the present invention.
[0067] Example. A CAD-based parametric intelligent recognition and redrawing method for doors and windows, characterized by the following steps:
[0068] S1. Data Classification: Extract the outer frame polyline, grid annotation, mullion geometric segment and open line from the CAD selection set, and perform strong type distribution based on layer and geometric feature, classifying them into outer frame set, axis set, annotation set and open line set respectively;
[0069] S2. Quantitative Grid Construction: Using the boundary coordinates of the grid markings as the absolute size reference, generate ascending-order horizontal cutting point sequences XStops and vertical cutting point sequences YStops respectively. Construct a grid using these sequences through calculations. A quantitative grid array consisting of atomic grid cells, each atomic grid cell having precise physical dimensions based on labeled primitives;
[0070] S3. Qualitative Topology Recognition: Using mullion geometric segments as blocking features, the connectivity between adjacent atomic meshes is determined by the disjoint-set data structure algorithm, and the connected mesh sets are qualitatively merged into independent panel objects.
[0071] S4. Data serialization and storage: The identified door and window topology, construction parameters and panel attributes are encapsulated into WindowData objects, serialized into JSON strings, and stored in the extended data XData defined by the CAD block through a block segmentation mechanism.
[0072] S5, Driven Redraw: Reads data from XData and automatically generates door and window blocks with semantic information in CAD through a parametric redraw engine.
[0073] The quantitative grid construction described in step S2 specifically includes:
[0074] S2.1 Extract the coordinates of the boundary endpoints of horizontal and vertical annotations, and eliminate redundant annotations by filtering with direction vectors and detecting collinear conflicts to ensure the uniqueness of the benchmark reference;
[0075] S2.2 Project the processed boundary coordinates onto the X and Y axes respectively to generate an ascending sequence of segmented docking points.
[0076] ,
[0077] ;
[0078] S2.3. Perform a double traversal of XStops and YStops to discretize the space of the door and window outer frame. Atom grid cells GridCell[i,j] (e.g., ...) Figure 3 In memory, a disjoint-set data structure of equal size is synchronously initialized, and each atomic grid cell is treated as an independent topological node; the root node pointer ID of the initialized atomic grid cell points to itself.
[0079] The qualitative topology identification described in step S3 specifically includes:
[0080] S3.1. Perform layer mask filtering on the internal primitive set to delineate blocking primitives. With functional primitives Two types of semantic sets, the blocking primitives The functional primitives are geometric entities with physical separation properties, including solid line layers, mullion layers, and frame center lines. The geometric structure representing logical attributes includes open lines; the set of internal primitives is the set of outer frame, axis, annotation and open lines after strong type distribution in step S1.
[0081] S3.2. Using the midpoint penetration detection method, traverse the common boundary of adjacent atomic mesh cells (such as...). Figure 4 If no corresponding element is detected on the line connecting the centroids of adjacent atomic grid cells... If any primitive in the set has a geometric intersection, the adjacent pair is considered to be connected; otherwise, if a physical collision is detected, the pair is considered to be isolated.
[0082] S3.3 Based on the connectivity determination in S3.2, the disjoint-set data structure algorithm is used to characterize the set of semantically connected atomic grid cells as an independent panel object.
[0083] S3.4, based on the panel object in S3.3, performs a spatial inclusion query on the closed region covered by each panel. If a query is found that matches the geometric features... Determine the opening direction of the opening line and set the direction of the opening sector;
[0084] S3.5 Based on the opening direction of S3.4, different types of opening fans are constructed, including multiple opening directions and double opening.
[0085] The topology of the doors and windows mentioned in S4 refers to the content identified in the qualitative topology in S3. The construction parameters refer to the specific parameters for constructing the doors and windows, such as the mullion width, subframe thickness, door and window number, handle height, etc. These contents are not completely consistent in different projects and are set using an interactive interface.
[0086] The specific details of the midpoint penetration detection method are as follows:
[0087] Establish a sampling area of a preset length at the center point of the panel object to avoid corner interference;
[0088] A probe ray is emitted perpendicular to the grid line, and combined with coarse measurement of the AABB bounding box and fine measurement of physical intersection, it is determined whether there are primitives that block the entity.
[0089] The block-sharing mechanism described in step S4 is as follows:
[0090] The generated JSON string is physically split according to a preset byte threshold to generate an ordered sequence of substrings;
[0091] By utilizing the CAD result buffer, the substring sequence is written sequentially into multiple DXF1000 group codes to overcome the length limit of a single XData string.
[0092] It also includes an intelligent yield calculation step, the details of which are as follows:
[0093] Based on the topological position of the panel object in the grid array, automatically determine its boundary attribute as "along the wall border" or "along the center mullion inner frame";
[0094] The corresponding setback formula is applied according to the boundary attributes to automatically calculate the clear production dimensions of the panel. The setback dimensions take into account the profile cross-section width, glass offset, and construction process gaps.
[0095] The setback formula refers to the outer frame line receding inward by a preset width.
[0096] It also includes a model reverse reconstruction step, which responds to drawing loading or entity change events. It triggers the reconstruction logic of the Window aggregate root by deserializing the WindowData object, dynamically restores its internal mesh topology and panel instances using the panel reconstruction algorithm, and drives all associated annotation and axis components to be updated synchronously with the data status, thereby realizing the transformation from static geometric lines to a parametric model with engineering semantics.
[0097] The model reverse reconstruction is achieved by parsing the persistent WindowData and utilizing the identity recovery and logical grouping algorithm of atomic grid cells to realize the reverse reconstruction of the physical model, such as... Figure 5 As shown, the specific content is as follows:
[0098] Call the mesh system constructor to convert the stored interval size sequence into cutting line coordinates XStops and YStops, and regenerate the atomic mesh cell matrix;
[0099] Execute the topology mapping algorithm, traverse the two-dimensional matrix topology relationship in the WindowData object, assign the panel index (PanelIndex) to the corresponding atomic grid cell, and restore the identity of the atomic grid cell;
[0100] The panel reconstruction algorithm is executed to cluster and group the data according to the panel index held by each atomic grid cell. A logical grouping dictionary is generated with the panel index as the key and the grid cell set as the value. The physical boundary is calculated in combination with the backoff algorithm, and the panel object is instantiated and injected into the form aggregate root.
[0101] It also includes parameterized editing methods based on WindowData objects, the details of which are as follows:
[0102] Dynamically read and display JSON text parameters stored in XData in the GUI interface, and provide a structured parameter editing interface;
[0103] In response to a user's parameter modification command, update the WindowData object and write it back to the block definition;
[0104] Simultaneously triggering the redraw engine to execute the clear-rebuild process:
[0105] The original geometric entities within the block definition are deleted, and quantitative mesh construction, qualitative topology identification, and geometry generation are re-executed based on the updated WindowData to achieve adaptive reproduction of annotations and parametric updates of blocks.
[0106] A CAD-based parametric intelligent recognition and redrawing system for doors and windows, such as... Figure 1 As shown, the system adopts a three-tier architecture design, including a command interaction module, a domain analysis module, and an infrastructure module. The command interaction module, the domain analysis module, and the infrastructure module communicate with each other through interfaces and data transfer objects (DTOs).
[0107] The command interaction module includes a user interaction submodule, a CAD database transaction management submodule, and a graphic element classification and distribution submodule.
[0108] The domain analysis module is implemented in C# and includes a mesh analysis unit and a panel recognition engine, which are used to perform geometric logic operations and topology reconstruction.
[0109] The infrastructure module includes an XData serialization engine and a graphics driver engine. The XData serialization engine is used for a block storage mechanism to achieve persistence of WindowData objects. The graphics driver engine is used to respond to data change events, clear and rebuild the geometric entities within the block definition, and achieve parametric redrawing.
[0110] The CAD database transaction management submodule takes as input a collection of heterogeneous primitives selected by the user in the CAD interface, and outputs a strongly typed collection of objects (such as a List) after type classification. <polyline>、List <dimension>);
[0111] The primitive classification and distribution submodule adopts a strong type precise distribution mechanism, which filters the selection set into outer frame set, axis set, annotation set and open line set according to the layer and geometric feature.
[0112] The domain analysis module employs a composite judgment logic that combines label-driven quantitative analysis with geometric topology qualitative analysis. This logic, through the collaborative work of the grid analysis unit (GridAnalyzer) and the panel recognition engine (PanelAnalyzer), utilizes the labeled dimensions in CAD drawings as the source of absolute dimensions, rather than relying on geometric line segments that may have drawing errors, to ensure the accuracy of the recognition results in terms of dimensions and the rationality of the structure.
[0113] like Figure 2 As shown, the workflow of the domain analysis module is specifically steps S2 and S3 in the method.
[0114] The parametric redraw engine, which is the method in the infrastructure module used to implement the persistence of WindowData objects, is as follows:
[0115] The persistence mechanism adopts the aggregate root pattern to achieve closed-loop management from runtime model to persistent data, and then from data-driven model reconstruction.
[0116] The Window aggregate root is a concept in Domain-Driven Design. It refers to the root node of the entity within the consistency boundary of the door and window object. When a data export instruction is received, it is used to perform a depth traversal of the dictionary of the grid system and panels inside it, extract the grid segmentation sequence, panel opening direction and handle positioning parameters, and map the above parameters to WindowData.
[0117] It includes data serialization and segmented storage steps, which utilize the aggregation relationship between Window aggregation root and WindowData to convert structured snapshots into serialized strings, and use a segmented storage algorithm to write the data stream sequentially into multiple data groups in the CAD entity extended data area to overcome the capacity limit of a single data group.
[0118] This includes the entity association recording step, which uses the transformation interface inherited from the component base class (Component) by the Window aggregate root to obtain and save the geometric transformation matrix and unique handle of the current entity, thereby establishing a single source of fact relationship between the graphical entity and the persistent data;
[0119] This includes a dependency association link construction step, which utilizes the dependency relationship between the Window aggregation root and auxiliary components such as dimension groups and axis groups to establish a data index-based communication link to support subsequent parameterized synchronization;
[0120] The model reverse reconstruction step is used to trigger the reconstruction logic of the Window aggregate root by deserializing the WindowData when the drawing is loaded or the entity is changed. It uses the panel reconstruction algorithm to dynamically restore the internal mesh topology and panel instance, and drives all associated annotation and axis components to be updated synchronously with the data status, so as to realize the transformation from static geometric lines to a parametric model with engineering semantics.
[0121] The simplified application process of this invention is as follows:
[0122] A. The command interaction module obtains geometric entities through box selection and automatically searches for matching name text using the NameHelper submodule;
[0123] B. Construct the GridSystem coordinate system based on the identified outer polyline and its internal annotation lines;
[0124] C. The domain analysis module calls the disjoint-set data structure algorithm to identify the panel topology, and at the same time identifies the open sector direction lines (such as triangles or V-shaped lines), and converts them into Directions codes and stores them in the panel dictionary;
[0125] D. The infrastructure module creates new block definitions in the CAD block table and drives the generation of fine geometric primitives based on the identified parameters (such as frame width, gaps, and glass thickness).
[0126] E. Bind the final generated WindowDataJSON data to the extended dictionary of the block definition, and instantiate the block reference (BlockReference) to the model space;
[0127] F. When a user modifies a value in WindowData, the system automatically clears the original block definition entity and executes step D based on the new data to achieve parametric redraw.
[0128] Effect Comparison
[0129] For 50 typical door and window numbers involved in a large residential building curtain wall project, the work efficiency of the present invention was compared with that of the traditional manual detailing method.
[0130] In the traditional model, technicians need to offset the center lines of doors and windows one by one to draw horizontal and vertical mullions, offset the opening lines to draw the subframes, and manually read the area of each panel to calculate the glass thickness. Finally, they need to select the elements and package them into blocks. Each of these processes takes more than 5 minutes and is very prone to errors in the conversion of area to thickness due to human negligence, which seriously affects the integrity of the drawings.
[0131] After adopting this invention, the average time for modeling a single unit was reduced from 5 minutes to 1 second, and the overall efficiency was improved by 99%; the error rate of grid size and thickness conversion was reduced to 0, achieving complete accuracy benchmarking; at the same time, the response cycle for design changes was shortened from 3 working days to 10 minutes.
[0132] Test results show that this invention significantly improves the efficiency of design refinement, completely solves the precision bottleneck of manual operation, and greatly optimizes the design response speed.< / dimension> < / polyline>
Claims
1. A CAD-based door and window parameterization intelligent identification and redrawing method, characterized in that, Includes the following steps: S1. Data Classification: Extract the outer frame polyline, grid annotation, mullion geometric line segment and opening direction line from the CAD selection set, and perform strong type distribution based on layer and geometric features, classifying them into outer frame set, axis set, annotation set and opening line set respectively; S2. Quantitative Grid Construction: Using the boundary coordinates of the grid markings as the absolute size reference, generate ascending-order horizontal cutting point sequences XStops and vertical cutting point sequences YStops respectively. Construct a grid using these sequences through calculations. A quantitative grid array consisting of atomic grid cells, each atomic grid cell having precise physical dimensions based on grid annotations; S3. Qualitative Topology Recognition: Using mullion geometric segments as blocking features, the connectivity between adjacent atomic meshes is determined by the disjoint-set data structure algorithm, and the connected mesh sets are qualitatively merged into independent panel objects. S4. Data serialization and storage: The identified door and window topology, construction parameters and panel attributes are encapsulated into WindowData objects, serialized into JSON strings, and stored in the extended data XData defined by the CAD block through a block segmentation mechanism. S5, Driven Redraw: Reads data from XData and automatically generates door and window blocks with semantic information in CAD through a parametric redraw engine.
2. The CAD-based parametric intelligent recognition and redrawing method for doors and windows according to claim 1, characterized in that, The quantitative grid construction described in step S2 specifically includes: S2.1 Extract the coordinates of the boundary endpoints of horizontal and vertical annotations, and eliminate redundant annotations by filtering with direction vectors and detecting collinear conflicts to ensure the uniqueness of the benchmark reference; S2.2 Project the processed boundary coordinates onto the X and Y axes respectively to generate an ascending sequence of segmented docking points. , ; S2.
3. Perform a double traversal of XStops and YStops to discretize the space of the door and window outer frame. Each atomic grid cell, GridCell[i,j], is synchronously initialized in memory with a disjoint-set data structure of equal size. Each atomic grid cell is treated as an independent topological node. The root node pointer ID of the initialized atomic grid cell points to itself.
3. The method for parametric intelligent recognition and redrawing of doors and windows based on CAD according to claim 1, characterized in that, The qualitative topology identification described in step S3 specifically includes: S3.
1. Perform layer mask filtering on the internal primitive set to delineate blocking primitives. With functional primitives Two types of semantic sets, the blocking primitives The functional primitives are geometric entities with physical separation properties, including solid line layers, mullion layers, and frame center lines. Geometric structures representing logical attributes, including open lines; S3.
2. Using the midpoint penetration detection method, traverse the common boundary of adjacent atomic grid cells; if no common boundary is detected on the centroid line connecting adjacent atomic grid cells... If any primitive in the set has a geometric intersection, then the adjacent pair is considered to be connected. Conversely, if a physical collision is detected, it is determined to be a boundary isolation. S3.
3. Based on the connectivity determination in S3.2, the disjoint-set data structure algorithm is used to characterize the set of semantically connected atomic grid cells as an independent panel object. S3.4, based on the panel object in S3.3, performs a spatial inclusion query on the closed region covered by each panel. If a query is found that matches the geometric features... Determine the opening direction of the opening line and set the direction of the opening sector; S3.5 Based on the opening direction of S3.4, different types of opening fans are constructed, including multiple opening directions and double opening.
4. The CAD-based parametric intelligent recognition and redrawing method for doors and windows according to claim 3, characterized in that, The specific details of the midpoint penetration detection method are as follows: Establish a sampling area of a preset length at the center point of the panel object to avoid corner interference; A probe ray is emitted perpendicular to the grid line, and combined with coarse measurement of the AABB bounding box and fine measurement of physical intersection, it is determined whether there are primitives that block the entity.
5. The CAD-based parametric intelligent recognition and redrawing method for doors and windows according to claim 1, characterized in that, The block-sharing mechanism described in step S4 is as follows: The generated JSON string is physically split according to a preset byte threshold to generate an ordered sequence of substrings; By utilizing the CAD result buffer, the substring sequence is written sequentially into multiple DXF1000 group codes to overcome the length limit of a single XData string.
6. The CAD-based parametric intelligent recognition and redrawing method for doors and windows according to claim 1, characterized in that, It also includes an intelligent yield calculation step, the details of which are as follows: Based on the topological position of the panel object in the grid array, automatically determine its boundary attribute as "along the wall border" or "along the center mullion inner frame"; The corresponding setback formula is applied based on the boundary attributes to automatically calculate the clear production dimensions of the panel. The setback dimensions take into account the profile cross-sectional width, glass offset, and construction process clearance.
7. The CAD-based parametric intelligent recognition and redrawing method for doors and windows according to claim 1 further includes a model reverse reconstruction step, characterized in that, The model reverse reconstruction step responds to drawing loading or entity change events. It triggers the reconstruction logic of the Window aggregate root by deserializing the WindowData object, dynamically restores its internal mesh topology and panel instances using a panel reconstruction algorithm, and drives all associated annotation and axis components to update synchronously with the data state, achieving the transformation from static geometric lines to a parametric model with engineering semantics. The specific content of the model reverse reconstruction step is as follows: Call the mesh system constructor to convert the stored interval size sequence into cutting line coordinates XStops and YStops, and regenerate the atomic mesh cell matrix; Execute the topology mapping algorithm, traverse the two-dimensional matrix topology relationship in the WindowData object, assign the panel index to the corresponding atomic grid cell, and restore the identity of the atomic grid cell; The panel reconstruction algorithm is executed to cluster and group the data according to the panel index held by each atomic grid cell. A logical grouping dictionary is generated with the panel index as the key and the grid cell set as the value. The physical boundary is calculated in combination with the backoff algorithm, and the panel object is instantiated and injected into the form aggregate root.
8. The CAD-based parametric intelligent recognition and redrawing method for doors and windows according to claim 1, characterized in that, It also includes parameterized editing methods based on WindowData objects, the details of which are as follows: Dynamically read and display JSON text parameters stored in XData in the GUI interface, and provide a structured parameter editing interface; In response to a user's parameter modification command, update the WindowData object and write it back to the block definition; Simultaneously triggering the redraw engine to execute the clear-rebuild process: The original geometric entities within the block definition are deleted, and quantitative mesh construction, qualitative topology identification, and geometry generation are re-executed based on the updated WindowData to achieve adaptive reproduction of annotations and parametric updates of blocks.
9. A CAD-based parametric intelligent recognition and redrawing system for doors and windows according to any one of claims 1-8, characterized in that: The system adopts a three-tier architecture design, including a command interaction module, a domain analysis module, and an infrastructure module. The command interaction module, the domain analysis module, and the infrastructure module communicate with each other through interfaces and data transmission objects. The command interaction module includes a user interaction submodule, a CAD database transaction management submodule, and a graphic element classification and distribution submodule. The domain analysis module is implemented in C# and includes a mesh analysis unit and a panel recognition engine, which are used to perform geometric logic operations and topology reconstruction. The infrastructure module includes an XData serialization engine and a graphics driver engine. The XData serialization engine is used for a block storage mechanism to achieve persistence of WindowData objects. The graphics driver engine is used to respond to data change events, clear and rebuild the geometric entities within the block definition, and achieve parametric redrawing.
10. A CAD-based parametric intelligent recognition and redrawing system for doors and windows according to claim 9, characterized in that: The input content of the CAD database transaction management submodule is the set of heterogeneous primitives selected by the user in the CAD interface, and the output content is a set of strongly typed objects after type classification. The primitive classification and distribution submodule adopts a strong type precise distribution mechanism, which filters the selection set into outer frame set, axis set, annotation set and open line set according to the layer and geometric features.