Automatic marking method and device for external size of building plane and medium
By identifying and adjusting the annotation information of the external components of the building plane, the problem of unbalanced dimension annotation in the existing technology is solved, the comprehensiveness and aesthetics of the annotation are achieved, and the rationality and clarity of the annotation are ensured.
Patent Information
- Application Number
- CN202510895127.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-09-30
AI Technical Summary
In the prior art, the dimension markings of architectural floor plans are too dense, with redundant and missing markings, resulting in an unbalanced layout and not conforming to the drafting standards and practices of the design engineering industry.
By identifying the categories of external components of the building plane, determining the annotation information and location, performing initial annotation, and making avoidance adjustments when there are overlaps, the annotations are aligned and arranged reasonably, including splitting, retaining or removing annotation segments, moving text base points to avoid occlusion, and using priority adjustments to generate the optimal layout.
It achieves comprehensiveness and accuracy in building plan dimension marking, avoids overlap, improves marking efficiency and aesthetics, and ensures rationality and clear readability of marking layout.
Smart Images

Figure CN120724549A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of architectural design, and in particular to a method, device, and medium for automatically marking the external dimensions of a building plane. Background Art
[0002] Architectural floor plans require numerous dimensions for walls, rooms, and key components. Current technologies generate dimensions in localized locations, resulting in overly dense and redundant dimensions. Furthermore, dimensions are sometimes missing, resulting in an unbalanced overall layout and failing to meet the drafting standards and conventions of the design engineering industry. Summary of the Invention
[0003] In order to solve the above problems, the present application proposes a method for automatic annotation of the external dimensions of a building plane, including: determining the components outside the building plane, and identifying the components to determine the category of the components; determining the annotation information corresponding to the components according to the category, the annotation information including the annotation content and the annotation position, and initially annotating the components according to the annotation information; determining the annotation placement range, aligning the annotations according to the annotation placement range, and determining whether there is annotation overlap based on the aligned annotations; if there is annotation overlap, making avoidance adjustments to the annotations.
[0004] In one example, determining the annotation placement range and performing annotation alignment based on the annotation placement range specifically includes: determining the bounding box of the building plane, and determining the long side range and short side range of the building plane based on the bounding box; determining the placement range corresponding to the external annotation, and determining the alignment position based on the placement range, so as to perform annotation alignment based on the alignment position, the long side range, and the short side range.
[0005] In one example, the method further includes: determining whether there is a labeling line dividing the two overlapping segments of the labeling; if there is no labeling line dividing the two ends of the overlapping segment, performing overlap avoidance; if there is a labeling line dividing the two ends of the overlapping segment, determining the dividing situation, and retaining the labeling according to the dividing situation.
[0006] In one example, retaining the annotations according to the segmentation situation specifically includes: determining the segmentation situation, the segmentation situation including overlapping of multiple segmented annotation segments, overlapping of multiple complete annotation segments, and overlapping of multiple complete annotation segments and segmented annotation segments; if multiple segmented annotation segments overlap, retaining any one of the multiple segmented annotation segments; if multiple complete annotation segments overlap, retaining any one of the multiple complete annotation segments; if multiple complete annotation segments overlap with the segmented annotation segments, removing the complete annotation segments and retaining the segmented annotation segments.
[0007] In one example, after performing overlap avoidance, the method further includes: determining whether the annotations after overlap avoidance have overlap; if overlap exists, determining component priorities, and moving the annotation segments in a hierarchical manner according to the component priorities.
[0008] In one example, the method further includes: determining an occlusion condition of a circumscribed rectangle of the marked number, and if the circumscribed rectangle is occluded, moving a base point of the text.
[0009] In one example, the method further includes: determining pre-set component attributes, the component attributes including component name, identification method, and identification annotation segment, identifying the component according to the component attributes, and classifying and saving the identified component.
[0010] In one example, the method further includes: recording key parameters and results in the annotation process, and verifying the generated annotation results, including but not limited to recognition results, annotation positions, and avoidance adjustments.
[0011] On the other hand, the present application also proposes an automatic marking device for the external dimensions of a building plane, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the automatic marking device for the external dimensions of a building plane to execute: a method as described in any one of the above examples.
[0012] On the other hand, the present application also proposes a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to perform the method described in any one of the above examples.
[0013] This application ensures comprehensive labeling by identifying components and determining labels; avoids overlaps through label alignment and avoidance adjustments, achieves a reasonable layout, clear readability, and improves labeling efficiency and accuracy. This application traverses all planar external components that need to be labeled to ensure that there are no omissions, and at the same time merges overlapping dimensions to avoid repeated and redundant labeling, making the dimensioning layout more reasonable. The movable range of the labeling segment is determined, and a reasonable alignment position is obtained based on the classic algorithm of non-overlapping intervals, making the dimensioning more neat and beautiful on the drawing. By moving the text base point to avoid overlap with the dimension line or adjacent labeling numbers, the clarity and readability of the labeling are ensured. Through the logical steps of labeling avoidance, a reasonable evaluation and scoring rule is designed, and multiple positions are generated according to priority within the allowed avoidance range, and finally a layout plan with the highest overall score is generated, so that the dimensioning finally approaches or reaches the global optimal overall layout. This application is not only applicable to residential building floor plans, but can also extend the priority of components outside the residential plan to the priority of components outside the public building plan, achieving the same or similar dimensioning effects, with strong scalability. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0015] Figure 1 Schematic diagram of a flow chart of a method for automatically marking the external dimensions of a building plane in an embodiment of the present application;
[0016] Figure 2 This is a schematic diagram of an automatic marking device for the external dimensions of a building plane in an embodiment of the present application. DETAILED DESCRIPTION
[0017] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0018] The following describes in detail the technical solutions provided by various embodiments of the present application in conjunction with the accompanying drawings.
[0019] like Figure 1 As shown, in order to solve the above problems, an embodiment of the present application provides a method for automatically marking the external dimensions of a building plane, the method comprising:
[0020] S101. Determine components outside a building plane, and identify the components to determine the categories of the components.
[0021] In the pre-set annotation interface, click the "External Dimensions" button under the "Plane Annotation" function to automatically generate dimensions for various components on the building's exterior. These dimensions are identified and annotated based on pre-set annotation properties. The annotation properties for all annotated objects and related elements are shown in Table 1 below.
[0022] Table 1 Annotation attributes
[0023]
[0024]
[0025]
[0026] S102: Determine annotation information corresponding to the component according to the category, the annotation information including annotation content and annotation position, and perform initial annotation on the component according to the annotation information.
[0027] The view scale factor needs to be considered in operations such as drawing, aligning, and avoiding dimension annotations. Assuming that the software view scale is 1:N, if you move x mm on the printed drawing, you should move x*N mm in the software view, which is simplified to xN. In addition, the default building plan has been restored to a horizontal and vertical orthogonal system, which does not affect the actual project application, and the corresponding relationship can be achieved through rotation transformation mapping. Based on the BoundingBox of the building plan, the long and short side ranges are defined. The movable range of the dimension line position is 4mm to 8mm outside the annotated component, which is 4N to 8N after considering the view scale N.
[0028] S103: Determine the label placement range, align the labels according to the label placement range, and determine whether there is label overlap based on the aligned labels.
[0029] After identifying the annotation object and the annotation segment, the annotation is first performed according to the default position. After identifying the annotation object and the annotation segment, the placement range of each external annotation is determined, that is, the long side range and the short side range, and alignment is performed according to the movable range.
[0030] In one embodiment, each annotation is first matched to its movable range and sorted by the minimum movable range. Then, the next movable range in the list is checked to determine whether the current interval intersects with the next movable range. If not, the current alignment interval is updated. If so, the current interval result is recorded and the next movable range is used as the alignment interval. Then, it is determined whether the traversal is complete. If not, the above steps are continued. If completed, each annotation is matched to the corresponding alignment interval. Then, it is determined whether there is only one annotation in the alignment interval. If so, the annotation does not need to be moved. If not, all annotations are moved to the minimum alignment interval, and the process ends. The target position is placed closest to the building. That is, if the external dimension is below the drawing, the maximum value of the Y-axis interval is taken; if the external dimension is above the drawing, the minimum value of the Y-axis interval is taken. At this time, there may be a lot of overlap in the external dimension annotations.
[0031] S104: If there is overlap of the markings, make avoidance adjustments to the markings.
[0032] If overlap occurs after moving the dimension annotation, first read the overlapping segment to determine whether there is a dimension line dividing the two ends, so as to determine whether the dimension annotation segment can be merged: if there is no dimension line dividing the two ends, overlap avoidance is required; if there is a dimension line dividing the two ends, it is handled in three cases: first, when multiple split dimension segments overlap, if the split dimension segments are exactly the same, only one can be retained; second, when there are multiple complete dimension segments overlapping, one complete dimension segment is retained; third, when there are multiple complete dimension segments and split dimension segments overlapping, the complete dimension segments are removed and the split dimension segments are retained. If there are still overlapping dimension segments at this time, overlap avoidance is required.
[0033] To further determine if the annotation overlaps, it is necessary to evaluate whether the bounding rectangle of the annotation number is obstructed. For unobstructed rectangles, no avoidance is required; for obstructed rectangles, annotation avoidance is required. The avoidance principle is: when the annotation text coincides with the dimension line or the adjacent annotation number, the text base point is moved to avoid obstruction between the text and the dimension line. The specific method for determining overlap is: calculate the boundingbox of the text based on the number of characters and font size of the number, and compare it with the relationship between the text value. If there is obstruction, for example, at a font size of 3.0mm, if the distance is less than 200mm, it is considered that the text conflicts with the dimension line, and the text base point needs to be moved.
[0034] In one embodiment, a check is performed to determine whether the bounding rectangle of the outermost digit is obstructed. If so, the outermost digit is moved to the unmarked side. If obstruction still exists after the movement, each obstructed digit is checked sequentially from left to right and from top to bottom, following the principle of moving upward first and then downward: if the marked digit is obstructed by the marked line or the previous marked digit, it is moved upward; if it is still obstructed by the previous digit that has been moved upward after moving upward, it is moved downward instead; if it is still obstructed by the previous digit that has been moved downward after moving downward, the marked digit remains unchanged, retaining the obstruction with the marked line, and the judgment is repeated for subsequent marked digits until all overlapping obstructions are eliminated.
[0035] In one embodiment, after completing the annotation merge and identifying the annotation segments that require overlap avoidance, the overlap avoidance operation begins. First, if the overlap is caused by an alignment operation, a determination is made as to whether the annotation segments can be moved to the other side of the component for annotation, according to the priority order of "air conditioner position - solar panel - awning - ramp - steps - exterior wall doors and windows." If the other side is still within the annotable range of the external dimensions, the move is executed. If there is insufficient space on the other side or the annotated segment is already included, the move is impossible and the second step is executed. In the second step, the annotated segments are moved 8N toward the corresponding axis head, in the order of priority described above.
[0036] In one embodiment, the dimension line is moved in the Y-axis direction to achieve horizontal alignment of the horizontal annotations, and a list rangeList containing the dimension lines and their placement areas is constructed and sorted according to the minimum value of the dimension line movement range; then, the dimension annotations are grouped using the solution to the shooting ball problem, and related lists are initialized to store the grouped label groups, value ranges, etc. By traversing rangeList, the groups are determined based on whether the line segments Range overlap, and the movable range is updated; then, a new list targetLocation is created to store the positions of the aligned dimension lines, and the groups are traversed to determine the movement mode of each group of dimension lines. If there is only one element in the group, the movement vector is 0, otherwise the movement vector is calculated according to the lowest point in the acceptable value range; finally, data flattening preparation is performed, the grouped annotation information is sorted into newList, and the movement vector of each annotation is extracted and stored in oMoveVector as output.
[0037] like Figure 2 As shown, the embodiment of the present application further provides an automatic marking device for the external dimensions of a building plane, comprising:
[0038] at least one processor; and,
[0039] a memory communicatively connected to at least one processor; wherein,
[0040] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by the at least one processor to enable an automatic marking device for the external dimensions of a building plan to perform the method described in any one of the above embodiments.
[0041] An embodiment of the present application further provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to perform the method described in any one of the above embodiments.
[0042] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures such as diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD through their own programming, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.
[0043] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also understand that in addition to implementing the controller in pure computer-readable program code, the controller can be implemented in the form of logic gates, switches, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the means for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the means for implementing various functions can be considered as both a software module implementing the method and a structure within the hardware component.
[0044] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0045] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0046] The various embodiments in this application are described in a progressive manner. Similar portions between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device and medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For relevant portions, refer to the descriptions of the method embodiments.
[0047] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects to their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0048] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0049] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0050] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0051] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0052] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0053] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0054] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The 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 memory (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 disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic 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. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0055] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0056] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A method for automatically marking the external dimensions of a building plane, characterized in that: include: Determining components outside the building plan and identifying the components to determine the type of the components; Determining the annotation information corresponding to the component according to the category, the annotation information including annotation content and annotation position, and initially annotating the component according to the annotation information; Determining the label placement range, aligning the labels according to the label placement range, and determining whether there is label overlap based on the aligned labels; If there is overlap of annotations, avoidance adjustment is performed on the annotations.
2. The method according to claim 1, characterized in that Determining the label placement range and aligning the labels according to the label placement range specifically includes: Determine a bounding box of the building plane, and determine a long side range and a short side range of the building plane according to the bounding box; A placeable range corresponding to the external annotation is determined, and an alignment position is determined according to the placeable range, so as to perform annotation alignment according to the alignment position, the long side range, and the short side range.
3. The method according to claim 1, characterized in that The method further comprises: Determining whether two overlapping segments of the annotation are separated by an annotation line; If there is no marking line dividing the two ends of the overlapping segment, overlap avoidance is performed; If there are annotation line divisions at both ends of the overlapping segment, the division situation is determined, so as to retain the annotations according to the division situation.
4. The method according to claim 3, characterized in that The annotations are retained according to the segmentation conditions, including: Determining a segmentation condition, wherein the segmentation condition includes overlapping of multiple segmented labeled segments, overlapping of multiple fully labeled segments, and overlapping of multiple fully labeled segments and segmented labeled segments; If multiple segmented annotation segments overlap, any one of the multiple segmented annotation segments is retained; If multiple fully annotated segments overlap, any one of the fully annotated segments is retained; If multiple fully labeled segments and split labeled segments overlap, the fully labeled segments are removed and the split labeled segments are retained.
5. The method according to claim 3, characterized in that After performing overlap avoidance, the method further includes: Determining whether the annotations after overlap avoidance exist; If there is overlap, the component priority is determined and the marked segments are moved hierarchically according to the component priority.
6. The method according to claim 1, characterized in that The method further comprises: Determine the occlusion of the bounding rectangle of the labeled number. If the bounding rectangle is blocked, move the text base point.
7. The method according to claim 1, characterized in that The method further comprises: Determine pre-set component attributes, including component name, identification method, and identification mark segment, identify the component according to the component attributes, and classify and save the identified components.
8. The method according to claim 1, characterized in that The method further comprises: Record key parameters and results during the annotation process, and verify the generated annotation results, including but not limited to recognition results, annotation positions, and avoidance adjustments.
9. An automatic marking device for the external dimensions of a building plane, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the automatic marking device for the external dimensions of a building plan to perform: the method according to any one of claims 1 to 8.
10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions are configured to: perform the method according to any one of claims 1 to 8.
Citation Information
Cited By
Architectural planar graph size marking method and device based on tabu search and medium
CN121562025A
A method, equipment, and medium for taboo search of architectural floor plan dimensioning
CN121562025B
