A multi-layer drawing cleaning method combined with layer attribute analysis
By combining the method of layer attribute analysis, the problem of low and inaccurate cleaning efficiency of multi -level drawings is solved, the efficient and accurate cleanup of drawings are realized, and the efficiency of drawing management is improved.
Patent Information
- Application Number
- CN202411669303.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-11-21
AI Technical Summary
The prior art has problems of inefficient cleaning and inaccurate cleaning when dealing with multi-level drawings.
Based on the method of analyzing layer attribute analysis, obtain and traverse the original layer in the drawings, screen and clean up the content to generate a clean layer, and establish a connected relationship between layers, and use these relationships to clean up cross -layer.
Improve the efficiency and accuracy of drawing of drawings, and ensure the optimization processing results of drawings.
Smart Images

Figure CN119169145B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of drawing management, and in particular to a multi-level drawing cleaning method combined with layer attribute analysis. Background Art
[0002] With the rapid development of architecture, engineering design and infrastructure construction, drawing design and management have been widely used in many fields. The multi-level drawings drawn by designers using computer-aided design software have become the basis of various engineering projects. However, with the continuous expansion of project scale and the increasing complexity of design collaboration, the management and optimization of drawings are also facing greater challenges. Traditional drawing management methods often have problems such as low efficiency and incomplete cleaning when dealing with complex drawings with multiple layers and multi-disciplinary collaboration, which makes it difficult to meet the needs of efficient and collaborative management in modern engineering design. Summary of the invention
[0003] The present application provides a multi-level drawing cleaning method combined with layer attribute analysis, which is used to solve the technical problems of low cleaning efficiency and inaccurate cleaning in the prior art when processing multi-level drawings.
[0004] In view of the above problems, this application provides a multi-level drawing cleaning method combined with layer attribute analysis.
[0005] The present application provides a multi-level drawing cleaning method combined with layer attribute analysis, the method comprising:
[0006] Obtain a target drawing, and traverse the target drawing to obtain multiple original layers; analyze the multiple original layers to determine layer properties; based on the layer properties, traverse the multiple original layers to perform layer cleaning to generate multiple clean layers; according to the layer properties, establish a layer association relationship among the multiple clean layers, and according to the layer association relationship, perform cross-layer cleaning in combination with the layer properties to obtain a drawing cleaning result.
[0007] One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0008] The present application obtains a target drawing, and traverses the target drawing to obtain multiple original layers; analyzes multiple original layers to determine layer properties; based on the layer properties, traverses multiple original layers to perform layer cleaning to generate multiple clean layers; according to the layer properties, establishes a layer association relationship of multiple clean layers, and according to the layer association relationship, performs cross-layer cleaning in combination with the layer properties to obtain the drawing cleaning result. The present invention solves the technical problems of low cleaning efficiency and inaccurate cleaning in the prior art when processing multi-level drawings. By analyzing the layer properties, obtaining and traversing the original layers in the drawings, screening and cleaning the contents to generate clean layers, and establishing association relationships between layers, these relationships are used to perform cross-layer cleaning, and finally an optimized drawing cleaning result is obtained, achieving the technical effect of improving the efficiency and accuracy of drawing cleaning. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0010] Figure 1 A schematic flow chart of a multi-level drawing cleaning method combined with layer attribute analysis provided in an embodiment of the present application;
[0011] Figure 2 A schematic diagram of a process for determining layer attributes in a multi-level drawing cleaning method combined with layer attribute analysis provided in an embodiment of the present application. DETAILED DESCRIPTION
[0012] The present application provides a multi-level drawing cleaning method combined with layer attribute analysis, which is used to solve the technical problems of low cleaning efficiency and inaccurate cleaning in the prior art when processing multi-level drawings. By analyzing the layer attributes, the original layers in the drawing are obtained and traversed, the content is screened and cleaned to generate clean layers, and the association relationship between the layers is established. These relationships are used to perform cross-layer cleaning, and finally an optimized drawing cleaning result is obtained, thereby achieving the technical effect of improving the efficiency and accuracy of drawing cleaning.
[0013] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0014] It should be noted that any variations of the terms "include" and "have" are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or modules that are not explicitly listed or inherent to these processes, methods, products or devices.
[0015] like Figure 1 As shown, the present application provides a multi-level drawing cleaning method combined with layer attribute analysis, the method comprising:
[0016] Step S100: obtaining a target drawing, and traversing the target drawing to obtain a plurality of original layers.
[0017] In an embodiment of the present application, the target drawing files provided by the user are first loaded, and these files are saved in the format of design software such as CAD. Through the file import function, the metadata and graphic data structure of the drawing file are parsed, and the layer information in the drawing is identified. The parsed drawing file contains multiple layers, and each layer represents a different part in the drawing, such as a line, a graphic object, or a comment. Then, these parsed layers are traversed, that is, the contents of each layer are scanned layer by layer. During the traversal process, the data of each layer is read, including its name, number, geometric information, etc., and this information is stored in the memory. Through the above process, multiple original layers are obtained.
[0018] Furthermore, the method provided in the application embodiment also includes:
[0019] The multiple original layers include multiple user-defined layers and default layers.
[0020] In an embodiment of the present application, when parsing a target drawing file, all layers in the target drawing are identified and divided into user-defined layers and default layers. User-defined layers refer to layers that are manually created by users according to specific needs during the design process. These layers contain specific names and uses, such as for marking electrical wiring, building structures, or other custom information. By parsing the naming rules and properties of these layers, these user-defined layers are identified and classified.
[0021] On the other hand, default layers refer to the basic layers that are automatically generated by the design software when creating drawings. They have preset names and functions, such as "0 layer" or "Defpoints layer", and are used to store basic graphic elements and annotations generated by the system. These layers are the basic part of the drawing file and exist by default in most design software. During the parsing process, these preset layers are automatically classified as default layers by identifying their names and characteristics.
[0022] By classifying the layers, user-defined layers and default layers can be distinguished when traversing the original layers, thus providing a basis for subsequent cleanup and optimization operations on different types of layers.
[0023] Step S200: Analyze the multiple original layers to determine layer attributes.
[0024] In the embodiment of the present application, when analyzing multiple original layers, the basic information of each layer, such as name, color, line type, etc., is parsed, and the layer attributes are determined in combination with the professional field of the drawing. Then, the original layer is tile matched using the preset attribute mark tile group, so as to identify the specific tile type and quantity contained in the layer, and obtain the tile group matching result. Based on these matching results, the layer attributes are classified to determine the layer attributes.
[0025] Further, such as Figure 2 As shown, in the method provided in the embodiment of the application, the plurality of original layers are analyzed to determine the layer attributes, and further includes:
[0026] Based on the drawing field of the target drawing, multiple attribute mark block groups are determined; the multiple attribute mark block groups are respectively used as retrieval targets, and the multiple user-defined layers are traversed to perform block matching to obtain multiple groups of user block matching results, wherein the user block matching results include the number of block group matching and the block group matching rate; the multiple groups of user block matching results are sorted within the group to determine the layer properties of the multiple user-defined layers.
[0027] In the embodiment of the present application, firstly, according to the field of the target drawing, such as water supply and drainage, construction, electricity, etc., the corresponding attribute mark block group is selected from the preset block database. This process uses a field classification algorithm or database query technology to automatically identify the field of the drawing through the metadata of the drawing, such as the drawing title and layer naming rules. For example, for the water supply and drainage field, the attribute mark block group includes valves, inspection wells, pipes, elbows, tees, water pumps and other blocks.
[0028] After the attribute mark block group is determined, the user-defined layers in the drawing are traversed one by one, and the blocks in each layer are compared in detail. In this process, a geometric matching or symbol matching algorithm, such as an algorithm based on feature point matching, is called to scan the graphic objects in each user-defined layer and compare these objects with the standard blocks in the attribute mark block group. For example, it is detected whether there are graphic objects similar to standard valves or pipes in the layer. After the block matching is completed, the matching results are counted, and the number of block group matches and the block group matching rate are calculated. The number of block group matches is calculated by counting the number of block types in each layer that match the attribute mark block group. For example, if 10 valves, 8 inspection wells, and 5 pump blocks are detected in a water supply and drainage layer, the number of block group matches is 23, indicating that 23 blocks in the layer match the mark block group in the water supply and drainage field. The block group matching rate indicates how many types of blocks in the attribute mark block group are found in the layer. For example, if the water supply and drainage tile group contains 10 different tile types, such as valves, manholes, etc., and 6 of them are matched in the layer, the tile group matching rate is 60%. Through this process, multiple groups of user tile matching results are obtained, where the user tile matching results include the number of tile group matching and the tile group matching rate.
[0029] Next, the tile matching results of multiple groups of users are sorted within the group to determine the degree of association between the layer and each attribute mark tile group. Specifically, the weighted average method is used to sort the tile group matching number and matching rate, and the matching number and matching rate are respectively assigned preset weights, and then a weighted calculation is performed to obtain the comprehensive score of each layer. After the score calculation is completed, these scores are sorted, and the layers with higher scores are arranged in front by repeatedly comparing adjacent elements and exchanging positions. After multiple traversals, the layers are finally arranged from high to low according to the comprehensive score, ensuring that the most relevant layers are in the front.
[0030] After the sorting is completed, the layer attributes are determined based on the sorting results, and a simple judgment is made using the preset rule judgment method. Specifically, based on a preset score threshold, such as 50 points. If the comprehensive score of a layer is higher than 50 points and has the highest score with a specific "water supply and drainage block group", the layer is marked as a "water supply and drainage layer". Through this process, the layer attributes of multiple user-defined layers are determined.
[0031] Furthermore, in the method provided in the embodiment of the application, analyzing the plurality of original layers to determine the layer attributes further includes:
[0032] Taking the plurality of said attribute mark block groups as retrieval targets respectively, performing block matching on the said default layer to obtain a default block matching result, wherein the said default block matching result includes the number of block group matchings and the block group matching rate corresponding to the plurality of said attribute mark block groups; based on the said default block matching result, weighting the number of block group matchings and the block group matching rate corresponding to the plurality of said attribute mark block groups to obtain a plurality of attribute contribution degrees corresponding to the plurality of said attribute mark block groups; normalizing the plurality of said attribute contribution degrees, and arranging the normalized results in descending order to obtain a contribution degree form; based on a preset contribution degree threshold, selecting a plurality of attributes corresponding to a plurality of form items in the contribution degree form whose cumulative contribution degrees are greater than or equal to the contribution degree threshold, and outputting them as a layer attribute set of the said default layer.
[0033] In the embodiment of the present application, each attribute mark tile group is first used as a search target. These tile groups contain graphic symbols or tile types in a specific field. For example, the tile group in the water supply and drainage field includes valves, pipes, etc. Each default layer is traversed one by one, and the tiles in the attribute mark tile group are searched in these layers for matching.
[0034] During the matching process, the geometric matching method is used to compare the shape and feature points of each tile to determine whether the tile matches the standard tile type in the mark tile group. The matching results include the tile group matching number and the tile group matching rate. The tile group matching number refers to the number of tiles that match the attribute mark tile group in a certain default layer. For example, if there are 10 valves and 5 tees in a certain layer that match the water supply and drainage tile group, the matching number is 15. The tile group matching rate refers to the coverage ratio of the matched tile types in the attribute mark tile group. For example, if the water supply and drainage tile group contains 10 types of tiles, and 7 of them are matched in this layer, the matching rate is 70%.
[0035] Next, based on these matching results, weighted calculations are performed on the matching numbers and matching rates of different tile groups. Specifically, weights are set for the matching numbers and matching rates, for example, the matching number weight is 0.6 and the matching rate weight is 0.4. Then a weighted calculation is performed to obtain the attribute contribution by the tile group matching number × 0.6 + tile group matching rate × 0.4. Through this process calculation, the attribute contribution of each attribute-marked tile group to the default layer is generated, that is, the degree of influence of the tile group on the layer attributes.
[0036] After obtaining the attribute contributions corresponding to multiple attribute flag tile groups, these contributions are normalized. The purpose of normalization is to adjust different contribution values to the same range (for example, 0 to 1) so that the influence of different attributes can be directly compared. By using the minimum-maximum normalization method, all attribute contributions are adjusted to the same numerical range. After normalization, these normalized values are sorted in descending order to obtain a contribution table, in which the top-ranked attributes represent attribute flag tile groups that have a greater impact on the layer.
[0037] Finally, according to the preset contribution threshold, select the attributes corresponding to multiple form items whose cumulative contributions are greater than or equal to the threshold from the contribution form. For example, set a contribution threshold of 0.8, and when the cumulative normalized contributions of multiple attributes reach or exceed 0.8, select these attributes as the main attributes of the layer. Through such screening, the layer attribute set of the default layer is finally determined, that is, the attribute set that has the greatest influence on the layer definition.
[0038] Step S300: Based on the layer attributes, traverse the plurality of original layers to perform layer cleaning to generate a plurality of clean layers.
[0039] In the embodiment of the present application, the attribute filtering method is first used to classify the original layers according to the layer attributes of each original layer, such as architecture, electrical, water supply and drainage, etc. The attribute filtering method is a process of classifying the layer into the corresponding category by reading the attribute tag of the layer. For example, by reading the tag of the architecture layer attribute, this layer is classified as "architecture layer".
[0040] After the classification is completed, the original layers under each category are traversed one by one, and the layer content is checked using the geometric element recognition and screening method. The geometric element recognition technology is based on the geometric analysis function of the CAD tool to identify geometric elements such as lines, points, annotations and blocks in the layer. For example, for the identification of repeated lines, the shortest distance detection algorithm is used to identify overlapping lines by calculating the distance between line segments. If the starting and end points of two line segments are the same or close, they are determined to be repeated lines. After identifying the repeated geometric elements, a batch deletion operation is performed to delete redundant overlapping lines, repeated blocks and useless annotations. For this deletion operation, a graphics editing API, such as the command interface of AutoCAD, is called to automatically perform the deletion operation through instructions such as the OVERKILL command.
[0041] While cleaning up redundant information, specific types of processing are performed according to the pre-set cleaning rules of the layer properties. Using the rule matching method, different cleaning operations are performed on each type of layer. For example, for the "water supply and drainage layer", blocks that do not meet the design specifications are automatically deleted, such as offset pipe symbols and redundant dimensioning. The rule matching method relies on a preset cleaning template, and automatically removes non-compliant elements by scanning each block in the layer and comparing it with the valid blocks in the template.
[0042] After cleaning the layer content, the geometric relationship is corrected, and the topological correction algorithm is used to repair the geometric errors in the layer caused by improper drawing. Topological correction ensures the integrity of the layer content by detecting the geometric structure in the layer, such as the closure of polygons and the intersection of line segments. Specifically, call the geometric topological repair tool, such as the MAPCLEAN function in the CAD software, to automatically detect and repair unclosed polygon boundaries, or correct incorrectly intersecting line segments.
[0043] After completing the above cleaning and correction, multiple clean layers are generated through the layer export function. The entire process combines attribute filtering, geometric analysis, rule matching, topology correction and other technologies, from layer classification, content cleaning to export, providing a clean and accurate data foundation for subsequent layer analysis and optimization.
[0044] Step S400: establishing a layer association relationship of the plurality of cleaning layers according to the layer attributes, and performing cross-layer cleaning according to the layer association relationship and in combination with the layer attributes to obtain a drawing cleaning result.
[0045] In the embodiment of the present application, firstly, according to the properties of the cleaning layers, one is selected as the first cleaning main layer, then interference checks are performed on other cleaning layers and the main layer respectively, and layer interference information is statistically analyzed to determine the layer associated with the main layer and generate its intuitive association relationship. All cleaning layers are traversed, and different cleaning main layers are gradually updated and selected, and finally the association relationship of all cleaning layers is obtained.
[0046] Next, based on the domain information of the drawing, the standard attribute association matrix is called and matched with the layer attributes to obtain the logical association relationship of multiple clean layers. Then, by fitting the intuitive association relationship and the logical association relationship, the complete layer association relationship of the clean layer is generated.
[0047] When performing cross-layer cleaning, the tile set related to the main layer is extracted based on the layer association relationship, and these tiles are used as indexes to perform tile matching to find the tiles to be processed. According to the association relationship and layer properties, these tiles to be processed are migrated to the corresponding associated layers until all the tiles to be processed in all clean layers are migrated. Finally, these migrated results are output to form the optimized drawing cleaning results.
[0048] Furthermore, in the method provided in the embodiment of the application, a layer association relationship of a plurality of the cleaning layers is established according to the layer attributes, and further includes:
[0049] The method comprises the following steps: determining a first cleaning main layer from a plurality of the cleaning layers; fitting the plurality of the cleaning layers and the first cleaning main layer for interference inspection respectively, and performing statistical analysis to obtain layer interference information; determining an associated layer of the first cleaning main layer based on the layer interference information, and outputting the associated layer as an intuitive association relationship of the first cleaning main layer; traversing the plurality of the cleaning layers, updating and selecting the first cleaning main layer, and obtaining an intuitive association relationship of the plurality of the cleaning layers.
[0050] In an embodiment of the present application, a clean layer is first randomly selected as the first clean main layer. Then, the randomly selected main layer is subjected to interference inspection with other clean layers to detect the overlapping or interactive areas between the main layer and other clean layers. For example, geometric objects such as lines and blocks in two layers are compared in a CAD environment through an intersection operation, and the parts that overlap or interfere with each other in space are automatically identified. Through this process, it is identified whether the wall in the building layer overlaps with the cable path in the electrical layer, or whether the pipe in the water supply and drainage layer intersects with the building structure. After completing the interference detection, these overlapping areas are further statistically analyzed to generate layer interference information. The interference information includes parameters such as overlapping area, number of intersections, and overlap rate, and these overlapping areas are accurately quantified through area calculation formulas, such as polygon area calculation. The interference area between each main layer and other layers is calculated, and the overlap ratio between them is counted. For example, if the total area of the main layer is 100 square meters, and the overlapping area with another layer is 20 square meters, the overlap ratio is 20%.
[0051] Based on the interference information obtained by statistics, the threshold screening method is used to identify the associated layers. Threshold screening refers to a pre-set threshold of overlapping area or overlapping ratio, such as 10%. If the overlap ratio of a layer with the main layer exceeds the threshold, they are judged to have a significant association and are marked as associated layers. Associated layers refer to layers that have more physical overlap or functional interaction with the main layer in the design.
[0052] Based on these interference data, an intuitive association relationship of the first cleaning main layer is generated. The intuitive association relationship is presented in the form of an adjacency matrix or a graphical relationship diagram, with the main layer as the central node and the layers associated with it as adjacent nodes. Each element in the matrix represents the interference intensity between the main layer and other layers, such as overlapping area or interference ratio.
[0053] After generating the intuitive association relationship of the first clean main layer, other clean layers are randomly selected as new main layers through loop traversal, and the process of interference inspection, statistical analysis and generating intuitive association relationships is repeated. Each iterative analysis updates the intuitive association relationship data to ensure that each layer is fully analyzed when it is used as the main layer and its relationship with other layers is accurately recorded. When all clean layers are analyzed, the association relationships of these individual layers are combined to finally obtain the intuitive association relationships of multiple clean layers.
[0054] Furthermore, the method provided in the application embodiment also includes:
[0055] According to the drawing field of the target drawing, the standard attribute association matrix of the target drawing is called; the layer attributes are matched with the standard attribute association matrix to obtain the logical association relationship of the multiple cleaning layers; the intuitive association relationship is fitted with the logical association relationship to generate the layer association relationship of the multiple cleaning layers.
[0056] In an embodiment of the present application, first, according to the drawing field of the target drawing, such as architecture, structure, electricity, water supply and drainage, etc., a predefined standard attribute association matrix is called. The standard attribute association matrix is an adjacency matrix used to represent the standardized relationship between different layers based on industry specifications during the design process. Each element in this matrix represents the theoretical strength of association between two layers. For example, the degree of association between the architectural layer and the structural layer in the matrix is set to 0.8, indicating that the building layout has an important influence on the structural load-bearing design. Similarly, the matrix value between the structure and the water supply and drainage layers is set to 0.6, because the water supply and drainage pipes need to consider the position of the beams and columns in the structural design for perforation. Such a matrix is constructed through the knowledge of domain experts and industry standards.
[0057] Then, the attribute matching algorithm is used to compare the attributes of each clean layer with the relationship items in the standard attribute association matrix to generate the logical association relationship of each clean layer. Specifically, the attribute matching algorithm reads the label information of each clean layer, such as the purpose of the layer, functional description, etc., and compares it with the standard attributes in the matrix. For example, if a layer is identified as "architecture", the association strength data of this layer and other layers, such as structure and water supply and drainage, are obtained from the standard attribute association matrix. Through this matching, the theoretical association of the clean layer in the design is constructed, and a logical association relationship table of each layer is formed.
[0058] After the logical association relationship is obtained, it is fitted with the intuitive association relationship obtained by the geometric overlap analysis. The intuitive association relationship is derived based on the actual geometric overlap and interaction information between the layers. For example, in the geometric analysis, it is detected that the physical overlap area between the building layer and the structure layer is large, which forms an intuitive association relationship. The logical association relationship is a theoretical connection established based on the standard design specification. The goal of the fitting process is to combine the logical relationship in the design specification with the geometric relationship in the actual design to generate association data that is more in line with the actual situation. The technical methods of fitting include set operations, which can be intersection or union. The specific method to be used depends on the design requirements. If strict compliance is emphasized, the intersection method is used to retain only the common parts of the two; if all possible interactions need to be covered, the union method is used to combine the logical relationship with the actual overlap. For example, the association strength of the building and structure layers is identified as 0.8 in the logical association relationship, while the overlap ratio of the building and structure layers in the intuitive association relationship is 0.6. If the intersection method is used, 0.6 is selected as the final association strength; when the union method is used, the higher 0.8 is selected.
[0059] Through the fitting process, a comprehensive correlation matrix containing the correlation data of multiple clean layers is generated, that is, the layer correlation relationship of multiple clean layers. This comprehensive matrix reflects the final correlation strength between each pair of layers after fitting, which is a combination of design theory and actual design situation. Each element in the comprehensive correlation matrix represents the comprehensive correlation strength between two layers. The higher the value, the closer the correlation between the two layers in design and actual layout.
[0060] Furthermore, in the method provided in the embodiment of the application, cross-layer cleaning is performed according to the layer association relationship and in combination with the layer attributes to obtain the drawing cleaning result, and further includes:
[0061] Obtain the first layer association relationship of the first cleaning layer, and access the standard tile library to extract the first associated tile set of the first cleaning layer, wherein the first cleaning layer is any one of the multiple cleaning layers; using the first associated tile set as an index constraint, traverse the first cleaning layer for tile matching to obtain multiple to-be-processed tiles; according to the first layer association relationship and in combination with the layer attributes, migrate the multiple to-be-processed tiles to the corresponding associated layer; traverse the multiple cleaning layers, and perform iterative selection of the first cleaning layer until the multiple to-be-processed tiles of the multiple cleaning layers are migrated, and output multiple migration results as the drawing cleaning results.
[0062] In an embodiment of the present application, first, one of the multiple clean layers is randomly selected as the first clean layer, and then the first layer association relationship of the layer is extracted from the previously established layer association relationship matrix through a matrix query method. After obtaining the association relationship of the first clean layer, the standard tile library is accessed to extract the first associated tile set associated with the first clean layer. The standard tile library contains common elements in architectural design, such as doors and windows, beams, columns, pipes, etc. By using database query technology to screen and query the standard tile library, a standard tile set associated with the first clean layer, namely the first associated tile set, is extracted. The first associated tile set refers to a set of tiles associated with the first clean layer in the standard tile library, such as common beams and columns in the structural layer or wall tiles in the architectural layer.
[0063] Next, a tile matching algorithm is used to compare the tiles in the first clean layer one by one, with the first associated tile set as the index constraint. Specifically, the tile matching algorithm relies on geometric feature recognition technology, and automatically identifies elements that are consistent or similar to tiles in the standard tile library by comparing the shape, size, position, rotation angle and other features of each tile. The matching process uses the geometric comparison function in the CAD software to automatically scan all tiles in the layer and compare them with the associated tile set, select tiles that match these standard tiles, and mark them as tiles to be processed. Through this process, multiple tiles to be processed are obtained.
[0064] After identifying the blocks to be processed, these blocks are migrated from the first clean layer to the corresponding associated layers. The migration process relies on the CAD API to automatically copy and delete blocks to ensure that the blocks to be processed are accurately copied, located, and deleted in the new layer. In this process, the geometric properties of the blocks, such as position, rotation angle, and scale, are adjusted according to the layer properties to ensure that their display effect in the target layer is consistent with the original layer.
[0065] After completing the block migration of the first clean layer, continue to randomly select the next clean layer as the new first clean layer and repeat the block matching and migration process. This cyclic traversal process ensures that all clean layers are processed one by one. In each iteration, the same matching and migration operations as before are re-performed to ensure that each block can be correctly migrated to the corresponding associated layer throughout the process. During each migration process, the status of the drawing will be updated to ensure that each migrated block meets the design requirements and the standards of the target layer. This cyclic process continues until all pending blocks in all clean layers have completed the corresponding migration operations. The overall status of the drawing will be updated after each migration to ensure that there will be no redundancy or omission of the migrated blocks. When all pending blocks have been migrated to the corresponding associated layers, these migration results are summarized to generate the final drawing cleaning result.
[0066] Furthermore, the method provided in the application embodiment also includes:
[0067] The target user's identity information is obtained to determine the drawing cleanup scenario; based on the identity information, layer cleanup constraints are defined, wherein the layer cleanup constraints include cleanup category constraints and cleanup cycle constraints; and based on the layer cleanup constraints, layer cleanup is performed.
[0068] In an embodiment of the present application, the identity information of the target user is first obtained, and the identity of the user is confirmed through identity authentication technology, such as username and password verification, digital certificate authentication, or biometric technology. The user's identity information includes the user's role type, such as an architectural designer, a water supply and drainage engineer, and the project to which he belongs. Through this information, the user's current work area is identified, and the drawing cleanup scenario is determined accordingly. The drawing cleanup scenario reflects the user's design needs in a specific working environment. For example, water supply and drainage engineers need to focus on the optimization and cleanup of content such as pipeline layout and equipment installation.
[0069] After determining the drawing cleanup scenario, define the layer cleanup constraints based on the user's identity information. Layer cleanup constraints are rules and restrictions when performing cleanup operations, mainly including cleanup category constraints and cleanup cycle constraints. Cleanup category constraints determine which layer contents can be cleaned and which contents need to be retained. For example, for users in the water supply and drainage profession, set the cleanup category constraint to "do not clean blocks related to water supply and drainage sub-drawings", such as pipes, valves, inspection wells, and water pumps. On the other hand, the cleanup cycle constraint sets the frequency of cleanup based on the user's project progress and work rhythm. For example, in the early stages of a project, set a weekly cleanup cycle; and in the construction phase, set it to once a day to ensure that the drawings are always kept up to date.
[0070] When setting cleanup category constraints and cycle constraints, the rule engine is called to automatically generate cleanup rules that suit user needs based on the user's identity attributes, project phase, and design specifications. The rule engine makes judgments based on the preset rule library and automatically sets which layer content needs to be cleaned and which layer content needs to be retained, thereby ensuring the accuracy of the cleanup operation.
[0071] Next, according to the set layer cleanup constraints, start to perform layer cleanup. In this process, traverse the content in each layer and identify which elements need to be cleaned and which need to be retained one by one. For example, for users in the water supply and drainage profession, priority is given to protecting blocks directly related to water supply and drainage design, such as pipes, valves, and inspection wells, while irrelevant annotations, duplicate annotations, and temporary design sketches are screened and deleted. During the cleanup process, block recognition algorithms and geometric analysis tools are used to identify redundant elements, and automated scripts are called for processing, such as deleting invalid blocks, merging duplicate annotations, optimizing layer layouts, and other operations.
[0072] After the cleanup within the layer is completed, save the organized drawing as an optimized version and output it as the drawing cleanup result.
[0073] In the embodiments of the present application, in summary, the embodiments of the present application have at least the following technical effects:
[0074] The present application obtains a target drawing, and traverses the target drawing to obtain multiple original layers; analyzes multiple original layers to determine layer properties; based on the layer properties, traverses multiple original layers to perform layer cleaning to generate multiple clean layers; according to the layer properties, establishes a layer association relationship of multiple clean layers, and according to the layer association relationship, performs cross-layer cleaning in combination with the layer properties to obtain the drawing cleaning result. The present invention solves the technical problems of low cleaning efficiency and inaccurate cleaning in the prior art when processing multi-level drawings. By analyzing the layer properties, obtaining and traversing the original layers in the drawings, screening and cleaning the contents to generate clean layers, and establishing association relationships between layers, these relationships are used to perform cross-layer cleaning, and finally an optimized drawing cleaning result is obtained, achieving the technical effect of improving the efficiency and accuracy of drawing cleaning.
[0075] It should be noted that the above-mentioned sequence of the embodiments of the present application is only for description and does not represent the advantages and disadvantages of the embodiments. And the above-mentioned specific embodiments of this specification are described. The processes depicted in the accompanying drawings do not necessarily require the specific order and continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0076] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
[0077] This specification and drawings are merely exemplary illustrations of the present application and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, a person skilled in the art may make various modifications and variations to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the present application and its equivalents, the present application intends to include these modifications and variations.
Claims
1. A multi-level drawing cleaning method combined with layer attribute analysis, characterized in that: The method comprises: Get the target drawing, and traverse the target drawing to get multiple original layers; Analyze the plurality of original layers to determine layer attributes; Based on the layer attributes, traverse the plurality of original layers to perform layer cleaning to generate a plurality of clean layers; According to the layer attributes, a layer association relationship of the plurality of cleaning layers is established, and according to the layer association relationship and in combination with the layer attributes, cross-layer cleaning is performed to obtain a drawing cleaning result.
2. The multi-level drawing cleaning method combined with layer attribute analysis as claimed in claim 1 is characterized in that: The multiple original layers include multiple user-defined layers and default layers.
3. The multi-level drawing cleaning method combined with layer attribute analysis as claimed in claim 2 is characterized in that: Analyze the plurality of original layers to determine layer properties, including: Based on the drawing area of the target drawing, a plurality of attribute mark block groups are determined; Taking the plurality of attribute-marked tile groups as retrieval targets respectively, traversing the plurality of user-defined layers to perform tile matching, and obtaining a plurality of sets of user tile matching results, wherein the user tile matching results include the number of tile group matchings and the tile group matching rate; The plurality of groups of user block matching results are sorted within the groups to determine layer properties of the plurality of user-defined layers.
4. The multi-level drawing cleaning method combined with layer attribute analysis as claimed in claim 3 is characterized in that: Analyzing the plurality of original layers to determine layer properties also includes: Taking the plurality of the attribute flag block groups as retrieval targets respectively, performing block matching on the default layer to obtain a default block matching result, wherein the default block matching result includes the number of block group matchings and the block group matching rate corresponding to the plurality of the attribute flag block groups; Based on the default tile matching result, weight the tile group matching numbers and tile group matching rates corresponding to the plurality of attribute flag tile groups to obtain a plurality of attribute contribution degrees corresponding to the plurality of attribute flag tile groups; Normalizing the multiple attribute contributions, and arranging the normalized results in descending order to obtain a contribution table; Based on a preset contribution threshold, multiple attributes corresponding to multiple form items in the contribution form whose cumulative contributions are greater than or equal to the contribution threshold are selected and output as a layer attribute set of the default layer.
5. The multi-level drawing cleaning method combined with layer attribute analysis as claimed in claim 1 is characterized in that: According to the layer attributes, a layer association relationship of the plurality of cleaning layers is established, including: Among the plurality of cleaning layers, determining a first cleaning main layer; Fitting a plurality of the cleaning layers and the first cleaning main layer to perform interference inspection respectively, and statistically analyzing to obtain layer interference information; Based on the layer interference information, determining the associated layer of the first cleaning main layer, and outputting the intuitive associated relationship of the first cleaning main layer; The plurality of cleaning layers are traversed, the first cleaning main layer is updated and selected, and an intuitive association relationship among the plurality of cleaning layers is obtained.
6. The multi-level drawing cleaning method combined with layer attribute analysis as claimed in claim 5 is characterized in that: The method further comprises: According to the drawing field of the target drawing, the standard attribute association matrix of the target drawing is called; Matching the layer attributes with the standard attribute association matrix to obtain the logical association relationship of the plurality of cleaning layers; The intuitive association relationship and the logical association relationship are fitted to generate layer association relationships of a plurality of the cleaning layers.
7. The multi-level drawing cleaning method combined with layer attribute analysis as claimed in claim 6 is characterized in that: According to the layer association relationship and in combination with the layer attributes, cross-layer cleaning is performed to obtain a drawing cleaning result, including: Obtaining a first layer association relationship of a first cleaning layer, and accessing a standard tile library to extract a first associated tile set of the first cleaning layer, wherein the first cleaning layer is any one of the plurality of cleaning layers; Taking the first associated tile set as an index constraint, traversing the first clean layer to perform tile matching to obtain a plurality of tiles to be processed; Migrating the plurality of blocks to be processed to corresponding associated layers according to the first layer association relationship and in combination with the layer attributes; Traversing the plurality of cleaning layers, performing iterative selection of the first cleaning layer, until the plurality of to-be-processed blocks of the plurality of cleaning layers are all migrated, and outputting a plurality of migration results as the drawing cleaning results.
8. The multi-level drawing cleaning method combined with layer attribute analysis as claimed in claim 1 is characterized in that: The method further comprises: Obtain the identity information of the target user and determine the drawing cleanup scenario; Defining layer cleaning constraints according to the identity information, wherein the layer cleaning constraints include cleaning category constraints and cleaning cycle constraints; According to the layer cleaning constraints, clean up within the layer.
Citation Information
Patent Citations
Layer clean system and method
CN101630336A
Drawing cleaning method and system for architectural drawings
CN118277347A