Prefabricated wall modeling method, device, computer equipment and readable storage medium
By automatically extracting and matching prefabricated wall edge lines in CAD diagrams, the problem of manual drawing consuming and error-prone in prefabricated wall modeling is solved, and efficient and accurate generation of prefabricated wall elements is achieved, improving modeling efficiency and accuracy sex.
Patent Information
- Application Number
- CN202210692459.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2042-06-17
AI Technical Summary
In the prior art, users need to manually draw the elements during the modeling process of prefabricated walls, which makes them time-consuming and labor-intensive and error-prone, especially when dealing with complex sandwich walls, efficiency and accuracy are difficult to guarantee.
By extracting the prefabricated wall edge lines and logos in the CAD diagram, filter out the logos that comply with the prefabricated wall code rules, match the component names, determine the target prefabricated wall edge lines, and generate prefabricated wall elements based on these edges to achieve automatic drawing.
It improves the efficiency and accuracy of prefabricated wall element drawing, reduces the error rate of manual operation, and significantly improves the efficiency and user experience of the modeling process.
Smart Images

Figure CN117290915B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of modeling, and in particular to a modeling method, device, computer equipment and readable storage medium for prefabricated walls. Background Art
[0002] Prefabricated wall is a kind of assembled component, specifically a load-bearing wall that is prefabricated in the component factory and then transported to the site for assembly. With the vigorous promotion of assembled components, prefabricated walls are increasingly widely used in assembled shear wall structures. Using prefabricated walls to build assembled buildings can improve the degree of factory-based and mechanized construction, reduce on-site wet operations, save on-site labor, overcome seasonal influences, and shorten the construction period.
[0003] Before construction, prefabricated walls need to be modeled. Prefabricated wall modeling needs to be carried out according to detailed drawings and CAD drawings. The traditional modeling method is to manually draw the elements after creating the components. The process can be divided into the following steps:
[0004] 1. The software loads the CAD drawing, searches for the prefabricated wall components in the CAD drawing, and finds the name of the prefabricated wall components;
[0005] 2. Refer to the detailed drawings of prefabricated walls and establish the corresponding prefabricated wall component model;
[0006] 3. Manually draw graphics according to CAD drawings and manually check whether the graphics are drawn correctly.
[0007] The inventors have found that the number of prefabricated base plates in the composite slab drawings ranges from a dozen to hundreds, with an average of about 50 elements. However, in actual use, users currently need to input parameters, create components, and draw elements one by one, which involves a large number of simple steps in a loop and is prone to errors, especially for sandwich walls, which takes a lot of time for users to edit and draw.
[0008] Therefore, how to solve the problem that users manually drawing prefabricated wall elements is time-consuming, laborious and error-prone has become a technical problem that urgently needs to be solved in this field. Summary of the invention
[0009] The object of the present invention is to provide a prefabricated wall modeling method, device, computer equipment and readable storage medium, which are used to solve the technical problems in the prior art.
[0010] On the one hand, to achieve the above-mentioned purpose, the present invention provides a modeling method for a prefabricated wall.
[0011] The modeling method of the prefabricated wall includes: creating a new prefabricated wall component, and setting the parameters and component name of the prefabricated wall component according to the detailed drawing of the prefabricated wall to be modeled; extracting the prefabricated wall edge line and identification in the CAD drawing of the prefabricated wall; screening out the identification that meets the prefabricated wall code rule from the extracted identification to obtain the prefabricated wall identification; matching the prefabricated wall identification with the component name, wherein the prefabricated wall identification that matches the component name is the target prefabricated wall identification; determining the target prefabricated wall edge line corresponding to the prefabricated wall component from the prefabricated wall edge lines in the CAD drawing according to the target prefabricated wall identification and the parameters of the prefabricated wall component; and generating a prefabricated wall graphic element according to the target prefabricated wall edge line.
[0012] Furthermore, the steps of filtering out identifiers that meet the prefabricated wall code rules from the extracted identifiers to obtain the prefabricated wall identifier include: obtaining the prefabricated wall standard code; generating a regular expression based on the prefabricated wall standard code; matching the extracted identifier with the regular expression; and determining that the identifier is a prefabricated wall identifier when the matching result between the identifier and the regular expression is not 0.
[0013] Furthermore, based on the target prefabricated wall identifier and the parameters of the prefabricated wall component, the step of determining the target prefabricated wall edge line corresponding to the prefabricated wall component in the prefabricated wall edge line in the CAD drawing includes: obtaining a cross-sectional polygon of the prefabricated wall component in the detailed drawing; in the CAD drawing, with the target prefabricated wall identifier as the center, expanding outward a first preset range to generate a matching area; and matching the cross-sectional polygon with the prefabricated wall edge line in the matching area to determine the target prefabricated wall edge line.
[0014] Further, the step of matching the cross-sectional polygon with the prefabricated wall edge line in the matching area to determine the target prefabricated wall edge line includes: step S1: calculating the sum of the sides of the cross-sectional polygon to obtain the total length; step S2: overlapping the sides of the cross-sectional polygon with the prefabricated wall edge line in the matching area; step S3: calculating the overlapping length of the cross-sectional polygon and the prefabricated wall edge line; step S4: calculating the ratio of the overlapping length to the total length to obtain a matching rate; step S5: determining whether the matching rate is greater than a preset matching threshold, wherein when the matching rate is greater than or equal to the preset matching threshold, executing step S6, and when the matching rate is less than the preset matching threshold, executing step S7; step S6: determining that the prefabricated wall edge line overlapping with the cross-sectional polygon is the target prefabricated wall edge line; and step S7: adjusting the angle of the cross-sectional polygon and returning to step S2.
[0015] Furthermore, the step of generating prefabricated wall elements according to the target prefabricated wall edge lines includes: drawing initial elements in a point drawing manner using the target prefabricated wall edge lines; and adjusting the positions and angles of the initial elements respectively according to the positions and angles of all the target prefabricated wall edge lines to obtain the prefabricated wall elements.
[0016] Further, the parameters of the prefabricated wall component include a maximum wall thickness. According to the target prefabricated wall identifier and the parameters of the prefabricated wall component, the step of determining a target prefabricated wall edge line corresponding to the prefabricated wall component in the prefabricated wall edge line in the CAD drawing includes: obtaining a first prefabricated wall edge line frame set through multiple prefabricated wall edge line frames generated by the prefabricated wall edge line; obtaining a cross-sectional edge line frame of a column element in the CAD drawing; deleting prefabricated wall edge line frames in the first prefabricated wall edge line frame set that have the same position and shape as the cross-sectional edge line frame to obtain a second prefabricated wall edge line frame set; deleting prefabricated wall edge line frames in the second prefabricated wall edge line frame set whose length and width are both greater than the maximum wall thickness to obtain a third prefabricated wall edge line frame set; in the third prefabricated wall edge line frame set, determining a prefabricated wall edge line frame whose distance from the component name is within a preset distance, wherein the edge of the prefabricated wall edge line frame is the target prefabricated wall edge line.
[0017] Furthermore, the steps of generating multiple prefabricated wall edge frames through the prefabricated wall edge line include: when the figure generated through the prefabricated wall edge line is a rectangular frame with a gap and the gap is within a preset wall end intersection extension error range, filling the gap to generate the prefabricated wall edge frame; and / or when the figure generated through the prefabricated wall edge line is a grid, dividing the grid into sub-rectangular frames, obtaining the door and window lines in the CAD drawing, and merging the two sub-rectangular frames through the door and window lines to generate the prefabricated wall edge frame.
[0018] Furthermore, the step of merging the two sub-rectangular frames through the door and window line includes: sorting the sub-rectangular frames according to coordinate positions to generate a two-dimensional matrix; traversing the two-dimensional matrix, wherein, when the i-th sub-rectangular frame and the i+1-th sub-rectangular frame are in the same row or column and are adjacent in position in the CAD drawing, the i-th sub-rectangular frame and the i+1-th sub-rectangular frame are merged; when the i-th sub-rectangular frame and the i+1-th sub-rectangular frame are in the same row or column and are not adjacent in position in the CAD drawing, searching whether the door and window line exists between the i-th sub-rectangular frame and the i+1-th sub-rectangular frame, and if the door and window line exists between the i-th sub-rectangular frame and the i+1-th sub-rectangular frame, the i-th sub-rectangular frame and the i+1-th sub-rectangular frame are merged.
[0019] Furthermore, the step of generating a prefabricated wall graphic element according to the target prefabricated wall edge line includes: taking the long side of the prefabricated wall edge frame as the drawing direction and the short side as the wall width to generate a rectangular prefabricated wall center line; generating the prefabricated wall graphic element according to the parameters of the prefabricated wall component and the rectangular prefabricated wall center line.
[0020] Furthermore, after generating prefabricated wall elements according to the target prefabricated wall edge line, the method also includes: obtaining a center with the prefabricated wall identifier; performing similarity matching between the prefabricated wall identifier and the prefabricated wall elements within the second preset range; when the prefabricated wall identifier does not match any of the prefabricated wall elements within the second preset range, generating an error prompt message, wherein the error message includes the location information of the prefabricated wall identifier; and outputting the error prompt message.
[0021] On the other hand, to achieve the above-mentioned purpose, the present invention provides a modeling device for a prefabricated wall.
[0022] The modeling device of the prefabricated wall comprises: a new creation module, which is used to create a new prefabricated wall component and set the parameters and component name of the prefabricated wall component according to the detailed drawing of the prefabricated wall to be modeled; an extraction module, which is used to extract the prefabricated wall edge line and logo in the CAD drawing of the prefabricated wall; a screening module, which is used to screen out the logo that meets the prefabricated wall code rule from the extracted logo, and obtain the prefabricated wall logo; a matching module, which is used to match the prefabricated wall logo with the component name, wherein the prefabricated wall logo that matches the component name is the target prefabricated wall logo; a determination module, which is used to determine the target prefabricated wall edge line corresponding to the prefabricated wall component from the prefabricated wall edge lines in the CAD drawing according to the target prefabricated wall logo and the parameters of the prefabricated wall component; and a generation module, which is used to generate a prefabricated wall graphic element according to the target prefabricated wall edge line.
[0023] On the other hand, to achieve the above purpose, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above method when executing the computer program.
[0024] On the other hand, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned method are implemented.
[0025] The modeling method, device, computer equipment and readable storage medium of prefabricated wall provided by the present invention firstly extract the name and parameters of the prefabricated wall and other information from the detailed drawing to create a new prefabricated wall component; then extract the identifier from the CAD drawing and filter out the prefabricated wall identifier therefrom, and obtain the corresponding relationship between the prefabricated wall identifier and the prefabricated wall component by matching the prefabricated wall identifier with the component name; further, find the prefabricated wall edge line that matches the prefabricated wall component by using the prefabricated wall identifier and the parameter information of the prefabricated wall; finally, draw the prefabricated wall graphic element according to these prefabricated wall edge lines, thereby realizing the automatic drawing of the prefabricated wall graphic element. Through the present invention, the problem that users manually draw prefabricated wall graphic elements in a time-consuming, laborious and error-prone manner can be solved, thereby improving the drawing efficiency and accuracy of the prefabricated wall graphic elements. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0027] Figure 1 A flow chart of a prefabricated wall modeling method provided in Embodiment 1 of the present invention;
[0028] Figure 2 A schematic diagram of a cross-sectional polygon of a prefabricated wall provided in the first embodiment of the present invention;
[0029] Figure 3 A schematic diagram of a prefabricated wall edge provided in Embodiment 1 of the present invention;
[0030] Figures 4 to 11 A schematic diagram showing the overlap between the cross-section polygon and the edge line of the prefabricated wall provided in the first embodiment of the present invention;
[0031] Fig.12 A schematic diagram of a rectangular frame filling a gap provided in Embodiment 1 of the present invention;
[0032] Fig.13 A schematic diagram of a segmented grid provided in Embodiment 1 of the present invention;
[0033] Fig.14 A schematic diagram of merging sub-rectangular frames provided in the first embodiment of the present invention;
[0034] Fig.15 A flow chart of a prefabricated wall modeling method provided in Embodiment 2 of the present invention;
[0035] Fig.16 A flow chart of determining the generation position and angle of prefabricated wall graphic elements in the prefabricated wall modeling method provided in the second embodiment of the present invention;
[0036] Fig.17 A flow chart of merging sub-rectangular frames in a prefabricated wall modeling method provided in the second embodiment of the present invention;
[0037] Fig.18 A block diagram of a prefabricated wall modeling device provided in Embodiment 3 of the present invention;
[0038] Fig.19 This is a hardware structure diagram of a computer device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0040] The relevant terms involved in the present invention are explained as follows:
[0041] Prefabricated wall: Prefabricated wall is a load-bearing wall that is prefabricated in a component factory and then transported to the site for assembly. It can be divided into three types according to its shape: ordinary wall panels, PCF panels and sandwich insulation walls; it can be divided into parametric prefabricated walls and rectangular prefabricated walls according to the modeling method.
[0042] Ordinary rectangular prefabricated wall: referred to as ordinary wall, which only has prefabricated body (inner leaf plate).
[0043] PCF board: The wall consists of outer leaf board and insulation layer.
[0044] Sandwich insulation wall: referred to as sandwich wall, the wall consists of three parts: outer leaf plate, insulation layer and inner leaf plate.
[0045] Parametric prefabricated wall: The full name is parametric modeling prefabricated wall. Parametric prefabricated wall is not a type of PC wall. It is just a modeling method of PC wall, which refers to the prefabricated wall built in a parametric way.
[0046] Rectangular precast wall: The full name is rectangular modeling precast wall, a modeling method opposite to "parametric precast wall", which refers to the precast wall built by rectangular modeling method.
[0047] Among them, the parametric modeling method can be used to model sandwich insulation walls, PCF boards and ordinary prefabricated walls, and its characteristics are parametric cross-sections and adjustable parameters; the rectangular modeling method can only be used to model ordinary prefabricated walls, and its characteristics are rectangular cross-sections, adjustable width, and arbitrary length.
[0048] Precast wall CAD edge element: the edge of the precast wall drawn on the CAD drawing, hereinafter referred to as "precast wall edge";
[0049] Prefabricated wall CAD identification element: the identification of the prefabricated wall drawn on the CAD drawing, hereinafter referred to as "prefabricated wall identification";
[0050] Door and window line CAD element: the door and window lines drawn on the CAD drawing, hereinafter referred to as "door and window lines".
[0051] Embodiment 1
[0052] Embodiment 1 of the present invention provides a modeling method for a prefabricated wall. A modeling software program can be implemented based on the method to model the prefabricated wall based on the CAD drawing and the detailed drawing. The method can automatically implement the modeling of the prefabricated wall based on the CAD drawing and the detailed drawing of the prefabricated wall. Specifically, Figure 1 This is a flow chart of a prefabricated wall modeling method provided in Embodiment 1 of the present invention, such as Figure 1 As shown, the prefabricated wall modeling method provided in this embodiment includes the following steps S101 to S106.
[0053] Step S101: Create a new prefabricated wall component, and set the parameters and component name of the prefabricated wall component according to the detailed drawing of the prefabricated wall to be modeled.
[0054] Among them, new modules based on parametric modeling and rectangular modeling can be preset respectively, and the wall type options under the parametric modeling method and the section type options under each type of wall can be preset.
[0055] When the user chooses to create a new prefabricated wall component based on parametric modeling, it is necessary to further select the wall type and wall section type. In this step, the new module creates a new prefabricated wall component according to the user's selection and the parameters of the prefabricated wall component in the detailed drawing;
[0056] When the user chooses to create a new prefabricated wall component based on the rectangular modeling method, the new module creates a new prefabricated wall component according to the parameters of the prefabricated wall component in the detailed drawing.
[0057] After creating a new precast wall component, change the name of the new component to the component name of the precast wall on the detailed drawing.
[0058] Step S102: extracting the prefabricated wall edge lines and marks in the CAD drawing of the prefabricated wall.
[0059] Based on the path selection operation, the CAD drawing of the prefabricated wall can be determined, the CAD drawing can be loaded, and the prefabricated wall edge lines and logos in the drawing can be extracted. Specifically, the prefabricated wall edge lines and logos can be extracted by element selection, layer selection, and color selection.
[0060] The extracted prefabricated wall edges are edges of several different prefabricated walls; the extracted logos include prefabricated wall logos and logos of other types of components.
[0061] Step S103: Filter out the identifiers satisfying the prefabricated wall code rule from the extracted identifiers to obtain the prefabricated wall identifiers.
[0062] Among them, in the CAD drawing, the prefabricated wall identification usually adopts several fixed codes, and the prefabricated wall code rule can be generated according to the commonly used symbols of the prefabricated wall identification; or the prefabricated wall code rule for generating the prefabricated wall identification is agreed in advance. In this step, the extracted identification is screened using the prefabricated wall code rule, and the identifications that meet the prefabricated wall code rule are screened out, and these identifications are the prefabricated wall identifications.
[0063] Step S104: Match the prefabricated wall identifier with the component name.
[0064] Among them, the precast wall identifier that matches the component name is the target precast wall identifier.
[0065] The component name comes from the detailed drawing, that is, the name of the newly built precast wall component. In this step, the precast wall identifier is matched with the component name to determine which precast wall identifiers in the CAD drawing correspond to the newly built precast wall components.
[0066] Step S105: According to the target prefabricated wall identifier and the parameters of the prefabricated wall component, the target prefabricated wall edge line corresponding to the prefabricated wall component is determined from the prefabricated wall edge lines in the CAD drawing.
[0067] After the prefabricated wall identifier corresponding to the newly created prefabricated wall component in the CAD drawing, that is, the target prefabricated wall identifier, is determined through the above step S104, the prefabricated wall edge lines corresponding to the prefabricated wall component are further determined among the prefabricated wall edge lines in the CAD drawing, that is, the target prefabricated wall edge lines. These target prefabricated wall edge lines are the prefabricated wall edge lines required to be referenced when drawing prefabricated wall graphics elements.
[0068] Step S106: Generate prefabricated wall graphics elements according to the target prefabricated wall edge lines.
[0069] The modeling method of the prefabricated wall provided in this embodiment is adopted. First, the name and parameters of the prefabricated wall and other information are obtained from the detailed drawing to create a new prefabricated wall component. Then, the identifier is extracted from the CAD drawing and the prefabricated wall identifier is screened out therefrom. By matching the prefabricated wall identifier with the component name, the corresponding relationship between the prefabricated wall identifier and the prefabricated wall component is obtained. Furthermore, the prefabricated wall identifier and the parameter information of the prefabricated wall are used to find the prefabricated wall edge line that matches the prefabricated wall component. Finally, the prefabricated wall graphic elements can be drawn according to these prefabricated wall edge lines, thereby realizing the automatic drawing of the prefabricated wall graphic elements and solving the problem that the user manually draws the prefabricated wall graphic elements, which is time-consuming, laborious and error-prone.
[0070] Optionally, in one embodiment, the extracted identifiers that meet the prefabricated wall code rules are filtered out, and the step of obtaining the prefabricated wall identifier includes: obtaining the prefabricated wall standard code; generating a regular expression based on the prefabricated wall standard code; matching the extracted identifier with the regular expression; and when the matching result between the identifier and the regular expression is not 0, determining that the identifier is a prefabricated wall identifier.
[0071] Specifically, when screening the prefabricated wall identification in the identification, first obtain the standard code of the prefabricated wall, which can be stored in the software as preset information, including multiple codes, and the prefabricated wall identification in the CAD drawing includes the code. After obtaining the standard code of the prefabricated wall, generate a regular expression, which includes each code, and when matching the identification with the regular expression, if the identification includes any code, the matching result is not 0, indicating that the identification is a prefabricated wall identification; if the identification does not include any code, the matching result is 0, indicating that the identification is not a prefabricated wall identification.
[0072] By adopting the modeling method of the prefabricated wall provided in this embodiment, it is possible to automatically obtain the prefabricated wall identification on the CAD drawing, with a simple calculation method, fast acquisition speed and high accuracy.
[0073] Optionally, in one embodiment, according to the target prefabricated wall identifier and the parameters of the prefabricated wall component, the step of determining the target prefabricated wall edge line corresponding to the prefabricated wall component in the prefabricated wall edge line in the CAD drawing includes: obtaining the cross-sectional polygon of the prefabricated wall component in the detailed drawing; in the CAD drawing, with the target prefabricated wall identifier as the center, expanding outward a first preset range to generate a matching area; and matching the cross-sectional polygon with the prefabricated wall edge line in the matching area to determine the target prefabricated wall edge line.
[0074] Specifically, when the prefabricated wall edge corresponding to the prefabricated wall component, i.e., the prefabricated wall edge, is identified in the CAD drawing, on the one hand, the component name of the prefabricated wall component is obtained, and then the cross-sectional polygon of the prefabricated wall component where the component name is located is obtained from the detailed drawing. On the other hand, the logo is usually set near the primitive, so with the target prefabricated wall logo as the center, specifically, the location of the logo frame of the target prefabricated wall logo can be used as the center, and a predetermined area is expanded outward to form a matching area with the target prefabricated wall logo as the center, and the cross-sectional polygon is matched with the prefabricated wall edge in the matching area to obtain the target prefabricated wall edge.
[0075] By adopting the modeling method of prefabricated walls provided in this embodiment, the prefabricated wall edge lines corresponding to the prefabricated wall components are identified in the CAD drawing, and the area that needs to be matched in the CAD drawing is first narrowed down by the position of the prefabricated wall identifier, which is equivalent to first performing a round of selection on the prefabricated wall edge lines in the CAD drawing, and first finding the range where the possible target prefabricated wall edge lines are located, thereby reducing matching data and improving modeling efficiency.
[0076] Optionally, in one embodiment, the step of matching the cross-sectional polygon with the prefabricated wall edge line in the matching area to determine the target prefabricated wall edge line includes:
[0077] Step S1: Calculate the sum of the sides of the cross-sectional polygon to obtain the total length;
[0078] Step S2: aligning the edge of the cross-section polygon with the edge of the prefabricated wall in the matching area;
[0079] Step S3: Calculate the overlap length between the cross-section polygon and the edge line of the prefabricated wall;
[0080] Step S4: Calculate the ratio of the overlap length to the total length to obtain the matching rate;
[0081] Step S5: Determine whether the matching rate is greater than a preset matching threshold, wherein when the matching rate is greater than or equal to the preset matching threshold, execute step S6, and when the matching rate is less than the preset matching threshold, execute step S7;
[0082] Step S6: determining the prefabricated wall edge line that coincides with the cross-section polygon as the target prefabricated wall edge line; and
[0083] Step S7: Adjust the angle of the cross-section polygon and return to step S2.
[0084] Specifically, Figure 2 A schematic diagram of a cross-sectional polygon of a prefabricated wall provided in the first embodiment of the present invention, such as Figure 2 In step S1, the sum of the lengths of the eight sides of the cross-sectional polygon is calculated to obtain the total length. In step S2, the side of the cross-sectional polygon is overlapped with the preset wall edge line. Figure 3 A schematic diagram of a prefabricated wall edge provided in Embodiment 1 of the present invention, such as Figure 3 As shown, the preset wall edges form frame A and frame B. Figures 4 to 11 This is a schematic diagram of the overlap between the cross-section polygon and the edge line of the prefabricated wall provided in the first embodiment of the present invention, wherein: Figure 4 Shows Figure 3 The schematic diagram of the overlap between the cross-section polygon and the preset wall edge line included in the frame A is shown. Figures 5 to 7 Shows the Figure 3 The cross-sectional polygon shown in the figure is adjusted to coincide with the preset wall edge line included in the frame A. Figure 4For example, the edge of the cross-section polygon is overlapped with the preset wall edge line, and the matching rate is 100%. Figures 5 to 7 The corresponding matching rates are 85%, 12% and 75% respectively. Figure 8 Shows Figure 3 The schematic diagram of the overlap between the cross-section polygon and the preset wall edge line included in the frame B is shown. Figures 9 to 11 Shows the Figure 3 The cross-sectional polygon shown in the figure is adjusted to coincide with the preset wall edge line included in the frame B. Figure 8 For example, the edge of the cross-section polygon is overlapped with the preset wall edge line, and the matching rate is 75%. Figures 9 to 11 The corresponding matching rates are 12%, 75% and 35% respectively.
[0085] Set the match rate preset to 0.999, then Figure 4 The corresponding matching rate is greater than 0.999, that is, Figure 4 In the figure, the precast wall edge line that coincides with the cross-section polygon is the target precast wall edge line, and the position and angle of the precast wall element are obtained at the same time, that is, the position of the frame A is the position of the precast wall element, and the angle of the frame A relative to the cross-section polygon is the angle of the precast wall element.
[0086] Among them, when aligning the sides of the cross-section polygon with the preset wall edge lines, the longest side of the cross-section polygon is first aligned with the preset wall edge line, and then the overlap of other sides with the preset wall edge lines is determined accordingly, which is conducive to quickly finding the prefabricated wall edge line with a higher matching degree.
[0087] Using the prefabricated wall modeling method provided in this embodiment, when matching the cross-sectional polygon with the prefabricated wall edge line, the angle of the cross-sectional polygon is adjusted to perform multiple matches to find the matching rate of each angle to determine the target prefabricated wall edge line, thereby avoiding matching omissions due to angle changes, and helping to improve the accuracy of determining the target prefabricated wall edge line.
[0088] Optionally, in one embodiment, the step of generating prefabricated wall elements according to the target prefabricated wall edge lines includes: drawing initial elements in a point drawing manner using the target prefabricated wall edge lines; and adjusting the positions and angles of the initial elements according to the positions and angles of all target prefabricated wall edge lines to obtain prefabricated wall elements.
[0089] Specifically, for the generation method of parametric precast walls, the initial graphic element is first drawn by point drawing using the determined target precast wall edge line, and then the position and angle of the initial graphic element are adjusted to obtain the precast wall graphic element.
[0090] By adopting the prefabricated wall modeling method provided in this embodiment, it is possible to generate prefabricated wall graphic elements by means of a parameterized prefabricated wall generation method.
[0091] Optionally, in one embodiment, the parameters of the prefabricated wall component include a maximum wall thickness, and according to the target prefabricated wall identifier and the parameters of the prefabricated wall component, the step of determining a target prefabricated wall edge line corresponding to the prefabricated wall component in the target prefabricated wall edge line in the CAD drawing includes: obtaining a first prefabricated wall edge line frame set through a plurality of prefabricated wall edge line frames generated by the prefabricated wall edge line; obtaining a cross-sectional edge line frame of a column element in the CAD drawing; deleting prefabricated wall edge line frames in the first prefabricated wall edge line frame set that have the same position and shape as the cross-sectional edge line frame, to obtain a second prefabricated wall edge line frame set; deleting prefabricated wall edge line frames in the second prefabricated wall edge line frame set whose length and width are both greater than the maximum wall thickness, to obtain a third prefabricated wall edge line frame set; in the third prefabricated wall edge line frame set, determining a prefabricated wall edge line frame whose distance from the component name is within a preset distance, wherein the edge of the prefabricated wall edge line frame is the target prefabricated wall edge line.
[0092] Specifically, the rectangular prefabricated wall is easily affected by the door and window lines and other edges due to its rectangular cross section. The effect of identifying the target prefabricated wall edge line by relying on the parametric prefabricated wall recognition method is poor. In this embodiment, when determining the target prefabricated wall edge line corresponding to the prefabricated wall component, a plurality of prefabricated wall edge wireframes generated by the prefabricated wall edge line are first defined as a first prefabricated wall edge wireframe set. The first prefabricated wall edge wireframe set includes the prefabricated wall edge wireframe formed by the target prefabricated wall edge line. For the first prefabricated wall edge wireframe set, the cross-section edge wireframes of all column elements are filtered to obtain a second prefabricated wall edge wireframe set. Then, the unreasonable prefabricated wall edge wireframes are filtered using the maximum wall thickness to obtain a third prefabricated wall edge wireframe set. For the prefabricated wall edge wireframe set after the input filtering, the prefabricated wall edge wireframes whose distance from the component name is within a preset distance are further extracted. The obtained prefabricated wall edge wireframes are the prefabricated wall edge wireframes corresponding to the prefabricated wall components, and the prefabricated wall edge lines contained therein are also the target prefabricated wall edge lines.
[0093] The prefabricated wall modeling method provided in this embodiment is adopted. In order to reduce the influence of door and window lines and other edge lines, the prefabricated wall edge line frame is first formed by using the prefabricated wall edge line, and then the target prefabricated wall edge line is obtained by screening the prefabricated wall edge line frame, and the prefabricated wall edge line frame is filtered to filter out the prefabricated wall edge line formed by non-prefabricated wall edge lines, thereby improving the recognition accuracy of the target prefabricated wall edge line.
[0094] Optionally, in one embodiment, the step of generating multiple prefabricated wall edge frames through prefabricated wall edge lines includes: when the figure generated through the prefabricated wall edge lines is a rectangular frame with a gap and the gap is within a preset wall end intersection extension error range, filling the gap to generate a prefabricated wall edge frame.
[0095] Specifically, Fig.12Schematic diagram of a rectangular frame filling a gap provided in the first embodiment of the present invention, in the process of generating a plurality of prefabricated wall edge frame by prefabricated wall edge line, such as Fig.12 As shown, if the generated figure has a gap and the gap is within the allowable error range, the gap is filled as the prefabricated wall edge frame.
[0096] The prefabricated wall modeling method provided in this embodiment is used to tolerate errors that may be stored in the CAD drawing within an allowable error range, thereby avoiding the loss of the target prefabricated wall edge line, which results in the inability to identify the target prefabricated wall edge line and reduces the recognition accuracy.
[0097] Optionally, in one embodiment, when the graphic generated by the prefabricated wall edge line is a grid, the grid is divided into sub-rectangular frames, the door and window lines in the CAD drawing are obtained, and the two sub-rectangular frames are merged through the door and window lines to generate a prefabricated wall edge frame.
[0098] Specifically, Fig.13 A schematic diagram of a segmented grid provided in Embodiment 1 of the present invention, Fig.14 This is a schematic diagram of merging sub-rectangular frames provided in the first embodiment of the present invention, such as Fig.13 and Fig.14 As shown, in the case of generating a mesh for the prefabricated wall edge line, the sub-rectangular frames with door and window lines in the gaps are first divided and then merged to obtain a complete prefabricated wall edge frame.
[0099] Among them, the step of merging two sub-rectangular frames through the door and window line includes: sorting the sub-rectangular frames according to the coordinate positions to generate a two-dimensional matrix; traversing the two-dimensional matrix horizontally and then vertically, wherein, when the i-th sub-rectangular frame and the i+1-th sub-rectangular frame are in the same row (or column) and are adjacent in position in the CAD drawing, the i-th sub-rectangular frame and the i+1-th sub-rectangular frame are merged; when the i-th sub-rectangular frame and the i+1-th sub-rectangular frame are in the same row (or column) and are not adjacent in position in the CAD drawing, searching whether there is a door and window line between the i-th sub-rectangular frame and the i+1-th sub-rectangular frame, if there is a door and window line between the i-th sub-rectangular frame and the i+1-th sub-rectangular frame, the i-th sub-rectangular frame and the i+1-th sub-rectangular frame are merged.
[0100] The prefabricated wall modeling method provided in this embodiment can ensure that the prefabricated wall edge frame formed by using the prefabricated wall edge line is used as the target prefabricated wall edge line identification range, ensure that the target prefabricated wall edge line can be identified, and improve the identification accuracy.
[0101] Optionally, in one embodiment, the step of generating prefabricated wall elements according to the target prefabricated wall edge line includes: taking the long side of the prefabricated wall edge line frame as the drawing direction and the short side as the wall width to generate a rectangular prefabricated wall center line; generating prefabricated wall elements according to the parameters of the prefabricated wall components and the rectangular prefabricated wall center line.
[0102] Specifically, since the rectangular prefabricated wall adopts the straight line drawing method, it is necessary to judge the direction of the element border. When the rectangular prefabricated wall modeling method is used to generate the square prefabricated wall element, for each prefabricated wall side wireframe, the drawing direction is first determined according to the long side of the prefabricated wall side wireframe, and the short side is the wall width. After determining the drawing direction, the center line of the rectangular prefabricated wall is generated, and then the rectangular prefabricated wall is generated.
[0103] By adopting the prefabricated wall modeling method provided in this embodiment, a prefabricated wall graphic element can be generated by generating a rectangular prefabricated wall.
[0104] Optionally, in one embodiment, after generating prefabricated wall elements according to the target prefabricated wall edge line, the method also includes: obtaining a center centered on the prefabricated wall identifier; performing similarity matching between the prefabricated wall identifier and the prefabricated wall elements within a second preset range; when the prefabricated wall identifier does not match any of the prefabricated wall elements within the second preset range, generating an error prompt message, wherein the error message includes location information of the prefabricated wall identifier; and outputting the error prompt message.
[0105] Specifically, after the prefabricated wall element is generated, an identification check is performed to check the unused identifiers. All parsed prefabricated wall identifiers can be obtained and the identifiers can be merged into clusters. A check area is constructed with each prefabricated wall identifier as the center, and all prefabricated wall elements in the check area are obtained. The prefabricated wall identifier and the name of the prefabricated wall element are matched for similarity. If there is a mismatch, an error prompt message is generated. The error message includes the location information of the identifier and the error prompt message is output. Optionally, the error prompt message is output and displayed in the form of a table. Double-clicking a row can locate the identifier position corresponding to the information, and the identifier color is darkened.
[0106] By adopting the prefabricated wall modeling method provided in this embodiment, the prefabricated wall identifiers that have not been modeled in the CAD drawing are further checked, and error prompt information is output to prompt the user to perform further processing, thereby improving the user experience.
[0107] Embodiment 2
[0108] Embodiment 2 of the present invention provides a prefabricated wall modeling method, through which the prefabricated wall modeling can be automatically implemented based on the CAD drawing and detailed drawing of the prefabricated wall. Specifically, Fig.15 This is a flow chart of a prefabricated wall modeling method provided in the second embodiment of the present invention, such as Fig.15 As shown, the prefabricated wall modeling method provided in this embodiment includes the following steps:
[0109] 1) Identification preparation: Create new prefabricated wall components through the new component function, and set component parameters according to the prefabricated wall detailed drawing; load the prefabricated wall CAD drawing, and extract the prefabricated wall edge lines, logos, and door and window lines in the prefabricated wall CAD drawing.
[0110] There are two modeling methods for newly created prefabricated wall components: parametric modeling and rectangular modeling. Parametric modeling can be used to draw ordinary prefabricated walls, PCF boards, and sandwich insulation walls. If you choose parametric modeling, you need to select the wall type. Each wall has two or three section types to choose from. Refer to the detailed drawings and set the size parameters of the prefabricated wall through the view editor.
[0111] The rectangular modeling method can only draw ordinary precast walls with rectangular cross-sections, so there is no need to select the cross-section type, and only the width of the size parameter needs to be set. After generating the precast wall component, change the component name to the component name on the detailed drawing.
[0112] After loading the CAD drawing, you can extract the prefabricated wall edge lines, signs, door and window lines in turn. There are three extraction methods: single element selection, layer selection and color selection, so that relevant information can be extracted more accurately.
[0113] 2) Parsing the identifier name: After extracting the identifier, obtain the prefabricated wall code, use the prefabricated wall code to generate a regular expression, use the regular expression to filter the identifier, and obtain the prefabricated wall identifier.
[0114] 4.2. Parsing the logo text
[0115] Among them, the logo extracted from the CAD drawing needs to be parsed to obtain the component name, and the component name matching rule is set through regular expressions to filter the logo text. The implementation method is as follows:
[0116] 1. Get the precast wall code from "CAD Identification Options". The precast wall code is the common English symbols of precast wall components in CAD drawings, separated by commas. The default value is: "WQ, NQ, PCQ, GQ, PCF";
[0117] 2. Replace "," with "|" in the prefabricated wall code, add brackets at the beginning and end, and generate a regular expression; match the extracted identifiers one by one. If the matching result is not 0, it means that the identifier is a prefabricated wall identifier and is stored in the prefabricated wall identifier storage.
[0118] 3) Matching component names: Match the parsed prefabricated wall identifier with the existing component name. Optionally, a quadtree of the prefabricated wall identifier is used to match the existing component name to obtain the corresponding relationship between the prefabricated wall identifier and the component.
[0119] After parsing the identifier, a prefabricated wall identifier set is obtained, and then the corresponding generated prefabricated wall component is searched for each prefabricated wall identifier in the set. If the corresponding prefabricated wall component is found, the next step of prefabricated wall identification is performed, otherwise it is skipped. The specific method is as follows:
[0120] 1. Construct a "component-name" dictionary for identification and matching.
[0121] a) Get the prefabricated wall components constructed on the current floor and get the component names;
[0122] b) Remove leading and trailing spaces and special symbols from the component name, and convert all full-width characters to half-width characters;
[0123] c) Remove weight-related character information and character information with "(L)" or "(R)" through regular expressions;
[0124] d) Filter some character information that conforms to the preset special rule library and store it in the "component-name" dictionary.
[0125] 2. Match the precast wall logos one by one.
[0126] a) Remove leading and trailing spaces and special symbols from the prefabricated wall logo, and convert all full-width characters into half-width characters;
[0127] b) Remove weight-related character information and character information with "(L)" or "(R)" through regular expressions;
[0128] c) For each prefabricated wall identifier, first search the "component-name" dictionary to see if there is a situation where they are completely identical or mutually inclusive. If so, it indicates that the prefabricated wall identifier matches the component name, and the prefabricated wall identifier is stored in the "identifier-component" dictionary;
[0129] d) If the appropriate component name is not matched in step c, mirror information such as "L", "R", "F" and "W" is added to the component name and matched again. If no match is found, skip and match the next prefabricated wall mark.
[0130] 4) For different modeling methods, different prefabricated wall edge line recognition methods and corresponding modeling methods are used. Among them, the modeling methods include parametric modeling methods and rectangular methods.
[0131] Prefabricated wall recognition is the core step of the modeling process. It is to calculate the position and direction of the prefabricated wall by combining the generated components and the preprocessed edge lines, logos, door and window line information. According to the modeling method of prefabricated wall components, it is divided into two categories: parametric prefabricated wall recognition and rectangular prefabricated wall recognition.
[0132] For parametric precast wall recognition:
[0133] i. Construct the matching area: Take the identification box of the prefabricated wall in the CAD drawing as the center, expand outward by a fixed value, and generate the matching area;
[0134] ii. Perform component matching: match the edge of the component cross-section polygon with the edge of the prefabricated wall in the matching area, calculate the length matching rate, and determine the target prefabricated wall edge based on the length matching rate.
[0135] For rectangular precast wall recognition:
[0136] i. Edge preprocessing: Combine the door and window lines and the existing column elements to filter and preprocess the prefabricated wall edges, and use the filtered prefabricated wall edges to generate a prefabricated wall rectangular edge frame;
[0137] ii. Use a binary matching algorithm to match the prefabricated wall rectangular edge frame and the prefabricated wall identifier, and then match them with the component name to obtain a target prefabricated wall rectangular edge frame that matches the component name, wherein the edge of the target prefabricated wall rectangular edge frame is the target prefabricated wall edge.
[0138] 5) Based on the target prefabricated wall edge lines obtained above, prefabricated wall graphics are generated, and prefabricated wall identification verification is performed. During the prefabricated wall verification, unused identifications, unused edges and size mismatch problems can be verified.
[0139] After the prefabricated wall is identified, the corresponding prefabricated wall element is automatically generated, and the identification status is checked, and the verification information is generated to prompt the user. The order of element generation is to generate the parametric prefabricated wall first and then the rectangular prefabricated wall. Because the rectangular prefabricated wall is identified in a way that the rectangular wall may be generated in the wrong place, which may occupy the position of the parametric prefabricated wall, resulting in the inability to generate the parametric prefabricated wall normally.
[0140] The method of generating parametric precast walls is as follows: after obtaining the corresponding component name, placement position, and angle from the previous step, directly draw the element in point drawing mode, and then adjust the position and angle.
[0141] The rectangular precast wall is generated as follows:
[0142] 1) determining a corresponding dictionary between the prefabricated wall identifier and the target prefabricated wall rectangular border frame according to the distance relationship between the identifier frame of the prefabricated wall identifier and the target prefabricated wall rectangular border frame;
[0143] 2) Since the rectangular prefabricated wall adopts the straight line drawing method, it is necessary to judge the drawing direction of the prefabricated wall element border. The judgment basis is to use the long side of the target prefabricated wall rectangular edge frame as the drawing direction and the short side as the wall width.
[0144] 3) After determining the drawing direction, generate the center line of the rectangular precast wall, and then generate the rectangular precast wall element.
[0145] After the prefabricated wall element is generated, the identification check is performed to check the unused logos. The check steps are as follows:
[0146] 1. Obtain all parsed prefabricated wall logos and merge the logos into clusters;
[0147] 2. Construct a verification area with each prefabricated wall mark as the center, and obtain all prefabricated wall elements in the verification area;
[0148] 3. The prefabricated wall logo is matched with the name of the prefabricated wall element for similarity. If there is a mismatch, an error message is generated, which includes the location information of the logo.
[0149] 4. Display the verification information. The verification information is displayed in a table. Double-click a row to locate the corresponding identification position of the information and display the identification color in a darker color.
[0150] Optionally, in one embodiment, Fig.16 This is a flow chart of determining the position and angle of generating prefabricated wall elements in the prefabricated wall modeling method provided in the second embodiment of the present invention, such as Fig.16 As shown, when determining the generation position and angle of the prefabricated wall element, first obtain the corresponding prefabricated wall component from the "identifier-component" dictionary table according to the prefabricated wall identifier, obtain the cross-sectional polygon of the component, and sort the sides of the polygon by length for subsequent use. Then, according to the position and direction of the prefabricated wall identifier, expand a certain area outward to generate a matching area, and obtain the prefabricated wall edge line and door and window line of the matching area. Match the above-obtained component cross-sectional polygon with the prefabricated wall edge line of the matching area, and the matching method is:
[0151] a) Make the longest side of the component section polygon coincide with the edge line of the prefabricated wall, then calculate the length of coincidence between the section polygon and all the prefabricated wall edges in the matching area, and divide it by the total length of the side lengths of the section polygon to obtain the matching rate; and perform angle rotation, mirroring and other operations on the component section polygon. Each time the angle changes, calculate the matching rate and take the highest matching rate among all cases.
[0152] b) Set the matching threshold to 0.999. When the highest matching rate is greater than the threshold, exit the loop and determine the generation position and angle of the prefabricated wall element based on the scene with the highest matching rate; otherwise, continue the matching loop.
[0153] Optionally, in one embodiment, Fig.17 This is a flow chart of merging sub-rectangular frames in the modeling method of a prefabricated wall provided in the second embodiment of the present invention, such as Fig.17,The rectangular prefabricated wall is easily affected by the door and window lines and other edge lines because of its rectangular cross-section. The recognition effect of the parametric prefabricated wall recognition method is poor, so another recognition process is used:
[0154] 1. Generate multiple closed rectangular frames based on the extracted CAD prefabricated wall edges;
[0155] 2. Filter the column edge wireframe: Get all the column elements of the current floor, get the cross-sectional edge wireframe of the column element, construct a search quadtree, and compare it with the prefabricated wall edge wireframe obtained above. If there is a prefabricated wall edge wireframe with the same position and shape as the cross-sectional edge wireframe of the column element, remove the edge wireframe.
[0156] 3. Filter out illegal enclosed frames: Get the maximum wall thickness value from the recognition settings, filter out enclosed frames whose length and width are greater than the maximum wall thickness value, filter out enclosed frames that are too large or too small, and use the remaining enclosed frames for subsequent generation of prefabricated wall elements.
[0157] Among them, for the grid-shaped prefabricated wall edge, Fig.13 As shown, segmentation is performed to generate a small closed rectangular frame, and then the door and window lines are combined to merge the two separated wall edge wireframes into a complete wall edge wireframe through the door and window line joint algorithm. The door and window line joint algorithm is described in detail as follows:
[0158] 1. Initialize the door and window line quadtree for finding the door and window lines in the third step;
[0159] 2. Sort the prefabricated wall edge closed frame into a two-dimensional matrix according to the coordinate position;
[0160] 3. Traverse the closed frame horizontally and then vertically:
[0161] a) If the i-th closed box and the i+1-th closed box are in the same row (column) and adjacent, they are directly merged;
[0162] b) If the i-th closed box and the i+1-th closed box in the same row (column) are not adjacent, then a gap closed box is constructed between them. The door and window line quadtree generated in step 1 is used to search whether there is a door or window line in the gap closed box.
[0163] c) If there are door and window lines in the gap closed frame, the two closed frames are merged, otherwise the next pair of closed frames are processed, wherein when merging two closed frames, the i-th closed frame can be extended and the i+1-th closed frame can be deleted.
[0164] Embodiment 3
[0165] Corresponding to the above-mentioned embodiment 1, embodiment 3 of the present invention provides a modeling device for a prefabricated wall. The corresponding technical feature details and corresponding technical effects can be referred to the above-mentioned embodiment 1 and embodiment 2, and will not be repeated in this embodiment. Fig.18 A block diagram of a prefabricated wall modeling device provided in Embodiment 3 of the present invention, such as Fig.18 As shown, the device includes: a new creation module 301, an extraction module 302, a screening module 303, a first matching module 304, a determination module 305 and a first generation module 306.
[0166] The new creation module 301 is used to create a new prefabricated wall component and set the parameters and component name of the prefabricated wall component according to the detailed drawing of the prefabricated wall to be modeled; the extraction module 302 is used to extract the prefabricated wall edge lines and logos in the CAD drawing of the prefabricated wall; the screening module 303 is used to screen out the logos that meet the prefabricated wall code rules from the extracted logos to obtain the prefabricated wall logos; the first matching module 304 is used to match the prefabricated wall logo with the component name, wherein the prefabricated wall logo that matches the component name is the target prefabricated wall logo; the determination module 305 is used to determine the target prefabricated wall edge line corresponding to the prefabricated wall component in the prefabricated wall edge line in the CAD drawing according to the target prefabricated wall logo and the parameters of the prefabricated wall component; and the generation module 306 is used to generate the prefabricated wall graphic element according to the target prefabricated wall edge line.
[0167] Optionally, in one embodiment, the screening module includes: a first acquisition unit, used to acquire a prefabricated wall standard code; a first generation unit, used to generate a regular expression based on the prefabricated wall standard code; a first matching unit, used to match the extracted identifier with the regular expression; and a first determination unit, used to determine that the identifier is a prefabricated wall identifier when the matching result between the identifier and the regular expression is not 0.
[0168] Optionally, in one embodiment, the determination module includes: a second acquisition unit, used to acquire the cross-sectional polygon of the prefabricated wall component in the detailed drawing; a second generation unit, used to expand a first preset range outward with the target prefabricated wall identifier as the center in the CAD drawing to generate a matching area; and a second matching unit, used to match the cross-sectional polygon with the prefabricated wall edge line in the matching area to determine the target prefabricated wall edge line.
[0169] Optionally, in one embodiment, the steps performed by the second matching unit include: step S1: calculating the sum of the sides of the cross-sectional polygon to obtain the total length; step S2: overlapping the sides of the cross-sectional polygon with the prefabricated wall edge lines in the matching area; step S3: calculating the overlapping length of the cross-sectional polygon and the prefabricated wall edge lines; step S4: calculating the ratio of the overlapping length to the total length to obtain a matching rate; step S5: determining whether the matching rate is greater than a preset matching threshold, wherein when the matching rate is greater than or equal to the preset matching threshold, executing step S6, and when the matching rate is less than the preset matching threshold, executing step S7; step S6: determining that the prefabricated wall edge line that overlaps with the cross-sectional polygon is the target prefabricated wall edge line; and step S7: adjusting the angle of the cross-sectional polygon and returning to step S2.
[0170] Optionally, in one embodiment, the first generation module includes: a first drawing unit, used to draw an initial graphic element in a point drawing manner using the target prefabricated wall edge line; and an adjustment unit, used to adjust the position and angle of the initial graphic element according to the position and angle of all the target prefabricated wall edge lines to obtain the prefabricated wall graphic element.
[0171] Optionally, in one embodiment, the parameters of the prefabricated wall component include a maximum wall thickness, and the determination module includes: a third generation unit, used to obtain a first prefabricated wall edge wireframe set through a plurality of prefabricated wall edge wireframes generated by the prefabricated wall edge line; a third acquisition unit, used to obtain a cross-sectional edge wireframe of the column element in the CAD drawing; a first deletion unit, used to delete the prefabricated wall edge wireframes in the first prefabricated wall edge wireframe set that are the same in position and shape as the cross-sectional edge wireframe, to obtain a second prefabricated wall edge wireframe set; a second deletion unit, used to delete the prefabricated wall edge wireframes in the second prefabricated wall edge wireframe set whose length and width are both greater than the maximum wall thickness, to obtain a third prefabricated wall edge wireframe set; a second determination unit, used to determine, in the third prefabricated wall edge wireframe set, a prefabricated wall edge wireframe that is within a preset distance from the component name, wherein the edge of the prefabricated wall edge wireframe is the target prefabricated wall edge line.
[0172] Optionally, in one embodiment, the steps specifically performed by the third generation unit include: when the figure generated by the prefabricated wall edge line is a rectangular frame with a gap and the gap is within a preset wall end intersection extension error range, filling the gap to generate the prefabricated wall edge line frame; and / or when the figure generated by the prefabricated wall edge line is a grid, dividing the grid into sub-rectangular frames, obtaining the door and window lines in the CAD drawing, and merging the two sub-rectangular frames through the door and window lines to generate the prefabricated wall edge line frame.
[0173] Optionally, in one embodiment, when the third generating unit merges two sub-rectangular boxes through the door and window line, the specific steps performed include: sorting the sub-rectangular boxes according to the coordinate positions to generate a two-dimensional matrix; traversing the two-dimensional matrix, wherein when the i-th sub-rectangular box and the i+1-th sub-rectangular box are in the same row or column and are adjacent in position in the CAD drawing, the i-th sub-rectangular box and the i+1-th sub-rectangular box are merged; when the i-th sub-rectangular box and the i+1-th sub-rectangular box are in the same row or column and are not adjacent in position in the CAD drawing, searching whether the door and window line exists between the i-th sub-rectangular box and the i+1-th sub-rectangular box, and if the door and window line exists between the i-th sub-rectangular box and the i+1-th sub-rectangular box, the i-th sub-rectangular box and the i+1-th sub-rectangular box are merged.
[0174] Optionally, in one embodiment, the first generation module includes: a second drawing unit, used to generate a rectangular prefabricated wall center line with the long side of the prefabricated wall edge frame as the drawing direction and the short side as the wall width; a fourth generation unit, used to generate the prefabricated wall element according to the parameters of the prefabricated wall component and the rectangular prefabricated wall center line.
[0175] Optionally, in one embodiment, the device further includes: an acquisition module, used to acquire, after generating prefabricated wall elements according to the target prefabricated wall edge line, a centering on the prefabricated wall identifier; a second matching module, used to perform similarity matching between the prefabricated wall identifier and the prefabricated wall elements within the second preset range; a second generation module, used to generate an error prompt message when the prefabricated wall identifier does not match any of the prefabricated wall elements within the second preset range, wherein the error message includes the location information of the prefabricated wall identifier; and an output module, used to output the error prompt message.
[0176] Embodiment 4
[0177] This fourth embodiment also provides a computer device, such as a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including an independent server or a server cluster composed of multiple servers) that can execute programs. Fig.19 As shown, the computer device 01 of this embodiment includes at least but is not limited to: a memory 011 and a processor 012 which can be interconnected through a system bus. Fig.19 It should be pointed out that Fig.19 Only a computer device 01 having components memory 011 and processor 012 is shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0178] In this embodiment, the memory 011 (i.e., readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 011 may be an internal storage unit of the computer device 01, such as a hard disk or memory of the computer device 01. In other embodiments, the memory 011 may also be an external storage device of the computer device 01, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. equipped on the computer device 01. Of course, the memory 011 may also include both the internal storage unit of the computer device 01 and its external storage device. In this embodiment, the memory 011 is generally used to store the operating system and various application software installed on the computer device 01, such as the program code of the prefabricated wall modeling device of the third embodiment. In addition, the memory 011 can also be used to temporarily store various types of data that have been output or are to be output.
[0179] In some embodiments, the processor 012 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 012 is generally used to control the overall operation of the computer device 01. In this embodiment, the processor 012 is used to run the program code stored in the memory 011 or process data, such as a modeling method of a prefabricated wall.
[0180] Embodiment 5
[0181] The fifth embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, and when the program is executed by a processor, a corresponding function is realized. The computer-readable storage medium of the present embodiment is used to store a modeling device for a prefabricated wall, and when executed by a processor, the modeling method for a prefabricated wall of the first embodiment is realized.
[0182] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0183] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0184] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0185] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A prefabricated wall modeling method, characterized in that: include: Create a new prefabricated wall component, and set the parameters and component name of the prefabricated wall component according to the detailed drawing of the prefabricated wall to be modeled; Extracting the prefabricated wall edge lines and marks in the CAD drawing of the prefabricated wall; Screening out the identifiers satisfying the prefabricated wall code rule from the extracted identifiers to obtain the prefabricated wall identifiers; Matching the prefabricated wall identifier with the component name, wherein the prefabricated wall identifier that matches the component name is the target prefabricated wall identifier; Determining, according to the target prefabricated wall identifier and the parameters of the prefabricated wall component, a target prefabricated wall edge line corresponding to the prefabricated wall component from among the prefabricated wall edges in the CAD drawing; as well as A prefabricated wall graphic element is generated according to the target prefabricated wall edge line.
2. The prefabricated wall modeling method according to claim 1, characterized in that: The step of selecting the identifiers satisfying the prefabricated wall code rule from the extracted identifiers to obtain the prefabricated wall identifiers includes: Get the standard code of precast wall; Generate a regular expression according to the prefabricated wall standard code; Matching the extracted identifier with the regular expression; and When the matching result between the identifier and the regular expression is not 0, it is determined that the identifier is a prefabricated wall identifier.
3. The modeling method of prefabricated wall according to claim 1, characterized in that: The step of determining a target prefabricated wall edge line corresponding to the prefabricated wall component from among the prefabricated wall edge lines in the CAD drawing according to the target prefabricated wall identifier and the parameters of the prefabricated wall component comprises: Obtaining a cross-sectional polygon of the prefabricated wall component in the detailed drawing; In the CAD drawing, taking the target prefabricated wall mark as the center, expanding outward a first preset range to generate a matching area; and The cross-section polygon is matched with the prefabricated wall edge line in the matching area to determine the target prefabricated wall edge line.
4. The prefabricated wall modeling method according to claim 3, characterized in that: The step of matching the cross-section polygon with the prefabricated wall edge line in the matching area to determine the target prefabricated wall edge line comprises: Step S1: Calculate the sum of the sides of the cross-sectional polygon to obtain the total length; Step S2: aligning the edge of the cross-section polygon with the edge of the prefabricated wall in the matching area; Step S3: Calculate the overlap length between the cross-section polygon and the edge line of the prefabricated wall; Step S4: Calculate the ratio of the overlap length to the total length to obtain a matching rate; Step S5: determining whether the matching rate is greater than a preset matching threshold, wherein when the matching rate is greater than or equal to the preset matching threshold, executing step S6, and when the matching rate is less than the preset matching threshold, executing step S7; Step S6: determining the prefabricated wall edge line that coincides with the cross-section polygon as the target prefabricated wall edge line; and Step S7: adjust the angle of the cross-section polygon and return to step S2.
5. The method for modeling a prefabricated wall according to claim 3 or 4, characterized in that: The step of generating a prefabricated wall element according to the target prefabricated wall edge line comprises: Using the target prefabricated wall edge line to draw an initial graphic element in a point drawing manner; and According to the positions and angles of all the target prefabricated wall edge lines, the positions and angles of the initial graphic elements are adjusted respectively to obtain the prefabricated wall graphic elements.
6. The method for modeling a prefabricated wall according to claim 1, characterized in that: The parameters of the prefabricated wall component include a maximum wall thickness. The step of determining a target prefabricated wall edge line corresponding to the prefabricated wall component from among the prefabricated wall edges in the CAD drawing according to the target prefabricated wall identifier and the parameters of the prefabricated wall component includes: Obtaining a first prefabricated wall edge line frame set through a plurality of prefabricated wall edge line frames generated by the prefabricated wall edge line; Obtain a cross-section edge frame of the column element in the CAD drawing; Deleting the prefabricated wall edge wireframes in the first prefabricated wall edge wireframe set that have the same position and shape as the cross-section edge wireframe, to obtain a second prefabricated wall edge wireframe set; Deleting the prefabricated wall edge wireframes in the second prefabricated wall edge wireframe set whose length and width are both greater than the maximum wall thickness, to obtain a third prefabricated wall edge wireframe set; In the third prefabricated wall edge wireframe set, a prefabricated wall edge wireframe whose distance from the component name is within a preset distance is determined, wherein the edge of the prefabricated wall edge wireframe is the target prefabricated wall edge.
7. The prefabricated wall modeling method according to claim 6, characterized in that: The steps of generating a plurality of prefabricated wall edge frames by using the prefabricated wall edge include: When the graphic generated by the prefabricated wall edge line is a rectangular frame with a gap and the gap is within a preset wall end intersection extension error range, the gap is filled to generate the prefabricated wall edge line frame; and / or When the graphic generated by the prefabricated wall edge line is a grid, the grid is divided into sub-rectangular frames, the door and window lines in the CAD drawing are obtained, and the two sub-rectangular frames are merged through the door and window lines to generate the prefabricated wall edge frame.
8. The method for modeling a prefabricated wall according to claim 7, characterized in that: The step of merging the two sub-rectangular frames through the door and window line comprises: Sorting the sub-rectangular frames according to coordinate positions to generate a two-dimensional matrix; The two-dimensional matrix is traversed, wherein, when the i-th sub-rectangular box and the i+1-th sub-rectangular box are in the same row or column and are adjacent in position in the CAD drawing, the i-th sub-rectangular box and the i+1-th sub-rectangular box are merged; when the i-th sub-rectangular box and the i+1-th sub-rectangular box are in the same row or column and are not adjacent in position in the CAD drawing, it is searched whether the door and window line exists between the i-th sub-rectangular box and the i+1-th sub-rectangular box, and if the door and window line exists between the i-th sub-rectangular box and the i+1-th sub-rectangular box, the i-th sub-rectangular box and the i+1-th sub-rectangular box are merged.
9. The method for modeling a prefabricated wall according to any one of claims 6 to 8, characterized in that: The step of generating a prefabricated wall element according to the target prefabricated wall edge line comprises: The long side of the prefabricated wall edge wireframe is used as the drawing direction, and the short side is used as the wall width to generate a rectangular prefabricated wall centerline; The prefabricated wall graphic element is generated according to the parameters of the prefabricated wall component and the center line of the rectangular prefabricated wall.
10. The prefabricated wall modeling method according to claim 1, characterized in that: After generating the prefabricated wall element according to the target prefabricated wall edge line, the method further includes: Acquire the center of the prefabricated wall mark; Performing similarity matching between the prefabricated wall identifier and the prefabricated wall graphic element within a second preset range; When the prefabricated wall identifier does not match any of the prefabricated wall graphic elements within the second preset range, an error prompt message is generated, wherein the error prompt message includes the location information of the prefabricated wall identifier; and Output the error prompt information.
11. A modeling device for prefabricated walls, characterized in that: include: A new module is used to create a new prefabricated wall component and set the parameters and component name of the prefabricated wall component according to the detailed drawing of the prefabricated wall to be modeled; An extraction module, used to extract the prefabricated wall edge lines and marks in the CAD drawing of the prefabricated wall; A screening module, used to screen out the identifiers satisfying the prefabricated wall code rule from the extracted identifiers, and obtain the prefabricated wall identifiers; A matching module, used for matching the prefabricated wall identifier with the component name, wherein the prefabricated wall identifier that matches the component name is a target prefabricated wall identifier; a determination module, configured to determine, according to the target prefabricated wall identifier and the parameters of the prefabricated wall component, a target prefabricated wall edge line corresponding to the prefabricated wall component from among the prefabricated wall edges in the CAD drawing; and A generation module is used to generate a prefabricated wall element according to the target prefabricated wall edge line.
12. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.