A method, device and readable medium for automatically optimizing the drawing of a plane axis network

By establishing the mapping relationship between the axis and the wall, the wall and the room, filtering, merging, offsetting and cutting the axis, the problem of rough and inability to merge the axis grid in the existing technology is solved, and more accurate construction is achieved Plan drawing.

CN118570341BActive Publication Date: 2024-12-03TIANHUA ARCHITECTURE DESIGN COMPANY
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411035313.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-12-03
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

In the drawing of building floor plan, the axis grid is roughly generated, and it is impossible to reasonably merge adjacent axis, effectively filter the axis without extension, and cannot meet the professional drawing standards of architecture.

Method used

By establishing the mapping relationship between the axis and the wall, the wall and the room, the axis is filtered, merged, offset and cut according to the control parameters of the optimization operation to generate a more accurate axis grid.

Benefits of technology

It realizes accurate drawing of the axis grid, effectively filters the axis without extension, meets the building floor plan drawing standards, and reduces manual processing time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570341B_ABST
    Figure CN118570341B_ABST
Patent Text Reader

Abstract

The purpose of this application is to provide a method, device and readable medium for automatically optimizing the drawing of a plane axis network. This application establishes the mapping relationship between the axis and the wall and the mapping relationship between the wall and the room according to the axis network information, wall information and room information in the current CAD drawing; filters the axis according to the control parameters of this optimization operation, the mapping relationship between the axis and the wall, and the mapping relationship between the wall and the room, and obtains the filtered axis; performs a merge operation, an offset operation and a clipping operation on the filtered axis according to the control parameters to obtain an optimization result; and draws the optimization result in the current CAD drawing. The drawing result is relatively accurate, can effectively filter the axis that does not need to be extended, and meets the drawing standard of the architectural plan.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of architectural drawing, and in particular to a method, device and readable medium for automatically optimizing the drawing of a plane axis grid. Background Art

[0002] The axis grid is a set of virtual reference lines on the building plane, usually arranged along the walls and columns of the building. In the process of architectural design, the axis grid is needed to locate the components in the plane drawings. All physical components such as walls, doors and windows are marked with positions and sizes based on the axes in the axis grid as reference lines, which serves as a basis for raising funds and guiding construction between different professions. Therefore, the accurate and reasonable arrangement and expression of the axis grid is a very important part of architectural design.

[0003] Existing software technology can generate an axis along the baseline or center line of each wall after the wall component information of the building is known, and then extend it to both sides to a certain boundary range to generate a rough axis network. However, there are the following problems: First, the results obtained are relatively rough and cannot meet the drawing requirements of the architectural profession. Architects still need to spend a lot of time to manually process the results. Second, only the center line or baseline of the wall is extended, and it is impossible to reasonably merge adjacent axes according to the drawing standards of the architectural profession. Third, it can only extend all axes to both sides indiscriminately, and it is impossible to effectively filter out axes that do not need to be extended. Fourth, it is impossible to reasonably group axes of different angles, and therefore it is impossible to meet the subsequent group numbering and group labeling requirements. Summary of the invention

[0004] One purpose of the present application is to provide a method, device and readable medium for automatically optimizing the drawing of a plane axis grid, so as to solve the problems in the prior art that the results obtained are relatively rough, the merging of adjacent axes is unreasonable, the axes that do not need to be extended cannot be effectively filtered, and the standards for drawing architectural plans cannot be directly met.

[0005] According to one aspect of the present application, a method for automatically optimizing the drawing of a plane axis grid is provided, the method comprising:

[0006] According to the axis grid information, wall information and room information in the current CAD drawing, establish the mapping relationship between the axis and the wall, and the mapping relationship between the wall and the room;

[0007] Filtering the axis according to the read control parameters of this optimization operation, the mapping relationship between the axis and the wall, and the mapping relationship between the wall and the room to obtain a filtered axis;

[0008] According to the control parameters of this optimization operation, the filtered axes are merged, offset and trimmed to obtain the optimization result;

[0009] Draw the optimization results in the current CAD drawing.

[0010] Optionally, according to the axis grid information, wall information and room information in the current CAD drawing, a mapping relationship between the axis and the wall and a mapping relationship between the wall and the room are established, including:

[0011] Get the axis grid information, wall information and marked text information in the current CAD drawing;

[0012] Identify the room according to the wall information and text information to obtain room information;

[0013] Determine all axes according to the axis grid information, determine the wall to which the axis is mapped according to the baseline of each axis and each wall, and establish a mapping relationship;

[0014] The room to which the wall is mapped is determined according to the inner contour of the room and the edge line of the wall, and a mapping relationship is established.

[0015] Optionally, identifying a room according to the wall information and the text information to obtain room information includes:

[0016] Calculate the edge lines of all walls in the current CAD drawing according to the baseline and width in the wall information;

[0017] Determine the two-dimensional closed area enclosed by the edge lines of all walls;

[0018] The text is assigned to the room where it is located according to the room face area where the coordinates of the center point of each text information are located, and the room name of the room is obtained.

[0019] Optionally, the control parameters of the optimization operation include the minimum width and minimum length of the wall for which the axis needs to be generated, and the axis is filtered according to the read control parameters of the optimization operation, the mapping relationship between the axis and the wall, and the mapping relationship between the wall and the room, including:

[0020] Find all walls to which each axis is mapped according to the mapping relationship between the axis and the wall;

[0021] Merge walls according to the center lines and widths of all mapped walls;

[0022] Find the target wall from the merged walls according to the minimum width and minimum length of the wall that needs to generate the axis;

[0023] The axis that has a mapping relationship with the target wall is used as the target deletion axis, and the target deletion axis is deleted from the axis grid.

[0024] Optionally, a merge operation, an offset operation, and a trim operation are performed on the filtered axes according to the control parameters of this optimization operation, including:

[0025] Performing a merging operation on the target parallel axes among the filtered axes according to the control parameters of this optimization operation to obtain a first axis result, wherein the distance between the target parallel axes is less than a preset threshold;

[0026] Determine the target axis that needs to be offset in the first axis result according to the control parameters of this optimization operation, calculate the offset direction and distance of each target axis, offset the target axis according to the offset direction and distance, and obtain the second axis result;

[0027] The target clipping axis in the second axis result is determined according to the room information and the mapping relationship between the wall and the room, and the target clipping axis is clipped.

[0028] Optionally, a merging operation is performed on the target parallel axes in the filtered axes according to the control parameters of this optimization operation, including:

[0029] Determine the distance threshold based on the default wall width of the current drawing in the control parameters of this optimization operation;

[0030] Group the target parallel axes among the filtered axes according to the parallel relationship;

[0031] In each group, all pairs of axes whose parallel distance is less than the distance threshold are screened out;

[0032] Determine the wall to which the paired axes are mapped according to the mapping relationship between the axes and the walls;

[0033] The number of walls with a width greater than a distance threshold among the mapped walls is determined, and the axis lines to be merged in each pair of axes are selected according to the number, and the merged axis lines are merged, and the mapping relationship between the merged axis lines and the walls is updated.

[0034] Optionally, determining the target axis to be offset in the first axis result according to the control parameters of this optimization operation includes:

[0035] The first axis results are traversed to filter out the target axis that needs to be offset, wherein the target axis satisfies the following conditions: the widths of all walls mapped to the target axis are smaller than the default wall width of the current drawing.

[0036] Optionally, the offset direction and distance of each target axis are calculated, including:

[0037] Determine the target wall with the longest length among the walls mapped in the target axis;

[0038] Obtaining the rooms on both sides to which the target wall is mapped according to the mapping relationship between the wall and the room;

[0039] Determine the room with the highest priority among the rooms on both sides according to the room priority list in the control parameters of this optimization operation;

[0040] Offset the target axis to the room with higher priority and determine the offset distance based on the wall width and the default wall width of the current drawing.

[0041] Optionally, determining a target clipping axis in the second axis result according to the room information and a mapping relationship between the wall and the room includes:

[0042] Add the rooms whose names are in the set of room names that need to be marked with axes to the first room set;

[0043] According to the mapping relationship between walls and rooms, the walls mapped to all rooms in the first room set are added to the first wall set;

[0044] Calculate the outer contour of the first wall set, and add the wall corresponding to the outer contour to the second wall set;

[0045] The axis of the wall associated with the second axis result that is not in the second wall set is used as the target clipping axis.

[0046] Optionally, clipping the target clipping axis includes:

[0047] Add the walls in the first wall set that are not in the second wall set and intersect with the walls in the second wall set to the third wall set;

[0048] The target clipping axis is clipped using the third wall set, the outer contour of the first wall set, and the inner contour of the first room set.

[0049] According to another aspect of the present application, a device for automatically optimizing the drawing of a plane axis grid is also provided, the device comprising:

[0050] one or more processors; and

[0051] A memory storing computer readable instructions, which, when executed, cause the processor to perform the operations of the method as described above.

[0052] According to another aspect of the present application, a computer-readable medium is provided, on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement the method described above.

[0053] Compared with the prior art, this application establishes the mapping relationship between the axis and the wall, and the mapping relationship between the wall and the room according to the axis grid information, wall information and room information in the current CAD drawing; filters the axis according to the control parameters of this optimization operation, the mapping relationship between the axis and the wall, and the mapping relationship between the wall and the room to obtain the filtered axis; performs a merge operation, an offset operation and a clipping operation on the filtered axis according to the control parameters of this optimization operation to obtain the optimization result; and draws the optimization result in the current CAD drawing. The drawing result is relatively accurate, can effectively filter the axis that does not need to be extended, and meets the drawing standard of the architectural plan. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0055] Figure 1 A schematic flow chart of a method for automatically optimizing the drawing of a plane axis grid provided according to one aspect of the present application is shown;

[0056] Figure 2 A schematic diagram showing an axis network before optimization in one embodiment of the present application;

[0057] Figure 3 A schematic diagram showing an optimized axis network in an embodiment of the present application is shown;

[0058] Figure 4 A schematic diagram of a method for automatically optimizing the drawing of a residential building plane grid in a specific embodiment of the present application is shown.

[0059] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION

[0060] The present application is described in further detail below in conjunction with the accompanying drawings.

[0061] In a typical configuration of the present application, the terminal, the device of the service network and the trusted party all include one or more processors (eg, a central processing unit (CPU)), an input / output interface, a network interface and a memory.

[0062] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0063] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, Phase-Change RAM (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of random access memory (RAM), Read-Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disk (DVD) or other optical storage, cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0064] Figure 1 A schematic flow chart of a method for automatically optimizing the drawing of a plane axis grid according to one aspect of the present application is shown, the method comprising: steps S11 to S14, wherein:

[0065] Step S11, according to the axis information, wall information and room information in the current CAD drawing, establish the mapping relationship between the axis and the wall, and the mapping relationship between the wall and the room; here, the current CAD drawing refers to the drawing where the axis that needs to be optimized is located, obtain the axis information, wall information and room information to be optimized on the CAD drawing, and build the relevant mapping relationship; wherein, the axis information includes the unique identification mark and axis geometry information of the axis, the wall information includes the unique identification mark of the wall, the wall baseline geometry information, the left wall width with the baseline as the reference, the right wall width with the baseline as the reference and the unique identification mark of the room to which it belongs; the room information includes the room name. Thus, the mapping association between the axis, the wall and the room is established according to the obtained information, and the bidirectional mapping relationship from the axis to the wall and the bidirectional mapping relationship from the wall to the room are recorded.

[0066] Step S12, filtering the axis according to the control parameters of this optimization operation, the mapping relationship between the axis and the wall, and the mapping relationship between the wall and the room to obtain the filtered axis; here, the control parameters of this optimization operation are read from the configuration interface, wherein the control parameters include the minimum width of the wall for which the axis needs to be generated (W1), the default wall width of the current drawing (W2), the minimum length of the wall for which the axis needs to be generated (L1), and the priority sorting table of room names (P), so that the axis that needs to be optimized in the current CAD drawing can be filtered using the read control parameters and the established mapping relationship, and the axis that does not need to be generated can be screened out and deleted from the existing axis network.

[0067] Step S13, according to the control parameters of this optimization operation, the filtered axes are merged, offset and trimmed to obtain the optimization result; here, W2 in the control parameter is used as the basis for judging whether to merge the axes, and W2 and P are used as the basis for judging whether to offset the axes. Combined with the building wall and room layout information, the given axis network is merged, offset and trimmed. The adjacent axes can be reasonably merged according to the drawing standards of the architectural profession, the axes that need to be offset are offset, and the axes that do not need to be extended are trimmed to obtain the optimization result. Finally, in step S14, the optimization result is drawn in the current CAD drawing to solve the problem that the axis network generated by the existing drawing software is inaccurate and cannot directly meet the drawing standards of the architectural plan.

[0068] In some embodiments of the present application, in step S11, the axis grid information, wall information and annotated text information in the current CAD drawing are obtained; the room is identified based on the wall information and text information to obtain the room information; all the axes are determined based on the axis grid information, and the walls to which the axes are mapped are determined based on the baselines of each axis and each wall, and a mapping relationship is established; the room to which the wall is mapped is determined based on the inner contour of the room and the edge line of the wall, and a mapping relationship is established. Here, there is text information marked in the CAD drawing, and the text information includes the unique identification mark of the text, the text content and the positioning coordinates. The room is identified according to the wall information and the text information. Then, the mapping association between the axis, the wall and the room is established, and each wall object is traversed. The axis parallel to the baseline of the wall (for the arc, it means the same center of the circle) is found in all the axis sets, and the axis with the smallest parallel distance to the wall baseline (for the arc, it means the difference in radius) is selected as the axis associated with the wall, and the bidirectional mapping relationship from the wall to the axis is recorded; each wall object is traversed, and if the left line or the right line of the wall overlaps with the inner contour of a room, the room is regarded as the associated room of the wall, and the bidirectional mapping relationship from the wall to the room is recorded.

[0069] The process of identifying a room is as follows: calculate the edge lines of all walls in the current CAD drawing according to the baseline and width in the wall information; determine the two-dimensional closed area enclosed by the edge lines of all walls; assign the text to the room where it is located according to the room face domain where the center point coordinates of each text information are located, and obtain the room name of the room. Here, specifically: Step 1, calculate the edge lines of all walls in the drawing according to the wall baseline and width; Step 2, obtain all two-dimensional closed face domains enclosed by the wall edge lines; Step 3, filter out the face domains that are not within the edge lines of any wall from these face domains, and each of the filtered face domains is identified as a room, and this face domain is used as the inner contour of this room; Step 4, determine whether the text is within a room face domain according to the center point coordinates of the text, and if so, assign the text to the room as one of the room names of the room. Among them, the edge lines of all walls are calculated using the following steps: step a, taking the wall baseline as a reference and offsetting the left wall width to the left to obtain its left edge line; step b, taking the wall baseline as a reference and offsetting the right wall width to the right to obtain its right edge line; step c, connecting the starting points of the left and right edge lines and connecting the end points of the left and right edge lines to obtain the edge lines at both ends; step d, the closed curve formed by connecting the above four lines end to end is used as the edge line of this wall.

[0070] In some embodiments of the present application, the control parameters of the optimization operation include the minimum width and minimum length of the wall for which an axis needs to be generated. In step S12, all walls to which each axis is mapped are found according to the mapping relationship between the axis and the wall; the walls are merged according to the center lines and widths of all the mapped walls; the target wall is searched from the merged walls according to the minimum width and minimum length of the wall for which an axis needs to be generated; the axis that has a mapping relationship with the target wall is used as the target deletion axis, and the target deletion axis is deleted from the axis network. Here, the control parameters of this optimization operation are read from the configuration interface, including the minimum width W1 of the wall that needs to generate an axis and the minimum length L1 of the wall that needs to generate an axis. The following steps are used to delete redundant axes from the existing axis network according to the wall information: traverse all axes, find all walls corresponding to the current axis according to the mapping relationship between the axis and the wall, and merge the walls whose center lines are on the same line and have equal width; find the wall that does not need to generate an axis from the merged walls, take the wall that does not need to generate an axis as the target wall, and delete the axis corresponding to the target wall; that is, the wall that needs to generate an axis can be found from the merged walls, and the specific judgment method is: baseline length ≥ L1 and width ≥ W1; if the number of walls found is 0, that is, the wall is actually a wall that does not need to generate an axis, and the current axis corresponding to the wall is not needed, then the current axis is deleted from the axis network.

[0071] The method described in the embodiment of the present application will optimize and merge the axes with similar parallel distances in the axis network by judging the width of the wall where they are located, the relative position and the room conditions on both sides.

[0072] In some embodiments of the present application, in step S13, the target parallel axes in the filtered axes are merged according to the control parameters of this optimization operation to obtain a first axis result, wherein the distance between the target parallel axes is less than a preset threshold; the target axes that need to be offset in the first axis result are determined according to the control parameters of this optimization operation, the offset direction and distance of each target axis are calculated, and the target axes are offset according to the offset direction and distance to obtain a second axis result; the target clipping axis in the second axis result is determined according to the room information, the mapping relationship between the wall and the room, and the target clipping axis is clipped. Here, the parallel axes with similar distances are filtered out from the filtered axes and merged, and the merged result obtained is the first axis result; the axes that should not be generated in the center of the wall are filtered out from the first axis result as the target axes for offset operation, the offset direction and offset distance required for each axis that needs to be offset are calculated, and the axes are offset according to the calculated results, and the offset result obtained is the second axis result; the axes that should not be extended in the second axis result are continued to be filtered out as the target clipping axes, and the target clipping axes are clipped, and then the final result is drawn in the drawing; for example, the axis network before optimization is as follows Figure 2 As shown in the figure, after filtering, merging, offsetting and trimming the axis grid, the optimized result is as follows Figure 3 shown.

[0073] In some embodiments of the present application, when performing a merging operation, a distance threshold is determined according to the wall width default in the current drawing among the control parameters of the current optimization operation; the target parallel axes in the filtered axes are grouped according to the parallel relationship; all pairs of axes with a parallel distance less than the distance threshold are selected in each group; the walls mapped by the pairs of axes are determined according to the mapping relationship between the axes and the walls; the number of walls with a width greater than the distance threshold among the mapped walls is determined, and the axes to be merged in each pair of axes are selected according to the number, and then merged, and the mapping relationship between the merged axes and the walls is updated. Here, the control parameters of the current optimization operation include the wall width W2 default in the current drawing, and W2 / 2 is used as the distance threshold. The axes in the filtered axes are grouped according to the parallel relationship, and all pairs of axes with a parallel distance less than the distance threshold are selected in each group. According to the mapping relationship between the axes and the walls, the walls mapped by the pairs of axes are respectively obtained; it is judged whether there is a wall with a width greater than or equal to W2 among the walls mapped by each pair of axes. The specific process is as follows: if only one of the pair of axes is mapped to a wall with a width greater than or equal to W2, the other axis is merged into this axis; if none of the pair of axes is mapped to a wall with a width greater than or equal to W2, the total length values of the walls they are mapped to are compared, and the axis with the larger value is merged into the axis with the smaller value; the mapping relationship between the merged axis and the wall is merged into the new axis. For example, if axis A is mapped to two walls a1 and a2, and axis B is mapped to three walls b1, b2, and b3, then compare the length of a1 + a2 with the length of b1 + b2 + b3. If a1 + a2 < b1 + b2 + b3, then axis A is merged into axis B, and the mapping relationship between A and a1, a2 is also merged into axis B, that is, the mapping relationship between the merged axis B and the walls becomes that axis B is mapped to five walls a1, a2, b1, b2, and b3.

[0074] In the embodiments of the present application, for multiple groups of axes that are obliquely intersecting at a certain angle in the same building plane, it is possible to group the axes at different angles according to the relative positions of the walls where they are located, and optimize the extended lengths thereof, so as to be able to correctly perform subsequent grouping numbering and dimension marking.

[0075] In some embodiments of the present application, when performing an offset operation, the first axis result is traversed, and the target axes that need to be offset are screened out. Among them, the target axes meet the following conditions: the widths of all the walls mapped by the target axes are less than the wall width default in the current drawing. Here, the merged first axis result is traversed, and the axis objects that meet the following conditions are screened out and added to the set A1: the widths of all the walls mapped by this axis are < W2.

[0076] Next, calculate the offset direction and distance of each target axis in the set A1, as follows: determine the target wall with the longest length among the walls mapped to the target axis; obtain the rooms on both sides mapped to the target wall according to the mapping relationship between the wall and the room; determine the room with a high priority among the rooms on both sides according to the room priority list in the control parameters of this optimization operation; offset the target axis to the room with a high priority, and determine the offset distance according to the wall width and the default wall width of the current drawing. Here, traverse each axis object in the axis set A1, take the longest one among the walls mapped to the current axis traversed, and obtain the rooms on both sides mapped to the wall according to the mapping relationship; determine the priority of the rooms on both sides according to the parameter list P, and offset the current axis to the side with a higher priority, and the offset distance = abs (wall width - W2) / 2.

[0077] The method described in the embodiments of the present application can more intuitively mark the width and depth dimensions of each suite type through the trimming operation, and can selectively extend the generated axis according to the specific layout of the building plan room, and trim the axis that does not need to be extended.

[0078] In some embodiments of the present application, when performing a clipping operation, the rooms whose names are within the set of room names that need to mark axes are added to the first room set; based on the mapping relationship between walls and rooms, the walls to which all rooms in the first room set are mapped are added to the first wall set; the outer contour of the first wall set is calculated, and the walls corresponding to the outer contour are added to the second wall set; and the axis to which the wall mapped in the second axis result is not in the second wall set is used as the target clipping axis. Here, traverse all rooms. If the room name is in the set of room names that need to be marked with axes, add the room to the room set T; according to the mapping relationship between walls and rooms, add the walls mapped by all rooms in the room set T to the first wall set T1; calculate the outer contour of the first wall set T1, and add the wall corresponding to the outer contour to the second wall set T2. The specific process is as follows: obtain all two-dimensional closed domains enclosed by the edge lines of the walls in the T1 set; take the edge lines of the union of these domains as the outer contour lines of the T1 set; traverse all walls in the T1 set. If the edge lines of the walls overlap with the outer contour lines, add the wall to the set T2. Find the axis that meets the following conditions in the current axis set (second axis result) and add it to the axis set T4: the wall mapped to the axis is not in the wall set T2, and the axis in the axis set T4 is the target clipping axis that needs to be clipped.

[0079] Next, add the walls in the first wall set but not in the second wall set and intersecting with the walls in the second wall set to the third wall set; use the third wall set, the outer contour of the first wall set and the inner contour of the first room set to clip the target clipping axis. Here, add the walls in set T1 but not in set T2 and intersecting with the walls in set T2 to the third wall set T3; use the wall set T3, the outer contour of the wall set T1 and the inner contour of the room set T to clip the objects in the axis set T4: Step 1), for each axis object in T4, find the intersection point with the inner contour lines of all rooms in T and the outer contour of T1, and break the axis into several segments at the intersection point. Step 2), for each segment after being interrupted in step 1), determine whether it is located inside the inner contour of any room in the room set T (excluding the boundary) or outside the outer contour of the wall set T1 (excluding the boundary), if so, delete this segment. Step 3), for each axis object in T3, find the intersection point with the inner contour lines of all rooms in T, and break the axis into several segments at the intersection point. Step 4), for each segment after being broken in step 3), determine whether it is inside the inner contour of any room in the room set T (excluding the boundary), if so, delete this segment. Step 5), for each segment of the result in step 4), determine whether it is outside the outer contour of T1 (excluding the boundary) and does not intersect with the edge line of any wall in T3, if so, delete this segment.

[0080] Figure 4 A schematic diagram of a method for automatically optimizing the drawing of a residential building plane axis network in a specific embodiment of the present application is shown, which reads the control parameters of the current optimization operation, reads the axis network information, wall information, and room information in the CAD drawing; associates all axes with walls, and walls with rooms; selects axes that do not need to be generated, and deletes the axes that do not need to be generated from the existing axis network; selects parallel axes with similar distances in the results after deletion for merging operations; selects axes that should not be generated in the center of the wall in the results after merging operations for offset operations; selects axes that should not be extended in the results after offset operations for clipping operations, and draws the calculation results in the drawing. This solves the problem that the axis network generated by the existing drawing software is inaccurate and cannot directly meet the drawing standards of the building plan.

[0081] In addition, an embodiment of the present application also provides a computer-readable medium on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement the aforementioned method for automatically optimizing the drawing of a plane axis grid.

[0082] In one embodiment of the present application, a device for automatically optimizing and drawing a plane axis grid is also provided, the device comprising:

[0083] one or more processors; and

[0084] A memory storing computer readable instructions, which, when executed, cause the processor to perform the operations of the method as described above.

[0085] For example, the computer readable instructions, when executed, cause the one or more processors to:

[0086] According to the axis grid information, wall information and room information in the current CAD drawing, establish the mapping relationship between the axis and the wall, and the mapping relationship between the wall and the room;

[0087] Filtering the axis according to the read control parameters of this optimization operation, the mapping relationship between the axis and the wall, and the mapping relationship between the wall and the room to obtain a filtered axis;

[0088] According to the control parameters of this optimization operation, the filtered axes are merged, offset and trimmed to obtain the optimization result;

[0089] Draw the optimization results in the current CAD drawing.

[0090] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

[0091] It should be noted that the present application can be implemented in software and / or a combination of software and hardware, for example, it can be implemented using an application-specific integrated circuit (ASIC), a general-purpose computer or any other similar hardware device. In one embodiment, the software program of the present application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of the present application (including related data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and the like. In addition, some steps or functions of the present application can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform various steps or functions.

[0092] In addition, a part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. The program instruction for calling the method of the present application may be stored in a fixed or removable recording medium, and / or transmitted through a data stream in a broadcast or other signal-bearing medium, and / or stored in a working memory of a computer device that runs according to the program instruction. Here, according to an embodiment of the present application, a device is included, the device including a memory for storing computer program instructions and a processor for executing program instructions, wherein, when the computer program instruction is executed by the processor, the device is triggered to run the method and / or technical solution based on the aforementioned multiple embodiments according to the present application.

[0093] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or essential features of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural.

Claims

1. A method for automatically optimizing the drawing of a plane axis grid, characterized in that: The method comprises: According to the axis grid information, wall information and room information in the current CAD drawing, establish the mapping relationship between the axis and the wall, and the mapping relationship between the wall and the room; Filtering the axis according to the read control parameters of this optimization operation, the mapping relationship between the axis and the wall, and the mapping relationship between the wall and the room to obtain a filtered axis; According to the control parameters of this optimization operation, the filtered axes are merged, offset and trimmed to obtain the optimization result; Draw the optimization results in the current CAD drawing; Among them, according to the control parameters of this optimization operation, the filtered axes are merged, offset and trimmed, including: Performing a merging operation on the target parallel axes in the filtered axes according to the control parameters of this optimization operation to obtain a first axis result, wherein the distance between the target parallel axes is less than a preset threshold; Determine the target axis that needs to be offset in the first axis result according to the control parameters of this optimization operation, calculate the offset direction and distance of each target axis, offset the target axis according to the offset direction and distance, and obtain the second axis result; Determine the target clipping axis in the second axis result according to the room information and the mapping relationship between the wall and the room, and clip the target clipping axis; The target parallel axes in the filtered axes are merged according to the control parameters of this optimization operation, including: Determine the distance threshold based on the default wall width of the current drawing in the control parameters of this optimization operation; Group the target parallel axes among the filtered axes according to the parallel relationship; In each group, all pairs of axes whose parallel distance is less than the distance threshold are screened out; Determine the wall to which the paired axes are mapped according to the mapping relationship between the axes and the walls; The number of walls with a width greater than a distance threshold among the mapped walls is determined, and the axis lines to be merged in each pair of axes are selected according to the number, and the merged axis lines are merged, and the mapping relationship between the merged axis lines and the walls is updated.

2. The method according to claim 1, characterized in that: According to the axis grid information, wall information and room information in the current CAD drawing, establish the mapping relationship between the axis and the wall, and the mapping relationship between the wall and the room, including: Get the axis grid information, wall information and marked text information in the current CAD drawing; Identify the room according to the wall information and text information to obtain room information; Determine all axes according to the axis grid information, determine the wall to which the axis is mapped according to the baseline of each axis and each wall, and establish a mapping relationship; The room to which the wall is mapped is determined according to the inner contour of the room and the edge line of the wall, and a mapping relationship is established.

3. The method according to claim 2, characterized in that The room is identified according to the wall information and the text information to obtain room information, including: Calculate the edge lines of all walls in the current CAD drawing according to the baseline and width in the wall information; Determine the two-dimensional closed area enclosed by the edge lines of all walls; The text is assigned to the room where it is located according to the room face area where the coordinates of the center point of each text information are located, and the room name of the room is obtained.

4. The method according to claim 1, characterized in that: The control parameters of this optimization operation include the minimum width and minimum length of the wall for which the axis needs to be generated. The axis is filtered according to the read control parameters of this optimization operation, the mapping relationship between the axis and the wall, and the mapping relationship between the wall and the room, including: Find all walls to which each axis is mapped according to the mapping relationship between the axis and the wall; Merge walls according to the center lines and widths of all mapped walls; Find the target wall from the merged walls according to the minimum width and minimum length of the wall that needs to generate the axis; The axis that has a mapping relationship with the target wall is used as the target deletion axis, and the target deletion axis is deleted from the axis grid.

5. The method according to claim 1, characterized in that Determine the target axis that needs to be offset in the first axis result according to the control parameters of this optimization operation, including: The first axis results are traversed to filter out the target axis that needs to be offset, wherein the target axis satisfies the following conditions: the widths of all walls mapped to the target axis are smaller than the default wall width of the current drawing.

6. The method according to claim 5, characterized in that Calculate the offset direction and distance of each target axis, including: Determine the target wall with the longest length among the walls mapped in the target axis; Obtaining the rooms on both sides to which the target wall is mapped according to the mapping relationship between the wall and the room; Determine the room with the highest priority among the rooms on both sides according to the room priority list in the control parameters of this optimization operation; Offset the target axis to the room with higher priority and determine the offset distance based on the wall width and the default wall width of the current drawing.

7. The method according to claim 1, characterized in that The target clipping axis in the second axis result is determined according to the room information and the mapping relationship between the wall and the room, including: Add the rooms whose names are in the set of room names that need to be marked with axes to the first room set; According to the mapping relationship between walls and rooms, the walls mapped to all rooms in the first room set are added to the first wall set; Calculate the outer contour of the first wall set, and add the wall corresponding to the outer contour to the second wall set; The axis of the wall mapped in the second axis result but not in the second wall set is used as the target clipping axis.

8. The method according to claim 7, characterized in that Clip the target clipping axis, including: Add the walls in the first wall set that are not in the second wall set and intersect with the walls in the second wall set to the third wall set; The target clipping axis is clipped using the third wall set, the outer contour of the first wall set, and the inner contour of the first room set.

9. A device for automatically optimizing the drawing of a plane axis grid, characterized in that: The device comprises: one or more processors; and A memory storing computer readable instructions which, when executed, cause the processor to perform the operations of the method as claimed in any one of claims 1 to 8.

10. A computer-readable medium having computer-readable instructions stored thereon, wherein the computer-readable instructions can be executed by a processor to implement the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Axial network generation method, electronic device and storage medium

    CN109670469A

  • Axis net identification method and device, equipment and storage medium

    CN114282288A

  • Axis net drawing system and method based on house type diagram

    CN115238341A

  • Axis network generation method and device, equipment and storage medium

    CN117473633A

  • Systems and methods for automating conversion of drawings to indoor maps and plans

    EP4242587A1