Component filling method and device, storage medium and electronic device
By displaying the component information list in the filling edit window and dividing it into subsets, component filling is automatically processed, which solves the problem of low component filling efficiency and achieves efficient and accurate component filling operations.
Patent Information
- Application Number
- CN202410839800.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-25
AI Technical Summary
In the existing technology, the component filling efficiency is low and the manual operation is cumbersome, resulting in low graphics filling efficiency and accuracy, and it is easy to miss feature identification.
Automatically process the boundaries and attributes of multiple adjacent component objects by displaying the information list of the target component collection in the fill editing window, dividing the subsets according to component attributes, and filling in the target drawing according to the target style in response to the fill confirmation command.
It improves the efficiency and accuracy of component filling, reduces manual operations, avoids repeated inefficient operations, and saves manpower and material resources.
Smart Images

Figure CN118840451A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular, to a component filling method, device, storage medium and electronic device. Background Art
[0002] In the prior art, the graphic filling method adopted by users is usually to manually screen the characteristics, use the filling tool to draw, and then manually fill in the characteristic identification text, but this method has many disadvantages. First, it is time-consuming to manually search for data, distinguish the characteristics, and then fill in the characteristic identification text; second, when there are many components with different characteristics, manual search is prone to omissions; and, since a certain characteristic identification on the diagram may be expressed in multiple positions, if you want to modify a certain characteristic identification on the diagram, you need to manually modify it one by one; that is, this method requires more manual operations, is cumbersome and has low accuracy.
[0003] The existing method of operating the components is cumbersome and time-consuming, which leads to low efficiency and accuracy of graphic filling. Therefore, there are technical problems of low efficiency and accuracy of graphic filling in the related art.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a component filling method, device, storage medium and electronic device to at least solve the technical problem of low component filling efficiency in the related art.
[0006] According to one aspect of an embodiment of the present application, a component filling method is provided, comprising: in response to a fill trigger instruction for a target drawing, displaying a component information list matching a target component set in a fill edit window, wherein the target component set includes component objects of multiple target types drawn in the target drawing; in the case where at least one target component attribute is determined from the component information list, dividing the target component set into at least one target component subset according to the at least one target component attribute, wherein at least one component attribute of the component object is displayed in the component information list, and the target component attribute configured for at least one target component object included in the target component subset is the same; in response to a fill confirmation instruction for a target component subset in at least one component subset, filling the target component objects included in the target component subset in the target drawing according to the target style.
[0007] According to another aspect of an embodiment of the present application, a component filling device is also provided, comprising: a display unit, in response to a fill trigger instruction for a target drawing, displaying a component information list matching a target component set in a fill edit window, wherein the target component set includes component objects of multiple target types drawn in the target drawing; a determination unit, in the case of determining at least one target component attribute from the component information list, dividing the target component set into at least one target component subset according to the at least one target component attribute, wherein at least one component attribute of the component object is displayed in the component information list, and the target component attribute configured for at least one target component object included in the target component subset is the same; a filling unit, in response to a fill confirmation instruction for a target component subset in at least one component subset, filling the target component objects included in the target component subset in the target drawing according to the target style.
[0008] Optionally, the filling device of the above-mentioned component also includes: a first filling unit, used to traverse the above-mentioned target component object in the above-mentioned target drawing, and fill the traversed target component object according to the above-mentioned target filling style; when the traversed target component object has at least one target component object adjacent to it, replace the object boundaries corresponding to multiple adjacent target component objects according to the target object boundary, wherein the target object boundary is used to surround multiple adjacent target component objects.
[0009] Optionally, the first filling unit includes: a first acquisition unit, used to acquire a plurality of component objects adjacent to the target object boundary; when the target component object is included in the plurality of component objects, determining an updated target object boundary according to the plurality of target component objects included in the target object boundary and an image area corresponding to the target component objects adjacent to the target object boundary.
[0010] Optionally, the first filling unit further includes: a second acquisition unit, configured to acquire the number of components corresponding to each of the at least one component subset; determine the filling mode of the first component objects in the first component subset whose number is greater than or equal to the target threshold value as no filling; and determine the filling mode of the second component subset according to the number of components of the second component objects included in the second component subset, wherein the number of components of the second component objects included in the second component subset is less than the target threshold value.
[0011] Optionally, the first filling unit further includes: a first display unit, configured to display first component attribute prompt information in a target image area surrounded by a boundary of the target object, wherein the first component attribute prompt information is used to indicate first attribute values corresponding to multiple target component objects filled according to a target filling method; display second component attribute prompt information at a first position in a target drawing, wherein the second component attribute prompt information is used for second attribute values corresponding to multiple component objects that are not filled; and display an attribute prompt information set at a second position in the target drawing, wherein the attribute prompt information set includes fill identification information respectively matching multiple component subsets, and the target component attributes of the component objects included in each component subset are configured with the same attribute values.
[0012] Optionally, the first filling unit includes: an editing unit, used to respond to a selection operation of a reference component subset in the target drawing, obtain an editing operation matching the reference component subset, wherein the reference component subset includes multiple reference component objects corresponding to the same object boundary; and perform the editing operation on the multiple reference component objects in the reference component subset respectively.
[0013] Optionally, the editing unit includes: an adjustment unit, used to adjust the attribute value of the reference component attribute of the reference component object according to the parameter value carried in the component parameter adjustment operation; and fill the reference component object in the target drawing according to the reference fill method indicated by the fill identifier carried in the fill adjustment operation.
[0014] According to another aspect of the embodiments of the present invention, there is further provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the filling method of the component described above when running.
[0015] According to another aspect of the embodiment of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the filling method of the component as above.
[0016] According to another aspect of the embodiment of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the component filling method through the computer program.
[0017] In an embodiment of the present application, in response to a fill trigger instruction for a target drawing, a component information list matching a target component set is displayed in a fill edit window, wherein the target component set includes component objects of multiple target types drawn in the target drawing; when at least one target component attribute is determined from the component information list, the target component set is divided into at least one target component subset according to the at least one target component attribute, wherein at least one component attribute of the component object is displayed in the component information list, and the target component attribute configured for at least one target component object included in the target component subset is the same; in response to a fill confirmation instruction for a target component subset in at least one component subset, the target component objects included in the target component subset are filled in the target drawing according to the target style.
[0018] By utilizing the above-mentioned component filling method, when a filling instruction is received, at least one target component attribute is determined, and the target component set is divided into at least one target component subset according to the at least one target component attribute, and then the target component objects included in the target component subset are filled in the target drawing according to the target style. There is no need to manually search for multiple characteristic components on the drawing, fill in characteristic identifiers, and then fill components with the same characteristic identifier, which solves the problem of many manual filling operations on components, slow speed, and cumbersome operations, achieves the technical effect of improving the filling efficiency of components, and then solves the technical problem of low filling efficiency of components in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0021] Figure 1 is a hardware environment schematic diagram of a component filling method according to an embodiment of the present application;
[0022] Figure 2 is a flow chart of an optional component filling method according to an embodiment of the present application;
[0023] Figure 3 is a schematic diagram of an optional component filling method according to an embodiment of the present application;
[0024] Figure 4is a schematic diagram of another optional component filling method according to an embodiment of the present application;
[0025] Figure 5 is a schematic diagram of another optional component filling method according to an embodiment of the present application;
[0026] Figure 6 is a schematic diagram of another optional component filling method according to an embodiment of the present application;
[0027] Figure 7 is a schematic diagram of another optional component filling method according to an embodiment of the present application;
[0028] Figure 8 is a schematic diagram of another optional component filling method according to an embodiment of the present application;
[0029] Fig. 9 is a schematic diagram of another optional component filling method according to an embodiment of the present application;
[0030] Fig.10 is a schematic diagram of another optional component filling method according to an embodiment of the present application;
[0031] Fig.11 is a flowchart of another optional component filling method according to an embodiment of the present application;
[0032] Fig.12 is a schematic diagram of another optional component filling method according to an embodiment of the present application;
[0033] Fig.13 is a schematic diagram of another optional component filling method according to an embodiment of the present application;
[0034] Fig.14 is a schematic diagram of an optional component filling device according to an embodiment of the present invention;
[0035] Fig.15 2 is a schematic diagram of components of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application 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 interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0038] According to one aspect of the embodiments of the present application, a method for filling a component is provided. Optionally, as an optional implementation, the method for filling a component can be applied to, but is not limited to, Figure 1 In the system shown in FIG. 1 , a terminal device 102, a server 104 and a network 110 are formed. Figure 1 As shown, the terminal device 102 is connected and communicated with the server 104 through the network 110. The above network may include but is not limited to: wired network, wireless network, wherein the wired network includes: local area network, metropolitan area network and wide area network, and the wireless network includes: Bluetooth, WIFI and other networks that realize wireless communication. The above terminal device may include but is not limited to at least one of the following: mobile phone (such as Android mobile phone, iOS mobile phone, etc.), laptop computer, tablet computer, PDA, MID (Mobile Internet Devices, mobile Internet device), PAD, desktop computer, smart TV, car-mounted device, etc. The above terminal device 102 may include but is not limited to a display, a processor and a memory, and the above server 104 may be a single server, or a server cluster composed of multiple servers, or a cloud server. The above server includes a database and a processing engine.
[0039] The specific process can be as follows:
[0040] Step S102, the terminal device 102 sends a component filling request to the server 104 through the network 110; the component filling request can trigger the server to obtain at least one file that needs to be filled with components, such as a PDF file, or the file filling request carries a file that needs to be filled with components, so that the server can obtain the file that needs to be filled with components, etc. The specific way in which the server obtains the file is not limited in this application;
[0041] Steps S104-S108, in response to a fill trigger instruction for a target drawing, displaying a component information list matching a target component set in a fill edit window, wherein the target component set includes component objects of multiple target types drawn in the target drawing; in the case where at least one target component attribute is determined from the component information list, dividing the target component set into at least one target component subset according to the at least one target component attribute, wherein at least one component attribute of the component object is displayed in the component information list, and the target component attribute configured for at least one target component object included in the target component subset is the same; in response to a fill confirmation instruction for a target component subset in at least one component subset, filling the target component objects included in the target component subset in the target drawing according to the target style;
[0042] Step S110 : the server 104 sends the component filling result to the terminal device 102 via the network 110 .
[0043] remove Figure 1 In addition to the examples shown, the above steps can be completed independently by the client or the server, or by the client and the server working together, such as the terminal device 102 executing the above steps S104, thereby reducing the processing pressure of the server 104. The terminal device 102 includes but is not limited to a handheld device (such as a mobile phone), a laptop computer, a desktop computer, a vehicle-mounted device, etc., and the present application does not limit the specific implementation of the terminal device 102.
[0044] As an optional implementation, Figure 2 As shown, the filling method of the component includes:
[0045] S202, in response to a fill trigger instruction for a target drawing, displaying a component information list matching a target component set in a fill edit window, wherein the target component set includes component objects of multiple target types drawn in the target drawing;
[0046] S204, when at least one target component attribute is determined from the component information list, dividing the target component set into at least one component subset according to the at least one target component attribute, wherein at least one component attribute of the component object is displayed in the component information list, and the target component attribute configured for at least one target component object included in the target component subset is the same;
[0047] S206 , in response to a fill confirmation instruction for a target component subset in at least one component subset, fill the target component objects included in the target component subset in a target drawing according to a target style.
[0048] It is understandable that the above-mentioned component filling method can be applied, but not limited to, in scenarios where a large number of engineering files need to perform component filling operations. In the prior art, it is often necessary to manually search for data, distinguish characteristics, and then fill in the characteristic identification text, which is time-consuming, and when there are many components with different characteristics, manual search is prone to omissions; as a result, a certain characteristic identification on the diagram may be expressed in multiple positions. If you want to modify a certain characteristic identification on the diagram, you need to manually modify it one by one, which leads to the defect of low efficiency in filling engineering components. By adopting the above-mentioned component filling method, the acquired data is automatically distinguished for different characteristics, and each characteristic identification is expressed on the drawing; the problem of low efficiency and easy omission of manual distinction of characteristics is solved; and if you want to modify the characteristic identification on the drawing, you can modify it in batches uniformly, which solves the problem of cumbersome and inefficient operation process of component filling caused by manual operation, thereby achieving the beneficial effect of increasing the speed of component filling and reducing the operational complexity of component filling.
[0049] In step S202, in response to a fill trigger instruction for a target drawing, a component information list matching the target component set is displayed in a fill edit window, wherein the component information list may include but is not limited to the component name, component type, component material, size information, component direction information such as horizontal and vertical information in space, component status information such as designed, built, component annotations, etc., which are not limited here; the target component set includes component objects of multiple target types drawn in the target drawing;
[0050] It can be understood that step S204 determines at least one target component attribute from the component information list, for example, it is determined that the component information list includes plate thickness, lifting elevation, and pattern, and the target component attribute is determined as: plate thickness 130mm, lifting elevation -1.800m, and a characteristic identifier such as "ANS134" is determined corresponding to the determined target component attribute. This is only an example and does not specifically limit the above process;
[0051] Further, the target component set is divided into at least one target component subset according to at least one target component attribute. It should be noted that at least one component attribute of the component object is displayed in the component information list, and the target component attribute configured by at least one target component object included in the target component subset is the same. For example, in the target component subset divided according to the above target component attribute, there is a component A with a plate thickness of 130 mm and a lifting elevation of -1.800 m, and a component B with a plate thickness of 130 mm and a lifting elevation of -1.800 m, that is, the target component attribute configured by at least one target component object is the same;
[0052] Step S206: In response to a fill confirmation instruction for a target component subset in at least one component subset, fill the target component objects included in the target component subset in the target drawing according to the target style;
[0053] Specifically, it can be receiving a user filling instruction, which can be but not limited to an input instruction or automatically generating other rules, etc.; determining a filling style, including a filling pattern, color, transparency, etc., and filling adjacent components in a target component subset; updating the filled drawing to obtain a component filling drawing that meets the needs, thereby improving the efficiency of component filling;
[0054] Through the embodiment provided by the present application, in response to the filling trigger instruction of the target drawing, a component information list matching the target component set is displayed in the filling editing window, wherein the target component set includes component objects of multiple target types drawn in the target drawing; when at least one target component attribute is determined from the component information list, the target component set is divided into at least one target component subset according to the at least one target component attribute, wherein at least one component attribute of the component object is displayed in the component information list, and the target component attribute configured by at least one target component object included in the target component subset is the same; in response to the filling confirmation instruction of the target component subset in at least one component subset, the target component objects included in the target component subset are filled in the target drawing according to the target style. The above method avoids the staff from performing repeated and inefficient operations on a large number of components, saves manpower and material resources, and improves the efficiency of component filling.
[0055] As an optional solution, fill the component objects included in the target component subset in the target drawing according to the target fill style, including:
[0056] S1, traversing the target component objects in the target drawing, and filling the traversed target component objects according to the target filling style;
[0057] S2, when there is at least one target component object adjacent to the traversed target component object, replacing the object boundaries corresponding to the plurality of adjacent target component objects according to the target object boundary, wherein the target object boundary is used to surround the plurality of adjacent target component objects.
[0058] Optionally, in the implementation step S1, the target component object is traversed in the target drawing, and the graphic data of each layer may be traversed in sequence, but is not limited to, and the traversal is performed according to the size and direction (horizontal, vertical) of the graphic data according to preset traversal conditions; and then the traversed target component object is filled according to the target filling style;
[0059] Further, in step S2, when the traversed target component object has at least one target component object adjacent to it, the object boundaries corresponding to the plurality of adjacent target component objects are replaced according to the target object boundary, such as Figure 3 As shown, A, B, and C are components with the same characteristic identifier (that is, component objects in the same target component subset), component A is adjacent to component B, and component C is not adjacent to component A or component B. Therefore, the object boundaries corresponding to multiple adjacent target component objects are replaced according to the target object boundary to obtain the filled component A'. It can be understood that the target object boundary is used to surround multiple adjacent target component objects.
[0060] Through the embodiments provided by the present application, target component objects are traversed in a target drawing, and the traversed target component objects are filled according to a target filling style; when the traversed target component object has at least one target component object adjacent to it, object boundaries corresponding to the plurality of adjacent target component objects are replaced according to the target object boundary, wherein the target object boundary is used to surround the plurality of adjacent target component objects, thereby achieving a technical effect of improving the filling efficiency of the component.
[0061] As an optional solution, in the case where there is at least one target component object adjacent to the traversed target component object, after replacing the object boundaries corresponding to the plurality of adjacent target component objects according to the target object boundary, the method further includes:
[0062] S1, obtaining multiple component objects adjacent to the boundary of the target object;
[0063] S2, when the target component object is included in the plurality of component objects, determining an updated target object boundary according to the plurality of target component objects included in the target object boundary and the image region corresponding to the target component object adjacent to the target object boundary.
[0064] In the above steps S1-S2, firstly, a plurality of component objects adjacent to the target boundary are obtained; further, in the case where the target component object is included in the plurality of component objects, the updated target object boundary is determined according to the plurality of target component objects included in the target object boundary and the image area corresponding to the target component object adjacent to the target object boundary. It can be understood that the target component object can be a component with the same attributes as the component in the target object boundary, or can be a component object with the largest component area and the top position, etc.; Figure 4 As shown, the boundary of the target object is the boundary corresponding to component A. The component objects adjacent to component A are component D, component E, and component F, among which component D is the target component object. Therefore, the boundary of the target object is updated to be the boundary corresponding to A1.
[0065] Through the embodiments provided by the present application, multiple component objects adjacent to the target object boundary are obtained; when the target component object is included in the multiple component objects, an updated target object boundary is determined based on the multiple target component objects included in the target object boundary and the image area corresponding to the target component object adjacent to the target object boundary, thereby improving the flexibility of the component filling operation, thereby achieving the technical effect of improving the filling efficiency of the component.
[0066] As an optional solution, in response to a fill confirmation instruction for a target component subset in at least one component subset, before filling the target component objects included in the target component subset in the target drawing according to the target style, the method further includes:
[0067] S1, obtaining the number of components corresponding to each component subset in at least one component subset;
[0068] S2, determining the filling mode of the first component objects in the first component subset whose number is greater than or equal to the target threshold in at least one component subset as no filling;
[0069] S3: Determine a filling mode of the second component subset according to the number of components of the second component objects included in the second component subset, wherein the number of components of the second component objects included in the second component subset is less than a target threshold.
[0070] As an optional implementation, the number of components corresponding to each component subset in at least one component subset is obtained, and the filling mode of the first component object in the first component subset whose number is greater than or equal to the target threshold in the at least one component subset is determined as no filling. Optionally, the first component is determined to be a filling mode of no filling, and the outline of the first component object can be enhanced, the color can be increased, the transparency can be modified, and the information of the first component object can be annotated and explained in the component-undisplayed area of the image, such as Figure 5 As shown, the component subset in the drawing includes component B, component D, component E, and component F. If the number is greater than the preset threshold, the component is processed in a non-filling manner, and the boundary corresponding to the component can be enhanced and the boundary line style can be modified;
[0071] In step S3, the filling mode of the second component subset is determined according to the number of components of the second component object included in the second component subset. It should be noted that the number of components of the second component object included in the second component subset is less than the target threshold. As an optional implementation, for example, when the number of components of the second component object is in the range of 1 to 10, the filling mode is adopted. When the number of components is in the range of 11 to 100, the filling mode is adopted. The filling mode is adopted, thereby achieving the effect of filling components with different characteristics.
[0072] Through the embodiments provided by the present application, the number of components corresponding to each component subset in at least one component subset is obtained; the filling mode of the first component object in the first component subset whose number is greater than or equal to the target threshold in at least one component subset is determined as no filling; the filling mode of the second component subset is determined according to the number of components of the second component objects included in the second component subset, wherein the number of components of the second component objects included in the second component subset is less than the target threshold, thereby improving the efficiency of filling the components.
[0073] As an optional solution, after filling the component objects included in the target component subset in the target drawing according to the target filling style, at least one of the following is further included:
[0074] Method 1: displaying first component attribute prompt information in a target image area surrounded by a target object boundary, wherein the first component attribute prompt information is used to indicate first attribute values corresponding to a plurality of target component objects filled according to a target filling method;
[0075] Method 2: displaying the second component attribute prompt information at the first position in the target drawing, wherein the second component attribute prompt information is used for the second attribute values corresponding to the plurality of component objects that are not filled;
[0076] Method three: displaying a property prompt information set at a second position in the target drawing, wherein the property prompt information set includes fill identification information respectively matching multiple component subsets, and the target component properties of the component objects included in each component subset are configured with the same property value.
[0077] As an optional implementation, the first component attribute prompt information is displayed in the target image area surrounded by the target object boundary. It should be noted that the first component attribute prompt information is used to indicate the first attribute values corresponding to the multiple target component objects filled according to the target filling method. Specifically, it can be as follows: Figure 6 As shown, component A is the target image area surrounded by the boundary of the target object;
[0078] Optionally, the second component attribute prompt information is displayed at the first position in the target drawing. It should be noted that the second component attribute prompt information is used for the second attribute values corresponding to the plurality of component objects that are not filled. Specifically, Figure 7 As shown, component C is an unfilled component. Optionally, the first position may be inside component C;
[0079] In another optional implementation, the attribute prompt information set is displayed at the second position in the target drawing, such as Figure 8As shown, it should be noted that the attribute prompt information set includes fill identification information that matches multiple component subsets respectively, and the target component attributes of the component objects included in each component subset are configured with the same attribute value, such as Figure 8 As shown, in the plate fill table, the pattern is the style of the component fill, and the plate thickness and lift elevation are the attributes. Optionally, the fill table can be placed in a blank area without components in the drawing;
[0080] Through the embodiments provided by the present application, first component attribute prompt information is displayed in a target image area surrounded by a target object boundary, wherein the first component attribute prompt information is used to indicate a first attribute value corresponding to a plurality of target component objects filled according to a target filling method; second component attribute prompt information is displayed at a first position in a target drawing, wherein the second component attribute prompt information is used for a second attribute value corresponding to a plurality of component objects that are not filled; and an attribute prompt information set is displayed at a second position in the target drawing, wherein the attribute prompt information set includes fill identification information respectively matched with a plurality of component subsets, and the target component attributes of the component objects included in each component subset are configured with the same attribute value, without the need to repeatedly perform a large number of repetitive editing and modification operations on the components, thereby further improving the filling efficiency of the components.
[0081] As an optional solution, after replacing the object boundaries corresponding to the plurality of adjacent target component objects according to the target object boundary, the method further includes:
[0082] S1, in response to a selection operation of a reference component subset in a target drawing, obtaining an editing operation matching the reference component subset, wherein the reference component subset includes a plurality of reference component objects corresponding to a same object boundary;
[0083] S2, performing editing operations on multiple reference component objects in the reference component subset respectively.
[0084] Optionally, in this embodiment, firstly, in response to the selection operation of the reference component subset in the target drawing, an editing operation matching the reference component subset is obtained, and further, the editing operation is respectively performed on multiple reference component objects in the reference component subset. It should be noted that the reference component subset includes multiple reference component objects corresponding to the same object boundary;
[0085] As an optional implementation, Figure 5As shown, components B, D, E, and F are drawings after being filled and merged according to different characteristic identifiers, and an editing operation of matching the reference component subset is obtained. For example, the editing operation of matching a reference component subset is selected to modify the plate thickness of the component to 1.300 mm, and the plate thickness of the filled and merged components B, D, E, and F are uniformly modified to 1.300 mm at the same time; this is only an example and does not specifically limit the above process.
[0086] Through the embodiments provided by the present application, in response to a selection operation of a reference component subset in the target drawing, an editing operation matching the reference component subset is obtained, wherein the reference component subset includes multiple reference component objects corresponding to the same object boundary; the editing operation is performed on the multiple reference component objects in the reference component subset respectively, thereby achieving a technical effect of improving the filling efficiency of components.
[0087] As an optional solution, performing editing operations on multiple reference component objects in the reference component subset respectively includes at least one of the following:
[0088] Method 1: adjusting the attribute value of the reference component attribute of the reference component object according to the parameter value carried in the component parameter adjustment operation;
[0089] Method 2: Fill the reference component object in the target drawing according to the reference fill method indicated by the fill identifier carried in the fill adjustment operation.
[0090] Optionally, in one mode, the attribute value of the reference component attribute of the reference component object is adjusted according to the parameter value carried in the component parameter adjustment operation;
[0091] In another mode, the reference component object is filled in the target drawing according to the reference filling mode indicated by the filling identifier carried in the filling adjustment operation; for example, if the filling identifier is "ANS134", it means that the filling is performed with a transparency of 60%, a ripple style, a filling ratio of 100%, and a filling angle of 10°;
[0092] Through the embodiments provided by the present application, the attribute values of the reference component attributes of the reference component object are adjusted according to the parameter values carried in the component parameter adjustment operation; the reference component object is filled in the target drawing according to the reference filling method indicated by the filling identifier carried in the filling adjustment operation, thereby achieving the purpose of improving the speed and flexibility of component filling and reducing the complexity of component filling operations, thereby realizing the technical effect of improving the filling efficiency of components.
[0093] The following is a specific implementation method for completely filling components with the same characteristic identifier to illustrate this solution:
[0094] S1, obtains the calculation model path according to the data information, automatically reads the relevant data information under the model path, and obtains the layer information to be processed according to the filled layer number. The specific operation content is as follows Fig. 9 As shown;
[0095] S2, through the "Template Setting" - "Plate Filling" interface, click "Intelligent Identification" to automatically read the data and screen the plates with different characteristics, such as different plate thickness and lifting height. The program automatically specifies the characteristic identification (that is, the pattern to be filled) and fills it in the table. The information in the table can also be manually added and modified, and the filling angle and proportion can be set, such as Fig.10 As shown;
[0096] S3, click "OK" on the "Generate Template Drawing" interface to automatically insert the drawing distinguishing the component characteristics into CAD, such as Figure 8 shown.
[0097] As an optional implementation method, the specific process is as follows Fig.11 As shown:
[0098] S1102, automatically reading data; specifically, automatically reading relevant data of all layers, and extracting characteristic data of the component.
[0099] S1104, feature screening and classification; specifically, the features are automatically screened and classified, and each type of feature matches a corresponding feature identifier. The feature identifier can also be manually modified and regenerated after modification. The modified feature identifiers on the diagram will be uniformly updated. For example: Board features: After clicking "Smart Identification", the features are automatically screened, such as Fig.12 shown.
[0100] S1106, filter out components that do not need to express characteristics and components with the same characteristics; specifically, as an optional implementation, components with the same characteristics and the largest number do not express characteristic identifiers on the drawing, but need to be noted in the description text, such as the characteristics of the plate: that is, the filling pattern is not expressed on the drawing; as another optional implementation, filter out components with exactly the same characteristics, such as plates that meet one of the following conditions, and are judged as plates with exactly the same characteristics: all are judged to have filling patterns, and the plate thickness and lifting elevation are exactly the same; all are judged to have no filling patterns, and the plate thickness and lifting elevation are exactly the same;
[0101] S1108, merging adjacent components with the same characteristics to obtain the boundary contour of each characteristic envelope; specifically, filling and merging the component regions with the same characteristics; updating the boundary range after merging, and distinguishing the components at the junction of two adjacent components with different characteristics to determine which characteristic the component belongs to;
[0102] As an optional implementation, the method for determining the filling merge contour can be as follows: first, randomly select a component with a certain characteristic to obtain the boundary contour of the component; then, determine whether the components adjacent to it have the same characteristic, if there is a component with the same characteristic, merge it with the processed component; if not, terminate; further, re-obtain the maximum envelope boundary contour of the merged component according to the merged component; finally, based on the contour, determine according to the steps in S1106; terminate until all the components adjacent to it do not have the same characteristic;
[0103] S1110, drawing expression characteristic identification, such as Fig.13 As shown;
[0104] S1112, summarize the characteristic identification legend corresponding to each layer, such as Figure 8 shown.
[0105] Through the embodiments provided by the present application, when a filling instruction is received, at least one target component attribute is determined, and the target component set is divided into at least one target component subset according to the at least one target component attribute, and then the target component objects included in the target component subset are filled in the target drawing according to the target style. There is no need to manually search for multiple characteristic components on the drawing, fill in characteristic identifiers, and then fill in components with the same characteristic identifier, which solves the problem of having to perform a large number of manual filling operations on components, which is slow and cumbersome, and achieves the technical effect of improving the filling efficiency of components, thereby solving the technical problem of low filling efficiency of components in the related art.
[0106] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0107] According to another aspect of the embodiment of the present application, a component filling device for implementing the component filling method is also provided. Fig.14 As shown, the device comprises:
[0108] The display unit 1402 is used to display a component information list matching the target component set in the fill edit window in response to a fill trigger instruction for the target drawing, wherein the target component set includes component objects of multiple target types drawn in the target drawing;
[0109] The determining unit 1404 is used to divide the target component set into at least one target component subset according to the at least one target component attribute when at least one target component attribute is determined from the component information list, wherein the component information list displays at least one component attribute of the component object, and the target component attribute configured for at least one target component object included in the target component subset is the same;
[0110] The filling unit 1406 is configured to fill the target component objects included in the target component subset in the target drawing according to the target style in response to a fill confirmation instruction for the target component subset in the at least one component subset.
[0111] For a specific embodiment, reference may be made to the example shown in the above-mentioned component filling method, which will not be described in detail in this example.
[0112] According to another aspect of the embodiment of the present application, an electronic device for implementing the filling method of the above-mentioned component is also provided. Fig.15 As shown, the electronic device includes a memory 1502 and a processor 1504. The memory 1502 stores a computer program, and the processor 1504 is configured to execute the steps in any of the above method embodiments through the computer program.
[0113] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0114] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0115] S1, in response to a fill trigger instruction for a target drawing, displaying a component information list matching a target component set in a fill edit window, wherein the target component set includes component objects of multiple target types drawn in the target drawing;
[0116] S2, when at least one target component attribute is determined from the component information list, dividing the target component set into at least one target component subset according to the at least one target component attribute, wherein at least one component attribute of the component object is displayed in the component information list, and the target component attribute configured for at least one target component object included in the target component subset is the same;
[0117] S3, in response to a fill confirmation instruction for a target component subset in at least one component subset, filling the target component objects included in the target component subset in a target drawing according to a target style.
[0118] Alternatively, a person skilled in the art may understand that: Fig.15The components shown are for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, or other terminal equipment. Fig.15 It does not limit the components of the electronic device. For example, the electronic device may also include Fig.15 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.15 Different configurations are shown.
[0119] Among them, the memory 1502 can be used to store software programs and modules, such as the program instructions / modules corresponding to the component filling method and device in the embodiment of the present application. The processor 1504 executes various functional applications and data processing by running the software programs and modules stored in the memory 1502, that is, realizing the above-mentioned component filling method. The memory 1502 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1502 may further include a memory remotely arranged relative to the processor 1504, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1502 can be specifically, but not limited to, used for information such as target determination requests and target sending requests. As an example, such as Fig.15 As shown, the memory 1502 may include but is not limited to the display unit 1402, the determination unit 1404, and the filling unit 1406 in the filling device of the above components. In addition, other module units in the filling device of the above components may also be included but are not limited to, which will not be repeated in this example.
[0120] Optionally, the transmission device 1506 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 1506 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1506 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0121] In addition, the electronic device further includes: a display 1508 for displaying information such as the target determination request and the target sending request; and a connection bus 1510 for connecting various module components in the electronic device.
[0122] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes may form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0123] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions provided by the embodiments of the present application are executed.
[0124] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0125] It should be noted that the computer system of the electronic device is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0126] The computer system includes a central processing unit (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) or the program loaded from the storage part to the random access memory (RAM). In the random access memory, various programs and data required for system operation are also stored. The central processing unit, the read-only memory and the random access memory are connected to each other through a bus. The input / output interface (I / O interface) is also connected to the bus.
[0127] The following components are connected to the input / output interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a local area network card, a modem, etc. The communication part performs communication processing via a network such as the Internet. A drive is also connected to the input / output interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that the computer program read therefrom is installed into the storage part as needed.
[0128] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions defined in the system of the present application are executed.
[0129] Optionally, the filling device of the above-mentioned component also includes: a first filling unit, used to traverse the above-mentioned target component object in the above-mentioned target drawing, and fill the traversed target component object according to the above-mentioned target filling style; when the traversed target component object has at least one target component object adjacent to it, replace the object boundaries corresponding to multiple adjacent target component objects according to the target object boundary, wherein the target object boundary is used to surround multiple adjacent target component objects.
[0130] Optionally, the first filling unit includes: a first acquisition unit, used to acquire a plurality of component objects adjacent to the target object boundary; when the target component object is included in the plurality of component objects, determining an updated target object boundary according to the plurality of target component objects included in the target object boundary and an image area corresponding to the target component objects adjacent to the target object boundary.
[0131] Optionally, the first filling unit further includes: a second acquisition unit, configured to acquire the number of components corresponding to each of the at least one component subset; determine the filling mode of the first component objects in the first component subset whose number is greater than or equal to the target threshold value as no filling; and determine the filling mode of the second component subset according to the number of components of the second component objects included in the second component subset, wherein the number of components of the second component objects included in the second component subset is less than the target threshold value.
[0132] Optionally, the first filling unit further includes: a first display unit, configured to display first component attribute prompt information in a target image area surrounded by a boundary of the target object, wherein the first component attribute prompt information is used to indicate first attribute values corresponding to multiple target component objects filled according to a target filling method; display second component attribute prompt information at a first position in a target drawing, wherein the second component attribute prompt information is used for second attribute values corresponding to multiple component objects that are not filled; and display an attribute prompt information set at a second position in the target drawing, wherein the attribute prompt information set includes fill identification information respectively matching multiple component subsets, and the target component attributes of the component objects included in each component subset are configured with the same attribute values.
[0133] Optionally, the first filling unit includes: an editing unit, used to respond to a selection operation of a reference component subset in the target drawing, obtain an editing operation matching the reference component subset, wherein the reference component subset includes multiple reference component objects corresponding to the same object boundary; and perform the editing operation on the multiple reference component objects in the reference component subset respectively.
[0134] Optionally, the editing unit includes: an adjustment unit, used to adjust the attribute value of the reference component attribute of the reference component object according to the parameter value carried in the component parameter adjustment operation; and fill the reference component object in the target drawing according to the reference fill method indicated by the fill identifier carried in the fill adjustment operation.
[0135] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0136] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0137] S1, in response to a fill trigger instruction for a target drawing, displaying a component information list matching a target component set in a fill edit window, wherein the target component set includes component objects of multiple target types drawn in the target drawing;
[0138] S2, when at least one target component attribute is determined from the component information list, dividing the target component set into at least one target component subset according to the at least one target component attribute, wherein at least one component attribute of the component object is displayed in the component information list, and the target component attribute configured for at least one target component object included in the target component subset is the same;
[0139] S3, in response to a fill confirmation instruction for a target component subset in at least one component subset, filling the target component objects included in the target component subset in a target drawing according to a target style.
[0140] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0141] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0142] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0143] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0144] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0145] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0146] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0147] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for filling a component, characterized in that: include: In response to a fill trigger instruction for a target drawing, a component information list matching a target component set is displayed in a fill edit window, wherein the target component set includes component objects of multiple target types drawn in the target drawing; In the case where at least one target component attribute is determined from the component information list, dividing the target component set into at least one target component subset according to the at least one target component attribute, wherein the component information list displays at least one component attribute of the component object, and the target component attribute configured by at least one target component object included in the target component subset is the same; In response to a fill confirmation instruction for a target component subset in at least one of the component subsets, the target component objects included in the target component subset are filled in the target drawing according to a target style.
2. The method according to claim 1, characterized in that The step of filling the component objects included in the target component subset in the target drawing according to the target filling style includes: Traversing the target component objects in the target drawing, and filling the traversed target component objects according to the target filling style; When the traversed target component object has at least one target component object adjacent to it, object boundaries corresponding to a plurality of adjacent target component objects are replaced according to a target object boundary, wherein the target object boundary is used to surround a plurality of adjacent target component objects.
3. The method according to claim 2, characterized in that In the case that the traversed target component object has at least one target component object adjacent to it, after replacing the object boundaries corresponding to the plurality of adjacent target component objects according to the target object boundary, the method further includes: Acquire a plurality of component objects adjacent to a boundary of the target object; In the case where the target component object is included in the plurality of component objects, the updated target object boundary is determined according to the plurality of target component objects included in the target object boundary and the image area corresponding to the target component object adjacent to the target object boundary.
4. The method according to claim 2, characterized in that: In response to a fill confirmation instruction for a target component subset in at least one of the component subsets, before filling the target component objects included in the target component subset in the target drawing according to a target style, the method further includes: Obtain the number of components corresponding to each of the component subsets in at least one of the component subsets; Determine the filling mode of the first component objects in the first component subset whose number is greater than or equal to the target threshold in at least one of the component subsets as no filling; The filling mode of the second component subset is determined according to the number of components of the second component object included in the second component subset, wherein the number of components of the second component object included in the second component subset is less than the target threshold.
5. The method according to claim 2, characterized in that: After filling the component objects included in the target component subset in the target drawing according to the target filling style, the method further includes at least one of the following: Displaying first component attribute prompt information in a target image area surrounded by the target object boundary, wherein the first component attribute prompt information is used to indicate first attribute values corresponding to a plurality of target component objects filled according to a target filling method; Displaying second component attribute prompt information at a first position in the target drawing, wherein the second component attribute prompt information is used for second attribute values corresponding to a plurality of component objects that are not filled; A property prompt information set is displayed at a second position in the target drawing, wherein the property prompt information set includes fill identification information respectively matching multiple component subsets, and the target component properties of the component objects included in each component subset are configured with the same property value.
6. The method according to claim 2, characterized in that After replacing the object boundaries corresponding to the plurality of adjacent target component objects according to the target object boundary, the method further includes: In response to a selection operation of a reference component subset in the target drawing, obtaining an editing operation matching the reference component subset, wherein the reference component subset includes a plurality of reference component objects corresponding to a same object boundary; The editing operation is performed on a plurality of the reference component objects in the reference component subset respectively.
7. The method according to claim 6, characterized in that The performing the editing operation on the plurality of reference component objects in the reference component subset respectively comprises at least one of the following: Adjusting the attribute value of the reference component attribute of the reference component object according to the parameter value carried in the component parameter adjustment operation; The reference component object is filled in the target drawing according to the reference filling method indicated by the filling identifier carried in the filling adjustment operation.
8. A filling device for a component, characterized in that: include: A display unit, in response to a fill trigger instruction for a target drawing, displays a component information list matching a target component set in a fill edit window, wherein the target component set includes component objects of multiple target types drawn in the target drawing; A determining unit, in the case of determining at least one target component attribute from the component information list, divides the target component set into at least one target component subset according to the at least one target component attribute, wherein the at least one component attribute of the component object is displayed in the component information list, and the target component attribute configured by at least one target component object included in the target component subset is the same; The filling unit fills the target component objects included in the target component subset according to a target style in the target drawing in response to a fill confirmation instruction for a target component subset in at least one of the component subsets.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed by an electronic device.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to claim 1 are implemented.
Citation Information
Cited By
Component labeling method and device, computer equipment, storage medium and program product
CN120808382A
