A fast counting method and counting system for the number of arbitrary closed curves in CAD
By developing node packages in Rhino software, repeated components in CAD drawings are automatically merged and marked, solving the problem of cumbersome and overlapping component quantity statistics in CAD drawings, achieving fast and accurate deduplication statistics and graphics correction, and improving work efficiency. and management level.
Patent Information
- Application Number
- CN202110178564.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-07
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-02-07
AI Technical Summary
In large-scale projects, counting the number of components of the same type in CAD drawings is cumbersome and error-prone. Especially due to the overlapping of component blocks or the overlapping of multiple curves caused by multiple people's design, it is difficult to achieve batch statistics.
By developing a node package in Rhino software, the number of components after deduplication is automatically output, the center point distance parameters of the components are used to merge duplicate components, and a marking module is provided for position marking and manual deletion to achieve rapid statistics and graphics correction.
It realizes fast and accurate statistics on the number of components in the form of any closed curve in CAD drawings, improves work efficiency and management level, simplifies the statistical process, and reduces the error rate.
Smart Images

Figure CN112906089B
Abstract
Description
Technical Field
[0001] The invention relates to the field of CAD engineering drawing, and in particular to a method and a system for quickly counting the number of arbitrary closed curves in CAD. Background Art
[0002] In large-scale projects, there are many components of the same type, many types, and irregular arrangements. The CAD drawings of the same project may be drawn by multiple designers in different fields, which can easily lead to inconsistent identification and naming of components of the same type in CAD drawings, and even problems such as superposition of component blocks and complete overlap (or partial overlap) of multiple curves. Therefore, it is difficult to perform batch statistics on the number of components of the same type in CAD drawings, and manual marking and counting are not only cumbersome but also prone to errors. Summary of the invention
[0003] In order to solve the above problems, the present invention provides a method and system for quickly counting the number of arbitrary closed curves in CAD drawings, which can efficiently and quickly count the number of components in the form of arbitrary closed curves in CAD drawings after deduplication. The method is simple, convenient, and conducive to popularization and use.
[0004] The present invention is implemented by the following scheme: a method for quickly counting the number of arbitrary closed curves in CAD, comprising the steps of:
[0005] Importing a CAD drawing with a plurality of components into the Rhino software, wherein the components are composed of closed curves, and positions of at least two of the plurality of components overlap or intersect;
[0006] Click the node package preset in the Rhino software to automatically output the number of all the components in the CAD after deduplication;
[0007] The node package is compiled through a compilation process, and the compilation process includes:
[0008] Select all components imported into Rhino software;
[0009] Extracting the center points of all said components;
[0010] Compare the center point distances of all the components with a preset distance parameter, and merge two components corresponding to the center point distances less than the distance parameter into one group;
[0011] The sum of the number of groups of all groups and the number of components that have not been merged into a group is output as the number of all the components in the CAD after duplication is removed.
[0012] The present invention uses Rhino software to compile a node package to achieve one-click output of the number of components after duplicate removal. The node package can be used for the number statistics of components in any closed curve form in CAD. The node package can determine whether there are repeated components based on the geometric relationship of the components, and can efficiently and quickly perform accurate statistics on the number of components after duplicate removal, thereby ensuring the work efficiency of the staff and improving the management level of the management personnel.
[0013] A further improvement of the method for quickly counting the number of arbitrary closed curves in CAD of the present invention is that after clicking a node package preset in the Rhino software, a component in each merged group in the node package is obtained as a deduplicated component, and the position of the deduplicated component is marked.
[0014] A further improvement of the method for quickly counting the number of arbitrary closed curves in CAD of the present invention is that overlapping or intersecting components at the marked position are manually deleted to obtain a corrected graph.
[0015] The present invention provides a fast counting system for the number of arbitrary closed curves in CAD in view of the above counting method, comprising:
[0016] Curve module, used to select all components of CAD drawings imported into Rhino software;
[0017] A frame attribute module, used to extract the center points of all said components;
[0018] A point grouping module, used for comparing the center point distances of all the components with a preset distance parameter, and merging two components corresponding to the center point distances less than the distance parameter into one group;
[0019] The list item module is used to output the sum of the number of groups of all groups and the number of components that are not merged into groups as the number of all the components in the CAD after deduplication.
[0020] A further improvement of the system for quickly counting the number of arbitrary closed curves in CAD of the present invention is that it also includes a marking module for obtaining a component in each merged group in the node package as a deduplicated component after clicking a node package preset in the Rhino software, and marking the position of the deduplicated component. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 An example diagram is shown after the CAD drawing is imported into the Rhino software.
[0022] Figure 2 A flowchart for compiling a node package is shown. DETAILED DESCRIPTION
[0023] In order to solve the problem that it is difficult to perform batch statistics on the number of components of the same type in CAD drawings, the present invention provides a method and system for quickly counting the number of arbitrary closed curves in CAD drawings, which can efficiently and quickly perform quantitative statistics on the number of components in the form of arbitrary closed curves in CAD drawings after deduplication, which is simple, convenient, and conducive to popularization and use.
[0024] The following is a further description of the method and system for quickly counting the number of arbitrary closed curves in CAD in conjunction with the accompanying drawings.
[0025] See also Figure 1 and Figure 2 As shown, a method for quickly counting the number of arbitrary closed curves in CAD includes the following steps:
[0026] Step 1: Import a CAD drawing with multiple components into the Rhino software. The components are composed of closed curves, and at least two of the multiple components overlap or intersect.
[0027] Step 2. Click the node package preset in the Rhino software to automatically output the deduplicated quantity of all components in CAD.
[0028] The node package is compiled through a compilation process, which includes:
[0029] S1. Select all components imported into Rhino software;
[0030] S2, extracting the center points of all components;
[0031] S3, comparing the center point distances of all the components with a preset distance parameter, and merging two components corresponding to the center point distances less than the distance parameter into one group;
[0032] S4. Output the sum of the number of groups of all groups and the number of components that have not been combined into a group as the number of all the components in the CAD after deduplication.
[0033] Specifically, for actual construction, only one component should be constructed at the same position under the same plane. However, when drawing, due to various reasons, it is easy to redraw or draw multiple components. Therefore, this embodiment takes the CAD pile position map as an example, and arranges multiple components (i.e. Figure 1The circular pile 1) in the figure, and the positions of at least two components among the multiple components overlap or intersect. Taking into account the size of the pile, the present embodiment presets the distance parameter to 500mm. The distance parameter is determined according to the actual component size, preferably not exceeding the actual component diameter, and the distance parameter can be adjusted by external input before clicking the node package each time. When using this statistical method, first import the CAD pile bitmap into the Rhino software, and select the entire graphic to obtain the number of all piles before deduplication, which is 4761. After clicking the node package, the output number is 4728, which is the number of piles used in the actual project after deduplication. This statistical method can efficiently and quickly perform quantitative statistics on the number of components in the form of any closed curve in the CAD drawing after deduplication, which is simple, convenient, and conducive to popularization and use.
[0034] Furthermore, in this embodiment, when performing step S3, components that have not been combined into groups are grouped separately, so that all components form a group. When performing step S4, it is only necessary to count the number of groups in the group and output it.
[0035] As a preferred implementation, after clicking on the node package preset in the Rhino software, on the one hand, the number of components after deduplication is output, and on the other hand, a component in each merged group in the node package is obtained as a deduplication component, and the position of the deduplication component is marked. Figure 1 The two positions marked as (A) are the positions where repeated components exist. This mark allows the staff to quickly identify the positions of overlapping or intersecting components in the figure. Moreover, when marking, the size of the mark can be freely adjusted to facilitate identification and not block the positions of surrounding components.
[0036] Furthermore, the overlapping or intersecting components at the marked position are manually deleted to obtain a corrected image. The corrected image is exported using the Rhion software to correct the previously erroneous CAD drawing.
[0037] The statistical method of the present invention can avoid the tedious work of the staff in the statistical process due to the disagreement of CAD drawing habits. By using the pre-compilation of node packages, rapid batch statistics of any closed curve form components in various similar engineering drawings can be achieved, and further rapid correction of erroneous drawings can be achieved, which has certain promotion value.
[0038] The present invention further provides a fast counting system for the number of arbitrary closed curves in CAD based on the above counting method, comprising:
[0039] Curve module, used to select all components of CAD drawings imported into Rhino software;
[0040] The frame attribute module is used to extract the center points of all components;
[0041] A point grouping module is used to compare the center point distances of all the components with a preset distance parameter, and to combine two components corresponding to the center point distances less than the distance parameter into one group;
[0042] The list item module is used to output the sum of the number of groups of all groups and the number of components that have not been merged into groups as the number of all the components after deduplication in CAD.
[0043] Specifically, this embodiment inserts a Grasshopper plug-in into the Rhino software, and then uses various battery functions in the Grasshopper plug-in to realize the compilation of the node package. Specifically: the curve module includes a Geometry battery, and the curve command of the Geometry battery is used to realize the selection of components. For pile components, each circular closed curve is selected; the box property module includes a Box Properties battery, which can use the geometric characteristics of the selected closed curve to extract the center point of each closed curve; the point grouping module includes a Points Groups battery, which can process, compare and group each center point; the list item module includes a list Item battery, which can filter, extract and count multiple groups of data.
[0044] As a preferred embodiment, the statistical system also includes a marking module for obtaining a component in each merged group in the node package as a deduplicated component after clicking a node package preset in the Rhino software, and marking the position of the deduplicated component.
[0045] This marking module is similar to the node package, and can also be implemented using various battery functions in the Grasshopper plug-in. For example, the Dispatch battery is first used to determine the above grouping, and the merged group is defined as 1 (i.e., the overlapping component group), and the unmerged component is defined as 0 (i.e., the non-overlapping component). Then, the Tree Branch battery is used to find the overlapping component group, and then the list Item battery and Box Properties battery are used to extract the center point of a component in the overlapping component group and obtain the position of the corresponding component as the de-duplication position. Finally, a custom marking symbol (such as Figure 1 The deduplication position is marked by the marker symbol (A) at position 2 in the figure.
[0046] The present invention is described in detail above in conjunction with the embodiments of the accompanying drawings. A person skilled in the art can make various variations of the present invention according to the above description. Therefore, certain details in the embodiments should not constitute a limitation of the present invention, and the scope of protection of the present invention shall be defined by the scope of the attached claims.
Claims
1. A method for quickly counting the number of arbitrary closed curves in CAD, characterized in that: Includes steps: Importing a CAD drawing with a plurality of components into the Rhino software, wherein the components are composed of closed curves, and positions of at least two of the plurality of components overlap or intersect; Click the node package preset in the Rhino software to automatically output the number of all the components in the CAD after deduplication; The node package is compiled through a compilation process, and the compilation process includes: Select all components imported into Rhino software; Extracting the center points of all said components; Compare the center point distances of all the components with a preset distance parameter, and merge two components corresponding to the center point distances less than the distance parameter into one group; Outputting the sum of the number of groups of all groups and the number of components that have not been combined into a group as the number of all the components in the CAD after deduplication; The node package is compiled by inserting a Grasshopper plug-in into the Rhino software and then utilizing various battery functions in the Grasshopper plug-in.
2. The method for quickly counting the number of any closed curves in CAD as claimed in claim 1, characterized in that: After clicking on the node package preset in the Rhino software, a component in each merge group in the node package is obtained as a deduplicated component, and the position of the deduplicated component is marked.
3. The method for quickly counting the number of any closed curves in CAD as claimed in claim 2, characterized in that: The overlapping or intersecting components at the marked positions are manually deleted to obtain a corrected graph.
4. A fast counting system for arbitrary closed curves in CAD, characterized in that: Used to implement the method for rapid counting of the number of any CAD closed curve as claimed in claim 1, the rapid counting system comprises: Curve module, used to select all components of CAD drawings imported into Rhino software; A frame attribute module, used to extract the center points of all said components; A point grouping module, used for comparing the center point distances of all the components with a preset distance parameter, and merging two components corresponding to the center point distances less than the distance parameter into one group; The list item module is used to output the sum of the number of groups of all groups and the number of components that are not merged into groups as the number of all the components in the CAD after deduplication.
5. The CAD arbitrary closed curve rapid counting system as claimed in claim 4, characterized in that: It also includes a marking module for obtaining a component in each merge group in the node package as a deduplicated component after clicking a node package preset in the Rhino software, and marking the position of the deduplicated component.
Citation Information
Patent Citations
Three-dimensional model processing method and apparatus and computer device
CN109448115A
Multi-dimensional curved glass curtain wall designing, processing and mounting method based on BIM technology
CN110569621A
BIM-based simple parameterized unit type curtain wall material classification statistics method
CN110633518A
Fast pit marking and lofting method for transmission line foundation
WO2020088363A1
