CN116029007A - On-site editing method, device, equipment and storage medium for labels - Google Patents

On-site editing method, device, equipment and storage medium for labels Download PDF

Info

Publication number
CN116029007A
CN116029007A CN202310125732.2A CN202310125732A CN116029007A CN 116029007 A CN116029007 A CN 116029007A CN 202310125732 A CN202310125732 A CN 202310125732A CN 116029007 A CN116029007 A CN 116029007A
Authority
CN
China
Prior art keywords
attribute
editable
editing
target
position information
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
CN202310125732.2A
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 CN202310125732.2A priority Critical patent/CN116029007A/en
Publication of CN116029007A publication Critical patent/CN116029007A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention discloses an on-site editing method, device, equipment and storage medium for labels, wherein the method comprises the following steps: when a preset operation for performing in-place editing on a label of a component is detected in a drawing, identifying an editable attribute from the label; drawing a corresponding dotted line frame for each editable attribute in the label; determining a target editable attribute corresponding to the cursor according to the position relationship between the cursor corresponding to the preset operation and each dotted line frame; generating an editing frame for performing in-place editing on the target editable attribute according to the position information of the dotted frame of the target editable attribute; acquiring updated target editable properties from the editing frame, and updating the labels based on the updated target editable properties; the method can directly edit the multiple attributes in the generated label in place in the drawing, and is easy to operate, visual and efficient.

Description

On-site editing method, device, equipment and storage medium for labels
Technical Field
The present invention relates to the field of computer aided design, and in particular, to a method, an apparatus, a device, and a storage medium for on-site editing of labels.
Background
A designer usually uses labels to explain components in a drawing, and the generated labels are re-edited in the process of designing the drawing; for the labels in the traditional CAD, a designer needs to edit the target properties in the target labels through the property panel, and as one component can have a plurality of labels and one label can have a plurality of properties, the designer needs to be able to quickly find the target properties needing to be modified in the plurality of properties of the property panel, which is inconvenient for a novice designer; for three-dimensional BIM software, only one label containing one attribute can be edited in place, and when one label contains a plurality of attributes, the plurality of target attributes need to be edited through an attribute panel.
Therefore, the existing editing mode aiming at the labels has the technical problems of complex operation and difficult operation of novice designers.
Disclosure of Invention
The invention aims to provide an on-site editing method, device, equipment and storage medium for labels, which can directly edit a plurality of attributes in generated labels on site in a drawing, and are easy to operate, visual and efficient.
According to one aspect of the present invention, there is provided an in-place editing method for annotations, the method comprising:
when a preset operation for performing in-place editing on a label of a component is detected in a drawing, identifying an editable attribute from the label;
drawing a corresponding dotted line frame for each editable attribute in the label; wherein the dashed box is used to enclose the editable properties;
determining a target editable attribute corresponding to the cursor according to the position relationship between the cursor corresponding to the preset operation and each dotted line frame;
generating an editing frame for performing in-place editing on the target editable attribute according to the position information of the dotted frame of the target editable attribute;
and acquiring updated target editable properties from the editing frame, and updating the labels based on the updated target editable properties.
Optionally, when a preset operation for editing the label of the component in place is detected in the drawing, identifying the editable attribute from the label includes:
determining an annotation template adopted by the annotation, and identifying each attribute in the annotation according to the annotation template;
And traversing each attribute in the annotation in sequence, acquiring additional information corresponding to the currently traversed attribute from the annotation template, and judging whether the currently traversed attribute is an editable attribute according to the additional information.
Optionally, the drawing, in the annotation, a corresponding dashed box for each editable attribute includes:
acquiring the position information of the marked datum point and acquiring the width information of each attribute in the mark;
calculating width position information of the editable attribute in the label according to the position information of the datum point and the width information of each attribute;
acquiring the marked height information, and calculating the height position information of the editable attribute according to the position information of the datum point and the height information;
and drawing a corresponding dotted line frame for the editable attribute according to the width position information and the height position information.
Optionally, generating an edit box for performing in-place editing on the target editable attribute according to the position information of the dashed box of the target editable attribute includes:
judging whether the dotted line frame is horizontally placed or not;
if yes, generating the editing frame according to the position information of the dotted frame;
If not, acquiring the position information of the dotted frame when the dotted frame deflects to be horizontally placed, and generating the editing frame according to the acquired position information.
Optionally, the obtaining the updated target editable attribute from the edit box includes:
acquiring an input unit from the editing frame, and converting the input unit into a corresponding standard unit according to a preset mapping table;
acquiring an input attribute value from the editing box, and converting the input attribute value into a standard attribute value according to the input unit and the standard unit;
and forming the updated target editable attribute by the standard attribute value and the standard unit.
Optionally, after the obtaining the updated target editable attribute from the edit box and updating the annotation based on the updated target editable attribute, the method further includes:
when the target editable attribute is a size attribute, adjusting the form of the member according to the updated target editable attribute; or alternatively, the process may be performed,
and when the target editable attribute is the elevation attribute, adjusting the elevation of the component according to the updated target editable attribute.
In order to achieve the above object, the present invention further provides an in-place editing apparatus for labeling, the apparatus comprising:
the identification module is used for identifying the editable attribute from the label when a preset operation for editing the label of the component in place is detected in the drawing;
the drawing module is used for drawing a corresponding dotted line frame for each editable attribute in the label; wherein the dashed box is used to enclose the editable properties;
the determining module is used for determining the target editable attribute corresponding to the cursor according to the position relationship between the cursor corresponding to the preset operation and each dotted line frame;
the generation module is used for generating an editing frame for performing in-place editing on the target editable attribute according to the position information of the dotted frame of the target editable attribute;
and the updating module is used for acquiring the updated target editable attribute from the editing frame and updating the label based on the updated target editable attribute.
Optionally, the apparatus further includes:
the adjusting module is used for adjusting the form of the component according to the updated target editable attribute when the target editable attribute is a size attribute; or when the target editable attribute is the elevation attribute, adjusting the elevation of the component according to the updated target editable attribute.
In order to achieve the above object, the present invention further provides a computer device, which specifically includes: the system comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the steps of the method for editing labels in place described above when executing the computer program.
In order to achieve the above object, the present invention further provides a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the above-described method for on-site editing of annotations.
According to the on-site editing method, device, equipment and storage medium for the labels, when the labels are required to be edited, the editable attribute in the labels can be framed out through the dotted line frame, so that the editable attribute values can be intuitively presented to the designer, and the subsequent on-site editing operation of the designer is facilitated; in addition, since a plurality of editable attributes are contained in one label, in order to accurately determine the target editable attribute required to be edited by a designer, the target editable attribute can be rapidly and accurately determined according to the captured position relation between the mouse cursor and the dotted line frame, and an editing frame for performing on-site editing on the target editable attribute is directly generated in the drawing based on the dotted line frame, and editing through an attribute panel is not required, so that the editing process is more convenient and quicker; the method and the device can directly edit the multiple attributes in the generated label in place in the 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 designate like parts throughout the figures. In the drawings:
FIG. 1 is a schematic flow chart of an alternative method for editing labels in place according to the first embodiment;
FIG. 2 is a schematic flow chart for drawing a dashed box according to the first embodiment;
FIG. 3 is a schematic diagram of generating annotation templates by an annotation manager according to the first embodiment;
FIG. 4 is a schematic diagram of a spliced character string according to the first embodiment;
FIG. 5 is a flow chart for determining target editable properties according to a first embodiment;
FIG. 6 (a) is a schematic diagram showing an edit box (circled area) showing a horizontal state when an annotation showing a horizontal state according to the first embodiment;
FIG. 6 (b) is a schematic diagram showing an edit box (circled area) in a horizontal state when the label is in a non-horizontal state according to the first embodiment;
FIG. 7 is a schematic overall flowchart of an on-site editing method for labels according to the first embodiment;
FIG. 8 is a schematic diagram of an alternative composition of an on-site editing device for labeling according to the second embodiment;
fig. 9 is a schematic diagram of an alternative hardware architecture of a computer device according to the third embodiment.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
The embodiment of the invention provides an on-site editing method for labels, which specifically comprises the following steps as shown in fig. 1:
step S101: when a preset operation for performing in-place editing on a label of a component is detected in a drawing, an editable attribute is identified from the label.
The labeling is used for facilitating engineering staff to read drawings and explain labeling objects, so that relevant engineering staff can acquire accurate design information conveniently; for example, in the field of building mechanics, the annotation objects include: line components such as electromechanical water pipes, air pipes, bridge frames and the like, and point components such as equipment, pipe fittings and the like; in addition, the callout is made up of one or more properties (i.e., parameters), with some properties supporting editing modifications and some properties not supporting editing modifications. In this embodiment, on-site editing of the labels can be implemented, where on-site editing refers to supporting a designer to edit the generated labels directly on the drawing in the design process, without using other editing tools.
Specifically, step S101 includes:
step A1: determining an annotation template adopted by the annotation, and identifying each attribute in the annotation according to the annotation template;
step A2: and traversing each attribute in the annotation in sequence, acquiring additional information corresponding to the currently traversed attribute from the annotation template, and judging whether the currently traversed attribute is an editable attribute according to the additional information.
It should be noted that, a designer usually marks a plurality of attributes (i.e. parameters) for a certain type of component according to requirements, for example, the height and width of a certain component need to be marked at the same time, and the types of attributes used in the marking of the same type of component are the same; therefore, a designer can generate different types of annotation templates for different application scenes through the annotation manager, and in practical application, the designer can obtain a final annotation containing a plurality of attributes by calling one type of annotation template and assigning values to each attribute in the annotation template. In addition, when the annotation template is configured, corresponding additional information can be added for each attribute; wherein the additional information includes information characterizing whether the attribute is an editable attribute.
Step S102: drawing a corresponding dotted line frame for each editable attribute in the label; wherein the dashed box is used to enclose the editable properties.
In this embodiment, only the dotted line box needs to be drawn for the editable attribute, and the dotted line box does not need to be drawn for the non-editable attribute, so that the editable part in the annotation is more intuitively displayed to the designer.
Specifically, step S102 includes:
step B1: acquiring the position information of the marked datum point and acquiring the width information of each attribute in the mark; preferably, the datum point is the top left corner vertex of the mark;
the width information is used for representing the width occupied by one attribute;
step B2: calculating width position information of the editable attribute in the label according to the position information of the datum point and the width information of each attribute;
preferably, the width information of each attribute positioned on the left side of the editable attribute is superimposed with the abscissa in the position information of the reference point as a starting point, so as to obtain the width position information of the editable attribute;
step B3: acquiring the marked height information, and calculating the height position information of the editable attribute according to the position information of the datum point and the height information;
Preferably, when there is only one line in the label, the height information is superimposed with the ordinate in the position information of the reference point as a starting point to obtain height position information of the editable attribute; when a plurality of lines exist in the label, stacking the height information of each line by taking the ordinate in the position information of the datum point as a starting point so as to obtain the height position information of the editable attribute;
in this embodiment, when the label includes multiple lines of label information, the height information of each line is usually different, the height information of each line needs to be determined respectively, and then the height position information of the editable attribute in the label is calculated according to the height information of each line and the position information of the reference point;
step B4: drawing a corresponding dotted line frame for the editable attribute according to the width position information and the height position information;
it should be noted that, in the present embodiment, the width information is a width value, and the width position information is a two-dimensional coordinate or a three-dimensional coordinate; the height information is a height value, and the height position information is a two-dimensional coordinate or a three-dimensional coordinate.
Further, since the designer only needs to edit the attribute values in the in-place editing process, the dashed box may be used only to enclose the attribute values in the editable attribute, and when the dashed box is used only to enclose the attribute values in the editable attribute, as shown in fig. 2, the step S102 specifically includes:
Step C1: identifying annotation partitions from the annotations, sorting all identified annotation partitions, and setting the first annotation partition after sorting as a target annotation partition;
in practical applications, in different usage scenarios, the annotations need to be presented in different annotation styles, for example: the water pipe labeling needs to be presented in a round labeling mode, the air port labeling needs to be presented in a labeling mode of a two-by-two table, and the gradient pipeline needs to be presented in a labeling mode of a half arrow or a full arrow; in addition, in some labeling styles, various attributes in the labels may be combined into different labeling partitions; for example, there are two labeling partitions, an upper and a lower, in the up and down text annotation style, only one labeling partition in the single line text annotation style, and four partitions in the two-by-two form annotation style.
Step C2: determining a datum point of the target labeling partition; preferably, the reference point is the top left corner vertex of the target labeling partition.
Step C3: splitting the target labeling partition into a plurality of row units according to the line feed information in the target labeling partition;
in this embodiment, the marking information of each line is required to be a line unit according to the line feed information in the marking partition, and the line unit is the minimum processing unit of the subsequent step.
Step C4: and sequencing all the split row units, and setting the first sequenced row unit as a target row unit.
Step C5: identifying each character in the target line unit; wherein the character comprises: attribute prefix, attribute value, attribute suffix, and space;
it should be noted that the attribute must include an attribute value, and in addition, the attribute may further include one of the following: attribute prefix, attribute suffix, space; wherein the attribute prefix is generally a logical operator characterizing the attribute value of the current attribute and the attribute value of the previous attribute; attribute suffixes are typically units of attribute values; space is used to distinguish from the latter attribute; since the designer only needs to edit the property values during the in-place editing process, the dashed box may be used only to enclose the property values in the editable properties;
as shown in FIG. 3, to be an annotation manager for generating annotation templates, the following attributes (i.e., parameters) are included in the annotation target as shown in FIG. 3: system code, width, height, diameter, bottom height; and attribute prefixes, attribute values (i.e., sample values), attribute suffixes, spaces, and line feed information for each attribute may be edited by the annotation manager.
Step C6: calculating width position information of an attribute value of the editable attribute in the target line unit according to the width information of each character and the position information of the datum point;
preferably, as shown in fig. 4, the step C6 specifically includes:
step C61: traversing each character in sequence from left to right, forming all characters preceding a first attribute value into a character string (i.e., character string 1) and forming the first attribute value into another character string (i.e., character string 2) when traversing to the first attribute value;
step C62: setting the first attribute value as a target attribute value;
step C63: judging whether the target attribute value is the last attribute value, if so, executing the step C65; if not, forming all characters between the target attribute value and the next attribute value into a character string (namely, character string 3), and executing step C64;
step C64: forming the next attribute value into a character string (i.e., character string 4), setting the next attribute value as a new target attribute value, and re-executing step C63;
step C65: forming a character string from all characters located after the target attribute value;
Step C66: calculating the total width information of each character string according to the width information of the characters in each character string;
step C67: and calculating the width position information of the attribute value of the editable attribute according to the position information of the datum point and the total width information of each character string.
Step C7: calculating the height position information of the attribute value of the editable attribute in the target line unit according to the line feed information and the position information of the datum point;
step C8: drawing a corresponding dotted line frame for the attribute value of the editable attribute according to the width position information and the height position information;
step C9: c10, judging whether the target line unit is the last line unit in the target labeling partition, if so, executing the step C5, and if not, setting the next line unit of the target line unit as a new target line unit and executing the step C5 again;
step C10: and C2, judging whether the current target labeling partition is the last labeling partition in the labeling, if so, ending the flow, and if not, setting the next labeling partition of the target labeling partition as a new target labeling partition and re-executing the step C2.
It should be noted that some labels may have a non-horizontal state, so the presentation of the dashed box needs to be combined with the flow state of the text in the label, so that the dashed box is consistent with the flow state. In addition, the presentation of the dashed boxes is for supporting a designer to quickly and accurately acquire the editing state and position of each attribute during design, and is not needed in an actual drawing; therefore, special treatment is required for the dashed box, the dashed box is only presented at the marked part in the 'mouse select or hover' state, and the rest states do not display the dashed box.
Step S103: determining a target editable attribute corresponding to the cursor according to the position relationship between the cursor corresponding to the preset operation and each dotted line frame; wherein the cursor is located within a dashed box of the target editable property.
Specifically, as shown in fig. 5, step S103 includes:
step D1: acquiring the position information of each labeling partition in the labeling;
step D2: acquiring the position information of the cursor;
step D3: setting a first labeling partition in the labeling as a target labeling partition;
step D4: judging whether the position information of the cursor belongs to the position information of the target labeling partition or not; if yes, executing the step D5, and if not, executing the step D6;
Step D5: sequentially traversing each dotted line frame in the target labeling partition, judging whether the position information of the cursor belongs to the position information of the currently traversed dotted line frame, if so, setting the editable attribute corresponding to the currently traversed dotted line frame as the target editable attribute, and if not, executing the step D6;
step D6: d7, judging whether the target labeling partition is the last labeling partition in the labeling, if so, executing the step D7, and if not, setting the next labeling partition of the target labeling partition as a new target labeling partition and re-executing the step D4;
step D7: and returning information of which the editable attribute of the target is not determined.
Step S104: and generating an editing frame for performing in-place editing on the target editable attribute according to the position information of the dotted line frame of the target editable attribute.
Specifically, step S104 includes:
judging whether the dotted line frame is horizontally placed or not;
if yes, generating the editing frame according to the position information of the dotted frame;
if not, acquiring the position information of the dotted frame when the dotted frame deflects to be horizontally placed, and generating the editing frame according to the acquired position information.
In order to improve the operation friendliness, the presentation of the edit box is always kept horizontal. And the upper left corner of the edit box is consistent with the upper left corner of the corresponding dashed box.
As shown in fig. 6 (a), when the callout assumes a horizontal state, the edit box (circle-marked area) assumes a horizontal state; as shown in fig. 6 (b), when the callout assumes a non-horizontal state, the edit box (circle-marked area) assumes a horizontal state.
Step S105: and acquiring updated target editable properties from the editing frame, and updating the labels based on the updated target editable properties.
Specifically, the obtaining the updated target editable attribute from the editing box includes:
and carrying out rationality verification on the information acquired from the editing frame according to a preset verification rule, and taking the information successfully verified as the updated target editable attribute.
In this embodiment, the designer may start the editing box by double-clicking the dashed box with the editable property, the designer may edit the text in the editing box, and after the editing is completed, the designer may press the enter key or mouse click on the area outside the editing box to indicate the completion of editing input.
After editing input is completed, rationality verification is required to be carried out on the input content; the content of the verification comprises: whether the input data type is reasonable, whether the input numerical value is out of range (aiming at the attribute of int, double, float type), whether special characters are contained or not, and other scenes.
Further, the obtaining the updated target editable attribute from the editing box further includes:
step E1: acquiring an attribute suffix (namely, an input unit) from the editing frame, and converting the attribute suffix into a corresponding standard unit according to a preset mapping table;
step E2: acquiring an input attribute value from the editing box, and converting the input attribute value into a corresponding standard attribute value according to the attribute suffix and the standard unit;
step E3: and forming the updated target editable attribute by the standard attribute value and the standard unit.
Further, after step S105, the method further includes:
when the target editable attribute is a size attribute, adjusting the form of the member according to the updated target editable attribute; and/or determining the type of the component to which the component belongs, and carrying out linkage adjustment on the forms of all the components belonging to the type of the component according to the updated target editable attribute;
And when the target editable attribute is the elevation attribute, adjusting the elevation of the component according to the updated target editable attribute.
In this embodiment, if the edited attribute is one geometric attribute (i.e., a dimensional attribute) of the member, a reasonable input value through unit conversion is set to the member, and the shape of the member is reversely driven; in addition, other components related to the current editing component may be changed, for example, the elevation of a certain pipeline in a pipe network system is modified, so that other pipelines and pipes in the whole pipe network system may be linked to adjust the elevation. Therefore, in addition to the annotation currently being edited, other related annotations also require coordinated refreshing.
In this embodiment, as shown in fig. 7, which is an overall flowchart of this embodiment, when rendering a drawing view, the editable attribute values are framed by a dashed box, so that the editability of each attribute in the label is intuitively represented, and the use by a designer is facilitated; when the designer double clicks the range in the dotted line frame, the text editor (i.e. edit frame) is triggered, so that the time cost for searching a certain attribute on the attribute panel is saved, and the drawing efficiency of the designer is greatly improved. In addition, the rationality verification can be carried out on the input content, so that the false editing of a designer is avoided. In addition, when editing input, the method supports unit conversion, is compatible with the design habit of a designer, and improves the design efficiency. After editing is completed, the components can be reversely driven, and other relevant labels are refreshed, so that the robustness of the whole labeling system is ensured.
In this embodiment, a dashed box positioning algorithm for editable properties is provided. When the view is rendered, the construction and rendering of the dotted line frame can be carried out only for the attribute supporting editing, so that a designer can intuitively perceive the attribute item capable of being edited and modified, and the on-site editing of the label is carried out; in addition, the embodiment also provides an algorithm for searching the corresponding attribute items of the cursor of the mouse on the labels; when a designer double clicks the mouse to prepare editing, a partition in the mark where the cursor of the mouse is positioned and a corresponding attribute item in the partition can be positioned through the search algorithm, so that a text editor is triggered and is displayed at an accurate position; finally, in this embodiment, on the one hand, the attribute values supporting editing and modification are framed by a dashed box, which is convenient for a designer to use, and on the other hand, through verification of rationality of input values, unit conversion, reverse driving, linked refreshing of labels, etc., it is ensured that the designer's input can correctly draw a figure, and meanwhile, the efficiency of drawing is greatly improved.
Example two
The embodiment of the invention provides an on-site editing device for labels, which is shown in fig. 8, and specifically comprises the following components:
An identifying module 801, configured to identify an editable attribute from a label of a component when a preset operation for performing in-place editing on the label is detected in a drawing;
a drawing module 802, configured to draw a corresponding dashed box for each editable attribute in the label; wherein the dashed box is used to enclose the editable properties;
a determining module 803, configured to determine, according to a positional relationship between a cursor corresponding to the preset operation and each dashed box, a target editable attribute corresponding to the cursor;
a generating module 804, configured to generate an edit box for performing in-place editing on the target editable attribute according to the position information of the dashed box of the target editable attribute;
and an updating module 805, configured to obtain an updated target editable attribute from the edit box, and update the label based on the updated target editable attribute.
Specifically, the identifying module 801 is configured to:
determining an annotation template adopted by the annotation, and identifying each attribute in the annotation according to the annotation template;
and traversing each attribute in the annotation in sequence, acquiring additional information corresponding to the currently traversed attribute from the annotation template, and judging whether the currently traversed attribute is an editable attribute according to the additional information.
The drawing module 802 is specifically configured to:
acquiring the position information of the marked datum point and acquiring the width information of each attribute in the mark;
calculating width position information of the editable attribute in the label according to the position information of the datum point and the width information of each attribute;
acquiring the marked height information, and calculating the height position information of the editable attribute according to the position information of the datum point and the height information;
and drawing a corresponding dotted line frame for the editable attribute according to the width position information and the height position information.
The generating module 804 is specifically configured to:
judging whether the dotted line frame is horizontally placed or not;
if yes, generating the editing frame according to the position information of the dotted frame;
if not, acquiring the position information of the dotted frame when the dotted frame deflects to be horizontally placed, and generating the editing frame according to the acquired position information.
The updating module 805 is specifically configured to:
acquiring an input unit from the editing frame, and converting the input unit into a corresponding standard unit according to a preset mapping table;
acquiring an input attribute value from the editing box, and converting the input attribute value into a standard attribute value according to the input unit and the standard unit;
And forming the updated target editable attribute by the standard attribute value and the standard unit.
Further, the device further comprises:
the adjusting module is used for adjusting the form of the component according to the updated target editable attribute when the target editable attribute is a size attribute; or when the target editable attribute is the elevation attribute, adjusting the elevation of the component according to the updated target editable attribute.
Further, since the designer only needs to edit the attribute values during the in-place editing process, the dashed box may be used only to enclose the attribute values in the editable attribute, and when the dashed box is used only to enclose the attribute values in the editable attribute, the drawing module 802 is further configured to:
step 1: identifying annotation partitions from the annotations, sorting all identified annotation partitions, and setting the first annotation partition after sorting as a target annotation partition;
step 2: determining a datum point of the target labeling partition; preferably, the reference point is the top left corner vertex of the target labeling partition;
step 3: splitting the target labeling partition into a plurality of row units according to the line feed information in the target labeling partition;
Step 4: sorting all the split row units, and setting the first row unit after sorting as a target row unit;
step 5: identifying each character in the target line unit; wherein the character comprises: attribute prefix, attribute value, attribute suffix, and space;
step 6: calculating width position information of an attribute value of the editable attribute in the target line unit according to the width information of each character and the position information of the datum point;
step 7: calculating the height position information of the attribute value of the editable attribute in the target line unit according to the line feed information and the position information of the datum point;
step 8: drawing a corresponding dotted line frame for the attribute value of the editable attribute according to the width position information and the height position information;
step 9: judging whether the target line unit is the last line unit in the target labeling partition, if so, executing the step 10, and if not, setting the next line unit of the target line unit as a new target line unit and re-executing the step 5;
step 10: and (3) judging whether the current target labeling partition is the last labeling partition in the labeling, if so, ending the flow, otherwise, setting the next labeling partition of the target labeling partition as a new target labeling partition, and re-executing the step (2).
At this time, the determining module 803 is further configured to:
step 1: acquiring the position information of each labeling partition in the labeling;
step 2: acquiring the position information of the cursor;
step 3: setting a first labeling partition in the labeling as a target labeling partition;
step 4: judging whether the position information of the cursor belongs to the position information of the target labeling partition or not; if yes, executing the step 5, and if not, executing the step 6;
step 5: sequentially traversing each dotted line frame in the target labeling partition, judging whether the position information of the cursor belongs to the position information of the currently traversed dotted line frame, if so, setting the editable attribute corresponding to the currently traversed dotted line frame as the target editable attribute, and if not, executing the step 6;
step 6: judging whether the target labeling partition is the last labeling partition in the labeling, if so, executing the step 7, otherwise, setting the next labeling partition of the target labeling partition as a new target labeling partition, and re-executing the step 4;
step 7: and returning information of which the editable attribute of the target is not determined.
Example III
The present embodiment also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack-mounted server, a blade server, a tower server, or a rack-mounted server (including an independent server or a server cluster formed by a plurality of servers) that can execute a program. 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 which are communicably connected to each other via a system bus. It should be noted that FIG. 9 only shows a computer device 90 having components 901-902, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead.
In this embodiment, the memory 901 (i.e., readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card 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 memory 901 may be an internal storage unit of the computer device 90, such as a hard disk or 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, which are provided on the computer device 90. Of course, memory 901 may also include both internal storage units of computer device 90 and external storage devices. In the present embodiment, the memory 901 is typically used to store an operating system and various types of application software installed on the computer device 90. Further, the memory 901 can also be used to temporarily store various types of data that have been output or are to be output.
The processor 902 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other on-site editing chip for labeling in some embodiments. The processor 902 is generally operative to control the overall operation of the computer device 90.
Specifically, in the present embodiment, the processor 902 is configured to execute a program of an on-site editing method for annotation stored in the memory 901, where the program of the on-site editing method for annotation is executed to implement the following steps:
when a preset operation for performing in-place editing on a label of a component is detected in a drawing, identifying an editable attribute from the label;
drawing a corresponding dotted line frame for each editable attribute in the label; wherein the dashed box is used to enclose the editable properties;
determining a target editable attribute corresponding to the cursor according to the position relationship between the cursor corresponding to the preset operation and each dotted line frame;
generating an editing frame for performing in-place editing on the target editable attribute according to the position information of the dotted frame of the target editable attribute;
and acquiring updated target editable properties from the editing frame, and updating the labels based on the updated target editable properties.
The specific embodiment process of the above method steps can be referred to as embodiment one, and the description of this embodiment is not repeated here.
Example IV
The present embodiment also provides a computer storage medium, such as a flash memory, a hard disk, a multimedia card, a card 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 store, etc., on which a computer program is stored, which when executed by a processor, performs the following method steps:
when a preset operation for performing in-place editing on a label of a component is detected in a drawing, identifying an editable attribute from the label;
drawing a corresponding dotted line frame for each editable attribute in the label; wherein the dashed box is used to enclose the editable properties;
determining a target editable attribute corresponding to the cursor according to the position relationship between the cursor corresponding to the preset operation and each dotted line frame;
generating an editing frame for performing in-place editing on the target editable attribute according to the position information of the dotted frame of the target editable attribute;
And acquiring updated target editable properties from the editing frame, and updating the labels based on the updated target editable properties.
The specific embodiment process of the above method steps can be referred to as embodiment one, and the description of this embodiment is not repeated here.
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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. An in-place editing method for labels, the method comprising:
when a preset operation for performing in-place editing on a label of a component is detected in a drawing, identifying an editable attribute from the label;
drawing a corresponding dotted line frame for each editable attribute in the label; wherein the dashed box is used to enclose the editable properties;
determining a target editable attribute corresponding to the cursor according to the position relationship between the cursor corresponding to the preset operation and each dotted line frame;
generating an editing frame for performing in-place editing on the target editable attribute according to the position information of the dotted frame of the target editable attribute;
and acquiring updated target editable properties from the editing frame, and updating the labels based on the updated target editable properties.
2. The method for in-place editing for a callout according to claim 1, wherein the identifying an editable attribute from the callout when a preset operation for in-place editing for the callout of a component is detected in a drawing, includes:
determining an annotation template adopted by the annotation, and identifying each attribute in the annotation according to the annotation template;
and traversing each attribute in the annotation in sequence, acquiring additional information corresponding to the currently traversed attribute from the annotation template, and judging whether the currently traversed attribute is an editable attribute according to the additional information.
3. The method for in-place editing for a callout according to claim 1, wherein drawing a corresponding dashed box for each editable property within the callout includes:
acquiring the position information of the marked datum point and acquiring the width information of each attribute in the mark;
calculating width position information of the editable attribute in the label according to the position information of the datum point and the width information of each attribute;
acquiring the marked height information, and calculating the height position information of the editable attribute according to the position information of the datum point and the height information;
And drawing a corresponding dotted line frame for the editable attribute according to the width position information and the height position information.
4. The method for on-site editing for a callout according to claim 1, wherein generating an edit box for on-site editing of the target editable attribute according to the position information of the dashed box of the target editable attribute includes:
judging whether the dotted line frame is horizontally placed or not;
if yes, generating the editing frame according to the position information of the dotted frame;
if not, acquiring the position information of the dotted frame when the dotted frame deflects to be horizontally placed, and generating the editing frame according to the acquired position information.
5. The method for on-site editing for annotations according to claim 1, wherein said obtaining updated target editable properties from said edit box comprises:
acquiring an input unit from the editing frame, and converting the input unit into a corresponding standard unit according to a preset mapping table;
acquiring an input attribute value from the editing box, and converting the input attribute value into a standard attribute value according to the input unit and the standard unit;
And forming the updated target editable attribute by the standard attribute value and the standard unit.
6. The method of on-site editing for a callout of claim 1, wherein after the obtaining the updated target editable property from the edit box and updating the callout based on the updated target editable property, the method further comprises:
when the target editable attribute is a size attribute, adjusting the form of the member according to the updated target editable attribute; or alternatively, the process may be performed,
and when the target editable attribute is the elevation attribute, adjusting the elevation of the component according to the updated target editable attribute.
7. An in-place editing device for annotations, the device comprising:
the identification module is used for identifying the editable attribute from the label when a preset operation for editing the label of the component in place is detected in the drawing;
the drawing module is used for drawing a corresponding dotted line frame for each editable attribute in the label; wherein the dashed box is used to enclose the editable properties;
The determining module is used for determining the target editable attribute corresponding to the cursor according to the position relationship between the cursor corresponding to the preset operation and each dotted line frame;
the generation module is used for generating an editing frame for performing in-place editing on the target editable attribute according to the position information of the dotted frame of the target editable attribute;
and the updating module is used for acquiring the updated target editable attribute from the editing frame and updating the label based on the updated target editable attribute.
8. The on-site editing device for annotations of claim 7, further comprising:
the adjusting module is used for adjusting the form of the component according to the updated target editable attribute when the target editable attribute is a size attribute; or when the target editable attribute is the elevation attribute, adjusting the elevation of the component according to the updated target editable attribute.
9. A computer device, the computer device comprising: memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 6 when the computer program is executed.
10. A computer storage medium having stored thereon a computer program, which when executed by a processor realizes the steps of the method according to any of claims 1 to 6.
CN202310125732.2A 2023-02-03 2023-02-03 On-site editing method, device, equipment and storage medium for labels Pending CN116029007A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310125732.2A CN116029007A (en) 2023-02-03 2023-02-03 On-site editing method, device, equipment and storage medium for labels

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310125732.2A CN116029007A (en) 2023-02-03 2023-02-03 On-site editing method, device, equipment and storage medium for labels

Publications (1)

Publication Number Publication Date
CN116029007A true CN116029007A (en) 2023-04-28

Family

ID=86072334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310125732.2A Pending CN116029007A (en) 2023-02-03 2023-02-03 On-site editing method, device, equipment and storage medium for labels

Country Status (1)

Country Link
CN (1) CN116029007A (en)

Similar Documents

Publication Publication Date Title
CN113255044A (en) Intelligent drawing method for fabricated building based on BIM
EP3451206B1 (en) Method, apparatus, and device for generating a visual model layout of a space
CN111159982B (en) Document editing method, device, electronic equipment and computer readable storage medium
CN116028653B (en) Method and system for constructing map by visually configuring multi-source heterogeneous data
CN113326314B (en) Data visualization method, device, electronic equipment and readable storage medium
CN111143478A (en) Two-three-dimensional file association method based on lightweight model and engineering object bit number
CN108763341B (en) Electronic device, automatic table building method and storage medium
CN111552704A (en) Data report generation method and device, computer equipment and storage medium
WO2023241519A1 (en) Bim component creation method and apparatus, and digital design resource library application method and apparatus
CN114581639A (en) Method for generating information of beam steel bars in BIM (building information modeling) model based on beam leveling construction drawing
CN111178083A (en) Semantic matching method and device for BIM and GIS
CN113468288A (en) Content extraction method of text courseware based on artificial intelligence and related equipment
CN111753763A (en) Method and device for identifying table content of construction drawing and computer equipment
CN111444368A (en) Method and device for constructing user portrait, computer equipment and storage medium
CN116029007A (en) On-site editing method, device, equipment and storage medium for labels
CN116756261A (en) GIS data processing method based on relational database management tool
CN116956837A (en) Project determining method and device for engineering quantity list
CN108920749B (en) Pipeline two-dimensional and three-dimensional data updating method and device and computer readable storage medium
CN113254455A (en) Dynamic configuration method and device of database, computer equipment and storage medium
CN116882032B (en) Building design atlas digitizing and visualizing method and device for applying same
CN116912446B (en) Remote sensing building sample rapid collection method based on self-closing orthogonal polygon
CN117195338B (en) Automatic generation method and device of product design diagram, electronic equipment and storage medium
WO2015000126A1 (en) Enriching building information modeling data
CN117392269B (en) Pipe network drawing data extraction method and device
CN116167728B (en) BIM project information linkage realization method and device

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