A method for parsing a three-dimensional tube file for a tube bender
By using OpenCascade software to parse 3D pipe fitting files, the problem of pipe bending machines being unable to recognize external files has been solved. This enables the parsing and feature support of multiple file formats, improving the versatility of pipe bending machines and the freedom of user drawing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUXI XINJIE ELECTRICAL
- Filing Date
- 2022-10-14
- Publication Date
- 2026-04-14
AI Technical Summary
Existing pipe bending machines cannot parse external pipe fitting files, especially files generated by other drawing tools, which limits users when drawing pipe fittings.
The OpenCascade software is used to read 3D pipe fitting files, discretize surfaces and identify the main body of the pipe fitting through the topology management interface, and generate machining information. It supports the parsing of files in various CAD software formats, including igs and stp types.
It enables the parsing of 3D pipe fitting files generated by various CAD software, improving the versatility and flexibility of pipe fitting file parsing. It supports the recognition of single-layer or double-layer pipe fittings and allows the creation of features such as grooves and holes on pipe fittings, reducing the limitations of user customization.
Smart Images

Figure CN115591990B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pipe bending machine processing technology, and in particular to a method for parsing three-dimensional pipe fitting files for pipe bending machines. Background Technology
[0002] CNC pipe bending machines are mainly used for pipe laying and repair in power construction, railway and highway construction, boilers, bridges, ships, furniture, and decoration. They offer advantages such as multiple functions, reasonable structure, simple operation, easy mobility, and rapid installation. In addition to pipe bending, this machine can also use the hydraulic cylinder as a hydraulic jack. Compared to other CNC pipe bending equipment, it is cheaper and easier to use, making it a dominant product in the domestic pipe bending machine market. CNC pipe bending machines can perform winding bends on pipes in a cold state with one bending radius (single layer) or two bending radii (double layer), and are widely used in the bending of various pipes and wires in the automotive, air conditioning, and other industries. Pipe bending machines are primarily used for the plastic forming of pipes.
[0003] Currently, most pipe bending machines on the market do not have the ability to parse external pipe fitting files. Some pipe bending machine software that does have the ability to read and parse pipe fitting files can only parse files generated by the software's custom pipe fitting drawing function, and cannot parse files generated by other drawing tools, which is a limitation. Summary of the Invention
[0004] The purpose of this invention is to overcome the problems of the prior art and provide a method for parsing 3D pipe fitting files for pipe bending machines. This method can read external pipe fitting files, parse the corresponding pipe fitting data, and convert it into processing data in the pipe bending machine. This method can parse pipe fittings created by users in a general modeling platform and generate corresponding processing data. The pipe fittings can have features, which improves the versatility of the pipe fitting file parsing function, reduces the restrictions on users when creating custom pipe fittings, and solves the problem that traditional pipe bending machines cannot parse files generated by other drawing tools.
[0005] The above objectives are achieved through the following technical solutions:
[0006] A method for parsing 3D pipe fitting files for pipe bending machines includes the following steps:
[0007] Step (1) Read the 3D pipe fitting file using OpenCascade software, obtain the corresponding primitive information, and store it in the primitive information set;
[0008] Step (2) uses the topology management interface of the OpenCascade software to discretize the composite in the primitive information set mentioned in step (1) into individual surfaces and store them in the surface set; the composite is a form in which a complete key model is read and stored.
[0009] Step (3) Iterate through the set of surfaces obtained in step (2) and analyze each surface to obtain the contour of the surface. Discretize the contour into a set of curves. Analyze the curves in the set of curves to identify and filter the main body elements of the pipe fitting that belong to the main body of the pipe fitting and the feature surfaces that do not belong to the main body of the pipe fitting.
[0010] Step (4) Based on the main body graphic elements of the pipe fitting described in step (3), identify the graphic elements in the same section of the pipe fitting to obtain the information of a single pipe fitting;
[0011] Step (5) classifies and sorts the individual pipe fittings identified in step (4) to generate a complete pipe fitting body;
[0012] Step (6) Calculate and generate the processing information corresponding to the pipe fitting based on the data of the completed pipe fitting body described in step (5). The processing information includes the wheel mold radius, bending angle, and feeding length.
[0013] Step (7) locates and analyzes the feature surface described in step (3) to determine whether it is a qualified pipe fitting.
[0014] Further, in step (3), the process of parsing the curves in the curve set and identifying and filtering the pipe fitting main body primitives that belong to the main body of the pipe fitting and the feature surfaces that do not belong to the main body of the pipe fitting specifically involves: taking six arbitrary points on the curve, and based on the principle that three points can determine a circle, calculating the circle generated by the first three points and the last three points.
[0015] If the generated circles are identical, then the curve is an arc.
[0016] If the number of arcs in the curve set is not less than 2, then the surface is the main part of the pipe fitting;
[0017] Surfaces that do not meet the criteria will be temporarily classified as feature surfaces.
[0018] Furthermore, since any cross-section of a pipe fitting that conforms to the bending rules should have the same radius, the program will further detect the arcs generated by the curves. If two or more arc curves belong to the same circle radius but are in different positions, the surface will be temporarily classified as a component of the pipe fitting body.
[0019] Further, step (4) specifically involves: calculating the pipe fitting surface data obtained in step (3), distinguishing whether the pipe fitting segment where the surface is located is a straight pipe or a bend, and then further calculating the straight pipe and bend information where the surface is located, including the position and radius of the two cross sections of the pipe fitting segment; classifying the surface according to the calculated pipe fitting information, first finding the surface with the same radius that belongs to the same pipe fitting segment, and then finding the pipe fitting surface with different radii but the same position, thereby obtaining the complete information of each bend or straight pipe segment.
[0020] Further, step (5) specifically involves: traversing and matching the individual pipe fittings obtained from the analysis, and finding a pipe fitting with a cross section that has only one maximum radius and the same position as the current pipe fitting, thereby obtaining a complete pipe fitting segment generated in one processing step.
[0021] Further, step (7) specifically involves: adding a bounding box to the feature surface to perform intersection detection, locating the pipe segment where the feature surface is located, and then checking whether the feature is inside the pipe. If it exceeds the surface of the pipe, it will affect subsequent processing and be judged as a non-compliant pipe.
[0022] Beneficial effects
[0023] The method for parsing three-dimensional pipe fitting files for pipe bending machines provided by this invention has the following advantages:
[0024] 1. Recognizable file formats are relatively easy to obtain. Most CAD software on the market can generate IGS or STP type files, which reduces the limitations for users when choosing drawing software;
[0025] 2. This solution supports the analysis of single-layer or double-layer pipe fittings;
[0026] 3. This solution can identify pipe fittings with distinctive features, increasing the user's freedom when drawing pipe fittings and allowing the creation of features such as grooves and holes on the pipe fittings;
[0027] 4. This solution can identify pipe fittings that are spliced together from multiple curved surfaces. Attached Figure Description
[0028] Figure 1 This is a flowchart of a method for parsing three-dimensional pipe fitting files for a pipe bending machine, as described in this invention.
[0029] Figure 2 This is a schematic diagram of solid and hollow pipes in the method for parsing three-dimensional pipe fitting files for pipe bending machines described in this invention;
[0030] Figure 3 This is a schematic diagram of a grooved pipe fitting in a method for parsing three-dimensional pipe fitting files for a pipe bending machine, as described in this invention.
[0031] Figure 4 This is a schematic diagram of a pipe fitting with raised surfaces in a method for parsing three-dimensional pipe fitting files for a pipe bending machine, as described in this invention. Detailed Implementation
[0032] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. The described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0033] like Figure 1 As shown, a method for parsing 3D pipe fitting files for pipe bending machines includes the following steps:
[0034] Step (1) Read the 3D pipe fitting file using OpenCascade software, obtain the corresponding primitive information, and store it in the primitive information set;
[0035] Step (2) uses the topology management interface of the OpenCascade software to discretize the composite in the primitive information set mentioned in step (1) into individual surfaces and store them in the surface set; the composite is a form in which a complete key model is read and stored.
[0036] Step (3) Iterate through the set of surfaces obtained in step (2) and analyze each surface to obtain the contour of the surface. Discretize the contour into a set of curves. Analyze the curves in the set of curves to identify and filter the main body elements of the pipe fitting that belong to the main body of the pipe fitting and the feature surfaces that do not belong to the main body of the pipe fitting.
[0037] Step (4) Based on the main body graphic elements of the pipe fitting described in step (3), identify the graphic elements in the same section of the pipe fitting to obtain the information of a single pipe fitting;
[0038] Step (5) classifies and sorts the individual pipe fittings identified in step (4) to generate a complete pipe fitting body;
[0039] Step (6) Calculate and generate the processing information corresponding to the pipe fitting based on the data of the completed pipe fitting body described in step (5). The processing information includes wheel mold radius, bending angle, feeding length, etc.
[0040] Step (7) locates and analyzes the feature surface described in step (3) to determine whether it is a qualified pipe fitting.
[0041] In step (1) of this embodiment, the geometry library OpenCascade (OpenCascade software) is used to read the 3D pipe fitting file. The file formats that can be read are igs, iges, stp, and step. This file can be created by the user after drawing in any CAD platform. The interface provided by OpenCascade stores all the primitive information in the read file in a set.
[0042] In step (2) of this embodiment, a complete key model is read and stored as a composite. The program uses the topology management interface in OpenCascade to discretize the composite into individual surfaces and store them in a collection.
[0043] Step (3) Traverse the set of discretized surfaces and analyze each surface to obtain its contour. Discretize the contour into a set of curves. Further analyze the discretized curves, arbitrarily select six points on the curves, and calculate the circle formed by the first three points and the last three points based on the principle that three points can determine a circle.
[0044] If the generated circles are identical, then the curve is an arc.
[0045] If the number of arcs in the curve set is not less than 2, then the surface is the main part of the pipe fitting;
[0046] Since any cross-section of a pipe fitting that conforms to the pipe bending rules should have the same radius, the program will further detect the arcs generated by the curves. If two or more arc curves belong to the same circle radius but are in different positions, the surface will be temporarily classified as a component of the pipe fitting body.
[0047] Surfaces that do not meet the criteria will be temporarily classified as feature surfaces.
[0048] In this embodiment, step (4) specifically involves: calculating the pipe surface data obtained in the previous step, distinguishing whether the pipe section where the surface is located is a straight pipe or a bend, and then further calculating the straight pipe and bend information where the surface is located, including the position and radius of the two cross sections of the pipe section.
[0049] Find elements within the same straight or curved pipe section: such as Figure 2 As shown, a straight or bent pipe segment can be a solid or hollow pipe fitting. A hollow pipe fitting can have an outer diameter and an inner diameter, thus containing two complete curved surfaces. Each complete pipe fitting surface may consist of multiple discrete curved surfaces, and different curved surfaces may belong to the same pipe fitting surface. This step classifies the curved surfaces based on the calculated pipe fitting information. First, it searches for curved surfaces with the same radius that belong to the same pipe segment. Then, it searches for curved surfaces with different radii but the same position, thereby obtaining complete information for each bent or straight pipe segment.
[0050] In step (5), the pipe fittings that meet the rules are formed by alternating connections of bent pipes and straight pipes. The individual pipe fittings obtained by parsing are traversed and matched to find the pipe fittings that have only one cross section with the same maximum radius and position as the current pipe fitting. Thus, a complete pipe fitting segment generated in one processing can be obtained.
[0051] Further, step (7) specifically involves: locating and analyzing the feature surfaces identified in the preceding steps. By adding bounding boxes to the feature surfaces and performing intersection checks, the pipe segment containing the feature surface is located. Then, it is checked whether the feature is inside the pipe, such as in a groove, cavity, etc. (e.g.,...). Figure 3 As shown), if it extends beyond the surface of the pipe fitting, such as a protrusion (e.g. Figure 4 (As shown) will affect subsequent processing and will be judged as a non-compliant pipe fitting.
[0052] The above description is merely illustrative of the embodiments of the present invention and is not intended to limit the present invention. For those skilled in the art, any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for parsing three-dimensional pipe fitting files for pipe bending machines, characterized in that, include: Step (1) Read the 3D pipe fitting file using OpenCascade software, obtain the corresponding primitive information, and store it in the primitive information set; Step (2) uses the topology management interface of the OpenCascade software to discretize the composite in the primitive information set mentioned in step (1) into individual surfaces and store them in the surface set; the composite is a form in which a complete key model is read and stored. Step (3) Iterate through the set of surfaces obtained in step (2) and analyze each surface to obtain the contour of the surface. Discretize the contour into a set of curves. Analyze the curves in the set of curves to identify and filter the main body elements of the pipe fitting that belong to the main body of the pipe fitting and the feature surfaces that do not belong to the main body of the pipe fitting. Step (4) Based on the main body graphic elements of the pipe fitting described in step (3), identify the graphic elements in the same section of the pipe fitting to obtain the information of a single pipe fitting; Step (5) classifies and sorts the individual pipe fittings identified in step (4) to generate a complete pipe fitting body; Step (6) Calculate and generate the processing information corresponding to the pipe fitting based on the data of the complete pipe fitting body described in step (5). The processing information includes the wheel mold radius, bending angle, and feeding length. Step (7) locates and analyzes the feature surface described in step (3) to determine whether it is a qualified pipe fitting.
2. The method for parsing three-dimensional pipe fitting files for a pipe bending machine according to claim 1, characterized in that, Step (3) involves analyzing the curves in the curve set, identifying and filtering the pipe fitting main body elements that belong to the main body of the pipe fitting and the feature surfaces that do not belong to the main body of the pipe fitting. Specifically, six points are randomly selected on the curve. Based on the principle that three points can determine a circle, the circle generated by the first three points and the last three points is calculated. If the generated circles are identical, then the curve is an arc. If the number of arcs in the curve set is not less than 2, then the surface is the main part of the pipe fitting; Surfaces that do not meet the criteria will be temporarily classified as feature surfaces.
3. The method for parsing three-dimensional pipe fitting files for a pipe bending machine according to claim 2, characterized in that, Since any cross-section of a pipe fitting that conforms to the pipe bending rules should have the same radius, the program will further detect the arcs generated by the curves. If two or more arc curves belong to the same circle radius but are in different positions, the surface will be temporarily classified as a component of the pipe fitting body.
4. The method for parsing three-dimensional pipe fitting files for a pipe bending machine according to claim 1, characterized in that, The specific steps (4) are as follows: calculate the pipe surface data obtained in step (3), distinguish whether the pipe segment where the surface is located is a straight pipe or a bend, and then further calculate the straight pipe and bend information where the surface is located, including the position and radius of the two cross sections of the pipe segment; classify the surface according to the calculated pipe information, first find the surface with the same radius and belonging to the same pipe segment, and then find the pipe surface with different radii but the same position, thereby obtaining the complete information of each bend or straight pipe segment.
5. The method for parsing three-dimensional pipe fitting files for a pipe bending machine according to claim 1, characterized in that, The specific steps (5) are as follows: traverse and match the individual pipe fittings obtained from the analysis, and find the pipe fittings that have only one cross section with the same maximum radius and position as the current pipe fitting, thereby obtaining the complete pipe fitting segment generated in one processing.
6. The method for parsing three-dimensional pipe fitting files for a pipe bending machine according to claim 1, characterized in that, The specific steps (7) are as follows: by adding a bounding box to the feature surface to perform intersection detection, locate the pipe segment where the feature surface is located, and then check whether the feature is inside the pipe. If it exceeds the surface of the pipe, it will affect subsequent processing and be judged as a non-compliant pipe.
Citation Information
Patent Citations
Guide pipe automatic identification method based on visual detection
CN104143213A
CAE-based internal high-pressure forming optimized analysis method and system
CN108345703A