Method and device for generating tree structure model of bent workpiece, electronic equipment and medium
By generating a tree structure model of bent workpiece, the problems of low accuracy and low efficiency in the acquisition of bend information in the prior art are solved, and efficient and accurate acquisition of bend information is achieved, saving time and improving processing efficiency.
Patent Information
- Application Number
- CN202510541406.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-09-02
AI Technical Summary
The prior art has low accuracy and low efficiency in obtaining bending information during simulation or actual processing of bending workpieces, and high time cost.
By generating a tree structure model of the bent workpiece, the master node and bending node are created based on all the face information of the three-dimensional model, the parent-child hierarchical relationship is determined, and the tree structure model is generated based on this information and the bend information is described.
It improves the accuracy and convenience of bending information acquisition, saves time, improves work efficiency, and reduces the time and errors of manual measurement.
Smart Images

Figure CN120579232A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of bent workpieces, and in particular to a method, device, electronic equipment, and medium for generating a tree structure model of a bent workpiece. Background Art
[0002] Bending refers to the process of plastically deforming raw materials, such as metal or non-metallic sheets and profiles, to create parts with specific angles, shapes, and dimensions. These parts are widely used in machinery manufacturing, sheet metal processing, automotive manufacturing, and home appliance production, for example, in automotive body components, distribution cabinet enclosures, and furniture brackets.
[0003] Currently, when performing machining simulation or actual machining of a bent workpiece, designers are required to measure the three-dimensional model to obtain all the key bending information of the bent workpiece. This method has low accuracy in obtaining bending information, is time-consuming and inefficient. Summary of the Invention
[0004] The technical problem to be solved by the embodiments of the present application is to provide a method, device, electronic device and medium for generating a tree structure model of a bent workpiece, so as to effectively improve the accuracy and convenience of obtaining bending information, save time and improve work efficiency.
[0005] In a first aspect, an embodiment of the present application provides a method for generating a tree structure model of a bent workpiece, comprising:
[0006] Creating a main node of the bent workpiece according to all surface information of the three-dimensional model of the bent workpiece;
[0007] Acquire all bending nodes of the bent workpiece according to all faces of the three-dimensional model of the bent workpiece;
[0008] Determine, according to the edge line of the main plane of the main node, the parent-child hierarchical relationship between the main node and the bending node, and between the bending nodes;
[0009] A tree structure model for describing the bending information of the bent workpiece is generated based on the main node, the bending node, the parent-child hierarchical relationship and the geometric information of the bending node.
[0010] Optionally, creating a main node of the bent workpiece according to all surface information of the three-dimensional model of the bent workpiece includes:
[0011] According to the three-dimensional model, obtaining the areas of all surfaces of the bent workpiece;
[0012] A surface with the largest area is selected from all the surfaces as a main plane, and a main node of the bent workpiece is created based on the main plane.
[0013] Optionally, the step of selecting a surface with the largest area from all the surfaces as a main plane and creating a main node of the bent workpiece according to the main plane includes:
[0014] When there are two faces with the largest areas among all the faces, obtaining the coordinates of the center points of the two faces with the largest areas;
[0015] Obtain the principal planes of the two surfaces with the largest areas, wherein the principal planes are the surfaces with the largest Z-axis coordinate values of the center point coordinates;
[0016] A main node of the bent workpiece is created according to the main plane, and a transition surface of the main node includes the two surfaces with the largest areas.
[0017] Optionally, obtaining all bending nodes of the bent workpiece according to all surfaces of the three-dimensional model of the bent workpiece includes:
[0018] Traversing all faces of the three-dimensional model of the bent workpiece to obtain cylindrical faces among all faces, and establishing a cylindrical face set based on the obtained cylindrical faces;
[0019] Perform pairwise judgment on the cylindrical surfaces in the cylindrical surface set to obtain two cylindrical surfaces whose central axes are the same axis;
[0020] The two cylindrical surfaces with the same central axis are used as the bending nodes.
[0021] Optionally, determining the parent-child hierarchical relationship between the main node and the bending node, and between the bending nodes, based on the edge line of the main plane of the main node, includes:
[0022] Get all edges of the main plane of the main node;
[0023] Expanding all the edges outward until a plane to which the expanded edges belong is found to be the outer bending surface or the inner bending surface of a first bending node among the bending nodes, determining the first bending node as the first child node of the main node, and determining a parent-child hierarchical relationship between the main node and the first child node;
[0024] The inner and outer bend surfaces of the first-level child nodes are expanded outward to search for unprocessed bend nodes in the bend nodes until all bend nodes are associated and a multi-level parent-child hierarchical relationship is established.
[0025] Optionally, the inner and outer bend surfaces of the first-level child nodes are expanded outward to search for unprocessed bend nodes in the bend nodes until all bend nodes are associated to establish a multi-level parent-child hierarchical relationship, including:
[0026] Expand the inner bend surface and the outer bend surface of the first-level child node outward respectively until the expanded surface is found to be the inner bend surface or the outer bend surface of an unprocessed bend node in the bend node, and use the found bend node as the second-level child node of the first-level child node;
[0027] Iterate the above steps until all bend nodes are associated and a multi-level parent-child relationship is determined.
[0028] Optionally, after generating a tree structure model for describing the bending information of the bent workpiece based on the main node, the bending node, the parent-child hierarchical relationship and the geometric information of the bending node, the method further includes:
[0029] Acquire at least two target bending nodes from the same-level child nodes; the target bending nodes have the same bending direction, bending inner diameter, bending outer diameter, and thickness, and the cylindrical concentric axes of the target bending nodes are the same;
[0030] The at least two target bending nodes are merged into a merged child node set of a parent node of the child node at the same level, so as to be processed simultaneously.
[0031] In a second aspect, an embodiment of the present application provides a device for generating a tree structure model of a bent workpiece, comprising:
[0032] A main node creation module, used for creating a main node of the bent workpiece according to all surface information of the three-dimensional model of the bent workpiece;
[0033] A bending node acquisition module, configured to acquire all bending nodes of the bent workpiece according to all faces of the three-dimensional model of the bent workpiece;
[0034] A hierarchical relationship determination module, configured to determine the parent-child hierarchical relationship between the main node and the bending node, and between the bending nodes, based on the edge line of the main plane of the main node;
[0035] A tree structure model generation module is used to generate a tree structure model for describing the bending information of the bent workpiece based on the main node, the bending node, the parent-child hierarchical relationship and the geometric information of the bending node.
[0036] Optionally, the master node creation module includes:
[0037] an area acquisition unit, configured to acquire the areas of all surfaces of the bent workpiece according to the three-dimensional model;
[0038] The main node creation unit is used to select the surface with the largest area from all the surfaces as the main plane, and create the main node of the bent workpiece according to the main plane.
[0039] Optionally, the master node creation unit includes:
[0040] A coordinate acquisition subunit, configured to acquire the coordinates of the center points of the two faces with the largest areas when there are two faces with the largest areas among all the faces;
[0041] A principal plane acquisition subunit, configured to acquire the principal planes of the two surfaces with the largest areas, wherein the principal planes are the surfaces with the largest Z-axis coordinate value of the center point coordinates;
[0042] The main node creation subunit is used to create the main node of the bent workpiece according to the main plane, and the transition surface of the main node includes the two surfaces with the largest area.
[0043] Optionally, the bending node acquisition module includes:
[0044] a cylindrical surface set acquisition unit, configured to traverse all surfaces of the three-dimensional model of the bent workpiece, obtain cylindrical surfaces among all the surfaces, and establish a cylindrical surface set based on the obtained cylindrical surfaces;
[0045] a cylindrical surface acquisition unit, configured to perform pairwise judgment on the cylindrical surfaces in the cylindrical surface set to obtain two cylindrical surfaces whose central axes are the same axis;
[0046] The bending node acquisition unit is used to use the two cylindrical surfaces whose central axes are the same axis as the bending nodes.
[0047] Optionally, the hierarchical relationship determination module includes:
[0048] An edge line acquisition unit, configured to acquire all edge lines of the main plane of the main node;
[0049] a first hierarchical relationship determining unit, configured to expand all the edge lines outward until a plane to which the expanded edge lines belong is found to be a bend outer surface or a bend inner surface of a first bend node among the bend nodes, determine the first bend node as a first child node of the main node, and determine a parent-child hierarchical relationship between the main node and the first child node;
[0050] The second hierarchical relationship establishing unit is used to expand the inner and outer bending surfaces of the first-level child nodes to search for unprocessed bending nodes in the bending nodes until all bending nodes are associated and a multi-level parent-child hierarchical relationship is established.
[0051] Optionally, the second hierarchical relationship establishing unit includes:
[0052] A subnode search subunit is used to expand the inner bend surface and the outer bend surface of the first-level subnode outward respectively until the expanded surface is found to be the inner bend surface or the outer bend surface of an unprocessed bend node in the bend node, and the found bend node is used as a second-level subnode of the first-level subnode;
[0053] The hierarchical relationship determines the sub-unit, which is used to iteratively execute the above sub-node search sub-unit until all bending nodes are associated and the multi-level parent-child hierarchical relationship is determined.
[0054] Optionally, the device further comprises:
[0055] A target node acquisition module is used to acquire at least two target bending nodes from the same-level subnodes; the bending directions, bending inner diameters, bending outer diameters, and thicknesses of the target bending nodes are all the same, and the cylindrical concentric axes of the target bending nodes are the same;
[0056] The bending node merging module is used to merge the at least two target bending nodes into the merged child node set of the parent node of the child node at the same level so as to be processed simultaneously.
[0057] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0058] A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for generating a tree structure model of a bent workpiece as described above is implemented.
[0059] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute any of the above-mentioned methods for generating a tree structure model of a bent workpiece.
[0060] Compared with the prior art, the embodiments of the present application have the following advantages:
[0061] In an embodiment of the present application, a main node of a bending workpiece is created based on all surface information of the three-dimensional model of the bending workpiece. All bending nodes of the bending workpiece are obtained based on all surfaces of the three-dimensional model of the bending workpiece. According to the edge lines of the main plane of the main node, the parent-child hierarchical relationship between the main node and the bending node, and between the bending node and the bending node is determined. Based on the main node, the bending node, the parent-child hierarchical relationship and the geometric information of the bending node, a tree structure model for describing the bending information of the bending workpiece is generated. The embodiment of the present application describes the bending workpiece information based on the parent-child structure of the tree structure, and after obtaining this information, it can be used for subsequent processing simulation or provide a reference for actual processing. All key bending information can be obtained without the designer having to measure the three-dimensional model, which greatly improves the accuracy and convenience of obtaining bending information, saves time and improves work efficiency.
[0062] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 A flowchart of the steps of a method for generating a tree structure model of a bent workpiece provided in an embodiment of the present application;
[0064] Figure 2 A schematic diagram of a main plane of a bent workpiece provided in an embodiment of the present application;
[0065] Figure 3 A schematic diagram of a main node and associated bending nodes provided in an embodiment of the present application;
[0066] Figure 4 A schematic diagram of a sub-node and an associated bending sub-node provided in an embodiment of the present application;
[0067] Figure 5 A schematic diagram of a bending node merging provided in an embodiment of the present application;
[0068] Figure 6 A schematic structural diagram of a device for generating a tree structure model of a bent workpiece provided in an embodiment of the present application;
[0069] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0070] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0071] The terms used in the embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. The singular forms "a", "an", "the" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.
[0072] Reference Figure 1 , shows a flowchart of the steps of a method for generating a tree structure model of a bent workpiece provided by an embodiment of the present application, such as Figure 1 As shown, the method for generating a tree structure model of a bent workpiece may include: step 101 , step 102 , step 103 and step 104 .
[0073] Step 101: creating a main node of the bent workpiece according to all surface information of the three-dimensional model of the bent workpiece.
[0074] In this embodiment, when constructing the bending information for describing the bent workpiece, the three-dimensional model of the bent workpiece can be obtained first. Specifically, the three-dimensional model of the bent workpiece can be obtained by creating it with design software or obtaining it through reverse engineering.
[0075] Design software creation: Professional 3D design software can be used to manually or parametrically create models based on the workpiece's size, shape, and process requirements. The process can include: 1. Drawing a base plane: Create the workpiece's principal plane (such as the largest symmetry plane) as a modeling reference. 2. Adding bending features: Generate bending structures using commands such as "Bend," "Extrude Cut," and "Revolve Boss," defining parameters such as bend radius, angle, and thickness.
[0076] In practical applications, other methods may be used to obtain the three-dimensional model of the bent workpiece, which is not limited in this embodiment.
[0077] After obtaining a 3D model of the bent workpiece, all surface information of the 3D model can be obtained. Based on this information, a master node for the bent workpiece can be created. Specifically, the surface with the largest area can be selected from all surfaces as the master plane, and the master node can be created. This implementation process is described in detail in conjunction with the following specific implementation method.
[0078] In a specific implementation of the present application, the above step 101 may include:
[0079] Sub-step A1: Obtaining the areas of all surfaces of the bent workpiece according to the three-dimensional model.
[0080] In this embodiment, after the three-dimensional model of the bent workpiece is obtained, the three-dimensional model can be analyzed to obtain all surfaces of the bent workpiece and the areas of all surfaces.
[0081] After the areas of all surfaces of the bent workpiece are obtained, sub-step A2 is executed.
[0082] Sub-step A2: Filtering out the surface with the largest area from all the surfaces as the main plane, and creating the main node of the bent workpiece based on the main plane.
[0083] After obtaining the areas of all faces of the bending workpiece, the face with the largest area can be selected from all faces as the main plane, and the main node of the bending workpiece can be created based on the main plane. Figure 2 As shown, after obtaining the surface with the largest area of the bent workpiece, this plane is used as the main plane.
[0084] However, since most bending workpieces are symmetrical structures, there will be two faces with the largest areas. In this case, the main plane can be selected based on the Z-axis coordinates of the two faces with the largest areas. Specifically, when there are two faces with the largest areas among all faces, the coordinates of the center points of the two faces with the largest areas can be obtained. The main planes of the two faces with the largest areas are obtained, and the main planes are the faces with the largest Z-axis coordinate values of the center point coordinates. According to the main planes, the main nodes of the bending workpiece are created, and the transition surfaces of the main nodes include the two faces with the largest areas, that is, they are classified according to the Z coordinates of the center points of the two faces, where the ones with the larger Z value are the main planes, and a main node Node is created. The transition surface of the main node includes the two faces with the largest areas, and does not contain other geometric information. Among them, the transition surface refers to the intermediate connecting surface that connects two or more different geometric features (such as planes, curved surfaces, bending areas, etc.) in industrial design, mechanical manufacturing (especially in the fields of sheet metal bending, mold design, etc.). Its core function is to achieve a smooth transition or geometric connection between different features. The morphology and properties of the transition surface directly affect the structural strength, processing technology and appearance quality of the workpiece.
[0085] This embodiment of the application quickly determines the workpiece's primary bearing surface or assembly reference surface by using the surface with the largest area, avoiding the subjectivity of manually selecting references and improving modeling efficiency. Furthermore, based on the common symmetry characteristics of industrial bending parts, area screening and coordinate classification ensure that both bisymmetrical surfaces are included in the main node, fully preserving geometric topological information and assigning clear geometric anchor points to the main node. This provides a logical starting point for the hierarchical association of subsequent bending features (subnodes), facilitating automated process planning.
[0086] After the main node of the bent workpiece is created according to all surface information of the three-dimensional model of the bent workpiece, step 102 is executed.
[0087] Step 102: Acquire all bending nodes of the bent workpiece according to all faces of the three-dimensional model of the bent workpiece.
[0088] After creating the main node of the bent workpiece based on all face information of the 3D model of the bent workpiece, all bending nodes of the bent workpiece can be obtained based on all faces of the 3D model of the bent workpiece. Specifically, bending nodes can be obtained based on all cylindrical surfaces of the 3D model of the bent workpiece. This implementation process will be described in detail in conjunction with the specific implementation method below.
[0089] In a specific implementation of the present application, the above step 102 may include:
[0090] Sub-step B1: traverse all faces of the three-dimensional model of the bent workpiece to obtain cylindrical faces among all faces, and establish a cylindrical face set based on the obtained cylindrical faces.
[0091] In this embodiment, after obtaining all faces of the 3D model of the bent workpiece, all faces of the 3D model of the bent workpiece can be traversed to obtain cylindrical faces among all faces to obtain a cylindrical face set. That is, all faces of the 3D model of the bent workpiece are traversed and the faces that are cylindrical faces are counted and recorded as a set S.
[0092] After traversing all faces of the three-dimensional model of the bent workpiece to obtain cylindrical faces among all faces, and establishing a cylindrical face set based on the obtained cylindrical faces, sub-step B2 is executed.
[0093] Sub-step B2: performing pairwise judgment on the cylindrical surfaces in the cylindrical surface set to obtain two cylindrical surfaces whose central axes are the same axis.
[0094] Sub-step B3: using the two cylindrical surfaces whose central axes are the same axis as the bending nodes.
[0095] After obtaining the cylindrical surface set, we can perform a pairwise check on the cylindrical surfaces in the set to identify two cylindrical surfaces whose central axes coincide with each other. That is, we perform a pairwise check on the cylindrical surfaces in the set S. When two cylindrical surfaces share the same central axis, they form a bending node. After traversing all the faces of the 3D model, we obtain the bending node set N.
[0096] The embodiment of the present application automatically extracts the bending area (cylindrical surface) in the three-dimensional model through a geometric algorithm to avoid missed or misjudgment. Each bending node uses the "coaxial cylindrical surface" as the basic unit, which naturally matches the physical nature of the bending process (bending around the axis) and facilitates subsequent parent-child hierarchical construction (such as extended search of main node → child node).
[0097] At the same time, some geometric information of the bending node can be obtained through the bending node: the outer and inner surfaces of the bend can be distinguished through the cylindrical radius of these two surfaces, the cylindrical radius of the inner surface of the bend is the inner diameter of the bend, the cylindrical radius of the outer surface of the bend is the outer diameter of the bend, the bending thickness is the outer diameter of the bend minus the inner diameter of the bend, the bending length is the length of the boundary line outside the bend, and the bending angle is the angle between the midpoint of the bend center axis and the center line connecting the two boundary lines outside the bend.
[0098] After all bending nodes of the bent workpiece are acquired according to all surfaces of the three-dimensional model of the bent workpiece, step 103 is executed.
[0099] Step 103: Determine the parent-child hierarchical relationship between the main node and the bending node, and between the bending nodes, based on the edge line of the main plane of the main node.
[0100] After creating a main node and obtaining a bend node, the parent-child hierarchical relationship between the main node and the bend node, and between the bend nodes and the bend nodes, can be determined based on the edge lines of the main plane of the main node. This implementation process can be described in detail in conjunction with the following specific implementation methods.
[0101] In a specific implementation of the present application, the above step 103 may include:
[0102] Sub-step C1: Obtain all edges of the main plane of the main node.
[0103] In this embodiment, after obtaining a master node, all edges of the master node's main plane can be obtained. Specifically, the plane's topology is constructed based on the vertex information of the master plane. For a polygonal master plane, adjacent vertices are connected to form edges. All vertices of the master plane are traversed, and the start and end coordinates of each edge are determined based on the vertex connection relationship. This edge information is stored to form an edge set.
[0104] Sub-step C2: Expand all the edges outward until the plane to which the extended edges belong is found to be the outer bending surface or the inner bending surface of the first bending node in the bending nodes, determine the first bending node as the first child node of the main node, and determine the parent-child hierarchical relationship between the main node and the first child node.
[0105] After obtaining all the edges of the main plane of the main node, all edges can be expanded outward until it is found that the plane to which the extended edge belongs is the outer bending surface or the inner bending surface of the first bending node in the bending node, the first bending node is determined as the first child node of the main node, and the parent-child hierarchical relationship between the main node and the first child node is determined. Specifically, an outward expansion operation is performed on each edge in the edge set, and the expansion direction can be the normal direction of the plane where the edge is located. During the expansion process, it is continuously checked whether the plane to which the extended edge belongs is the outer bending surface or the inner bending surface of a certain bending node. When it is found that the plane to which the extended edge belongs is the outer bending surface or the inner bending surface of a certain bending node (the first bending node), the first bending node is determined as the first child node of the main node. Furthermore, the parent-child hierarchical relationship between the main node and the first child node can be recorded. For example, a data structure (such as a dictionary, a class object) can be used to store this relationship. As Figure 3 As shown, the edges of the main node Node extend outwards respectively, and the planes to which the edges in the extension direction belong are the inner or outer surfaces of the four bending nodes N1, N2, N3, and N4. At this time, N1, N2, N3, and N4 can serve as the first child nodes of the main node, etc.
[0106] Sub-step C3: Expand the inner and outer bend surfaces of the first-level child nodes to search for unprocessed bend nodes in the bend nodes until all bend nodes are associated and a multi-level parent-child hierarchical relationship is established.
[0107] After completing the search for the child nodes of the main node, the child nodes can be searched for by expanding the inner and outer surfaces of the bends outwards respectively. That is, the inner and outer surfaces of the first-level child nodes are expanded outwards respectively to search for the unprocessed bend nodes in the bend nodes until all the bend nodes are associated and a multi-level parent-child hierarchical relationship is established. Specifically, the inner and outer surfaces of the first-level child nodes can be expanded outwards respectively until the expanded surface is found to be the inner or outer surface of the bend node that is not processed in the bend node, and the found bend node is used as the second-level child node of the first-level child node. The expansion search method is iteratively executed until all the bend nodes are associated to determine the multi-level parent-child hierarchical relationship.
[0108] In the above process, the bending direction of the bending node and the geometric information of the transition surface can also be obtained. The above implementation process can be described in detail in conjunction with the following steps.
[0109] 1. Determine the child node set A of the main node Node: obtain all edge line information of the main plane of the main node Node, expand all edge lines outward to find the surface to which the line belongs, and interrupt the search until the surface is found to be the outer or inner bend surface of a node N1 in the bend node set N. Add the N1 node to the child node A of the main node Node, and record the parent node of the bend N1 as the main node Node.
[0110] 2. Determine the bending direction of the sub-node A set: Take the N1 node as an example. If the inner bending surface of the N1 node is connected to the main plane of the main node Node, then the N1 node is bent in the forward direction. If the outer bending surface of the N1 node is connected to the main plane of the main node Node, then the N1 node is bent in the reverse direction.
[0111] 3. Determine the parent and child nodes of the extended Node node: After obtaining the child node A in the previous step, process all the bending nodes N1...Nn in A respectively. Taking N1 as an example, the bending outer surface and the bending inner surface of the N1 node are expanded outward to search for the extension surface. The search is stopped until the extension surface is the bending outer surface or inner surface of a bending node Na in the set N (excluding N1...Nn nodes). Na is added to the child nodes of the N1 node, and the parent node of Na is recorded as the N1 node. All extended surfaces in the extension process are the transition surfaces of the N1 node.
[0112] 4. Determine the bending direction of the extended Node: If during the extension search process, Na is obtained by expanding the inner side of N1, then the bending direction of Na is the same as that of N1. If Na is obtained by expanding the outer side of N1, then the bending direction of Na is opposite to that of N1. Figure 4 As shown in the figure, the bending direction of the outer surface of the bend of the Na node is the reverse direction of the bend. The bending direction of the inner surface of the bend of the N1 node is the positive direction of the bend.
[0113] 5. Continue to extend outward according to the above method to determine the parent-child relationship and bending direction of all nodes until all nodes in the set N are confirmed.
[0114] The present embodiment uses an algorithm to automatically identify the connection between master nodes and bend nodes, constructing a complete, multi-level parent-child hierarchical relationship tree. This significantly improves the efficiency of processing complex bend workpiece models, reducing the time and potential errors associated with manual annotation. Furthermore, it accurately reflects the spatial position and connection relationships between individual bend features in the workpiece, providing a reliable foundation for subsequent process planning, simulation analysis, and more.
[0115] After determining the parent-child hierarchical relationship between the main node and the bending nodes, and between the bending nodes, based on the edge lines of the main plane of the main node, step 104 is performed.
[0116] Step 104: Based on the main node, the bending node, the parent-child hierarchical relationship and the geometric information of the bending node, a tree structure model for describing the bending information of the bent workpiece is generated.
[0117] The geometric information of the bending node may include the following information mentioned in the above steps: the transition surface of the bending node, the bending thickness, the bending angle, the bending inner diameter, the bending outer diameter, the bending length, and the bending direction.
[0118] After determining the parent-child hierarchical relationships between the main node and the bending nodes, and between the bending nodes, based on the edge lines of the main plane of the main node, a tree structure model describing the bending information of the bent workpiece can be generated based on the main node, the bending nodes, the parent-child hierarchical relationships, and the geometric information of the bending nodes. In this example, the tree structure model uses the main node as the root node and links the bending nodes step by step through the parent-child hierarchical relationships to form a hierarchical tree structure. The geometric information of the bending nodes can be reflected in the corresponding tree nodes.
[0119] This embodiment of the application describes bending workpiece information based on a parent-child tree structure. This information can be used for subsequent machining simulations or as a reference for actual machining. Designers can obtain all key bending information without having to measure the 3D model, greatly improving the accuracy and convenience of obtaining bending information, saving time and increasing work efficiency.
[0120] In the actual processing process, if the bending direction / bending inner diameter / bending outer diameter / thickness of two or more bending Node nodes are the same, and the cylindrical center axis of two or more bending Node nodes is the same, the bending Node nodes can be merged. The implementation process can be described in detail in combination with the following specific implementation method.
[0121] In a specific implementation of the present application, after the above step 104, the following steps may also be included:
[0122] Step D1: Obtain at least two target bending nodes in the same level subnodes; the bending directions, bending inner diameters, bending outer diameters, and thicknesses of the target bending nodes are the same, and the cylindrical concentric axes of the target bending nodes are the same.
[0123] In this embodiment, at least two target bending nodes in the same level sub-nodes can be obtained, wherein the bending direction, bending inner diameter, bending outer diameter, and thickness of the target bending nodes are the same, and the cylindrical concentric axes of the target bending nodes are the same.
[0124] Step D2: merging the at least two target bending nodes into the merged child node set of the parent node of the child node at the same level, so as to be processed simultaneously.
[0125] Then, at least two target bend nodes can be merged into the merged child node set of the parent node of the same-level child node for simultaneous processing. In other words, in actual processing, if two or more bend nodes have the same bending direction, inner diameter, outer diameter, and thickness, and the cylindrical center axis of the two or more bend nodes is the same, these two or more bend nodes need to be added to the merged child node of their parent node to facilitate simultaneous processing in subsequent processing.
[0126] In this embodiment of the application, for target bending nodes that meet the requirements (e.g., the bending direction, inner diameter, outer diameter, thickness, and concentric axis are all the same) in the same level of child nodes, multiple bending features can be processed in a single clamping or within the same processing flow by merging them into a "merged child node" of the parent node, thus avoiding the time-consuming process of clamping each bending feature one by one and adjusting the machine tool parameters in traditional processes. Furthermore, for bending workpieces with multiple symmetrically distributed or coaxially arranged bending features and completely consistent feature parameters, batch processing can be performed using the same set of tools, molds, or programming code, thereby improving the processing efficiency of the bent workpieces.
[0127] The tree structure model generation method of the bending workpiece provided in the embodiment of the present application creates the main node of the bending workpiece according to all the surface information of the three-dimensional model of the bending workpiece. According to all the surfaces of the three-dimensional model of the bending workpiece, all the bending nodes of the bending workpiece are obtained. According to the edge lines of the main plane of the main node, the parent-child hierarchical relationship between the main node and the bending node, and between the bending node and the bending node is determined. Based on the main node, the bending node, the parent-child hierarchical relationship and the geometric information of the bending node, a tree structure model for describing the bending information of the bending workpiece is generated. The embodiment of the present application describes the bending workpiece information based on the parent-child structure of the tree structure. After obtaining this information, it can be used for subsequent processing simulation or provide a reference for actual processing. All key bending information can be obtained without the designer having to measure the three-dimensional model, which greatly improves the accuracy and convenience of obtaining bending information, saves time and improves work efficiency.
[0128] Reference Figure 6 , shows a schematic structural diagram of a tree structure model generating device for a bent workpiece provided by an embodiment of the present application, such as Figure 6 As shown, the tree structure model generating device 600 for a bent workpiece may include the following modules:
[0129] A master node creation module 610 is configured to create a master node of the bent workpiece based on all surface information of the three-dimensional model of the bent workpiece;
[0130] A bending node acquisition module 620 is configured to acquire all bending nodes of the bent workpiece based on all surfaces of the three-dimensional model of the bent workpiece;
[0131] A hierarchical relationship determination module 630 is configured to determine the parent-child hierarchical relationship between the main node and the bending node, and between the bending nodes, based on the edge of the main plane of the main node;
[0132] The tree structure model generating module 640 is used to generate a tree structure model for describing the bending information of the bent workpiece based on the main node, the bending node, the parent-child hierarchical relationship and the geometric information of the bending node.
[0133] Optionally, the master node creation module includes:
[0134] an area acquisition unit, configured to acquire the areas of all surfaces of the bent workpiece according to the three-dimensional model;
[0135] The main node creation unit is used to select the surface with the largest area from all the surfaces as the main plane, and create the main node of the bent workpiece according to the main plane.
[0136] Optionally, the master node creation unit includes:
[0137] A coordinate acquisition subunit, configured to acquire the coordinates of the center points of the two faces with the largest areas when there are two faces with the largest areas among all the faces;
[0138] A principal plane acquisition subunit, configured to acquire the principal planes of the two surfaces with the largest areas, wherein the principal planes are the surfaces with the largest Z-axis coordinate value of the center point coordinates;
[0139] The main node creation subunit is used to create the main node of the bent workpiece according to the main plane, and the transition surface of the main node includes the two surfaces with the largest area.
[0140] Optionally, the bending node acquisition module includes:
[0141] a cylindrical surface set acquisition unit, configured to traverse all surfaces of the three-dimensional model of the bent workpiece, obtain cylindrical surfaces among all the surfaces, and establish a cylindrical surface set based on the obtained cylindrical surfaces;
[0142] a cylindrical surface acquisition unit, configured to perform pairwise judgment on the cylindrical surfaces in the cylindrical surface set to obtain two cylindrical surfaces whose central axes are the same axis;
[0143] The bending node acquisition unit is used to use the two cylindrical surfaces whose central axes are the same axis as the bending nodes.
[0144] Optionally, the hierarchical relationship determination module includes:
[0145] An edge line acquisition unit, configured to acquire all edge lines of the main plane of the main node;
[0146] a first hierarchical relationship determining unit, configured to expand all the edge lines outward until a plane to which the expanded edge lines belong is found to be a bend outer surface or a bend inner surface of a first bend node among the bend nodes, determine the first bend node as a first child node of the main node, and determine a parent-child hierarchical relationship between the main node and the first child node;
[0147] The second hierarchical relationship establishing unit is used to expand the inner and outer bending surfaces of the first-level child nodes to search for unprocessed bending nodes in the bending nodes until all bending nodes are associated and a multi-level parent-child hierarchical relationship is established.
[0148] Optionally, the second hierarchical relationship establishing unit includes:
[0149] A subnode search subunit is used to expand the inner bend surface and the outer bend surface of the first-level subnode outward respectively until the expanded surface is found to be the inner bend surface or the outer bend surface of an unprocessed bend node in the bend node, and the found bend node is used as a second-level subnode of the first-level subnode;
[0150] The hierarchical relationship determines the sub-unit, which is used to iteratively execute the above sub-node search sub-unit until all bending nodes are associated and the multi-level parent-child hierarchical relationship is determined.
[0151] Optionally, the device further comprises:
[0152] A target node acquisition module is used to acquire at least two target bending nodes from the same-level subnodes; the bending directions, bending inner diameters, bending outer diameters, and thicknesses of the target bending nodes are all the same, and the cylindrical concentric axes of the target bending nodes are the same;
[0153] The bending node merging module is used to merge the at least two target bending nodes into the merged child node set of the parent node of the child node at the same level so as to be processed simultaneously.
[0154] The tree structure model generation device for a bending workpiece provided in an embodiment of the present application creates a main node of the bending workpiece based on all surface information of the three-dimensional model of the bending workpiece. All bending nodes of the bending workpiece are obtained based on all surfaces of the three-dimensional model of the bending workpiece. According to the edge lines of the main plane of the main node, the parent-child hierarchical relationship between the main node and the bending node, and between the bending node and the bending node is determined. Based on the main node, the bending node, the parent-child hierarchical relationship and the geometric information of the bending node, a tree structure model for describing the bending information of the bending workpiece is generated. The embodiment of the present application describes the bending workpiece information based on the parent-child structure of the tree structure. After obtaining this information, it can be used for subsequent processing simulation or provide a reference for actual processing. All key bending information can be obtained without the designer having to measure the three-dimensional model, which greatly improves the accuracy and convenience of obtaining bending information, saves time and improves work efficiency.
[0155] An embodiment of the present application also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the above-mentioned method for generating a tree structure model of a bent workpiece.
[0156] Figure 7 FIG. 7 is a schematic diagram showing the structure of an electronic device 700 according to an embodiment of the present invention. Figure 7 As shown, the electronic device 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 702 or computer program instructions loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 803, various programs and data required for the operation of the electronic device 700 can also be stored. The CPU 701, ROM 702, and RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0157] Multiple components in the electronic device 700 are connected to the I / O interface 705, including an input unit 706, such as a keyboard, a mouse, a microphone, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0158] The various processes and procedures described above may be executed by the processing unit 701. For example, the method of any of the above embodiments may be implemented as a computer software program, which is tangibly contained in a computer-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the CPU 701, one or more actions in the method described above may be performed.
[0159] In addition, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned method for generating a tree structure model of a bent workpiece when the program is executed by a processor.
[0160] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0161] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0162] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminals (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal generate instructions for implementing the steps in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0163] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0164] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal so that a series of operational steps are executed on the computer or other programmable terminal to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable terminal for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0165] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0166] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal comprising the element.
[0167] The above is a detailed introduction to a tree structure model generation method for a bent workpiece, a tree structure model generation device for a bent workpiece, an electronic device and a computer-readable storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for generating a tree structure model of a bending workpiece, characterized in that: include: Creating a main node of the bent workpiece according to all surface information of the three-dimensional model of the bent workpiece; Acquire all bending nodes of the bent workpiece according to all faces of the three-dimensional model of the bent workpiece; Determine, according to the edge line of the main plane of the main node, the parent-child hierarchical relationship between the main node and the bending node, and between the bending nodes; A tree structure model for describing the bending information of the bent workpiece is generated based on the main node, the bending node, the parent-child hierarchical relationship and the geometric information of the bending node.
2. The method according to claim 1, characterized in that The step of creating a main node of the bent workpiece according to all surface information of the three-dimensional model of the bent workpiece includes: According to the three-dimensional model, obtaining the areas of all surfaces of the bent workpiece; A surface with the largest area is selected from all the surfaces as a main plane, and a main node of the bent workpiece is created based on the main plane.
3. The method according to claim 2, characterized in that The step of selecting the surface with the largest area from all the surfaces as the main plane and creating the main node of the bent workpiece according to the main plane includes: When there are two faces with the largest areas among all the faces, obtaining the coordinates of the center points of the two faces with the largest areas; Obtain the principal planes of the two surfaces with the largest areas, wherein the principal planes are the surfaces with the largest Z-axis coordinate values of the center point coordinates; A main node of the bent workpiece is created according to the main plane, and a transition surface of the main node includes the two surfaces with the largest areas.
4. The method according to claim 1, wherein The step of obtaining all bending nodes of the bent workpiece according to all surfaces of the three-dimensional model of the bent workpiece includes: Traversing all faces of the three-dimensional model of the bent workpiece to obtain cylindrical faces among all faces, and establishing a cylindrical face set based on the obtained cylindrical faces; Perform pairwise judgment on the cylindrical surfaces in the cylindrical surface set to obtain two cylindrical surfaces whose central axes are the same axis; The two cylindrical surfaces with the same central axis are used as the bending nodes.
5. The method according to claim 1, wherein The determining of the parent-child hierarchical relationship between the main node and the bending node, and between the bending nodes, based on the edge line of the main plane of the main node, includes: Get all edges of the main plane of the main node; Expanding all the edges outward until a plane to which the expanded edges belong is found to be the outer bending surface or the inner bending surface of a first bending node among the bending nodes, determining the first bending node as the first child node of the main node, and determining a parent-child hierarchical relationship between the main node and the first child node; The inner and outer bend surfaces of the first-level child nodes are expanded outward to search for unprocessed bend nodes in the bend nodes until all bend nodes are associated and a multi-level parent-child hierarchical relationship is established.
6. The method according to claim 5, characterized in that The inner and outer bend surfaces of the first-level child nodes are expanded outward to search for unprocessed bend nodes in the bend nodes until all bend nodes are associated and a multi-level parent-child hierarchical relationship is established, including: Expand the inner bend surface and the outer bend surface of the first-level child node outward respectively until the expanded surface is found to be the inner bend surface or the outer bend surface of an unprocessed bend node in the bend node, and use the found bend node as the second-level child node of the first-level child node; Iterate the above steps until all bend nodes are associated and a multi-level parent-child relationship is determined.
7. The method according to claim 1, characterized in that After generating a tree structure model for describing the bending information of the bent workpiece based on the main node, the bending node, the parent-child hierarchical relationship and the geometric information of the bending node, the method further includes: Acquire at least two target bending nodes from the same-level child nodes; the target bending nodes have the same bending direction, bending inner diameter, bending outer diameter, and thickness, and the cylindrical concentric axes of the target bending nodes are the same; The at least two target bending nodes are merged into a merged child node set of a parent node of the child node at the same level, so as to be processed simultaneously.
8. A device for generating a tree structure model of a bent workpiece, characterized in that: include: A main node creation module, used for creating a main node of the bent workpiece according to all surface information of the three-dimensional model of the bent workpiece; A bending node acquisition module, configured to acquire all bending nodes of the bent workpiece according to all faces of the three-dimensional model of the bent workpiece; A hierarchical relationship determination module, configured to determine the parent-child hierarchical relationship between the main node and the bending node, and between the bending nodes, based on the edge line of the main plane of the main node; A tree structure model generation module is used to generate a tree structure model for describing the bending information of the bent workpiece based on the main node, the bending node, the parent-child hierarchical relationship and the geometric information of the bending node.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for generating a tree structure model of a bent workpiece according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method for generating a tree structure model of a bent workpiece according to any one of claims 1 to 7.