A method and system for batch modification of arc-shaped parts
By using Grasshopper to automatically identify and modify curved parts into straight parts, the problem of low processing efficiency for curved parts is solved, enabling efficient and accurate batch modification of curved parts to meet engineering connection requirements.
Patent Information
- Application Number
- CN202511332430.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-18
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2045-09-18
AI Technical Summary
In the manufacturing of steel structure handrails, guardrail systems, and space frame structures, existing technologies suffer from low processing efficiency for curved parts, making automated cutting difficult. Furthermore, existing 3D software lacks batch processing tools, resulting in high labor costs and unstable quality.
This paper provides a method and system for batch modification of curved parts. By using Grasshopper, curved parts are automatically identified and filtered. Combined with geometric relationship judgment, the curved parts are modified into straight parts. This includes moving the end control points of the curved parts and analyzing geometric relationships to ensure that the connection relationship remains unchanged.
It enables fully automated batch processing of curved parts, improving processing efficiency and accuracy, ensuring the feasibility of the design and the accuracy of the connection relationship, and reducing human error.
Smart Images

Figure CN120822306B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer-aided design and manufacturing, and particularly relates to a batch modification method and system for arc-shaped parts. BACKGROUND
[0002] In the manufacturing and blanking process of steel structure handrails, guardrail systems and other similar space truss structures, a large number of pipe fittings are used. These pipe fittings are often connected in the form of intersecting line welding to ensure the stability and aesthetics of the structure. In such projects, some pipe fittings are designed as arc-shaped parts due to aesthetic or functional requirements. However, such arc-shaped parts generally have the following problems in production processing and hole processing:
[0003] 1. The shape of the intersecting hole of the arc-shaped part is a complex spatial curved surface, and in many cases it cannot be programmed and blanked using standard numerical control cutting equipment. It often relies on technical workers to perform manual cutting. The operator needs to rely on personal experience to perform lofting and line drawing on the physical pipe, and then use a handheld plasma or flame cutting machine for processing, resulting in low operation efficiency and processing quality of the hole processing;
[0004] 2. When using numerical control equipment for automatic cutting, the designer first modifies the arc-shaped part to a straight line-shaped part in the three-dimensional model without affecting the production requirements. The existing general three-dimensional software lacks batch processing tools for this specific requirement. In the existing operation process, the designer needs to manually operate each arc-shaped part: first draw a straight line segment between the two end points of the part, and then manually select and drag the middle control point of the arc to align it to the straight line, thereby "straightening" the part.
[0005] Therefore, the existing technology has great technical bottlenecks in the above two aspects, resulting in low efficiency and high labor cost in the actual design and manufacturing process, which affects the production quality. SUMMARY
[0006] The purpose of the present application is to provide a batch modification method and system for arc-shaped parts to solve the problems described in the background section.
[0007] To achieve the above purpose, the first aspect of the present application provides the following technical solution:
[0008] The first aspect of the present application provides a batch modification method for arc-shaped parts, the method comprising:
[0009] Iterate through all parts of the current model, and according to the parameter information of each part, screen the parts with a circular cross-section and meeting the preset parameter requirements into a first part set. The parameter types in the preset parameter requirements include cross-sectional outer diameter and wall thickness;
[0010] Traverse each part in the first part set, identify the arc-shaped part in the first part set, and screen each arc-shaped part as a second part set. The center line of the arc-shaped part is a circular arc curve with fixed curvature.
[0011] Respectively, the geometric relationship of each arc-shaped part in the second part set is judged, and according to the geometric relationship judgment result, the arc-shaped part is modified to a straight line part, and the center line of the straight line part is a straight line, wherein:
[0012] If at least one end of the arc-shaped part is connected with a first part, when the connection type is a through connection and the cutting surface of the arc-shaped part is a cylindrical surface, the end control point of the arc-shaped part connection end is moved to the intersection point of the center line of the arc-shaped part and the center line of the first part, and then the arc-shaped part is modified to a straight line part.
[0013] If at least one end of the arc-shaped part is connected with a second part, when the connection type is a flat connection and the cutting surface of the arc-shaped part is a plane, the end control point of the arc-shaped part connection end is moved to the intersection point of the center line of the arc-shaped part and the plane cutting surface, and then the arc-shaped part is modified to a straight line part.
[0014] Further, when the parameter information of each part cannot obtain the cross-section type and judge the preset parameter requirement, the method further comprises:
[0015] A plurality of cross-section contour lines are obtained by cutting the part with a preset plane at equal intervals along the length extension direction of the part, wherein the preset plane is perpendicular to the tangent direction of the center line of the part at the cutting point;
[0016] One or more fitting circles are formed according to the point set of the cross-section contour line, and the distance from each point on the outer cross-section contour line to the center of the corresponding fitting circle is obtained. If the difference between the distance from all points on the outer cross-section contour line to the center of the corresponding fitting circle and the radius of the fitting circle is within a preset range, and the radii of the fitting circles corresponding to the outer cross-section contour lines of each cutting point are equal, then the interface type of the part is a circular cross-section;
[0017] If the number of fitting circles formed by the cross-section contour line of a single cutting point is 2, then the cross-section type of the part is a ring cross-section;
[0018] The cross-section outer diameter and wall thickness of the part are obtained according to the cross-section contour line, and the part with a ring cross-section and meeting the preset parameter requirement is screened as the first part set.
[0019] Further, the traversal of each part in the first part set and the identification of the arc-shaped part in the first part set comprise:
[0020] Obtain the radius attribute value of each part in the first set of parts, where the radius attribute value is used to characterize the radius value of the arc where the center line of the part is located;
[0021] If the radius attribute value is not 0, then the part is determined to be an arc-shaped part;
[0022] If the radius attribute value is 0, then the number of control points of the part is read and it is determined whether each control point is located on the same straight line. If the number of control points of the part is greater than 2, then the curvature value of each control point on the curve formed by each control point is further obtained, and it is determined whether each control point is located on the same straight line based on the curvature value.
[0023] If the control points are not located on the same straight line and the curvature values of the control points are equal, then the part is determined to be an arc-shaped part.
[0024] Furthermore, determining whether each of the control points lies on the same straight line includes:
[0025] Set a curvature threshold, and obtain the relationship between the curvature value of each control point on the curve formed by the control points and the curvature threshold:
[0026] If the curvature value of each control point is less than the curvature threshold, the part is determined to be a straight part; if the curvature value of each control point is greater than the curvature threshold and the curvature values of each control point are equal, the part is determined to be an arc-shaped part.
[0027] Furthermore, modifying the arc-shaped part into a straight-shaped part includes:
[0028] After moving the end control point of the arc-shaped part according to the connection type of the arc-shaped part, three control points of the arc-shaped part are obtained respectively, including a first end control point, a second end control point and a middle control point. The middle control point is the control point located in the middle position between the first end control point and the second end control point. The first end control point and / or the second end control point are the end control points of the connection end of the arc-shaped part.
[0029] A first straight line is formed by connecting the first end control point and the second end control point. The middle control point is moved onto the first straight line to obtain the straight part. The length of the straight part after modification is different from that of the arc part.
[0030] Furthermore, the method also includes:
[0031] If at least one end of the arc-shaped part is connected to the third part, and the connection type is free splicing and the end is not cut, the first end control point, the second end control point and the middle control point of the arc-shaped part are obtained respectively, and the middle control point is the control point located in the middle position between the first end control point and the second end control point;
[0032] The intermediate control point is moved to the straight line formed by the first end control point and the second end control point to obtain the straight part.
[0033] Furthermore, when moving the end control point of the arc-shaped part, it moves along the center line of the arc-shaped part.
[0034] Furthermore, after identifying the arc-shaped parts in the first set of parts, the arch height of each arc-shaped part is obtained, and the arc-shaped parts that meet the preset arch height requirements are selected as the second set of parts.
[0035] Preferably, the method is implemented based on Grasshopper.
[0036] The second aspect of this application provides a batch modification system for arc-shaped parts. The method described in the first aspect of this application is based on the system described in the second aspect of this application. The system includes:
[0037] The ring-shaped part filtering module is used to traverse all parts of the current model and filter parts with a cross-section type of ring and that meet the preset parameter requirements into a first set of parts based on the parameter information of each part. The parameter types in the preset parameter requirements include the outer diameter of the cross-section and the wall thickness.
[0038] The arc-shaped part filtering module is used to traverse each part in the first part set, identify the arc-shaped parts in the first part set, and filter each arc-shaped part into a second part set, wherein the center line of the arc-shaped part is a circular arc curve with a fixed curvature.
[0039] The part type modification module is used to perform geometric relationship judgment on each of the arc-shaped parts in the second part set, and modify the arc-shaped parts into straight-shaped parts based on the geometric relationship judgment results, wherein the centerline of the straight-shaped parts is a straight line.
[0040] If at least one end of the arc-shaped part is connected to the first part, and the connection type is a through-hole connection and the cut surface of the arc-shaped part is a cylindrical surface, the end control point of the arc-shaped part connection end is moved to the intersection of the center line of the arc-shaped part and the center line of the first part, and the arc-shaped part is then modified into a straight part; if at least one end of the arc-shaped part is connected to the second part, and the connection type is a flat-mouth connection and the cut surface of the arc-shaped part is a plane, the end control point of the arc-shaped part connection end is moved to the intersection of the center line of the arc-shaped part and the plane cut surface, and the arc-shaped part is then modified into a straight part.
[0041] This application, through the batch modification method for arc-shaped parts described above, can achieve at least the following technical effects:
[0042] This application provides a fully automated batch processing method that automatically identifies and filters arc-shaped parts according to processing requirements and modifies them into straight parts, greatly improving the efficiency and accuracy of part processing. In addition, by performing geometric relationship analysis on the parts and fully considering the actual engineering connection requirements (such as through-cut and flat cut), the process of first adjusting the end control points and then straightening the whole part ensures that the modified parts fully meet the original connection relationship and guarantees the feasibility of the design. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0044] Figure 1 A schematic flowchart illustrating a batch modification method for arc-shaped parts provided in this application embodiment;
[0045] Figure 2 A schematic diagram of the connection relationship provided in the embodiments of this application;
[0046] Figure 3 This is a schematic diagram of the flat-mouth connection relationship provided in the embodiments of this application;
[0047] Figure 4 This is a schematic diagram of the control points for the moving parts provided in an embodiment of this application;
[0048] Figure 5 This is a schematic diagram of the free splicing relationship provided for an embodiment of this application;
[0049] Figure 6A schematic diagram of the Grasshopper user interface for screening tubular parts provided in this application embodiment;
[0050] Figure 7 A schematic diagram of the Grasshopper user interface for screening curved parts provided in this application embodiment;
[0051] Figure 8 Another schematic diagram of Grasshopper's user interface for filtering curved parts, provided as an embodiment of this application;
[0052] Figure 9 A schematic diagram of the Grasshopper user interface when modifying an arc segment into a straight line segment, provided in an embodiment of this application.
[0053] Figure 10 This is a schematic diagram of a batch modification system architecture for arc-shaped parts provided in an embodiment of this application.
[0054] Reference numerals: 200, a batch modification system for arc-shaped parts; 201, a ring-shaped parts filtering module; 202, an arc-shaped parts filtering module; 203, a parts type modification module. Detailed Implementation
[0055] The technical solutions of this application will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0056] This application provides a method for batch modification of curved parts. It automatically identifies and filters curved parts according to processing requirements and modifies them into straight parts in a fully automated batch process, greatly improving the efficiency and accuracy of part processing. Preferably, this embodiment uses Rhino software and Grasshopper to implement the following method, such as... Figure 1 As shown in the figure, the method for batch modification of arc-shaped parts provided in this embodiment specifically includes the following steps:
[0057] Step S100: Traverse all parts of the current model, and based on the parameter information of each part, filter the parts with a cross-section type of ring and that meet the preset parameter requirements into the first set of parts. The parameter types in the preset parameter requirements include the outer diameter of the cross-section and the wall thickness.
[0058] Specifically, in this embodiment, the current model is an arbitrary three-dimensional model, which contains structured parameter files corresponding to each part, including various part parameter information such as label, material specifications, grade, quantity, length, part weight, cross-sectional diameter, wall thickness, arch height, radius, etc. In step S100, the parameter information of all parts in the model file is first traversed. The cross-sectional parameters of all parts are obtained by calling the API of the model software (such as Rhino software) through Grasshopper, including cross-sectional type, cross-sectional outer diameter, and wall thickness. Parts that meet the production requirements are selected as the first set of parts according to the preset parameter requirements. The preset parameter requirements are determined based on the production requirements and may include cross-sectional outer diameter, wall thickness, and part material. In step S100, non-circular tube types are first excluded by filtering for parts with a circular cross-section. For parts with a circular cross-section, parts with a cross-sectional outer diameter much smaller or larger than the target cross-sectional outer diameter (the accuracy can be freely set, such as 1mm, 0.1mm, or 0.01mm) are further excluded. Finally, for parts with a circular cross-section and an outer diameter matching the target cross-sectional outer diameter, parts with a wall thickness greater than or less than the target wall thickness (e.g., 3mm) are further excluded. The preset parameters in this step are determined according to specific production and processing requirements, and further filtering can be performed based on different parameter types. For example, if the preset parameters also require parts to be made of Q235B material, then the material information of the parts is further retrieved and compared with the target material information for exclusion, and the finally filtered parts are used as the first set of parts.
[0059] Furthermore, in step S100, when the cross-section type and the preset parameter requirements cannot be obtained based on the parameter information of each part, the method further includes:
[0060] Step S110: Along the length extension direction of the part, cut the part at equal intervals with a preset plane to obtain multiple cross-sectional contour lines, wherein the preset plane is perpendicular to the tangent direction of the center line of the part at the cutting point;
[0061] Step S120: Fit one or more fitting circles according to the point set of the cross-sectional contour line, obtain the distance from each point on the outer cross-sectional contour line to the center of the corresponding fitting circle, if the difference between the distance from all points on the outer cross-sectional contour line to the center of the corresponding fitting circle and the radius of the fitting circle is within a preset range, and the radii of the fitting circles corresponding to the outer cross-sectional contour lines of each cutting point are equal, then the interface type of the part is a circular cross-section.
[0062] Step S130: If the number of fitted circles formed by the cross-sectional contour lines of a single cutting point is 2, then the cross-sectional type of the part is an annular cross-section;
[0063] Step S140: Obtain the outer diameter and wall thickness of the part based on the cross-sectional contour line, and select the parts with annular cross-section type and meeting the preset parameter requirements as the first part set.
[0064] Specifically, when the parameter information of each part in the model file is insufficient or missing, the cross-sectional type and various parameters in the preset parameter requirements of the part are obtained through the geometric relationship of the part. In this embodiment, preferably, multiple cross-sections are sampled along the centerline direction (length extension direction) of the part: using a preset plane, the part is cut from one end to the other at certain intervals (e.g., taking 5-10 cross-sections), along the tangent direction of the centerline of the part where each cutting point is located, to obtain multiple cross-sectional contour lines corresponding to each cutting point. Each cutting point may have one or more cross-sectional contour lines; firstly, the outer cross-sectional contour lines of each cutting point are analyzed:
[0065] The point set of the cross-sectional profile is fitted to a circle using the least squares method, i.e., the fitted circle; the distance from each point on the cross-sectional profile to the center of the fitted circle and the difference between the distance and the radius of the fitted circle are calculated; if the difference of all points is within the preset tolerance range, the cross-section is considered to be a circular cross-section. In addition, it must be ensured that the cross-sectional profile is a closed loop.
[0066] Secondly, determine whether each cutting point is a circular cross-section based on the outer cross-sectional contour lines of multiple cutting points. If the cross-sectional type of each cutting point is a circular cross-section and the radius of each fitted circle is consistent, then the part is a cylindrical part.
[0067] Finally, if the cross-sectional contour lines at each cutting point include both inner and outer sections, and can correspondingly form two fitted circles, then the part is a tubular part. Further, the outer diameter and wall thickness of the part's cross-section are obtained based on the cross-sectional contour lines, where wall thickness = outer fitted circle radius – inner fitted circle radius. Parts with annular cross-sections that meet the preset parameter requirements are selected as the first set of parts. In step S100, the method of combining part element parameters and geometric judgment of the cut parts greatly improves the accuracy of selecting the cross-sectional type and required parameters of the parts, and enhances the reliability of the overall process. The preset parameters also lay a standardized data foundation for subsequent automated batch processing.
[0068] Step S200: Traverse each part in the first part set, identify the arc-shaped parts in the first part set, and filter each arc-shaped part into a second part set, wherein the center line of the arc-shaped part is a circular arc curve with a fixed curvature.
[0069] Furthermore, in step S200, the step of traversing each part in the first part set and identifying the arc-shaped parts in the first part set includes:
[0070] Step S210: Obtain the radius attribute value of each part in the first part set, wherein the radius attribute value is used to characterize the radius value of the arc where the center line of the part is located;
[0071] Step S220: If the radius attribute value is not 0, then the part is determined to be an arc-shaped part;
[0072] Step S230: If the radius attribute value is 0, then read the number of control points of the part and determine whether each control point is located on the same straight line. If the number of control points of the part is greater than 2, then further obtain the curvature value of each control point on the curve formed by each control point, and determine whether each control point is located on the same straight line based on the curvature value.
[0073] Step S240: If the control points are not located on the same straight line and the curvature values of the control points are equal, then the part is determined to be an arc-shaped part.
[0074] Specifically, the first set of parts consists of parts with annular cross-sections. Step S200 further determines whether the parts are arc-shaped parts, i.e., the center line of the parts is an arc with a fixed curvature.
[0075] First, read the radius attribute of the part and determine whether the value of the radius attribute is 0: if the radius attribute value is 0, it means that the part is not constructed by two points + radius, and is a non-curved part, so further judgment of the control points is needed; if the radius attribute value is not 0, it means that the part is a curved part, and the part is filtered into the second part set.
[0076] Secondly, for parts with a radius attribute value of 0, the number of control points of the part is read by analyzing the part's construction history: if the number of control points is greater than 2, it is necessary to further determine whether the control points are on a straight line; if the number of control points is less than or equal to 2, the part is determined to be a straight line with a radius attribute of 0, which does not meet the screening criteria for curved parts.
[0077] Finally, for parts with more than 2 control points, the method for determining whether the control points are on a straight line includes: setting a curvature threshold, obtaining the relationship between the curvature value of each control point on the curve formed by multiple control points and the curvature threshold; if the curvature value of each control point is less than the curvature threshold, the part is determined to be a straight part; if the curvature value of each control point is greater than the curvature threshold and the curvature values of each control point are equal, the part is determined to be an arc-shaped part; otherwise, the part is discarded. Based on step S100, step S200 precisely separates those arc-shaped parts with regular geometric definitions that are most suitable for automated "curve-to-straight" conversion, avoiding the risks and errors that may arise from applying the algorithm to complex free curves, and ensuring the reliability of the modification process and the accuracy of the results. Since the target is limited to a standard arc, its geometric properties (such as center, radius, and arc length) can be accurately calculated, providing a clear mathematical basis for subsequent geometric relationship judgments and control point movements.
[0078] Step S300: Perform geometric relationship judgment on each of the arc-shaped parts in the second parts set. Based on the geometric relationship judgment result, modify the arc-shaped parts into straight-line parts, wherein the centerline of the straight-line parts is a straight line, wherein:
[0079] If at least one end of the arc-shaped part is connected to the first part, and the connection type is a through-hole connection and the cut surface of the arc-shaped part is a cylindrical surface, the end control point of the arc-shaped part is moved to the intersection of the center line of the arc-shaped part and the center line of the first part, and the arc-shaped part is then modified into a straight part; if at least one end of the arc-shaped part is connected to the second part, and the connection type is a flat-mouth connection and the cut surface of the arc-shaped part is a plane, the end control point of the arc-shaped part is moved to the intersection of the center line of the arc-shaped part and the plane cut surface, and the arc-shaped part is then modified into a straight part.
[0080] If at least one end of the arc-shaped part is connected to a third part, and the connection type is free splicing with no cutting at the end, the first end control point, the second end control point, and the intermediate control point of the arc-shaped part are obtained respectively. The intermediate control point is a control point located in the middle position between the first end control point and the second end control point. The intermediate control point is moved to the straight line formed by the first end control point and the second end control point to obtain the straight part.
[0081] Specifically, step S300 is used to further refine the selection of parts that need modification by analyzing the geometric / intersection relationships of the parts. For each curved part, its end connection relationship is determined (through-mouth connection / flat-mouth connection, where, for example...) Figure 2As shown, the cutting surface of the through-hole connection is a cylindrical surface; as Figure 3 As shown, the cutting surface of the flat-mouth connection is a plane. Based on this, the end control points are first adjusted, and then the entire part is modified to a straight line. For the through-mouth part, by first moving the end control points to the intersection of the center lines of the two parts and then straightening them, it is ensured that the end of the modified straight part is still accurately located in the original design connection position, and the intersection relationship with the other part (the first part) is maintained. This provides an absolutely reliable geometric reference for generating the correct CNC intersection line cutting path. For the flat-mouth part, by first moving the control points to the intersection of the center line and the cutting surface and then straightening them, it is ensured that the end of the modified part still fits perfectly with the mating part, without the need to readjust the splicing relationship, thus maintaining the assembly intention of the design. Through steps S100~S300, the parts in the model that meet the modification requirements are accurately screened, so that the subsequent through-mouth and plane cutting of the parts can be automated CNC machining. Figure 5 The diagram shows a free-connection relationship. To facilitate processing, and while meeting production requirements, curved parts with free ends and no cut surfaces are straightened by modifying control points. Furthermore, if the current curved part has free ends and no connection, it does not need to be modified into a straight part.
[0082] Furthermore, in step S300, after moving the control points at the ends of the arc-shaped parts with through-hole connections / flat-hole connections respectively, a straightening operation is performed on the arc-shaped parts, including:
[0083] Step S310: After moving the end control point of the arc-shaped part according to the connection type of the arc-shaped part, obtain three control points of the arc-shaped part, including a first end control point, a second end control point and a middle control point. The middle control point is the control point located in the middle position between the first end control point and the second end control point. The first end control point and / or the second end control point are the end control points of the connection end of the arc-shaped part.
[0084] Step S320: Connect the first end control point and the second end control point to form a first straight line, move the middle control point to the first straight line to obtain the straight part, and the length of the modified straight part is different from that of the arc part.
[0085] Specifically, such as Figure 4As shown, the centerline of each arc-shaped part is composed of three or more control points. When modifying the part type, the first and second end control points of the arc-shaped part, namely the starting point P1 and the ending point P2 of the centerline, are taken and connected to form the first straight line L1. Any point P3 other than P1 and P2 on the centerline of the arc-shaped part (preferably, the point located between P1 and P2) is taken and moved to the first straight line L1 formed by P1 and P2. The remaining points on the arc line other than P1, P2 and P3 are deleted. Points P1 and P3 form the second straight line L2, and points P3 and P2 form the third straight line L3. L2 and L3 are merged into a straight line segment L4. At this time, L4 is composed of three points P1, P3 and P2. It should be noted that the L1 and L4 of the line segments generated in the above steps are theoretically the same. However, due to software limitations, when the original part is generated from 3 or more "points", the modified part should still contain at least 3 "points" and cannot be less than 3 "points".
[0086] Furthermore, by using Grasshopper to call the modeling software's API to modify the model, only the specific part's attributes or parameters that need modification are changed, without affecting other unrelated attributes and parameters of the part. For example, if the above steps modify the part's centerline, changing it from an arc to a straight line, the other attributes of the part, such as material, cross-sectional dimensions, and surface treatment, will remain unchanged. However, the part's weight and length will be affected by the change from an arc to a straight line. The modeling software will automatically calculate the modified part's weight and length based on the modified straight line segment.
[0087] Preferably, when moving the end control point of the arc-shaped part, the movement is made along the centerline of the arc-shaped part to ensure the geometric continuity of the modified part.
[0088] Optionally, after identifying the arc-shaped parts in the first set of parts, the arch height of each arc-shaped part is obtained, and the arc-shaped parts that meet the preset arch height requirements are selected as the second set of parts. According to production and design requirements, the arch height can be used as a selection condition for arc-shaped parts during identification and selection.
[0089] Example 1
[0090] Based on steps S100~S300 in the above specific embodiments, this embodiment provides a specific method implemented in Grasshopper, including the following steps:
[0091] 1. Screening tubular parts
[0092] All model entities are obtained using secondary development components. The cross-sectional information of each entity is then extracted using these secondary development components and the system's built-in components (e.g., part cross-section type, part cross-section diameter, part wall thickness, number of control points in the part's build history, etc.). Based on the obtained part cross-section type, diameter, and wall thickness, round tubular parts that meet the requirements are selected.
[0093] According to production requirements, the target cross section of the handrail's central crossbar needs modification: PD33*3, which is a circular tube with a diameter of 33mm and a wall thickness of 3mm. Therefore, after filtering by cross section, the original model's 4759 objects are reduced to 1926 objects. Since the cross section of the handrail's central crossbar is always PD33*3 (33mm diameter, 3mm wall thickness), filtering by cross section reduces the original model's 4759 objects to 1926 objects. The Grasshopper interface is as follows... Figure 6 As shown.
[0094] 2. Screening curved parts
[0095] For the circular tube part obtained in step 1, the curvature of each control point on its respective centerline is analyzed by acquiring the centerline and control points or by using Curve. First, the ARC 3pt component is used to create the part's centerline by acquiring the control points, and the radius attribute value of the centerline is calculated.
[0096] Using the Curve Closedt Point component for analysis: if the curvature of all control points is less than a preset threshold (e.g., 0.001), it is determined to be a straight part; otherwise, it is an arc-shaped part. This filters out 1468 parts from 1926 parts. These 1468 parts are then analyzed, with an arch height range of 0-5mm. Due to the high model accuracy, the number of parts with an arch height of 0-1mm is 287, 1-2mm is 179, 2-3mm is 68, 3-4mm is 442, and 4-5mm is 492. The Grasshopper interface is shown below. Figure 7 , Figure 8 As shown, there are a total of 1466 parts with non-zero filter arching.
[0097] 3. Geometric Relationship Analysis
[0098] Using the Proximity or Closest Points method, identify other parts that are very close to each end of the current curved part; these are the connectors. Use Surface to extract the cut surface of the end and identify whether the cut surface is cylindrical or planar.
[0099] For a cylindrical cut surface, obtain the centerline of the connector (first part) of the current arc-shaped part, and use the Curve battery to move the end control point of the connector of the current arc-shaped part to the intersection of the centerline of the current arc-shaped part and the centerline of the first part; for a planar cut surface, use the Curve battery to obtain the intersection of the centerline of the current arc-shaped part and the cutting plane, and move the end control point of the connector of the current arc-shaped part to the intersection.
[0100] In addition, when connecting a curved part to a third part by means of free splicing and without cutting, the current curved part can be directly modified into a straight part by moving the control point.
[0101] 5. Change the arc segment to a straight line segment.
[0102] The curved parts obtained from steps 1-4 are modified. Based on steps S310-S320 in the above specific implementation, the original curved parts are modified into straight parts by modifying the control points. The Grasshopper interface is as follows: Figure 9 As shown, Grasshopper uses the modeling software's API to modify the model, targeting only the specific part's attributes or parameters that need modification, without affecting other unrelated attributes and parameters. For example, the steps above modify the part's centerline, changing it from an arc to a straight line. Other attributes such as material, cross-sectional dimensions, and surface treatment remain unchanged, but the part's weight and length will be affected by the change from an arc to a straight line. The modeling software will automatically calculate the modified part's weight and length based on the straight line segment.
[0103] This application also provides a batch modification system 200 for arc-shaped parts. The batch modification system method for arc-shaped parts provided in this embodiment is implemented based on a batch modification system for arc-shaped parts. For example... Figure 10 The diagram shows the architecture of a batch modification system 200 for arc-shaped parts, including:
[0104] The ring-shaped part filtering module 201 is used to traverse all parts of the current model and, based on the parameter information of each part, filter the parts with a cross-section type of ring and that meet the preset parameter requirements into a first set of parts. The parameter types in the preset parameter requirements include the outer diameter of the cross-section and the wall thickness.
[0105] The arc-shaped part filtering module 202 is used to traverse each part in the first part set, identify the arc-shaped parts in the first part set, and filter each arc-shaped part into a second part set, wherein the center line of the arc-shaped part is a circular arc curve with a fixed curvature.
[0106] The part type modification module 203 is used to perform geometric relationship judgment on each of the arc-shaped parts in the second part set, and modify the arc-shaped parts into straight-shaped parts based on the geometric relationship judgment results, wherein the center line of the straight-shaped parts is a straight line.
[0107] If at least one end of the arc-shaped part is connected to the first part, and the connection type is a through-hole connection and the cut surface of the arc-shaped part is a cylindrical surface, the end control point of the arc-shaped part connection end is moved to the intersection of the center line of the arc-shaped part and the center line of the first part, and the arc-shaped part is then modified into a straight part; if at least one end of the arc-shaped part is connected to the second part, and the connection type is a flat-mouth connection and the cut surface of the arc-shaped part is a plane, the end control point of the arc-shaped part connection end is moved to the intersection of the center line of the arc-shaped part and the plane cut surface, and the arc-shaped part is then modified into a straight part.
[0108] The embodiments of this application achieve the following technical effects:
[0109] 1. This application provides a systematic solution for process automation that integrates intelligent recognition, precise geometric calculation and automatic modification through 3D software and Grasshopper. It transforms the "curved to straight" operation that originally required designers to perform manually and one by one into fully automatic batch processing, which greatly improves the efficiency of cutting through the edges of parts and enables CNC automated equipment to completely replace manual cutting.
[0110] 2. Based on the automated processing of precise geometric algorithms in the part identification and screening stage, the unavoidable human error in manual layout, drawing and cutting during the process of modifying curved parts into straight parts is eliminated. This improves production efficiency while ensuring the quality requirements of parts in the design and production process, and connects the intelligent BIM design and CNC machining process.
[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method of batch modifying arc-shaped parts, characterized in that, The method comprises the following steps: traversing all parts of the current model, according to the parameter information of each part, screening the parts with circular cross-section and meeting the preset parameter requirements into a first part set, the parameter types in the preset parameter requirements include cross-section outer diameter and wall thickness, wherein, if the cross-section type cannot be obtained according to the parameter information and whether the preset parameter requirements are met cannot be judged, then: cutting the part along the length extension direction of the part with a preset plane at equal intervals to obtain a plurality of cross-section contour lines, wherein the preset plane is perpendicular to the tangent direction of the part center line at the cutting point; fitting one or more fitting circles according to the point set of the cross-section contour line, obtaining the distance from each point on the outer cross-section contour line to the center of the corresponding fitting circle, if the difference between the distance from all points on the outer cross-section contour line to the center of the corresponding fitting circle and the radius of the fitting circle is within a preset range, and the radii of the fitting circles corresponding to the outer cross-section contour lines of each cutting point are equal, then the cross-section type of the part is circular cross-section; if the number of the fitting circles formed by the cross-section contour line of a single cutting point is 2, then the cross-section type of the part is ring cross-section; obtaining the cross-section outer diameter and wall thickness of the part according to the cross-section contour line, screening the parts with the ring cross-section and meeting the preset parameter requirements into the first part set; traversing each part in the first part set, identifying the arc-shaped parts in the first part set by obtaining the radius attribute value of each part, and screening each arc-shaped part into a second part set, the radius attribute value is used to represent the radius value of the circular arc where the part center line is located; if the radius attribute value is not 0, then the part is judged to be an arc-shaped part; if the radius attribute value is 0, then the number of control points of the part is read and it is judged whether each control point is located on the same straight line, if the number of control points of the part is greater than 2, then the curvature value of each control point on the curve formed by each control point is further obtained, and it is judged whether each control point is located on the same straight line according to the curvature value; if each control point is not located on the same straight line and the curvature values of each control point are equal, then the part is judged to be an arc-shaped part, and the center line of the arc-shaped part is a circular arc curve with fixed curvature; respectively performing geometric relationship judgment on each arc-shaped part in the second part set, and modifying the arc-shaped part into a straight line-shaped part according to the geometric relationship judgment result, wherein the center line of the straight line-shaped part is a straight line, and wherein: if at least one end of the arc-shaped part is connected with a first part, when the connection type is a through connection and the cutting surface of the arc-shaped part is a cylindrical surface, then the end control point of the connected end of the arc-shaped part is moved to the intersection point of the center line of the arc-shaped part and the center line of the first part, and then the arc-shaped part is modified into a straight line-shaped part. If at least one end of the arc-shaped part is connected with a second part, when the connection type is a flat joint and the cutting surface of the arc-shaped part is a plane, the end control point of the connection end of the arc-shaped part is moved to the intersection of the center line of the arc-shaped part and the plane cutting surface, and then the arc-shaped part is modified into a straight line-shaped part.
2. A method of batch modifying arc-shaped parts according to claim 1, characterized in that, The judgment whether each control point is located on the same straight line comprises: A curvature threshold is set, and the size relationship between the curvature value of each control point on the curve formed by the control points and the curvature threshold is obtained: If the curvature value of each control point is less than the curvature threshold, the part is judged to be a straight line-shaped part; if the curvature value of each control point is greater than the curvature threshold and the curvature value of each control point is equal, the part is judged to be an arc-shaped part.
3. A method of batch modifying arc-shaped parts according to claim 1, characterized in that, The modification of the arc-shaped part into a straight line-shaped part comprises: After moving the end control point of the arc-shaped part according to the connection type of the arc-shaped part, three control points of the arc-shaped part are obtained, including a first end control point, a second end control point and an intermediate control point, the intermediate control point is a control point located at the intermediate position between the first end control point and the second end control point, and the first end control point and / or the second end control point is the end control point of the connection end of the arc-shaped part; The first end control point and the second end control point are connected to form a first straight line, the intermediate control point is moved to the first straight line, and the straight line-shaped part is obtained, and the length of the modified straight line-shaped part is different from that of the arc-shaped part.
4. A method of batch modifying arc-shaped parts according to claim 3, characterized in that, Further comprising: If at least one end of the arc-shaped part is connected with a third part, and the connection type is free splicing and the end has no cutting, the first end control point, the second end control point and the intermediate control point of the arc-shaped part are obtained, and the intermediate control point is a control point located at the intermediate position between the first end control point and the second end control point; The intermediate control point is moved to the straight line formed by the first end control point and the second end control point, and the straight line-shaped part is obtained.
5. The method of claim 1, wherein, When the end control point of the arc-shaped part is moved, the movement is along the center line of the arc-shaped part.
6. The method of claim 1, wherein, After the arc-shaped parts in the first part set are identified, the arch height of each arc-shaped part is obtained, and the arc-shaped parts meeting the preset arch height requirement are screened as the second part set.
7. The method of claim 1, wherein, The method is realized based on Grasshopper.
8. A system for batch modification of arc-shaped parts, characterized in that, The system is used to realize the method of any one of claims 1 to 7, and the system comprises: The annular part screening module is used to traverse all parts of a current model, and according to parameter information of each part, parts with a circular cross section and meeting preset parameter requirements are screened as a first part set, wherein the parameter types in the preset parameter requirements include a cross section outer diameter and a wall thickness, and wherein when the parameter information cannot be used to obtain the cross section type and determine the preset parameter requirements: a plurality of cross section contour lines are obtained by cutting the part at equal intervals along a length extension direction of the part with a preset plane, the preset plane being perpendicular to a tangent direction of a part center line at a cutting point; one or more fitting circles are formed according to a point set of the cross section contour line, a distance from each point on an outer cross section contour line to a center of a corresponding fitting circle is obtained, if the difference between the distance from each point on the outer cross section contour line to the center of the corresponding fitting circle and the radius of the fitting circle is within a preset range, and the radii of the fitting circles corresponding to the outer cross section contour lines of each cutting point are equal, then the cross section type of the part is a circular cross section; if the number of the fitting circles formed by the cross section contour line of a single cutting point is 2, then the cross section type of the part is an annular cross section; the cross section outer diameter and the wall thickness of the part are obtained according to the cross section contour line, and parts with an annular cross section and meeting the preset parameter requirements are screened as the first part set; The arc-shaped part screening module is used to traverse each part in the first part set, identify arc-shaped parts in the first part set by obtaining radius attribute values of each part in the first part set, and screen each arc-shaped part into a second part set, the radius attribute value being used to represent a radius value of a circular arc in which the part center line is located; if the radius attribute value is not 0, then the part is determined to be an arc-shaped part; if the radius attribute value is 0, then the number of control points of the part is read and it is determined whether each control point is located on a same straight line, if the number of control points of the part is greater than 2, then the curvature values of each control point on a curve formed by the control points are further obtained, and it is determined whether each control point is located on a same straight line according to the curvature values; if each control point is not located on a same straight line and the curvature values of each control point are equal, then the part is determined to be an arc-shaped part, and the center line of the arc-shaped part is a circular arc curve with a fixed curvature; The part type modification module is used to perform geometric relationship determination on each arc-shaped part in the second part set respectively, and modify the arc-shaped part into a straight line-shaped part according to a geometric relationship determination result, the center line of the straight line-shaped part being a straight line. If at least one end of the arc-shaped part is connected with the first part, when the connection type is a through-hole connection and the cutting surface of the arc-shaped part is a cylindrical surface, the end control point of the connection end of the arc-shaped part is moved to the intersection point of the center line of the arc-shaped part and the center line of the first part, and then the arc-shaped part is modified into a straight line-shaped part; if at least one end of the arc-shaped part is connected with the second part, when the connection type is a flat-hole connection and the cutting surface of the arc-shaped part is a plane, the end control point of the connection end of the arc-shaped part is moved to the intersection point of the center line of the arc-shaped part and the plane cutting surface, and then the arc-shaped part is modified into a straight line-shaped part.
Citation Information
Patent Citations
Method for analyzing measured drawing of part
CN103954213A
Bearing part machining feature recognition method based on geometric reasoning
CN120541907A