Method, device, computer equipment and storage medium for generating component labels
Through the component label generation method, the problem of cumbersome and non-compliant label generation in the existing technology is solved, automatic and accurate label generation and high-degree of freedom of lead adjustment are realized, which meets the marking needs of different components and complies with national standards.
Patent Information
- Application Number
- CN202110671423.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-17
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2041-06-17
AI Technical Summary
The existing construction drawing label tool has problems such as automatic update difficulty, inflexible lead position, and non-conformity to specifications when generating labels. Especially non-parametric label labels based on two-dimensional planes need to be manually adjusted, which is a large and cumbersome workload. The label lead position generated by parameterized tag labels based on BIM model is highly random and cannot set complex lead shapes.
Provide a component label generation method, obtaining the tag model by obtaining component types, determining the visible and hidden state of the tag leads, and determining the display form and position of the tag text box according to preset rules, supporting segmentation adjustment and mirror generation of tag leads. Automatic update of text content.
It realizes automatic and accurate generation of component labels, meets the marking needs of different components, has high freedom in the label leads, complies with the national standard drawing specifications, has strong correlation with the main component, and users can flexibly drag and copy the labels, quickly Identify the body of the tag.
Smart Images

Figure CN113407080B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of engineering drawing, and in particular to a method, device, computer equipment and storage medium for generating component labels. Background Art
[0002] At present, the label writing tools for construction drawings are mainly divided into two categories, one is non-parametric labeling based on two-dimensional planes, and the other is parametric labeling based on BIM models. At present, the software that can realize this function on the market is mainly AutoCAD and Revit under Autodesk. In practical applications, the above two categories of labeling have different defects. On the one hand, non-parametric labeling based on two-dimensional planes needs to create a template first, and reuse it in different positions of the drawing based on the template. Users need to manually adjust according to the drawing specifications, which is a lot of work; at the same time, users need to draw the leader manually, which is a cumbersome process; and non-parametric labeling based on two-dimensional planes cannot meet the situation of automatic update of labeling when some parameters of the component change. On the other hand, the position of the label leader generated in the parametric labeling based on the BIM model is highly random, which is not convenient for flexible control; the leader only covers one drag point, and it is impossible to set a more complex leader shape; and in some cases, the generated text does not meet the drawing specifications. Summary of the invention
[0003] The purpose of the present invention is to provide a technical solution that can automatically and accurately generate parameterized labels that meet the specifications for different components, so as to solve the above-mentioned problems existing in the prior art.
[0004] To achieve the above object, the present invention provides a method for generating a component label, comprising:
[0005] Acquire a label model according to the type of the first target component, wherein the label model includes a label leader and a label text box;
[0006] Determine the visible and invisible state of the tag lead;
[0007] When the visibility 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;
[0008] When the visibility 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;
[0009] Add corresponding text in the label text box.
[0010] According to the method for generating a component label provided by the present invention, the types of the target components include point components and line components. When the visibility state of the label leader is hidden, 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 includes:
[0011] The display position of the label text box is set to any one of the upper, lower, left and right sides of the dot-shaped component; and the order of the words in the label text box is set from left to right or from bottom to top;
[0012] Determine the relative distance between the label text box and the dot-shaped component according to the first preset rule; or
[0013] The display position of the label text box is set to the upper side or the left side of the linear component; and the order of the characters in the label text box is set to be from left to right or from bottom to top;
[0014] The relative distance between the label text box and the linear component is determined according to the first preset rule.
[0015] According to the method for generating a component label provided by the present invention, when the visibility state of the label leader is display, the step of determining the display form of the label text box according to the composition structure of the label leader and the second preset rule includes:
[0016] determining one or more segments included in the tag lead;
[0017] Determining the display position and text order of the label text box according to the direction of the segmentation;
[0018] The relative distance between the label text box and the last segment is determined according to the second preset rule.
[0019] According to the method for generating a component label provided by the present invention, the step of determining the one or more segments included in the label lead also includes:
[0020] When any first gripping point in the label lead is moved, all gripping points located before the first gripping point remain stationary, and all gripping points located after the first gripping point move synchronously with the first gripping point.
[0021] According to the method for generating a component label provided by the present invention, the step of determining the display position of the label text box according to the direction of the segment comprises:
[0022] When the last segment in the segment is in the horizontal direction, if the direction of the last segment from the first starting point to the first end point 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 of the last segment from the first starting point to the first end point is the negative direction of the x-axis, the lower left corner of the label text box is close to the first end point;
[0023] When the last segment in the segment is in a vertical direction, if the direction of the last segment from the second starting point to the second end point is the positive direction of the y-axis, the upper left corner of the label text box is close to the second end point; if the direction of the last segment from the second starting point to the second end point is the negative direction of the y-axis, the lower left corner of the label text box is close to the first end point.
[0024] According to the method for generating a component label provided by the present invention, when the visibility state of the label lead is displayed, the step of determining the display form of the label text box according to the composition structure of the label lead and the second preset rule also includes:
[0025] Based on the preset reference surface, a second label lead line and a second label text box corresponding to the mirror image are generated based on the generated first label lead line and the first label text box.
[0026] According to the method for generating a component label provided by the present invention, the step of adding corresponding text in the label text box provided by the present invention includes:
[0027] The label text box acquires the first attribute information of the first target component and automatically adds the first attribute information to the label text box; and / or
[0028] On the basis that the label text box moves from the first target component to the 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.
[0029] To achieve the above object, the present invention also provides a device for generating a component label, comprising:
[0030] A label model module, adapted to obtain a label model according to the type of the first target component, wherein the label model includes a label lead and a label text box;
[0031] A lead status module, adapted to determine the visible or invisible status of the tag lead;
[0032] A first display module, adapted to determine the display form of the label text box according to the type of the target component and a first preset rule when the display state of the label lead is hidden;
[0033] A second display module is adapted to determine the display form of the label text box according to the composition structure of the label lead and a second preset rule when the visibility state of the label lead is display;
[0034] The text adding module is adapted to add corresponding text in the label text box.
[0035] To achieve the above objectives, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0036] To achieve the above object, the present invention also provides a computer-readable storage medium on which a computer program is stored, and the computer program implements the steps of the above method when executed by a processor.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] (1) The label lead in the present invention has a high degree of freedom and can be displayed or hidden, and the drawn lead can be freely changed in shape by clamping points, which is convenient for users to meet their marking needs in different scenarios.
[0039] (2) The generation rules of leader lines and mark label text are set according to the national drawing production specifications, and special cases such as orthogonality, position transformation, and arc-shaped components are covered to help users generate labels that meet the national standard production specifications.
[0040] (3) The marking label is strongly associated with the main component, and the text in the marking label can change with the parameters of different main components.
[0041] (4) Users can flexibly change the marked label from one main component to another by dragging, moving, and copying, and during the operation, the main body is highlighted to help users quickly identify the main body of the marked label. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a flow chart of a first embodiment of a method for generating a component label of the present invention;
[0043] Figure 2A A schematic diagram of a label text box of a dot-shaped component according to the first embodiment of the present invention is shown;
[0044] Figure 2B A schematic diagram of a label text box of a linear component according to the first embodiment of the present invention is shown;
[0045] Figure 3A schematic flow chart of determining a text box in a label lead display state according to a first embodiment of the present invention is shown;
[0046] Figure 4 Several different label leader styles are shown;
[0047] Figure 5 A schematic diagram showing the corresponding relationship between the horizontal lead line and the text box in the first embodiment of the present invention is shown;
[0048] Figure 6 A schematic diagram showing the corresponding relationship between the vertical lead and the text box in the first embodiment of the present invention is shown;
[0049] Figure 7 The moving relationship between the text box and the individual leader lines is shown;
[0050] Figure 8 A schematic diagram of generating a mirror label in an embodiment of the present invention is shown;
[0051] Fig. 9 A schematic diagram of a program module of a first embodiment of a device for generating a component label of the present invention;
[0052] Fig.10 This is a schematic diagram of the hardware structure of the first embodiment of the device for generating component labels of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0054] Embodiment 1
[0055] See also Figure 1 This embodiment proposes a method for generating a component label, comprising the following steps:
[0056] S100: Acquire a label model according to the type of a first target component, wherein the label model includes a label leader and a label text box.
[0057] The first target component refers to any component in the engineering drawing. The type of component can be divided according to the shape of the component, such as point-shaped components, linear components, etc. The point-shaped components can be lamps, columns in the top view, etc., and the linear components can be beams, columns in the side view, etc., which are not limited in this embodiment. In this embodiment, the label leader and the label text box are used together as a label model. The label leader is used to indicate the corresponding first target component, and the label text box is used to add text corresponding to the first target component, such as component name, component size, component material, etc. When the background receives a label generation request issued by the user for a certain type of first target component, the corresponding label model can be returned.
[0058] S200: Determine the visibility status of the tag lead.
[0059] The visible and invisible states of the label lead include two states: display and hidden. The display state is that the lead pointing to the target component is usually displayed, and the label text box is displayed at the other end of the lead. The hidden state means that the lead itself is no longer displayed, and only the label text box is displayed near the first target component. This embodiment is described below from different visible and invisible states of the label lead.
[0060] S300: When the visibility 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.
[0061] In this step, the label leader is hidden, which means that the component label only displays the text box but not the leader. Figure 2A FIG. 1 shows a schematic diagram of a label text box of a dot-shaped component according to the first embodiment of the present invention. Figure 2A It can be seen that the display position of the label text box corresponding to the dot-shaped component G1 can be set to any side of the top, bottom, left or right. Figure 2A In the example, the text box itself is not displayed by default, and only the text inside the text box, such as "vertical text", is displayed. It can be further seen that the order of displayed text is usually set to read from left to right or from bottom to top. This setting method can be determined by a built-in first preset rule. Among them, the first preset rule can be a rule for the relative distance between the label text box and the dot-shaped component, text font, color, reading order, etc., which is set according to various standard drawing specifications. The specific rules may vary depending on different application scenarios, and this embodiment does not limit this. Figure 2B A schematic diagram of a label text box of a linear component according to the first embodiment of the present invention is shown. Figure 2BIn the figure, the linear components include G2 and G3 in the horizontal direction and G4 and G5 in the vertical direction. It can be seen that for the linear components G2 and G3 in the horizontal direction, the display position of the label text box is set on the upper side thereof, and the text reading order is set from left to right, for example Figure 2B The text in the text mark is "I am an example of text annotation 200×300"; for the vertical linear components G4 and G5, the display position of the label text box is set to the left, and the text reading order is set from bottom to top. Similarly, the relative distance between the label text box and the linear component, the text font, color, reading order and other rules can also be set by the first preset rule, and the specific rules can be different according to different application scenarios, which is not limited in this embodiment.
[0062] S400: When the visibility state of the label lead is display, the display form of the label text box is determined according to the composition structure of the label lead and a second preset rule.
[0063] When the label leader is displayed, the label model displays the leader and the text box at the same time. Usually, the label leader starts near the first target component and ends at a vertex of the text box. Figure 3 FIG. 1 shows a schematic flow chart of determining a text box in a label lead display state according to an embodiment of the present invention. Figure 3 As shown, step S400 includes:
[0064] S410: Determine one or more segments included in the tag lead.
[0065] The lead in this embodiment may be composed of multiple line segments, and the endpoint of each line segment is called a grip point. Figure 4 Several different label lead styles are shown. These label leads can be adjusted by dragging the grip points. The specific adjustment rules include that when any first grip point in the label lead is moved, all grip points before the first grip point remain stationary, and all grip points after the first grip point move synchronously with the first grip point. Figure 4 In the figure, the solid line represents the lead after adjustment is completed, and the dotted line represents the lead during adjustment.
[0066] S420: Determine the display position and text order of the label text box according to the direction of the segment.
[0067] When the label leader includes multiple segments, the direction of the last segment has a certain correspondence with the label text box. Specifically, when the last segment is horizontal, if the direction of the last segment from the first starting point to the first end point 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 of the last segment from the first starting point to the first end point is the negative direction of the x-axis, the lower left corner of the label text box is close to the first end point. Figure 5 A schematic diagram showing the corresponding relationship between the horizontal leader and the text box in the first embodiment of the present invention is shown.
[0068] When the last segment is in a vertical direction, if the direction of the last segment from the second starting point to the second end point is the positive direction of the y-axis, the upper left corner of the label text box is close to the second end point; if the direction of the last segment from the second starting point to the second end point is the negative direction of the y-axis, the lower left corner of the label text box is close to the first end point. Figure 6 A schematic diagram showing the corresponding relationship between the vertical lead and the text box in the first embodiment of the present invention is shown.
[0069] It should be noted that for inclined label leaders, there is a certain positional correspondence between the leader and the text box, also known as an adsorption relationship. When you drag the text box, the leader will rotate around the text box. Figure 7 The figure shows the moving relationship between the text box and the individual leader lines. Figure 7 As shown, when the text frame is continuously dragged, the inclined leader will be located at different positions of the frame accordingly. Specific adsorption rules include: when the lead line is tilted at (0,10], it is automatically marked as horizontal; when the tilt angle is (10,30] and (30,37.5], it is automatically adsorbed on the 30 degree line; when the tilt angle is (37.5,45] and (45,52.5], it is automatically adsorbed on the 45 degree line; when the tilt angle is (52.5,60] and (60,80], it is automatically adsorbed on the 60 degree line; when the tilt angle is (80,90], it is automatically marked as vertical, which is effective on the currently drawn lead line; when the tilt angle is (0,90), the adsorption point is the lower left corner point; when the tilt angle is 90 degrees, the adsorption point is directly below; when the tilt angle is (90,180), the adsorption point is the lower right corner point; when the tilt angle is 180 degrees, the adsorption point is directly to the right; when the tilt angle is (180,270), the adsorption point is the upper right corner point; when the tilt angle is 270 degrees, the adsorption point is directly above; when the tilt angle is (270,360), the adsorption point is the upper left corner point; when the tilt angle is 360 / 0 degrees, the adsorption point is the directly left corner point.
[0070] S430: Determine the relative distance between the label text box and the last segment according to the second preset rule.
[0071] The second preset rule may be the relative distance between the label text box and the leader segment set according to various standard drawing specifications, or rules on text font, color, reading order, etc., which may vary depending on different application scenarios, and this embodiment does not impose any restrictions on this.
[0072] Through the above steps, this embodiment can determine the specific display mode of the label model, thereby improving the efficiency of generating corresponding labels for target components and ensuring standardization.
[0073] Furthermore, this embodiment may also generate a second label lead line and a second label text box that correspond to the mirror image based on the generated first label lead line and the first label text box based on a preset reference surface. Figure 8 FIG. 2 shows a schematic diagram of generating a mirror label in an embodiment of the present invention. Figure 8 As shown, the user can select different reference planes to generate corresponding mirror labels, which is suitable for scenes with symmetrical building structures and can further improve the efficiency of generating labels.
[0074] S500: Add corresponding text in the label text box.
[0075] This step can automatically add text by obtaining the properties of the target component, or the user can manually add text. The method of automatically adding text may include: the label text box obtains the first property information of the first target component, and automatically adds the first property information to the label text box. The first property information here can be the name information, size information, material information, etc. related to the first target component pre-stored in the corresponding database. By automatically adding text, the efficiency of label generation can be improved. Furthermore, the text added in this embodiment can also change with the change of the target component. Specifically, on the basis of the label text box moving from the first target component to the second target component, the label text box obtains the second property information of the second target component, and replaces the first property information in the label text box with the second property information. The above steps can achieve a strong association between the marking label and the main component, and ensure the accuracy of the marking label.
[0076] Please continue reading Fig. 9 , shows a device for generating component labels. In this embodiment, the device 90 for generating component labels may include or be divided into one or more program modules. One or more program modules are stored in a storage medium and executed by one or more processors to complete the present invention and implement the above-mentioned method for generating component labels. The program module referred to in the present invention refers to a series of computer program instruction segments that can perform specific functions, which is more suitable for describing the execution process of the device 90 for generating component labels in a storage medium than the program itself. The following description will specifically introduce the functions of each program module in this embodiment:
[0077] A label model module 91, adapted to obtain a label model according to the type of the first target component, wherein the label model includes a label leader and a label text box;
[0078] A lead state module 92, adapted to determine the visible or invisible state of the tag lead;
[0079] A first display module 93, adapted to determine the display form of the label text box according to the type of the target component and a first preset rule when the display state of the label lead is hidden;
[0080] The second display module 94 is adapted to determine the display form of the label text box according to the composition structure of the label lead and a second preset rule when the visibility state of the label lead is display;
[0081] The text adding module 95 is adapted to add corresponding text in the label text box.
[0082] This embodiment also provides a computer device, such as a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including an independent server or a server cluster composed of multiple servers) that can execute programs. The computer device 100 of this embodiment includes at least but is not limited to: a memory 101 and a processor 102 that can communicate with each other via a system bus, such as Fig.10 It should be pointed out that Fig.10 Computer device 100 is shown only with components 101 - 102 , but it should be understood that implementing all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.
[0083] In this embodiment, the memory 101 (i.e., readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 101 can be an internal storage unit of the computer device 100, such as a hard disk or memory of the computer device 100. In other embodiments, the memory 101 can also be an external storage device of the computer device 100, such as a plug-in hard disk equipped on the computer device 100, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 101 can also include both the internal storage unit of the computer device 100 and its external storage device. In this embodiment, the memory 101 is generally used to store the operating system and various application software installed on the computer device 100, such as the program code of the component label generation device 100 of the first embodiment. In addition, the memory 101 can also be used to temporarily store various types of data that have been output or are to be output.
[0084] In some embodiments, the processor 102 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 102 is generally used to control the overall operation of the computer device 100. In this embodiment, the processor 102 is used to run the program code stored in the memory 101 or process data, such as running the component label generation device 10 to implement the component label generation method of the first embodiment.
[0085] This embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, and when the program is executed by a processor, a corresponding function is realized. The computer-readable storage medium of this embodiment is used to store a component label generation device 100, and when executed by a processor, the component label generation method of the first embodiment is realized.
[0086] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0087] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0088] A person of ordinary skill in the art can understand that all or part of the steps carried out in the above-mentioned embodiment method can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable medium. When the program is executed, it includes one of the steps of the method embodiment or a combination thereof.
[0089] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0091] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for generating a component label, characterized in that: include: Acquire a label model according to the type of the target component, wherein the label model includes a label lead and a label text box, and the type of the target component includes a point component and a line component; Determine the visible and invisible state of the tag lead; In the case where the visibility state of the label lead is hidden, the display form of the label text box is determined according to the type of the target component and the first preset rule, including: setting the display position of the label text box to any one of the upper, lower, left and right sides of the dot-shaped component, and setting the text order of the label text box to be from left to right or from bottom to top, and determining the relative distance between the label text box and the dot-shaped component according to the first preset rule; or setting the display position of the label text box to the upper side or left side of the linear component, and setting the text order of the label text box to be from left to right or from bottom to top, and determining the relative distance between the label text box and the linear component according to the first preset rule; When the visibility 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; Add corresponding text in the label text box.
2. The method for generating a component label according to claim 1, characterized in that: When the visibility state of the label lead is display, the step of determining the display form of the label text box according to the composition structure of the label lead and the second preset rule includes: determining one or more segments included in the tag lead; Determining the display position and text order of the label text box according to the direction of the segmentation; The relative distance between the label text box and the last segment is determined according to the second preset rule.
3. The method for generating a component label according to claim 2, characterized in that: The step of determining the one or more segments included in the tag lead also includes: When any first gripping point in the label lead is moved, all gripping points located before the first gripping point remain stationary, and all gripping points located after the first gripping point move synchronously with the first gripping point.
4. The method for generating a component label according to claim 2, characterized in that: The step of determining the display position of the label text box according to the direction of the segment comprises: When the last segment in the segment is in the horizontal direction, if the direction of the last segment from the first starting point to the first end point 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 of the last segment from the first starting point to the first end point 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 segment is in a vertical direction, if the direction of the last segment from the second starting point to the second end point is the positive direction of the y-axis, the upper left corner of the label text box is close to the second end point; if the direction of the last segment from the second starting point to the second end point is the negative direction of the y-axis, the lower left corner of the label text box is close to the first end point.
5. The method for generating a component label according to claim 2, characterized in that: When the visibility state of the label lead is display, the step of determining the display form of the label text box according to the composition structure of the label lead and the second preset rule further includes: Based on the preset reference surface, a second label lead line and a second label text box corresponding to the mirror image are generated based on the generated first label lead line and the first label text box.
6. The method for generating a component label according to claim 1, characterized in that: The step of adding corresponding text in the label text box includes: The label text box acquires first attribute information of the first target component, and automatically adds the first attribute information to the label text box; and / or On the basis that the label text box moves from the first target component to the 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.
7. A device for generating a component label, characterized in that: include: A label model module, adapted to obtain a label model according to the type of a target component, wherein the label model includes a label lead and a label text box, and the type of the target component includes a point component and a line component; A lead status module, adapted to determine the visible or invisible status of the tag lead; A first display module is adapted to determine the display form of the label text box according to the type of the target component and a first preset rule when the visibility state of the label lead is hidden, including: setting the display position of the label text box to any one of the upper, lower, left and right sides of the dot-shaped component, and setting the text order of the label text box from left to right or from bottom to top, and determining the relative distance between the label text box and the dot-shaped component according to the first preset rule; or setting the display position of the label text box to the upper side or left side of the linear component, and setting the text order of the label text box from left to right or from bottom to top, and determining the relative distance between the label text box and the linear component according to the first preset rule; A second display module is adapted to determine the display form of the label text box according to the composition structure of the label lead and a second preset rule when the visibility state of the label lead is display; The text adding module is adapted to add corresponding text in the label text box.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
