CN114565703A - Method, device and equipment for adjusting centralized labeling and readable storage medium - Google Patents

Method, device and equipment for adjusting centralized labeling and readable storage medium Download PDF

Info

Publication number
CN114565703A
CN114565703A CN202210214251.4A CN202210214251A CN114565703A CN 114565703 A CN114565703 A CN 114565703A CN 202210214251 A CN202210214251 A CN 202210214251A CN 114565703 A CN114565703 A CN 114565703A
Authority
CN
China
Prior art keywords
target
primitives
primitive
building
labeling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210214251.4A
Other languages
Chinese (zh)
Inventor
闫文俊
高猛
李鹏
周远顺
连静
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Glodon Co Ltd
Original Assignee
Glodon Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Glodon Co Ltd filed Critical Glodon Co Ltd
Priority to CN202210214251.4A priority Critical patent/CN114565703A/en
Publication of CN114565703A publication Critical patent/CN114565703A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/13Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Structural Engineering (AREA)
  • Computational Mathematics (AREA)
  • Civil Engineering (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Architecture (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method, a device, equipment and a readable storage medium for adjusting centralized labeling, wherein the method comprises the following steps: acquiring a building two-dimensional graph to be processed, and identifying a target centralized labeling primitive and a target component primitive corresponding to the target centralized labeling primitive from the building two-dimensional graph; judging whether the target set labeling graphics primitives have overlapping relations with other graphics primitives in the building two-dimensional graph or not; under the condition that an overlapping relation exists, generating a plurality of candidate points in the building two-dimensional graph according to the position of the central point of the target component primitive; sequentially moving the target centralized labeling graphics primitives to each candidate point until the moved target centralized labeling graphics primitives do not have an overlapping relation with other graphics primitives in the building two-dimensional graph; the invention realizes automatic overlapping avoidance adjustment of the labels, reduces the workload of designers and ensures that the adjusted construction drawing meets the design requirement.

Description

Method, device and equipment for adjusting centralized labeling and readable storage medium
Technical Field
The present invention relates to the field of computer aided design technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for adjusting centralized labeling.
Background
In the process of generating the two-dimensional construction drawing by using the computer aided design software, when the design software generates the label of one component, the generated label is placed based on the position of the single component, and the collision relation among a plurality of labels of different components can not be checked, so that the problem of label character overlapping exists in the generated two-dimensional construction drawing, and the construction drawing is disordered and does not meet the design requirement of the construction drawing.
In addition, the computer aided design software on the market supports basic operations such as moving, translating and turning of a single label, but has no function of performing overlapping processing on the whole image batch, and in the actual engineering design work, a designer needs to manually move the label, but the problems of repeated work content and large workload exist.
Therefore, how to automatically perform overlapping avoidance adjustment on all labels in the two-dimensional construction drawing of the building becomes a technical problem which needs to be solved urgently by the technical personnel in the field.
Disclosure of Invention
The invention aims to provide a method, a device, equipment and a readable storage medium for adjusting centralized labeling, which solve the problem that the labeling in a two-dimensional construction drawing of a building can not automatically avoid pain points, realize the automatic overlapping avoidance adjustment of the labeling, reduce the workload of designers and enable the adjusted construction drawing to meet the design requirements.
According to an aspect of the present invention, there is provided a method for adjusting centralized labeling, the method comprising:
acquiring a building two-dimensional graph to be processed, and identifying a target centralized labeling primitive and a target component primitive corresponding to the target centralized labeling primitive from the building two-dimensional graph;
judging whether the target set labeling graphics primitives have overlapping relations with other graphics primitives in the building two-dimensional graph or not;
under the condition that an overlapping relation exists, generating a plurality of candidate points in the building two-dimensional graph according to the position of the central point of the target component primitive;
and sequentially moving the target centralized labeling graphics primitives to each candidate point until the moved target centralized labeling graphics primitives do not have an overlapping relation with other graphics primitives in the building two-dimensional graph.
Optionally, the determining whether the target set labeling primitive has an overlapping relationship with other primitives in the two-dimensional building map includes:
determining a first area where the marking characters in the target concentrated marking graphic primitive can not be located on the building two-dimensional graph, and forming a first enclosure box of the first area;
determining a second area where the marking lead wire can not be located in the target concentrated marking graphic element on the building two-dimensional graph, and forming a second enclosure box of the second area;
and if the bounding box marked with the characters is overlapped with the first bounding box and/or the bounding box marked with the leads is overlapped with the second bounding box, judging that an overlapping relation exists.
Optionally, the determining whether the target set labeling primitive has an overlapping relationship with other primitives in the two-dimensional building map includes:
determining a first area in which the marking characters in the target concentrated marking graphic primitive cannot be located and a second area in which the marking lead lines in the target concentrated marking graphic primitive cannot be located on the building two-dimensional graph;
drawing a grid on the building two-dimensional graph to obtain grid points, setting the grid points in the first area as first collision points and setting the grid points in the second area as second collision points;
and if the area of the marked character has a first collision point and/or the area of the marked lead wire has a second collision point, judging that an overlapping relation exists.
Optionally, in the case that there is an overlapping relationship, generating a plurality of candidate points in the building two-dimensional map according to the position of the central point of the target component primitive includes:
the center line of the target component graphic element is taken as a datum line on the building two-dimensional graph, and other datum lines with a first set number are respectively drawn on two sides of the datum line; any two adjacent reference lines are parallel to each other, and the distance between the two adjacent reference lines is a first set value;
drawing a vertical line which is perpendicular to the central line and passes through the central point on the building two-dimensional graph, and respectively drawing other vertical lines with a second set quantity on two sides of the vertical line; wherein any two adjacent vertical lines are parallel to each other, and the distance between the two adjacent vertical lines is a second set value;
and determining an intersection point formed by the intersection of all the reference lines and all the vertical lines, and taking the intersection point as the candidate point.
Optionally, the sequentially moving the target centralized labeling primitives to each candidate point until the moved target centralized labeling primitives do not have an overlapping relationship with other primitives in the two-dimensional building map includes:
numbering each candidate point in sequence according to a preset rule by taking the central point of the target component primitive as a starting point;
and traversing all candidate points in sequence according to the numbering sequence, judging whether the moved target concentrated labeling graphics primitive has an overlapping relation with other graphics primitives in the two-dimensional building graph when the anchor point of the target concentrated labeling graphics primitive moves to the currently traversed candidate point, if so, continuously traversing the next candidate point, and if not, stopping traversing.
Optionally, the method further includes:
drawing a reference line on the building two-dimensional graph, and determining all candidate beam primitives intersected with the reference line;
screening out target beam primitives which are parallel to each other and vertical to the reference line from all the candidate beam primitives;
and adjusting the concentrated marking primitives of the target beam primitives based on the central line of each target beam primitive and the reference line so as to enable the concentrated marking primitives of the target beam primitives to be positioned on a straight line.
Optionally, the adjusting, based on the central line of each target beam primitive and the reference line, a centralized labeling primitive of each target beam primitive so that the centralized labeling primitive of each target beam primitive is located on a straight line includes:
drawing other reference lines of a third set number on two sides of the reference line respectively; any two adjacent reference lines are parallel to each other, and the distance between the two adjacent reference lines is a third set value;
sequentially traversing each target beam primitive, and respectively drawing other central lines of a fourth set number on two sides of the central line of the currently traversed target beam primitive; any two adjacent central lines of one target beam primitive are parallel to each other, and the distance between the central lines is a fourth set value;
sequentially traversing each reference line, and forming an intersection set corresponding to the currently traversed reference line by the intersection points of the currently traversed reference line and each central line of all target beam primitives;
respectively calculating the number of legal intersections in the intersection set of each reference line, and determining a target reference line corresponding to the intersection set with the maximum number of legal intersections; when the centralized labeling graphic elements move to legal intersection points, the centralized labeling graphic elements do not have overlapping relation with other graphic elements in the building two-dimensional graph;
and moving the centralized marks of all the target beam primitives to legal intersection points on the target reference line.
In order to achieve the above object, the present invention further provides a device for adjusting centralized labeling, which specifically includes the following components:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a building two-dimensional graph to be processed, identifying target concentrated labeling primitives from the building two-dimensional graph and identifying target component primitives corresponding to the target concentrated labeling primitives;
the judging module is used for judging whether the target centralized labeling graphic element has an overlapping relation with other graphic elements in the building two-dimensional graph;
the generating module is used for generating a plurality of candidate points in the building two-dimensional graph according to the position of the central point of the target component graphic element under the condition that an overlapping relation exists;
and the adjusting module is used for sequentially moving the target centralized labeling graphics primitives to each candidate point until the moved target centralized labeling graphics primitives do not have an overlapping relation with other graphics primitives in the building two-dimensional graph.
In order to achieve the above object, the present invention further provides a computer device, which specifically includes: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of tuning a label in a set as described above when executing the computer program.
In order to achieve the above object, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, realizes the above-mentioned steps of the method for adjusting centralized labeling.
According to the method, the device and the equipment for adjusting the concentrated labeling and the readable storage medium, the concentrated labeling graphics primitives in the two-dimensional building drawing are adjusted, so that the condition that graphics primitives which do not meet the design requirements of drawings are overlapped does not exist in the two-dimensional building drawing, the problem that the labeling in the two-dimensional building drawing cannot be automatically avoided is solved, the automatic overlapping and avoiding adjustment of the labeling is realized, the workload of designers is reduced, and the adjusted construction drawing meets the design requirements. Specifically, a target concentrated labeling primitive which has an overlapping relationship with other primitives is determined according to the position relationship between the primitives in the two-dimensional building drawing, then candidate points for adjusting the target concentrated labeling primitive are formed according to the position of the center point of a target component primitive corresponding to the target concentrated labeling primitive, and finally the target concentrated labeling primitive is sequentially moved to the candidate points until the moved target concentrated labeling primitive does not have an overlapping relationship with other primitives in the two-dimensional building drawing.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is an alternative flow chart of a method for adjusting centralized labeling according to an embodiment;
FIG. 2 is a diagram illustrating how candidate points are determined according to a first embodiment;
FIG. 3 is a schematic flow chart of another alternative method for adjusting centralized annotations according to an embodiment;
FIG. 4 is a flowchart illustrating how to adjust labels in a target set according to a first embodiment;
FIG. 5 is a schematic illustration of a beam leveling construction plan prior to adjustment provided in accordance with an embodiment one;
FIG. 6 is a schematic diagram of how to adjust multiple centralized labels in a beam leveling construction drawing according to a first embodiment;
FIG. 7 is a schematic view of an adjusted beam leveling construction drawing provided in accordance with the first embodiment;
FIG. 8 is a schematic diagram of an alternative structure of the apparatus for adjusting centralized labeling according to the second embodiment;
fig. 9 is a schematic diagram of an alternative hardware architecture of the computer device according to the third embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
The embodiment of the invention provides a method for adjusting centralized labeling, which specifically comprises the following steps as shown in fig. 1:
step S101: the method comprises the steps of obtaining a building two-dimensional graph to be processed, identifying a target centralized labeling primitive from the building two-dimensional graph and identifying a target component primitive corresponding to the target centralized labeling primitive.
Preferably, when the building two-dimensional graph is a beam leveling construction graph, the target component primitive is a beam primitive; the beam leveling construction drawing comprises column primitives, wall primitives, beam primitives, in-situ labeling primitives and centralized labeling primitives.
Since how to identify different types of primitives from a drawing is the prior art, the process of how to identify the centralized labeling primitives and the component primitives from the building two-dimensional drawing is not repeated.
Step S102: and judging whether the target set labeling graphics primitive has an overlapping relation with other graphics primitives in the building two-dimensional graph.
In the prior art, collision check can be carried out by utilizing the geometric boundaries of the component primitives to check and judge collision so as to determine whether the target primitive has an overlapping relationship with other primitives. Two different crash check modes are also provided in this embodiment, as described below, steps a1 through A3 provide a face check mode, and steps B1 through B3 provide a spot check mode.
Specifically, step S102 includes:
step A1: determining a first area where the marked characters in the target concentrated marked graphic primitive cannot be located on the building two-dimensional graph, and forming a first enclosure box of the first area;
wherein, the centralized labeling graphic element is composed of two parts of a labeling character and a labeling lead;
preferably, when the building two-dimensional graph is a beam-leveling construction graph and the target component primitive is a beam primitive, the first area includes: the areas of the beam primitives, the column primitives, the wall primitives, other centralized marking primitives and the in-situ marking primitives are located;
step A2: determining a second area where the marking lead wire can not be located in the target concentrated marking graphic element on the building two-dimensional graph, and forming a second enclosure box of the second area;
preferably, when the two-dimensional building map is a beam-leveling construction map and the target member primitive is a beam primitive, the second area includes: the area of the column graphic primitive, the area of the wall graphic primitive, the area of other centralized marking graphic primitives and the area of the in-situ marking graphic primitive;
step A3: if the bounding box marked with the characters is overlapped with the first bounding box and/or the bounding box marked with the leads is overlapped with the second bounding box, judging that an overlapping relation exists;
it should be noted that, because the construction drawing requires that the centrally labeled text cannot pass through the shear wall, the structural column, the structural beam, the centralized label, and the in-situ label (or the segment label), and the centrally labeled lead cannot pass through the shear wall, the structural column, the centralized label, and the in-situ label (or the segment label), in this embodiment, two unusable areas are formed for the centrally labeled text and the lead, respectively, so as to determine whether the centrally labeled primitive collides with other primitives through the two unusable areas.
Further, step S102 further includes:
step B1: determining a first area in which the marking characters in the target concentrated marking graphic primitive cannot be located and a second area in which the marking lead lines in the target concentrated marking graphic primitive cannot be located on the building two-dimensional graph;
preferably, when the building two-dimensional graph is a beam-leveling construction graph and the target component primitive is a beam primitive, the first area includes: the areas of the beam primitives, the column primitives, the wall primitives, other centralized marking primitives and the in-situ marking primitives are located; the second region includes: the area of the column primitive, the area of the wall primitive, the areas of other centralized marking primitives and the area of the in-situ marking primitive;
step B2: drawing a grid on the building two-dimensional graph to obtain grid points, setting the grid points in the first area as first collision points and setting the grid points in the second area as second collision points;
step B3: and if the area of the marked character has a first collision point and/or the area of the marked lead wire has a second collision point, judging that an overlapping relation exists.
It should be noted that the bounding box and the grid drawn in the present embodiment are only used for collision check, and the bounding box and the grid drawn on the two-dimensional building map are deleted after the collision check is finished.
Step S103: and under the condition that an overlapping relation exists, generating a plurality of candidate points in the building two-dimensional graph according to the position of the central point of the target component element.
Specifically, step S103 includes:
step C1: the center line of the target component graphic element is taken as a datum line on the building two-dimensional graph, and other datum lines with a first set number are respectively drawn on two sides of the datum line; any two adjacent reference lines are parallel to each other, and the distance between the two adjacent reference lines is a first set value;
step C2: drawing a vertical line which is perpendicular to the central line and passes through the central point on the building two-dimensional graph, and respectively drawing other vertical lines with a second set quantity on two sides of the vertical line; wherein any two adjacent vertical lines are parallel to each other, and the distance between the two adjacent vertical lines is a second set value;
step C3: and determining an intersection point formed by the intersection of all the reference lines and all the vertical lines, and taking the intersection point as the candidate point.
As shown in fig. 2, in order to determine candidate points when the target member primitive is a beam primitive, a plurality of reference lines are drawn based on the center line of the beam primitive, a plurality of vertical lines are drawn based on the vertical lines passing through the center point of the beam primitive, and the candidate points are determined based on the reference lines and the vertical lines.
Step S104: and sequentially moving the target centralized labeling graphics primitives to each candidate point until the moved target centralized labeling graphics primitives do not have an overlapping relation with other graphics primitives in the building two-dimensional graph.
Specifically, step S104 includes:
step D1: numbering each candidate point in sequence according to a preset rule by taking the central point of the target component primitive as a starting point;
preferably, the preset rule is that the candidate points are numbered in sequence in a mode of outward diffusion from a central point; in the embodiment, the preset rules are not limited, and the rules for numbering the candidate points in sequence can be set according to actual needs in practical application;
step D2: and traversing each candidate point in sequence according to the numbering sequence, and judging whether the moved target centralized labeling primitive has an overlapping relation with other primitives in the two-dimensional building graph or not when the anchor point of the target centralized labeling primitive moves to the currently traversed candidate point, if so, continuing traversing the next candidate point, and if not, stopping traversing.
The anchor point of the centralized labeling graphic element is a positioning point of the centralized labeling graphic element or a central point of the centralized labeling graphic element.
It should be noted that the reference line and the vertical line drawn in this embodiment are only used for adjusting the centralized labeling, and the reference line and the vertical line drawn on the two-dimensional building map are deleted after the centralized labeling is adjusted.
As shown in fig. 3, in this embodiment, various types of primitives (component primitives and labeled primitives) are analyzed from the beam-leveling construction drawing, then, for a target set of labeled primitives, a first region in which a label character is not usable and a second region in which a label lead is not usable are determined from the beam-leveling construction drawing, and finally, whether the target set of labeled primitives has an overlapping relationship with other primitives is determined by using the first region and the second region, as shown in fig. 3.
As shown in fig. 4, a schematic flow chart of how to adjust the target centralized label when the target centralized label has an overlapping relationship with other primitives is shown, which includes determining a beam primitive (one or more) corresponding to the target centralized label, selecting a target beam primitive from the determined beam primitives, determining candidate points based on a center point of the target beam primitive in the manner of steps C1 to C3, sequentially moving the target centralized label to each candidate point, determining whether the moved target centralized label has an overlapping relationship with other primitives, and if not, ending the flow chart, and completing adjustment of the target centralized label. When one candidate point cannot meet the collision check, judging whether other candidate points exist or not; and if so, continuing to adjust the target centralized marking based on other candidate points. And when other candidate points do not exist, selecting a new target beam primitive from other beam primitives corresponding to the target centralized marking, and continuously adjusting the target centralized marking based on the new target beam primitive. And when other target beam primitives do not exist, selecting a new target concentrated label from the beam leveling construction drawing, and adjusting the new target concentrated label according to the method until the adjustment of all concentrated labels with collision and overlapping problems in the beam leveling construction drawing is completed.
Further, the method further comprises:
step E1: drawing a reference line on the building two-dimensional graph, and determining all candidate beam primitives intersected with the reference line;
step E2: screening out target beam primitives which are parallel to each other and vertical to the reference line from all the candidate beam primitives;
it should be noted that, the target beam primitives may not be absolutely parallel, that is, an included angle between two adjacent target beam primitives is smaller than a preset angle value;
step E3: and adjusting the concentrated marking primitives of the target beam primitives based on the central line of each target beam primitive and the reference line so as to enable the concentrated marking primitives of the target beam primitives to be positioned on a straight line.
Further, step E3 specifically includes:
step E31: drawing other reference lines of a third set number on two sides of the reference line respectively; any two adjacent reference lines are parallel to each other, and the distance between the two adjacent reference lines is a third set value;
step E32: sequentially traversing each target beam primitive, and respectively drawing other central lines of a fourth set quantity at two sides of the central line of the currently traversed target beam primitive; any two adjacent central lines of one target beam primitive are parallel to each other, and the distance between the central lines is a fourth set value;
step E33: sequentially traversing each reference line, and forming an intersection set corresponding to the currently traversed reference line by the intersection points of the currently traversed reference line and each central line of all target beam primitives;
step E34: respectively calculating the number of legal intersections in the intersection set of each reference line, and determining a target reference line corresponding to the intersection set with the maximum number of legal intersections;
when the centralized labeling graphic elements move to legal intersection points, the centralized labeling graphic elements do not have overlapping relation with other graphic elements in the building two-dimensional graph;
step E35: and moving the centralized marks of all the target beam primitives to legal intersection points on the target reference line.
It should be noted that the reference line and the center line drawn in this embodiment are only used for performing overall adjustment on the centralized labeling of the plurality of beam primitives, and the reference line and the center line drawn on the two-dimensional building map are deleted after the centralized labeling of the plurality of beam primitives is adjusted.
In this embodiment, a method for adjusting multiple centralized labels together is further provided, as shown in fig. 5, a reference line is drawn in a beam leveling construction drawing at will, multiple target beam primitives intersecting with and approximately parallel to the reference line are determined, and then, as shown in fig. 6, multiple reference lines are formed on the basis of the reference line, and multiple groups of center line groups are formed on the basis of the center line of each target beam primitive; and finally, grouping the intersection points of the reference lines and the central line according to the reference lines to respectively obtain an intersection point set of each reference line. And finally, based on a reference line corresponding to the intersection point set with the largest number of legal intersection points, adjusting the concentrated labels of all target beam primitives, and adjusting the concentrated labels of all target beam primitives to a straight line (reference line) as shown in fig. 7.
In the embodiment, the concentrated marking primitives in the two-dimensional building map are adjusted, so that the condition that the primitives which do not meet the design requirements of the drawing are overlapped does not exist in the two-dimensional building map, the problem that the marking in the two-dimensional building map cannot be automatically avoided is solved, the automatic overlapping and avoiding adjustment of the marking is realized, the workload of designers is reduced, and the adjusted construction map meets the design requirements. Specifically, a target concentrated labeling primitive which has an overlapping relationship with other primitives is determined according to the position relationship between the primitives in the two-dimensional building drawing, then candidate points for adjusting the target concentrated labeling primitive are formed according to the position of the center point of a target component primitive corresponding to the target concentrated labeling primitive, and finally the target concentrated labeling primitive is sequentially moved to the candidate points until the moved target concentrated labeling primitive does not have an overlapping relationship with other primitives in the two-dimensional building drawing.
Example two
The embodiment of the invention provides a device for adjusting centralized labeling, which specifically comprises the following components:
an obtaining module 801, configured to obtain a building two-dimensional graph to be processed, and identify a target centralized labeling primitive and a target component primitive corresponding to the target centralized labeling primitive from the building two-dimensional graph;
a judging module 802, configured to judge whether the labeled primitive in the target set has an overlapping relationship with other primitives in the two-dimensional building map;
a generating module 803, configured to generate a plurality of candidate points in the two-dimensional building map according to the position of the center point of the target component primitive when there is an overlapping relationship;
and an adjusting module 804, configured to sequentially move the target centralized labeling primitive to each candidate point until the moved target centralized labeling primitive does not have an overlapping relationship with other primitives in the two-dimensional building map.
Specifically, the determining module 802 is configured to:
determining a first area where the marking characters in the target concentrated marking graphic primitive can not be located on the building two-dimensional graph, and forming a first enclosure box of the first area;
determining a second area where the marking lead wire cannot be located in the target concentrated marking graphic element on the building two-dimensional graph, and forming a second enclosure box of the second area;
and if the bounding box marked with the characters is overlapped with the first bounding box and/or the bounding box marked with the leads is overlapped with the second bounding box, judging that an overlapping relation exists.
Further, the determining module 802 is further configured to:
determining a first area in which the marking characters in the target concentrated marking graphic primitive cannot be located and a second area in which the marking lead lines in the target concentrated marking graphic primitive cannot be located on the building two-dimensional graph;
drawing a grid on the building two-dimensional graph to obtain grid points, setting the grid points in the first area as first collision points and setting the grid points in the second area as second collision points;
and if the area of the marked character has a first collision point and/or the area of the marked lead wire has a second collision point, judging that an overlapping relation exists.
Specifically, the generating module 803 is configured to:
the center line of the target component graphic element is taken as a datum line on the building two-dimensional graph, and other datum lines with a first set number are respectively drawn on two sides of the datum line; any two adjacent reference lines are parallel to each other, and the distance between the two adjacent reference lines is a first set value;
drawing a vertical line which is perpendicular to the central line and passes through the central point on the building two-dimensional graph, and respectively drawing other vertical lines with a second set quantity on two sides of the vertical line; wherein any two adjacent vertical lines are parallel to each other, and the distance between the two adjacent vertical lines is a second set value;
and determining an intersection point formed by the intersection of all the reference lines and all the vertical lines, and taking the intersection point as the candidate point.
Further, the adjusting module 804 is configured to:
numbering each candidate point in sequence according to a preset rule by taking the central point of the target component primitive as a starting point;
and traversing each candidate point in sequence according to the numbering sequence, and judging whether the moved target centralized labeling primitive has an overlapping relation with other primitives in the two-dimensional building graph or not when the anchor point of the target centralized labeling primitive moves to the currently traversed candidate point, if so, continuing traversing the next candidate point, and if not, stopping traversing.
Further, the apparatus further comprises:
the processing module is used for drawing a reference line on the building two-dimensional graph and determining all candidate beam primitives intersected with the reference line; screening out target beam primitives which are parallel to each other and vertical to the reference line from all the candidate beam primitives; and adjusting the concentrated marking primitives of the target beam primitives based on the central line of each target beam primitive and the reference line so as to enable the concentrated marking primitives of the target beam primitives to be positioned on a straight line.
Further, the processing module is specifically configured to:
drawing other reference lines of a third set number on two sides of the reference line respectively; any two adjacent reference lines are parallel to each other, and the distance between the two adjacent reference lines is a third set value; sequentially traversing each target beam primitive, and respectively drawing other central lines of a fourth set number on two sides of the central line of the currently traversed target beam primitive; any two adjacent central lines of one target beam primitive are parallel to each other, and the distance between the central lines is a fourth set value; sequentially traversing each reference line, and forming an intersection set corresponding to the currently traversed reference line by the intersection points of the currently traversed reference line and each central line of all target beam primitives; respectively calculating the number of legal intersections in the intersection set of each reference line, and determining a target reference line corresponding to the intersection set with the maximum number of legal intersections; when the centralized labeling graphic elements move to legal intersection points, the centralized labeling graphic elements do not have overlapping relation with other graphic elements in the building two-dimensional graph; and moving the centralized marks of all the target beam primitives to legal intersection points on the target reference line.
EXAMPLE III
The embodiment also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers) capable of executing programs, and the like. As shown in fig. 9, the computer device 90 of the present embodiment includes at least but is not limited to: a memory 901 and a processor 902 communicatively coupled to each other via a system bus. It is noted that FIG. 9 only shows the computer device 90 having components 901 and 902, but it is understood that not all of the shown components are required and that more or fewer components may be implemented instead.
In this embodiment, the memory 901 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., 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 magnetic disk, an optical disk, and the like. In some embodiments, the storage 901 may be an internal storage unit of the computer device 90, such as a hard disk or a memory of the computer device 90. In other embodiments, the memory 901 may also be an external storage device of the computer device 90, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device 90. Of course, the memory 901 may also include both internal and external storage devices for the computer device 90. In the present embodiment, the memory 901 is generally used for storing an operating system and various types of application software installed in the computer device 90. Further, the memory 901 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 902 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 902 generally functions to control the overall operation of the computer device 90.
Specifically, in this embodiment, the processor 902 is configured to execute the program of the method labeled in the adjustment set stored in the memory 901, and when the program of the method labeled in the adjustment set is executed, the following steps are implemented:
acquiring a building two-dimensional graph to be processed, and identifying a target centralized labeling primitive and a target component primitive corresponding to the target centralized labeling primitive from the building two-dimensional graph;
judging whether the target set labeling graphics primitives have overlapping relations with other graphics primitives in the building two-dimensional graph or not;
under the condition that an overlapping relation exists, generating a plurality of candidate points in the building two-dimensional graph according to the position of the central point of the target component primitive;
and sequentially moving the target centralized labeling graphics primitives to each candidate point until the moved target centralized labeling graphics primitives do not have an overlapping relation with other graphics primitives in the building two-dimensional graph.
The specific embodiment process of the above method steps can be referred to as embodiment one, and the detailed description of this embodiment is not repeated herein.
Example four
The present embodiments also provide a computer readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card type memory (e.g., 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 magnetic disk, an optical disk, a server, an App application mall, etc., having stored thereon a computer program that when executed by a processor implements the method steps of:
acquiring a building two-dimensional graph to be processed, and identifying a target centralized labeling primitive and a target component primitive corresponding to the target centralized labeling primitive from the building two-dimensional graph;
judging whether the target set labeling graphics primitives have overlapping relations with other graphics primitives in the building two-dimensional graph or not;
under the condition that an overlapping relation exists, generating a plurality of candidate points in the building two-dimensional graph according to the position of the central point of the target component primitive;
and sequentially moving the target set marking primitives to each candidate point until the moved target set marking primitives do not have an overlapping relation with other primitives in the building two-dimensional graph.
The specific embodiment process of the above method steps can be referred to as embodiment one, and the detailed description of this embodiment is not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for adjusting centralized labeling, the method comprising:
acquiring a building two-dimensional graph to be processed, and identifying a target centralized labeling primitive and a target component primitive corresponding to the target centralized labeling primitive from the building two-dimensional graph;
judging whether the target set labeling graphics primitives have overlapping relations with other graphics primitives in the building two-dimensional graph or not;
under the condition that an overlapping relation exists, generating a plurality of candidate points in the building two-dimensional graph according to the position of the central point of the target component primitive;
and sequentially moving the target centralized labeling graphics primitives to each candidate point until the moved target centralized labeling graphics primitives do not have an overlapping relation with other graphics primitives in the building two-dimensional graph.
2. The method for adjusting centralized labeling according to claim 1, wherein said determining whether the labeled primitive in the target set has an overlapping relationship with other primitives in the two-dimensional building map comprises:
determining a first area where the marking characters in the target concentrated marking graphic primitive can not be located on the building two-dimensional graph, and forming a first enclosure box of the first area;
determining a second area where the marking lead wire can not be located in the target concentrated marking graphic element on the building two-dimensional graph, and forming a second enclosure box of the second area;
and if the bounding box marked with the characters is overlapped with the first bounding box and/or the bounding box marked with the leads is overlapped with the second bounding box, judging that an overlapping relation exists.
3. The method for adjusting centralized labeling according to claim 1, wherein said determining whether the labeled primitive in the target set has an overlapping relationship with other primitives in the two-dimensional building map comprises:
determining a first area in which the marking characters in the target concentrated marking graphic primitive cannot be located and a second area in which the marking lead lines in the target concentrated marking graphic primitive cannot be located on the building two-dimensional graph;
drawing a grid on the building two-dimensional graph to obtain grid points, setting the grid points in the first area as first collision points and setting the grid points in the second area as second collision points;
and if the area of the marked character has a first collision point and/or the area of the marked lead wire has a second collision point, judging that an overlapping relation exists.
4. The method for adjusting centralized labeling according to claim 1, wherein generating a plurality of candidate points in the building two-dimensional map according to the position of the central point of the target component primitive in the case of an overlapping relationship comprises:
the center line of the target component graphic element is taken as a datum line on the building two-dimensional graph, and other datum lines with a first set number are respectively drawn on two sides of the datum line; any two adjacent reference lines are parallel to each other, and the distance between the two adjacent reference lines is a first set value;
drawing a vertical line which is perpendicular to the central line and passes through the central point on the building two-dimensional graph, and respectively drawing other vertical lines with a second set quantity on two sides of the vertical line; wherein any two adjacent vertical lines are parallel to each other, and the distance between the two adjacent vertical lines is a second set value;
and determining an intersection point formed by the intersection of all the reference lines and all the vertical lines, and taking the intersection point as the candidate point.
5. The method for adjusting centralized labeling according to claim 4, wherein the sequentially moving the labeling primitives in the target set to each candidate point until the moved labeling primitives in the target set do not have an overlapping relationship with other primitives in the two-dimensional building map comprises:
numbering each candidate point in sequence according to a preset rule by taking the central point of the target component primitive as a starting point;
and traversing each candidate point in sequence according to the numbering sequence, and judging whether the moved target centralized labeling primitive has an overlapping relation with other primitives in the two-dimensional building graph or not when the anchor point of the target centralized labeling primitive moves to the currently traversed candidate point, if so, continuing traversing the next candidate point, and if not, stopping traversing.
6. The method for adjusting centralized labeling as claimed in claim 1, further comprising:
drawing a reference line on the building two-dimensional graph, and determining all candidate beam primitives intersected with the reference line;
screening out target beam primitives which are parallel to each other and vertical to the reference line from all the candidate beam primitives;
and adjusting the concentrated marking primitives of the target beam primitives based on the central line of each target beam primitive and the reference line so as to enable the concentrated marking primitives of the target beam primitives to be positioned on a straight line.
7. The method for adjusting centralized labeling according to claim 6, wherein the adjusting the centralized labeling primitive of each target beam primitive based on the center line of each target beam primitive and the reference line so that the centralized labeling primitive of each target beam primitive is located on a straight line comprises:
drawing a third set number of other reference lines on two sides of the reference line respectively; any two adjacent reference lines are parallel to each other, and the distance between the two adjacent reference lines is a third set value;
sequentially traversing each target beam primitive, and respectively drawing other central lines of a fourth set number on two sides of the central line of the currently traversed target beam primitive; any two adjacent central lines of one target beam primitive are parallel to each other, and the distance between the central lines is a fourth set value;
sequentially traversing each reference line, and forming intersection point sets corresponding to the currently traversed reference lines by the intersection points of the currently traversed reference lines and the center lines of all the target beam primitives;
respectively calculating the number of legal intersections in the intersection set of each reference line, and determining a target reference line corresponding to the intersection set with the maximum number of legal intersections; when the centralized labeling graphic elements move to legal intersection points, the centralized labeling graphic elements do not have overlapping relation with other graphic elements in the building two-dimensional graph;
and moving the centralized marks of all the target beam primitives to legal intersection points on the target reference line.
8. An apparatus for adjusting centralized labeling, the apparatus comprising:
the acquisition module is used for acquiring a building two-dimensional graph to be processed, identifying target centralized labeling primitives and identifying target component primitives corresponding to the target centralized labeling primitives from the building two-dimensional graph;
the judging module is used for judging whether the target centralized labeling graphic elements have an overlapping relation with other graphic elements in the building two-dimensional graph;
the generating module is used for generating a plurality of candidate points in the building two-dimensional graph according to the position of the central point of the target component graphic element under the condition that an overlapping relation exists;
and the adjusting module is used for sequentially moving the target centralized labeling graphics primitives to each candidate point until the moved target centralized labeling graphics primitives do not have an overlapping relation with other graphics primitives in the building two-dimensional graph.
9. A computer device, the computer device comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202210214251.4A 2022-03-04 2022-03-04 Method, device and equipment for adjusting centralized labeling and readable storage medium Pending CN114565703A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210214251.4A CN114565703A (en) 2022-03-04 2022-03-04 Method, device and equipment for adjusting centralized labeling and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210214251.4A CN114565703A (en) 2022-03-04 2022-03-04 Method, device and equipment for adjusting centralized labeling and readable storage medium

Publications (1)

Publication Number Publication Date
CN114565703A true CN114565703A (en) 2022-05-31

Family

ID=81717033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210214251.4A Pending CN114565703A (en) 2022-03-04 2022-03-04 Method, device and equipment for adjusting centralized labeling and readable storage medium

Country Status (1)

Country Link
CN (1) CN114565703A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115131813A (en) * 2022-07-12 2022-09-30 中国建筑西南设计研究院有限公司 Method and device for confirming numbering position, electronic equipment and storage medium
CN116188629A (en) * 2022-12-12 2023-05-30 贝壳找房(北京)科技有限公司 Method, electronic equipment and medium for generating decoration drawing reference
CN117473591A (en) * 2023-12-26 2024-01-30 合肥坤颐建筑科技合伙企业(有限合伙) Information labeling method, device, equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115131813A (en) * 2022-07-12 2022-09-30 中国建筑西南设计研究院有限公司 Method and device for confirming numbering position, electronic equipment and storage medium
CN116188629A (en) * 2022-12-12 2023-05-30 贝壳找房(北京)科技有限公司 Method, electronic equipment and medium for generating decoration drawing reference
CN116188629B (en) * 2022-12-12 2024-02-27 贝壳找房(北京)科技有限公司 Method, electronic equipment and medium for generating decoration drawing reference
CN117473591A (en) * 2023-12-26 2024-01-30 合肥坤颐建筑科技合伙企业(有限合伙) Information labeling method, device, equipment and storage medium
CN117473591B (en) * 2023-12-26 2024-03-22 合肥坤颐建筑科技合伙企业(有限合伙) Information labeling method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN114565703A (en) Method, device and equipment for adjusting centralized labeling and readable storage medium
CN109165401B (en) Method and device for generating two-dimensional construction map based on civil structure three-dimensional model
CN113010937B (en) Parametric modeling method of member section steel bar and related device
CN112784340B (en) Conversion method and conversion device for construction BIM model
CN113763541B (en) Method and equipment for calculating longitudinal ribs in column and readable storage medium
CN111523531A (en) Word processing method and device, electronic equipment and computer readable storage medium
CN109871743B (en) Text data positioning method and device, storage medium and terminal
CN111913777A (en) Information processing method, information processing device, electronic equipment and storage medium
CN114580350A (en) Text character labeling method and device, computer equipment and storage medium
CN111489283A (en) Picture format conversion method and device and computer storage medium
CN114283436A (en) Table identification method, device, equipment and storage medium
CN113407080A (en) Method and device for generating component label, computer equipment and storage medium
CN114444185A (en) In-situ labeling identification method and device and electronic equipment
CN113722807A (en) Method, device and equipment for calculating style and size of steel bar at beam end
CN111739084B (en) Picture processing method, atlas processing method, computer device, and storage medium
CN111882534A (en) Method and device for identifying line type and readable storage medium
CN112884899A (en) Three-dimensional member generation method and device, computer device and storage medium
CN113026457A (en) Road construction segment determining method and determining device
CN111738116B (en) Method, device, computer equipment and readable storage medium for identifying plate hole area
CN107526333B (en) Method and device for generating chamfer cutting process
CN110750818B (en) Height marking method, system and storage medium for drainage well design
CN116301519B (en) Local information pickup method, device and equipment of rendering entity and storage medium
CN112906572B (en) Identification method and identification device for vertical section in construction drawing
CN114926566A (en) Switching beam in-situ labeling method, device, equipment and readable storage medium
CN113192189B (en) Method, device and equipment for correcting connection relation and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination