Engineering drawing labeling method and device, electronic equipment and storage medium
By automatically labeling the target view and labeling parameters of the workpiece, forming a view constraint area in response to the constraint pickup operation, view zoom adjustment and labeling parameters are performed, which solves the problem of low manual labeling efficiency of engineering drawings in the prior art, realizes automatic labeling, and improves design efficiency.
Patent Information
- Application Number
- CN202411848930.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, the measurement and labeling of engineering drawings mainly rely on manual labor, resulting in low design efficiency and long time.
By obtaining the target view and label parameters of the workpiece to be labeled, forming a view constraint area in response to the constraint pickup operation, performing view scaling adjustment and labeling parameter adjustment, realizing automatic labeling.
Automatic labeling significantly shortens the drawing labeling time, improves the efficiency of electrical design, and solves the problems of low design efficiency and time-consuming caused by manual labeling.
Smart Images

Figure CN119808186A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automated design technology, and in particular to an engineering drawing marking method, device, electronic equipment and storage medium. Background Art
[0002] With the development of digitalization, in the complete electrical industry, designers can realize copper busbar prefabrication through 3D simulation design of switch cabinets. After the copper busbar design is completed, it is necessary to draw part engineering drawings to guide the production and processing of the copper busbar.
[0003] In the prior art, dimension measurement and marking of engineering drawings are usually implemented manually, such as manually determining the dimensions to be marked, hole sizes, number of holes, segment angles, and view placement adjustments, and then manually generating drawings, resulting in low design efficiency and time-consuming design. Summary of the invention
[0004] The present invention provides an engineering drawing marking method, device, electronic device and storage medium to solve the problem that the existing engineering drawings are manually measured and marked, resulting in low design efficiency and long time consumption, and shortens the drawing marking time through automatic marking.
[0005] According to one aspect of the present invention, there is provided a method for marking an engineering drawing, comprising: obtaining at least one target view and at least one type of marking parameters of a workpiece to be marked in the engineering drawing; forming a view constraint area in response to a constraint picking operation for the target view; performing a first scaling adjustment on the workpiece projection view in the target view according to the view constraint area to determine a first view scaling ratio; adjusting the marking parameters in the target view according to the first view scaling ratio, and marking the adjusted data in the workpiece projection view; obtaining the outline size of the workpiece projection view after adding the marking, and performing a second scaling adjustment on the workpiece projection view, and / or adjusting the placement position and / or data marking position of the workpiece projection view.
[0006] Optionally, the outline size of the workpiece projection view after adding annotations is obtained, and the workpiece projection view is adjusted for a second scaling ratio, and / or the placement position and / or data annotation position of the workpiece projection view is adjusted, including: obtaining a first constraint size of the view constraint area along a first direction and a second constraint size of the view constraint area along a second direction; wherein the first direction is perpendicular to the second direction; obtaining a first outline size of the workpiece projection view along the first direction and a second outline size along the second direction after adding annotations; determining a first direction scaling ratio corresponding to the first direction according to a ratio between the first constraint size and the first outline size; determining a second direction scaling ratio corresponding to the second direction according to a ratio between the second constraint size and the second outline size; and determining a second view scaling ratio corresponding to the second scaling ratio adjustment according to the first direction scaling ratio and the second direction scaling ratio.
[0007] Optionally, the obtaining of the maximum outline size of the workpiece projection view after adding annotations, and performing a second scaling adjustment on the workpiece projection view, and / or adjusting the placement position and / or data annotation position of the workpiece projection view, includes: obtaining the spacing between the workpiece projection view and each boundary of the view constraint area after adding annotations; adjusting the placement position and / or the data annotation position according to the spacing, so that the workpiece projection view and the annotations added thereto all fall within the corresponding view constraint area. .
[0008] Optionally, adjusting the annotation parameters in the target view according to the first view zoom ratio and annotating the adjusted data in the workpiece projection view includes: reading the workpiece projection view based on preset annotation rules, identifying the workpiece size of the workpiece to be annotated, adjusting the workpiece size according to the first view zoom ratio, and annotating data in the workpiece projection view based on the adjusted workpiece size.
[0009] Optionally, the view constraint area is formed in response to the constraint picking operation on the target view, including: displaying constraint picking options corresponding to different target views in the engineering drawing adjustment interface; forming a three-view constraint area in response to a first constraint picking operation on three views; and / or, forming an expanded view constraint area in response to a second constraint picking operation on the expanded view; and / or, forming an axonometric view constraint area in response to a third constraint picking operation on the axonometric view.
[0010] Optionally, the acquiring of at least one target view and at least one type of annotation parameters of the workpiece to be annotated in the engineering drawing includes: forming at least one target view in response to a configuration operation for the view type in the engineering drawing; forming at least one annotation position in response to a configuration operation for a segmented annotation position in the engineering drawing; forming at least one type of annotation symbol in response to a configuration operation for the annotation method in the engineering drawing.
[0011] Optionally, the method further includes: establishing a view adjustment database based on the correspondence between the workpiece and any one of the view constraint area, the view zoom ratio and the placement position; comparing the workpiece to be marked with the workpieces in the view adjustment database, and determining the view adjustment data according to the comparison result.
[0012] According to another aspect of the present invention, there is provided an engineering drawing marking device, comprising: a parameter configuration module, used to obtain at least one target view and at least one type of marking parameters of a workpiece to be marked in the engineering drawing; a constraint configuration module, used to form a view constraint area in response to a constraint picking operation for the target view; a view adjustment module, used to perform a first scaling adjustment on the workpiece projection view in the target view according to the view constraint area, and determine a first view scaling ratio; a marking processing module, used to adjust the marking parameters in the target view according to the first view scaling ratio, and mark the adjusted data in the workpiece projection view; the view adjustment module is also used to obtain the outline size of the workpiece projection view after adding the marking, and perform a second scaling adjustment on the workpiece projection view, and / or adjust the placement position and / or data marking position of the workpiece projection view.
[0013] According to another aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned engineering drawing annotation method.
[0014] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the above-mentioned engineering drawing marking method when executed by a processor.
[0015] The technical solution of the embodiment of the present invention obtains at least one target view and at least one type of annotation parameters of the workpiece to be annotated in the engineering drawing, and before executing the annotation, responds to the constraint picking operation for the target view to form a view constraint area; when executing the annotation, firstly, the workpiece projection view in the target view is adjusted for the first time according to the view constraint area to determine the first view zoom ratio, and then the annotation parameters in the target view are adjusted according to the first view zoom ratio, and the adjusted data are annotated in the workpiece projection view, and finally the outline size of the workpiece projection view after adding the annotation is obtained, and the workpiece projection view is adjusted for the second zoom ratio, and / or the placement position and / or data annotation position of the workpiece projection view are adjusted, which solves the problem that the existing engineering drawings use manual method for dimension measurement and annotation, resulting in low design efficiency and long time consumption, and can realize automatic annotation in different annotation scenarios, shorten the drawing annotation time through automatic annotation, and improve electrical design efficiency.
[0016] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 A flowchart of a method for marking an engineering drawing provided by an embodiment of the present invention;
[0019] Figure 2 A schematic diagram of an engineering drawing adjustment interface and its display results provided by an embodiment of the present invention;
[0020] Figure 3 A schematic diagram of an engineering drawing annotation result provided by an embodiment of the present invention;
[0021] Figure 4 A flowchart of another method for marking engineering drawings provided by an embodiment of the present invention;
[0022] Figure 5 A flowchart of a method for adjusting view scaling in an engineering drawing provided by an embodiment of the present invention;
[0023] Figure 6 A flowchart of another method for marking engineering drawings provided by an embodiment of the present invention;
[0024] Figure 7 A schematic diagram of the structure of an engineering drawing marking device provided by an embodiment of the present invention;
[0025] Figure 8 A schematic diagram of the structure of an electronic device for implementing the engineering drawing marking method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Figure 1 This is a flowchart of a method for marking engineering drawings provided by an embodiment of the present invention. This embodiment is applicable to a complete set of electrical 3D simulation design scenarios. The method can be executed by an engineering drawing marking device. The engineering drawing marking device can be implemented in the form of hardware and / or software. The engineering drawing marking device can be configured in a complete set of electrical 3D simulation design software or an independent electronic device. Figure 1 As shown, the engineering drawing marking method of the present application comprises the following steps:
[0029] S1: Obtain at least one target view and at least one type of annotation parameters of a workpiece to be annotated in an engineering drawing.
[0030] The workpiece to be marked may be a copper busbar. Typically, the types of copper busbars include but are not limited to: straight busbars and multi-section busbars. Multi-section busbars are copper busbars formed by connecting multiple straight busbars in a certain order and angle.
[0031] The target view can be understood as a type of two-dimensional plane view or three-dimensional figure formed by the projection of the workpiece in the engineering drawing. Typically, the target view includes at least one of the following: front view, left view, top view, expansion view, and axonometric view.
[0032] The annotation parameters can be understood as the data that needs to be annotated based on the electrical design requirements of the engineering drawings. Typically, the annotation parameters include: the main view segment annotation position and the annotation method. Among them, the main view segment annotation position can be understood as the position where the various parts or features of the workpiece are segmented on the main view (i.e., the view that best reflects the main shape and features of the workpiece), and the dimensions are annotated at each segment. Typically, the main view segment annotation position includes at least one of the following: follow the sketch, inner virtual and outer virtual. Among them, the follow sketch can be understood as the sketch path in the three-dimensional model, which is used to stretch or scan the two-dimensional sketch into a three-dimensional shape along the specified path. The inner virtual can be understood as the center position of the inner arc of the bend. The outer virtual can be understood as the center position of the outer arc of the bend.
[0033] The annotation method can be understood as the annotation data that can fully and clearly present the shape and characteristics of the workpiece. The annotation methods include but are not limited to at least one of the following: center line, angle, opening annotation of the unfolded view, total length, total width, opening at the end of the unfolded view, center mark, projection length, bending line of the unfolded view, silver plating, opening of three views and length of oblique section.
[0034] In this embodiment, obtaining at least one target view and at least one type of annotation parameters of the workpiece to be annotated in the engineering drawing includes: forming at least one target view and at least one type of annotation parameters in response to a configuration operation on the workpiece to be annotated in the engineering drawing; or, configuring at least one target view and at least one type of annotation parameters based on a table lookup of electrical annotation rules of the workpiece to be annotated. Among them, "configuration operation on the workpiece to be annotated in the engineering drawing" can be understood as a scheme for setting the output of the engineering drawing based on the operation instructions on the output setting display interface corresponding to the workpiece to be annotated; "electrical annotation rules of the workpiece to be annotated" can be understood as a scheme for setting the output of the engineering drawing based on querying the electrical annotation rules corresponding to the workpiece to be annotated.
[0035] S2: In response to a constraint picking operation on a target view, a view constraint region is formed.
[0036] Among them, the constraint picking operation can be understood as the operation of adding geometric constraints and size constraints to limit the position and shape of the target view (such as the main view, left view, top view, expansion view or axonometric view) in the drawing during the drawing process. Designers can accurately control the configuration of the target view range by automatically or manually selecting the constraint range (such as clicking two diagonal vertices to form a rectangular area).
[0037] Optionally, in response to the constraint picking operation for the target view, a view constraint area is formed, including: displaying constraint picking options corresponding to different target views in the engineering drawing adjustment interface; in response to the first constraint picking operation for three views (i.e., the front view, the left view, and the top view), a three-view constraint area is formed; and / or, in response to the second constraint picking operation for the unfolded view, an unfolded view constraint area is formed; and / or, in response to the third constraint picking operation for the isometric view, an isometric view constraint area is formed. Among them, the engineering drawing adjustment interface can be understood as a display interface for designers to adjust the drawing style (including but not limited to the drawing size and drawing direction) and perform constraint picking operations.
[0038] Figure 2 A schematic diagram of an engineering drawing adjustment interface and its display results provided by an embodiment of the present invention. Figure 2 As shown, before executing the annotation, enter the engineering drawing adjustment interface, set the operation area and the display area, and the operation area is at least provided with the "range setting" operation area, the "style scheme" operation area and the general operation area. Among them, the "range setting" operation area is provided with multiple range picking options for designers to perform constraint picking operations, such as "three-view range picking" for designers to perform the first constraint picking operation to form the three-view constraint area; "expanded view range picking" is used for designers to perform the second constraint picking operation to form the expanded view constraint area; "isometric view range picking" is used for designers to perform the third constraint picking operation to form the isometric view constraint area.
[0039] S3: Performing a first scaling adjustment on the workpiece projection view within the target view according to the view constraint area to determine a first view scaling ratio.
[0040] The workpiece projection view can be understood as a two-dimensional plane view formed by projecting the workpiece to be annotated in the target view. Typically, the workpiece projection view can be a two-dimensional plane view in the main view, left view, top view, expansion view or axonometric view.
[0041] The view scaling ratio can be understood as the ratio between the displayed size of the workpiece in the workpiece projection view and its actual size.
[0042] Optionally, the workpiece projection view in the target view is first scaled according to the view constraint area, including: calculating the first view scale according to the ratio between the constraint size of the view constraint area and the maximum outline size of the three-dimensional model of the workpiece to be annotated. Among them, the constraint size of the view constraint area can be understood as the length and width of the view constraint area, and the drawing size of the target view can be understood as the width and length of the drawing. The drawing size is standardized and divided according to international standards or industry standards, such as A0, A1, A2, A3, A4 and other basic format sizes, so as to facilitate the normalization and standardization of drawings. In the process of drawing design, the above basic format size should be used first, and the extended format can also be used when necessary, but the lengthening amount must comply with the drawing specifications. The maximum outline size of the reserved annotation position in the workpiece projection view can be understood as the projection view obtained after the first scale adjustment based on the constraint size of the view constraint area, and the maximum width size and maximum length size of the corresponding reserved annotation position in the projection view. The reserved annotation position can be understood as the area for adding annotations.
[0043] Optionally, adjusting the placement position of the workpiece projection view according to the view constraint region includes: determining the placement position according to a spacing distance between the workpiece projection view and at least one region boundary in the view constraint region, wherein the spacing distance can ensure a position for reserved annotation data.
[0044] Specifically, after obtaining the view constraint area, the annotation program is executed. First, the three-dimensional model of the workpiece to be annotated (such as a copper busbar) is projected into each workpiece projection view (such as a three-view and an unfolded view). The maximum outline size of the two-dimensional plane view in the workpiece projection view and the constraint size of the view constraint area are proportionally adjusted. Then, the workpiece projection view is presented in the corresponding placement position, which needs to reserve a position for the annotation size. After the workpiece projection views in each target view are placed in place, data annotation is performed.
[0045] S4: adjusting the annotation parameters in the target view according to the scaling ratio of the first view, and annotating the adjusted data in the workpiece projection view.
[0046] Optionally, the annotation parameters in the target view are adjusted according to the zoom ratio of the first view, and the adjusted data are annotated in the workpiece projection view, including: reading the workpiece projection view based on a preset annotation rule, identifying the workpiece size of the workpiece to be annotated, adjusting the workpiece size according to the zoom ratio of the first view, and annotating the data in the workpiece projection view based on the adjusted workpiece size.
[0047] Figure 3 A schematic diagram of an engineering drawing annotation result provided by an embodiment of the present invention. Figure 3 As shown, the preset marking rules include but are not limited to at least one of the following:
[0048] The first type of annotation rule is the length and width annotation rule. When performing length and width annotation, the length and width dimensions of the workpiece to be annotated are identified based on the workpiece projection view, the length and width dimensions are adjusted according to the first view scaling ratio, and the total length is calculated in the workpiece projection view based on the adjusted length and width dimensions (see Figure 3 L11, L12) / total width (see Figure 3 D11, D12) in the workpiece projection view. Among them, the length and width dimensions include length and width. Specifically, first identify the copper busbar view, traverse all copper busbar projection views, and measure the length and width dimensions of the copper busbars in each copper busbar projection view based on the internal functions of the design software to ensure that the view scaling and unit are followed during measurement. Then, add up the lengths of all copper busbars to obtain the total length, and mark the total length in the workpiece projection view (such as the main view or the expanded view). If the copper busbars are placed side by side, the total length may be the sum of the lengths of each copper busbar; if the copper busbars are placed overlappingly, the total length may be the length of the longest copper busbar (depending on the specific copper busbar layout and marking requirements). The determination of the total width depends on the arrangement of the copper busbars. If the copper busbars are placed side by side, the total width is the sum of the widths of all copper busbars; if the copper busbars are placed overlappingly and the width of the entire copper busbar group needs to be marked, the total width may be the width of the widest copper busbar (or the width after considering factors such as installation clearance).
[0049] The second type of annotation rule is the segmented annotation rule. When performing segmented annotation, the segment size of the workpiece to be annotated is identified based on the workpiece projection view, the segment size is adjusted according to the first view scaling ratio, and the projected length is calculated in the workpiece projection view based on the adjusted segment size (see Figure 3 Specifically, first identify the segmented parts in each view. These segments may be composed of different lines, shapes or structures. Measure the segment size of each segment based on the internal function of the design software, and ensure that the view scaling and unit are followed during measurement. Then, mark the length dimension of each segment at the corresponding position of each segment in the projection view of the workpiece (such as the main view). If the segment is part of the projection, it is also necessary to ensure that the annotation accurately reflects its length in the projection.
[0050] The third type of marking rules is the hole marking rules. When performing hole marking, the hole diameter, hole quantity and hole position dimensions of the workpiece to be marked are identified based on the workpiece projection view, the hole diameter and hole position dimensions are adjusted according to the scaling ratio of the first view, and the hole quantity and adjusted hole diameter are calculated based on the hole quantity and adjusted hole diameter (see Figure 3 θ1, θ2) and the size of the opening position (see Figure 3 D21, D22, D23, D24, D25, D26, D27, D28) are opened in the workpiece projection view (see Figure 3 4×φθ1, 4×φθ2) are marked in the workpiece. Specifically, first identify the size and number of holes in each view, measure the position of the hole center from the end based on the internal function of the design software, and ensure that the view scaling and unit are followed during measurement. Then, mark the number of holes, hole diameters, and hole positions in the corresponding workpiece projection views (such as left view and top view). It should be noted that for special hole types (such as oblong holes, square holes, crescent holes, etc.), they must also be marked according to specific electrical marking rules. For example, oblong holes need to be marked with width and length, and square holes need to be marked with side length, etc.
[0051] The fourth type of annotation rule is the bending position annotation rule. When performing bending position annotation, the bending line position size of the workpiece to be annotated is identified based on the workpiece projection view in the unfolded view, the bending line position size is adjusted according to the scaling ratio of the first view, and the length is calculated in the workpiece projection view (such as the unfolded view) based on the adjusted bending line position size (see Figure 3 Specifically, first identify the position and direction of the bend in each view, measure the distance between the bend line and the end based on the internal function of the design software, and ensure that the view scaling and unit are followed during measurement. Then, mark the bend line position size and bend direction in the workpiece projection view (such as the unfolded view).
[0052] In the present application, the marking rules also include: multi-segment row angle marking rules. Specifically, when the copper busbar is a multi-segment row, the connection angles between the copper busbar segments in each view are identified, and the connection angles are marked at appropriate positions in the workpiece projection view that do not overlap with other elements. The marking format of the multi-segment row angle can adopt a format such as "XXX°", where "XXX" represents the measured connection angle. In the actual marking process, arrows can be used to point to the marked angle to avoid confusion.
[0053] S5: Obtain the outline size of the workpiece projection view after adding the annotation, and perform a second scaling adjustment on the workpiece projection view, and / or adjust the placement position and / or data annotation position of the workpiece projection view.
[0054] In this embodiment, performing a second scaling adjustment on the workpiece projection view refers to performing a second scaling adjustment on the workpiece projection view based on the outline size of the workpiece projection view after adding annotations and the constraint size of the view constraint area, so that the workpiece projection view and the annotations added thereto fall within the corresponding view constraint area.
[0055] Adjusting the placement position and / or data annotation position of the workpiece projection view refers to adjusting the placement position and / or data annotation position based on the contour boundary of the workpiece projection view after adding the annotation and the constraint boundary of the view constraint area, so that the workpiece projection view and its added annotations fall within the corresponding view constraint area.
[0056] Therefore, the technical solution of the present application can realize automatic annotation in different annotation scenarios by automatically identifying the view zoom ratio, which solves the problem that the existing engineering drawings use manual dimension measurement and annotation, resulting in low design efficiency and long time consumption. Through automatic annotation, the drawing annotation time is shortened and the electrical design efficiency is improved.
[0057] Optionally, Figure 4 The flowchart of another method for marking engineering drawings provided by the embodiment of the present invention exemplarily shows a specific implementation method of a method for setting the output of engineering drawings. Figure 4 As shown, in the above step S1, obtaining at least one target view and at least one type of annotation parameters of the workpiece to be annotated in the engineering drawing includes:
[0058] S101: In response to a configuration operation on a view type in an engineering drawing, forming at least one target view.
[0059] The view type can be understood as the type of two-dimensional plane view or three-dimensional graphic formed by the projection of the workpiece in the engineering drawing.
[0060] S102: In response to a configuration operation on a segmented annotation position in an engineering drawing, at least one annotation position is formed.
[0061] The segmentation marking position can be understood as the position where each part or feature of the workpiece is segmented on the main view and dimension marking is performed at each segment.
[0062] S103: In response to the configuration operation of the annotation method in the engineering drawing, at least one type of annotation symbol is formed.
[0063] Among them, the annotation method can be understood as annotation data that can fully and clearly present the shape and features of the workpiece.
[0064] Specifically, the above configuration operation can be implemented in the output setting display interface, which is provided with options such as "view type", "segmented annotation position", and "annotation method" for designers to input corresponding operation instructions. Designers can establish one or more target views by checking one or more sub-options under the "view type" option (such as main view, left view, top view, expansion view, and axonometric view); establish one or more annotation positions by checking one or more sub-options under the "segmented annotation position" option (such as follow sketch, inner virtual and outer virtual); configure one or more annotation symbols by checking one or more sub-options under the "annotation method" option (such as center line, angle, expansion view opening annotation, total length, total width, expansion view end opening, center symbol, projection length, expansion view bending line, silver plating, three-view opening and oblique section length). Therefore, by responding to the configuration operation on the display interface, designers can adjust the annotation data according to actual drawing needs, which is flexible and convenient to use.
[0065] Optionally, Figure 5 The flowchart of a method for adjusting the zoom of a view in an engineering drawing provided by an embodiment of the present invention exemplarily shows a specific implementation method of a method for setting the output of an engineering drawing. Figure 5 As shown, in the above step S5, the outline size of the workpiece projection view after adding the annotation is obtained, and the workpiece projection view is scaled for the second time, and / or the placement position and / or data annotation position of the workpiece projection view is adjusted, including:
[0066] S301: Obtain a first constraint size of a view constraint area along a first direction and a second constraint size of the view constraint area along a second direction.
[0067] The first direction and the second direction are perpendicular to each other. For example, taking the view constraint region as a rectangle, the first direction may be the long side direction of the view constraint region, and the second direction may be the short side direction of the view constraint region.
[0068] S302: Acquire a first outline dimension along a first direction and a second outline dimension along a second direction of a projection view of a workpiece after adding annotations.
[0069] S303: Determine a first direction scaling ratio corresponding to the first direction according to a ratio between the first constraint size and the first outline size.
[0070] S304: Determine a second direction scaling ratio corresponding to the second direction according to a ratio between the second constraint size and the second outline size.
[0071] S305: Determine a second view zoom ratio corresponding to a second zoom ratio adjustment according to the first direction zoom ratio and the second direction zoom ratio.
[0072] Specifically, the first direction is the long side direction of the view constraint area (eg Figure 2 The second direction is the short side direction of the view constraint area (e.g. Figure 2 The first direction scaling ratio is used to limit the scaling ratio of the view along the long side of the constraint area, and the second direction scaling ratio is used to limit the scaling ratio of the view along the short side of the constraint area. This allows flexible adjustment of scaling ratios in different directions and improves the display effect of the projection view.
[0073] Optionally, Figure 6 A flowchart of another method for marking engineering drawings provided by an embodiment of the present invention. Figure 6 As shown, the engineering drawing marking method of the present application also includes:
[0074] S601: Acquire at least one target view and at least one type of annotation parameters of a workpiece to be annotated in an engineering drawing.
[0075] S602: In response to a constraint picking operation on a target view, a view constraint region is formed.
[0076] S603: Performing a first scaling adjustment on the workpiece projection view in the target view according to the view constraint region to determine a first view scaling ratio.
[0077] S604: adjusting the annotation parameters in the target view according to the first view scaling ratio, and annotating the adjusted data in the workpiece projection view.
[0078] S605: Obtain the outline size of the workpiece projection view after adding the annotation, and perform a second scaling adjustment on the workpiece projection view, and / or adjust the placement position and / or data annotation position of the workpiece projection view.
[0079] S606: Establishing a view adjustment database based on the corresponding relationship between the workpiece and any one of the view constraint area, the view scaling ratio and the placement position.
[0080] In this embodiment, the view adjustment database may be a SQLit database, which may be integrated into an application having three-dimensional design and engineering drawing design functions.
[0081] S607: Compare the workpiece to be annotated with the workpiece in the view adjustment database, and determine the view adjustment data according to the comparison result.
[0082] Specifically, after determining the view scaling ratio of the workpiece projection view in the target view according to the view constraint area, and adjusting the placement position of the workpiece projection view according to the view constraint area, the workpiece and the view constraint area, view scaling ratio and placement position corresponding to the workpiece are stored in the view adjustment database. When performing electrical design for the same type of workpiece (such as a copper busbar), the workpiece to be marked is compared with the workpiece in the view adjustment database, and the view scaling ratio corresponding to the workpiece that is consistent with the workpiece to be marked is determined as the final view adjustment ratio, and the placement position corresponding to the workpiece that is consistent with the workpiece to be marked is determined as the final view adjustment position. Thus, by establishing a view adjustment database, the view adjustment operation steps are simplified, the design process is simplified, and the design efficiency is improved.
[0083] Based on the same inventive concept, an embodiment of the present invention further provides an engineering drawing marking device. The engineering drawing marking device provided by the embodiment of the present invention can execute the engineering drawing marking method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0084] Figure 7 A schematic diagram of a structure of an engineering drawing marking device provided by an embodiment of the present invention is shown in FIG. Figure 7 As shown, the engineering drawing annotation device of the present application includes: a parameter configuration module 101 , a constraint configuration module 102 , a view adjustment module 103 and an annotation processing module 104 .
[0085] Among them, the parameter configuration module 101 is used to obtain at least one target view and at least one type of annotation parameters of the workpiece to be annotated in the engineering drawing; the constraint configuration module 102 is used to form a view constraint area in response to the constraint picking operation for the target view; the view adjustment module 103 is used to perform a first scaling adjustment on the workpiece projection view in the target view according to the view constraint area, and determine the first view scaling; the annotation processing module 104 is used to adjust the annotation parameters in the target view according to the first view scaling, and annotate the adjusted data in the workpiece projection view; the view adjustment module 103 is also used to obtain the outline size of the workpiece projection view after adding the annotation, and perform a second scaling adjustment on the workpiece projection view, and / or adjust the placement position and / or data annotation position of the workpiece projection view.
[0086] Optionally, the view adjustment module 103 is configured to: obtain a first constraint dimension of the view constraint area along a first direction and a second constraint dimension of the view constraint area along a second direction; wherein the first direction and the second direction are perpendicular to each other; obtain a first outline dimension of the projection view of the workpiece after adding annotations along the first direction and a second outline dimension along the second direction; determine a first direction scaling ratio corresponding to the first direction according to a ratio between the first constraint dimension and the first outline dimension; determine a second direction scaling ratio corresponding to the second direction according to a ratio between the second constraint dimension and the second outline dimension; and determine a second view scaling ratio corresponding to the second scaling ratio adjustment according to the first direction scaling ratio and the second direction scaling ratio.
[0087] Optionally, the view adjustment module 103 is further configured to: obtain the spacing between the workpiece projection view and each boundary of the view constraint area after adding annotations; adjust the placement position and / or data annotation position according to the spacing so that the workpiece projection view and its added annotations all fall within the corresponding view constraint area.
[0088] Optionally, the annotation processing module 104 is configured to: read the workpiece projection view based on preset annotation rules, identify the workpiece size of the workpiece to be annotated, adjust the workpiece size according to the first view scaling ratio, and perform data annotation in the workpiece projection view based on the adjusted workpiece size.
[0089] Optionally, the constraint configuration module 102 is configured to: display constraint picking options corresponding to different target views in the engineering drawing adjustment interface; form a three-view constraint area in response to a first constraint picking operation on the three views; and / or, form an expanded view constraint area in response to a second constraint picking operation on the expanded view; and / or, form an axonometric view constraint area in response to a third constraint picking operation on the axonometric view.
[0090] Optionally, the parameter configuration module 101 is configured to: form at least one target view in response to a configuration operation on a view type in an engineering drawing; form at least one annotation position in response to a configuration operation on a segmented annotation position in an engineering drawing; form at least one type of annotation symbol in response to a configuration operation on an annotation method in an engineering drawing.
[0091] Optionally, the engineering drawing marking device of the present application is also configured to: establish a view adjustment database based on the correspondence between the workpiece and any one of the view constraint area, view zoom ratio and placement position; compare the workpiece to be marked with the workpiece in the view adjustment database, and determine the view adjustment data based on the comparison results.
[0092] Based on the above-mentioned inventive concept, an embodiment of the present invention further provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned engineering drawing marking method.
[0093] Figure 8 A schematic diagram of the structure of an electronic device for implementing the engineering drawing annotation method of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0094] like Figure 8 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0095] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0096] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the above-mentioned engineering drawing annotation method.
[0097] In some embodiments, the above-described engineering drawing annotation method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the above-described engineering drawing annotation method may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the above-described engineering drawing annotation method in any other appropriate manner (e.g., by means of firmware).
[0098] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0099] The computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages (e.g., C#). These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer programs are executed by the processor, the functions / operations specified in the flow charts and / or block diagrams are implemented. The computer programs may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0100] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0101] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0102] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0103] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0104] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0105] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for marking engineering drawings, characterized in that: include: Acquire at least one target view and at least one type of annotation parameters of the workpiece to be annotated in the engineering drawing; In response to a constraint picking operation for the target view, forming a view constraint region; Performing a first scaling adjustment on the workpiece projection view in the target view according to the view constraint area to determine a first view scaling ratio; Adjusting the annotation parameters in the target view according to the first view scaling ratio, and annotating the adjusted data in the workpiece projection view; The outline size of the workpiece projection view after adding the annotation is obtained, and the scaling ratio of the workpiece projection view is adjusted for the second time, and / or the placement position and / or data annotation position of the workpiece projection view are adjusted.
2. The engineering drawing marking method according to claim 1, characterized in that: The step of obtaining the outline size of the workpiece projection view after adding the annotation, and performing a second scaling adjustment on the workpiece projection view, and / or adjusting the placement position and / or data annotation position of the workpiece projection view includes: Acquire a first constraint size of the view constraint area along a first direction and a second constraint size of the view constraint area along a second direction; wherein the first direction and the second direction are perpendicular to each other; Acquire a first outline dimension of the workpiece projection view along the first direction and a second outline dimension along the second direction after adding annotations; determining a first direction scaling ratio corresponding to the first direction according to a ratio between the first constraint dimension and the first outline dimension; determining a second direction scaling ratio corresponding to the second direction according to a ratio between the second constraint size and the second outline size; A second view scaling ratio corresponding to the second scaling ratio adjustment is determined according to the first direction scaling ratio and the second direction scaling ratio.
3. The engineering drawing marking method according to claim 2, characterized in that: The step of obtaining the maximum outline size of the workpiece projection view after adding annotations, and performing a second scaling adjustment on the workpiece projection view, and / or adjusting the placement position and / or data annotation position of the workpiece projection view, includes: Obtaining the distances between the workpiece projection view and each boundary of the view constraint area after adding the annotation; The placement position and / or the data annotation position are adjusted according to the spacing so that the workpiece projection view and the annotations added thereto all fall within the corresponding view constraint area.
4. The engineering drawing marking method according to claim 1, characterized in that: The step of adjusting the annotation parameters in the target view according to the first view scaling ratio and annotating the adjusted data in the workpiece projection view includes: The workpiece projection view is read based on a preset marking rule, the workpiece size of the workpiece to be marked is identified, the workpiece size is adjusted according to the first view scaling ratio, and data is marked in the workpiece projection view based on the adjusted workpiece size.
5. The engineering drawing marking method according to claim 1, characterized in that: The forming of a view constraint region in response to the constraint picking operation on the target view includes: Displaying constraint picking options corresponding to different target views in the engineering drawing adjustment interface; In response to a first constraint picking operation for three views, forming a three-view constraint region; and / or, In response to a second constraint picking operation on the unfolded view, forming an unfolded view constraint region; and / or, In response to the third constraint picking operation for the isometric drawing, an isometric drawing constraint region is formed.
6. The engineering drawing marking method according to claim 1, characterized in that: The step of obtaining at least one target view and at least one type of annotation parameters of the workpiece to be annotated in the engineering drawing includes: In response to a configuration operation on a view type in the engineering drawing, forming at least one target view; In response to a configuration operation on a segmented annotation position in the engineering drawing, forming at least one annotation position; In response to the configuration operation on the annotation mode in the engineering drawing, at least one type of annotation symbol is formed.
7. The engineering drawing marking method according to any one of claims 1 to 6, characterized in that: Also includes: Establishing a view adjustment database based on a correspondence between the workpiece and any one of the view constraint area, the view scaling ratio and the placement position; The workpiece to be marked is compared with the workpieces in the view adjustment database, and the view adjustment data is determined according to the comparison result.
8. An engineering drawing marking device, characterized in that: include: A parameter configuration module, used to obtain at least one target view and at least one type of annotation parameter of the workpiece to be annotated in the engineering drawing; A constraint configuration module, configured to form a view constraint area in response to a constraint picking operation for the target view; A view adjustment module, used for performing a first scaling adjustment on the workpiece projection view in the target view according to the view constraint area, and determining a first view scaling ratio; A marking processing module, used for adjusting the marking parameters in the target view according to the first view scaling ratio, and marking the adjusted data in the workpiece projection view; The view adjustment module is also used to obtain the outline size of the workpiece projection view after adding the annotation, and perform a second scaling adjustment on the workpiece projection view, and / or adjust the placement position and / or data annotation position of the workpiece projection view.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the engineering drawing marking method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the engineering drawing marking method according to any one of claims 1 to 7 when executed.