CN113407080A - Method and device for generating component label, computer equipment and storage medium - Google Patents

Method and device for generating component label, computer equipment and storage medium Download PDF

Info

Publication number
CN113407080A
CN113407080A CN202110671423.6A CN202110671423A CN113407080A CN 113407080 A CN113407080 A CN 113407080A CN 202110671423 A CN202110671423 A CN 202110671423A CN 113407080 A CN113407080 A CN 113407080A
Authority
CN
China
Prior art keywords
label
text box
tag
lead
display
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
CN202110671423.6A
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 CN202110671423.6A priority Critical patent/CN113407080A/en
Publication of CN113407080A publication Critical patent/CN113407080A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser

Abstract

The invention provides a method and a device for generating a component label, computer equipment and a storage medium, wherein the method comprises the following steps: obtaining a label model according to the type of the first target component, wherein the label model comprises a label lead and a label text box; determining the visible and invisible states of the lead wires of the tag; under the condition that the display and hidden state of the label lead is hidden, determining the display form of the label text box according to the type of the target component and a first preset rule; under the condition that the display and hidden state of the label lead is display, determining the display form of the label text box according to the composition structure of the label lead and a second preset rule; and adding corresponding text in the label text box.

Description

Method and device for generating component label, computer equipment and storage medium
Technical Field
The invention relates to the technical field of engineering drawing, in particular to a method and a device for generating a component label, computer equipment and a storage medium.
Background
The label writing tools of the construction drawing at the present stage are mainly divided into two categories, one is a non-parametric label based on a two-dimensional plane, and the other is a parametric label based on a BIM model. Software which can realize the function in the market at present mainly takes AutoCAD and Revit under the flags of Autodesk company as main materials. In practical applications, the two types of label tags have different defects. On one hand, a sample plate is required to be created firstly based on the non-parametric marking label of the two-dimensional plane, the sample plate is multiplexed at different positions of a picture on the basis of the sample plate, a user needs to manually adjust the sample plate according to the drawing specification, and the workload is large; meanwhile, the user needs to draw the lead manually, and the process is complicated; and the non-parametric marking labels based on two-dimensional planes do not satisfy the situation that the marking labels are automatically updated when certain parameters of the component are changed. On the other hand, the tag lead position generated in the parametric label based on the BIM model is strong in randomness and is not convenient to flexibly control; the lead only covers one dragging point, and a complicated lead-out line shape cannot be set; and in some cases the generated text does not meet the graph specification.
Disclosure of Invention
The invention aims to provide a technical scheme capable of automatically and accurately generating parameterized labels meeting specifications aiming at different components so as to solve the problems in the prior art.
In order to achieve the above object, the present invention provides a component tag generation method, including:
obtaining a label model according to the type of the first target component, wherein the label model comprises a label lead and a label text box;
determining the visible and invisible states of the lead wires of the tag;
under the condition that the display and hidden state of the label lead is hidden, determining the display form of the label text box according to the type of the target component and a first preset rule;
under the condition that the display and hidden state of the label lead is display, determining the display form of the label text box according to the composition structure of the label lead and a second preset rule;
and adding corresponding text in the label text box.
According to the method for generating the member label provided by the invention, the type of the target member comprises a point-shaped member and a linear member, and the step of determining the display form of the label text box according to the type of the target member and a first preset rule under the condition that the display and hidden state of the label lead wire is hidden comprises the following steps:
setting the display position of the label text box at any one of the upper side, the lower side, the left side and the right side of the dot-shaped member; and the text sequence of the label text box is set to be from left to right or from bottom to top;
determining the relative distance between the label text box and the dot-shaped member according to the first preset rule; or
Setting a display position of the label text box on an upper side or a left side of the linear member; and the text sequence of the label text box is set to be from left to right or from bottom to top;
and determining the relative distance between the label text box and the linear member according to the first preset rule.
According to the method for generating the component label provided by the invention, under the condition that the display and hidden state of the label lead wire is display, the step of determining the display form of the label text box according to the composition structure of the label lead wire and a second preset rule comprises the following steps:
determining one or more segments that the tag lead contains;
determining the display position and the character sequence of the label text box according to the segmented direction;
and determining the relative distance between the label text box and the last segment according to the second preset rule.
According to the method for generating the component label provided by the invention, the step of determining one or more segments contained in the lead wire of the label further comprises the following steps:
when any first pinch point in the label lead is moved, all pinch points located before the first pinch point remain stationary, and all pinch points located after the first pinch point follow the first pinch point in a synchronized motion.
According to the method for generating the component tag provided by the invention, the step of determining the display position of the tag text box according to the direction of the segment comprises the following steps:
when the last segment in the segments is in the horizontal direction, if the direction from the first starting point to the first end point of the last segment is the positive direction of the x axis, the lower right corner of the label text box is close to the first end point; if the direction from the first starting point to the first end point of the last segment is the negative direction of the x axis, the lower left corner of the label text box is close to the first end point;
when the last segment in the segments is in the vertical direction, if the direction from the second starting point to the second end point of the last segment is the positive direction of the y axis, the upper left corner of the label text box is close to the second end point; and if the direction from the second starting point to the second end point of the last segment is the negative direction of the y axis, the lower left corner of the label text box is close to the first end point.
According to the method for generating the component tag provided by the invention, when the hidden state of the tag lead is the display state, the step of determining the display form of the tag text box according to the composition structure of the tag lead and a second preset rule further comprises the following steps:
and generating a second label lead and a second label text box corresponding to the mirror image based on the generated first label lead and the first label text box based on a preset reference surface.
According to the method for generating the component label, the step of adding the corresponding text in the label text box provided by the invention comprises the following steps:
the label text box acquires first attribute information of the first target component, and the first attribute information is automatically added into the label text box; and/or
On the basis that the label text box moves from the first target component to a second target component, the label text box acquires second attribute information of the second target component, and replaces the first attribute information in the label text box with the second attribute information.
In order to achieve the above object, the present invention further provides a component tag generation apparatus, including:
a tag model module adapted to obtain a tag model according to a type of a first target component, the tag model including a tag lead and a tag text box;
the lead state module is suitable for determining the visible and invisible states of the tag lead;
the first display module is suitable for determining the display form of the label text box according to the type of the target component and a first preset rule under the condition that the display and hidden state of the label lead wire is hidden;
the second display module is suitable for determining the display form of the label text box according to the composition structure of the label lead wire and a second preset rule under the condition that the display and hidden state of the label lead wire is display;
and the text adding module is suitable for adding corresponding texts in the label text box.
To achieve the above object, the present invention further provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
To achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above method.
Compared with the prior art, the invention has the following beneficial effects:
(1) the label lead wire has high degree of freedom and can realize a visible and hidden state, and the drawn lead wire can freely change the shape through a pinch point, so that the label lead wire is convenient for users to meet the marking requirements in different scenes.
(2) The generation rules of the lead and the label character are set according to the national drawing chart specification, and special conditions such as orthogonality, position transformation, arc-shaped components and the like are covered, so that a user is helped to generate a label, and the label can meet the national standard chart specification.
(3) The label has strong relevance with the body member, and characters in the label can change along with the parameter change of different bodies.
(4) The user can flexibly change the marking label from one main body component to another main body component through operations of dragging, moving, copying and the like, and the user is helped to quickly identify the main body of the marking label in the operation process through a main body highlight mode.
Drawings
FIG. 1 is a flow chart of a first embodiment of a method for generating a component tag according to the present invention;
FIG. 2A is a schematic diagram of a label text box of a dot-shaped member according to a first embodiment of the present invention;
FIG. 2B is a schematic view of a label text box of a linear member according to a first embodiment of the present invention;
FIG. 3 is a schematic flow chart diagram illustrating the determination of a text box in a tag lead display state according to an embodiment of the present invention;
FIG. 4 illustrates several different label lead patterns;
FIG. 5 is a diagram illustrating a correspondence relationship between horizontal leads and text boxes according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating a correspondence between a vertical lead and a text box according to an embodiment of the present invention;
FIG. 7 illustrates a moving relationship between a text box and an individual lead line;
FIG. 8 is a schematic diagram illustrating generation of a mirror label in an embodiment of the invention;
FIG. 9 is a schematic diagram of program modules of a first embodiment of an apparatus for generating a component tag according to the present invention;
fig. 10 is a schematic hardware configuration diagram of a first device for generating a component tag according to the present invention.
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
Referring to fig. 1, the present embodiment provides a method for generating a component tag, including the following steps:
and S100, acquiring a label model according to the type of the first target component, wherein the label model comprises a label lead and a label text box.
The first target member refers to any member in engineering drawings, and the types of the members can be divided according to the shapes of the members, such as a point-shaped member, a linear member and the like. The point-like member may be a lamp, a pillar in a top view, and the like, and the linear member may be a beam, a pillar, and the like in a side view, which is not limited in this embodiment. The embodiment uses the label lead and the label text box together as a label model. The label lead is used for indicating a corresponding first target component, and the label text box is used for adding text corresponding to the first target component, such as component name, component size, component material and the like. When the background receives a tag generation request sent by a user for a certain type of first target component, the corresponding tag model can be returned.
And S200, determining the visible and invisible states of the lead wires of the tag.
The visible and hidden states of the lead wire of the label comprise a visible state and a hidden state. The display state is that a lead line pointing to the target member is normally displayed, and a label text box is displayed at the other end of the lead line. The hidden state means that the lead itself is no longer displayed, and the label text box is only displayed in the vicinity of the first target member. The present embodiment will be described below with reference to the different states of visibility and invisibility of the tag lead wires.
And S300, under the condition that the display and hidden state of the label lead is hidden, determining the display form of the label text box according to the type of the target component and a first preset rule.
In this step, the tag lead is hidden, that is, the component tag only displays the text box and does not display the lead. Fig. 2A is a schematic diagram of a label text box of a dot-shaped member according to a first embodiment of the present invention. As can be seen from fig. 2A, the display position of the label text box corresponding to the dot-shaped member G1 may be set on any one of the upper, lower, left, and right sides. In the example of fig. 2A, the text box itself is defaulted to not being displayed, only the words inside the text box, e.g., "vertical words," are displayed. It will further be seen that the displayed text order is typically arranged to be read from left to right or from bottom to top. This setting may be determined by a first preset rule built in. The first preset rule may be a rule in various aspects, such as a relative distance between the label text box and the dot-shaped member, a text font, a color, a reading sequence, and the like, which are set according to various standard drawing specifications, and may be specifically distinguished according to different application scenarios, which is not limited in this embodiment. Fig. 2B is a schematic diagram of a label text box of the linear member according to the first embodiment of the present invention. In fig. 2B, the linear members include horizontal G2, G3 and vertical G4, G5. It can be seen that, with the linear members G2 and G3 in the horizontal direction, the display position of the tab text box is set on the upper side thereof, and the word reading order is set from left to right, for example, the words "i is an example 200 × 300 of word notation" in fig. 2B; as for the vertical linear members G4 and G5, the display position of the tab text box is set on the left side thereof, and the character reading order is set from bottom to top. Similarly, the rules in various aspects such as the relative distance between the label text box and the linear member, the text font, the color, the reading sequence, and the like may also be set by the first preset rule, and may be specifically distinguished according to different application scenarios, which is not limited in this embodiment.
And S400, under the condition that the display and hidden state of the label lead is display, determining the display form of the label text box according to the composition structure of the label lead and a second preset rule.
In the case of the label lead being in the display state, the label model then displays the lead and the text box simultaneously. Typically the label lead starts near the first target member and ends at one vertex of the text box. FIG. 3 is a schematic flow chart illustrating the determination of a text box in a tag lead line display state according to an embodiment of the present invention. As shown in fig. 3, step S400 includes:
s410: determining one or more segments that the tag lead contains.
The lead in this embodiment may be composed of a plurality of line segments, and the end point of each line segment is referred to as a pinch point. Fig. 4 shows several different label lead patterns. Wherein the label leads can be adjusted by means of dragging the pinch point. The specific adjustment rule includes that when any first pinch point in the label lead is moved, all pinch points located before the first pinch point are kept still, and all pinch points located after the first pinch point move synchronously along with the first pinch point. In fig. 4, the solid line indicates the lead line after the adjustment is completed, and the broken line indicates the lead line during the adjustment.
And S420, determining the display position and the character sequence of the label text box according to the segmented direction.
When the label lead line includes a plurality of segments, the direction of the last segment has a certain correspondence with the label text box. Specifically, when the last segment is in the horizontal direction, if the direction from the first starting point to the first end point of the last segment is the positive direction of the x-axis, the lower right corner of the label text box is close to the first end point; and if the direction from the first starting point to the first end point of the last segment is the negative direction of the x axis, the lower left corner of the label text box is close to the first end point. Fig. 5 is a schematic diagram illustrating a correspondence relationship between a horizontal lead line and a text box according to an embodiment of the present invention.
When the last segment is in the vertical direction, if the direction from the second starting point to the second end point of the last segment is the positive direction of the y axis, the upper left corner of the label text box is close to the second end point; and if the direction from the second starting point to the second end point of the last segment is the negative direction of the y axis, the lower left corner of the label text box is close to the first end point. Fig. 6 is a schematic diagram illustrating a correspondence relationship between a vertical lead and a text box according to an embodiment of the present invention.
It should be noted that, for the oblique label lead, there is a certain corresponding relationship between the lead and the text box, which is also called as an adsorption relationship. When the text box frame is dragged, the lead wire rotates around the text box. FIG. 7 illustrates the movement relationship between a text box and an individual lead. As shown in fig. 7, when the text frame is continuously dragged, the inclined lead lines are correspondingly located at different positions of the frame. The specific adsorption rule comprises that when the lead inclination angle is (0, 10), the lead is automatically leveled; the inclination angles (10, 30) and (30, 37.5) are automatically adsorbed on a 30-degree line; the inclination angles (37.5, 45) and (45, 52.5) are automatically adsorbed on a 45-degree line; the inclination angles (52.5, 60) and (60, 80) are automatically adsorbed on a 60-degree line; automatically marking the vertical angle at the inclination angle (80, 90) and taking effect on the currently drawn leading-out line; the adsorption point of the inclination angle (0, 90) is a left lower angular point; adsorbing a point right below the substrate by an inclination angle of 90 degrees; the inclined angles (90, 180) adsorb the right lower corner points; adsorbing a right point by an inclination angle of 180 degrees; the inclined angle (180, 270) adsorbs an upper right corner point; adsorbing a point right above the sample at an inclination angle of 270 degrees; the inclination angles (270, 360) absorb the upper left corner points; the tilt angle of 360/0 degrees is drawn to the right left corner point.
And S430, determining the relative distance between the label text box and the last segment according to the second preset rule.
The second preset rule may be a relative distance between the label text box and the lead line segment set according to various standard drawing specifications, or rules in various aspects such as text font, color, reading sequence, and the like, which may be specifically distinguished according to different application scenarios, and this embodiment does not limit this.
Through the steps, the specific display mode of the label model can be determined, so that the efficiency of generating the corresponding label for the target component is improved, and the standardization is ensured.
Further, in this embodiment, based on the preset reference plane, the second label lead and the second label text box corresponding to the mirror image may be generated according to the generated first label lead and the first label text box. FIG. 8 is a diagram illustrating generation of a mirror label in an embodiment of the invention. As shown in fig. 8, a user may select different reference planes to generate corresponding mirror image tags, which is suitable for scenes of a symmetric building structure, and may further improve the efficiency of generating the tags.
And S500, adding corresponding texts in the label text boxes.
The text can be automatically added in a mode of acquiring the attribute of the target component, and the text can also be manually added by a user. The manner in which the text is automatically added may include: the label text box acquires first attribute information of a first target component, and the first attribute information is automatically added into the label text box. The first attribute information here may be name information, size information, material information, and the like, which are pre-stored in a corresponding database, in association with the first target member. By means of automatic text adding, tag generation efficiency can be improved. Further, the text added in the present embodiment may also be changed with the change of the target member. Specifically, on the basis that the tag text box moves from a first target component to a second target component, the tag text box acquires second attribute information of the second target component, and replaces the first attribute information in the tag text box with the second attribute information. The steps can realize the strong association of the label and the main body member, and ensure the accuracy of the label.
Referring to fig. 9, a component tag generating apparatus is shown, in this embodiment, the component tag generating apparatus 90 may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to implement the component tag generating method and the component tag generating apparatus of the present invention. The program module referred to in the present invention means a series of computer program instruction segments capable of performing specific functions, and is more suitable than the program itself for describing the execution process of the component tag generating apparatus 90 in the storage medium. The following description will specifically describe the functions of the program modules of the present embodiment:
a label model module 91 adapted to obtain a label model according to a type of the first target component, the label model comprising a label lead and a label text box;
a lead status module 92 adapted to determine the visible and invisible status of the tag lead;
the first display module 93 is adapted to determine a display form of the tag text box according to the type of the target component and a first preset rule when the display and hidden state of the tag lead is hidden;
the second display module 94 is adapted to determine a display form of the tag text box according to a composition structure of the tag lead and a second preset rule when the display and hidden state of the tag lead is displaying;
a text adding module 95 adapted to add corresponding text in the label text box.
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. The computer device 100 of the present embodiment includes at least, but is not limited to: a memory 101, a processor 102, which may be communicatively coupled to each other via a system bus, as shown in FIG. 10. It is noted that FIG. 10 only shows the computer device 100 having components 101-102, 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 101 (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 101 may be an internal storage unit of the computer device 100, such as a hard disk or a memory of the computer device 100. In other embodiments, the memory 101 may also be an external storage device of the computer device 100, 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 100. Of course, the memory 101 may also include both internal and external storage devices of the computer device 100. In this embodiment, the memory 101 is generally used for storing an operating system installed in the computer device 100 and various types of application software, such as a program code of the component tag generation apparatus 100 of the first embodiment. Further, the memory 101 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 102 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 102 is generally used to control the overall operation of the computer device 100. In this embodiment, the processor 102 is configured to run the program code stored in the memory 101 or process data, for example, run the component tag generation apparatus 10, so as to implement the component tag generation method of the first embodiment.
The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., 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., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer-readable storage medium of the present embodiment is used for storing the component tag generation apparatus 100, and when executed by a processor, the computer-readable storage medium implements the component tag generation method of the first embodiment.
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.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example" or "some examples" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
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 generating a component tag, comprising:
obtaining a label model according to the type of the first target component, wherein the label model comprises a label lead and a label text box;
determining the visible and invisible states of the lead wires of the tag;
under the condition that the display and hidden state of the label lead is hidden, determining the display form of the label text box according to the type of the target component and a first preset rule;
under the condition that the display and hidden state of the label lead is display, determining the display form of the label text box according to the composition structure of the label lead and a second preset rule;
and adding corresponding text in the label text box.
2. The method for generating a component label according to claim 1, wherein the type of the target component includes a dot component and a line component, and the step of determining the display form of the label text box according to the type of the target component and a first preset rule when the tag lead is hidden comprises:
setting the display position of the label text box at any one of the upper side, the lower side, the left side and the right side of the dot-shaped member; and the text sequence of the label text box is set to be from left to right or from bottom to top;
determining the relative distance between the label text box and the dot-shaped member according to the first preset rule; or
Setting a display position of the label text box on an upper side or a left side of the linear member; and the text sequence of the label text box is set to be from left to right or from bottom to top;
and determining the relative distance between the label text box and the linear member according to the first preset rule.
3. The method for generating a component tag according to claim 1, wherein the step of determining the display format of the tag text box according to the composition structure of the tag lead and a second preset rule when the hidden state of the tag lead is display comprises:
determining one or more segments that the tag lead contains;
determining the display position and the character sequence of the label text box according to the segmented direction;
and determining the relative distance between the label text box and the last segment according to the second preset rule.
4. The method of generating a component tag of claim 3, wherein the step of determining one or more segments encompassed by the tag lead further comprises:
when any first pinch point in the label lead is moved, all pinch points located before the first pinch point remain stationary, and all pinch points located after the first pinch point follow the first pinch point in a synchronized motion.
5. The method of generating a building block tag according to claim 3, wherein the step of determining the display position of the tag text box according to the direction of the segment includes:
when the last segment in the segments is in the horizontal direction, if the direction from the first starting point to the first end point of the last segment is the positive direction of the x axis, the lower right corner of the label text box is close to the first end point; if the direction from the first starting point to the first end point of the last segment is the negative direction of the x axis, the lower left corner of the label text box is close to the first end point;
when the last segment in the segments is in the vertical direction, if the direction from the second starting point to the second end point of the last segment is the positive direction of the y axis, the upper left corner of the label text box is close to the second end point; and if the direction from the second starting point to the second end point of the last segment is the negative direction of the y axis, the lower left corner of the label text box is close to the first end point.
6. The method for generating a component tag according to claim 3, wherein the step of determining the display format of the tag text box according to the composition structure of the tag lead and a second preset rule when the hidden state of the tag lead is display further comprises:
and generating a second label lead and a second label text box corresponding to the mirror image based on the generated first label lead and the first label text box based on a preset reference surface.
7. The method for generating a component tag according to claim 2, wherein the step of adding corresponding text in the tag text box comprises:
the label text box acquires first attribute information of the first target component, and the first attribute information is automatically added into the label text box; and/or
On the basis that the label text box moves from the first target component to a second target component, the label text box acquires second attribute information of the second target component, and replaces the first attribute information in the label text box with the second attribute information.
8. An apparatus for generating a component tag, comprising:
a tag model module adapted to obtain a tag model according to a type of a first target component, the tag model including a tag lead and a tag text box;
the lead state module is suitable for determining the visible and invisible states of the tag lead;
the first display module is suitable for determining the display form of the label text box according to the type of the target component and a first preset rule under the condition that the display and hidden state of the label lead wire is hidden;
the second display module is suitable for determining the display form of the label text box according to the composition structure of the label lead wire and a second preset rule under the condition that the display and hidden state of the label lead wire is display;
and the text adding module is suitable for adding corresponding texts in the label text box.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented by the processor 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 of any one of claims 1 to 7.
CN202110671423.6A 2021-06-17 2021-06-17 Method and device for generating component label, computer equipment and storage medium Pending CN113407080A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110671423.6A CN113407080A (en) 2021-06-17 2021-06-17 Method and device for generating component label, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110671423.6A CN113407080A (en) 2021-06-17 2021-06-17 Method and device for generating component label, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113407080A true CN113407080A (en) 2021-09-17

Family

ID=77684852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110671423.6A Pending CN113407080A (en) 2021-06-17 2021-06-17 Method and device for generating component label, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113407080A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113901535A (en) * 2021-10-12 2022-01-07 广联达科技股份有限公司 Label adsorption method and device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113901535A (en) * 2021-10-12 2022-01-07 广联达科技股份有限公司 Label adsorption method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109165401B (en) Method and device for generating two-dimensional construction map based on civil structure three-dimensional model
US20140289607A1 (en) Apparatus and method providing augmented reality contents based on web information structure
JP5011916B2 (en) Shape refinement device, shape refinement method, shape refinement program, and machine CAD device
WO1998010353A2 (en) Computer-executed, three-dimensional graphical resource management process and system
KR20120009564A (en) Apparatus and method for generating 3 dimentional mouse pointer
CN114648615B (en) Method, device and equipment for controlling interactive reproduction of target object and storage medium
US20130232403A1 (en) Method and system for the use of adjustment handles to facilitate dynamic layout editing
JP2008084209A (en) Method, device, and program for creating height-limited-area information, and method for manufacturing three-dimensional structure
CN112034488A (en) Automatic target object labeling method and device
CN111597628B (en) Model marking method and device, storage medium and electronic equipment
CN113077548A (en) Collision detection method, device, equipment and storage medium for object
CN114565703A (en) Method, device and equipment for adjusting centralized labeling and readable storage medium
US10403040B2 (en) Vector graphics rendering techniques
CN113407080A (en) Method and device for generating component label, computer equipment and storage medium
JP2008084210A (en) Height-limit computing device, height-limit computing method, height-limit computing program, and manufacturing method of three-dimensional structure
EP1901189A2 (en) Parts managing system, parts managing method, computer program and computer readable storage medium
CN111489283B (en) Picture format conversion method and device and computer storage medium
CN114675925B (en) Configuration image processing method and device, computer equipment and storage medium
CN114254241A (en) Electronic certificate template manufacturing system and method
CN114170381A (en) Three-dimensional path display method and device, readable storage medium and electronic equipment
EP3929871A1 (en) Picture processing method, picture set processing method, computer device, and storage medium
CN114693532A (en) Image correction method and related equipment
CN111625237B (en) Character vision deformation method, system and medium
CN113448472B (en) Binding method of GIS data and three-dimensional model interaction behavior and related device
CN113901535A (en) Label adsorption method and device, computer equipment and 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