Arc workpiece observation viewpoint generation method, device and electronic equipment

By generating an initial list of observation viewpoints for arc-shaped workpieces and performing penetration and thin-plate filtering, the problems of low efficiency and unreasonable distribution of viewpoint planning in existing technologies are solved. This achieves efficient and unobstructed observation viewpoint generation for arc-shaped workpieces, which is suitable for multi-variety, small-batch production and measurement of complex structures.

CN122453906APending Publication Date: 2026-07-24FAIR INNOVATION (SUZHOU) ROBOTIC SYSTEM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FAIR INNOVATION (SUZHOU) ROBOTIC SYSTEM CO LTD
Filing Date
2026-04-29
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing technologies for generating observation viewpoints for arc-shaped workpieces suffer from low planning efficiency, lack of specificity, unreasonable viewpoint distribution, and inaccurate judgment of penetration and occlusion, resulting in viewpoint generation results that are not suitable for multi-variety, small-batch production and complex structure measurement.

Method used

By generating an initial list of observation viewpoints for the arc workpiece, the system detects and filters out viewpoints that penetrate other surfaces and gaps in the thin plate structure, performs viewpoint retry and repair operations, and ensures that the observation viewpoints are located in free space and do not interfere with the structural components. This is achieved by combining an adaptive distance reference and an angle bisector generation strategy.

Benefits of technology

It enables efficient and unobstructed generation of observation viewpoints for arc-shaped workpieces, improves the adaptability of viewpoint planning and measurement efficiency, and ensures the integrity and effectiveness of observation viewpoints.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122453906A_ABST
    Figure CN122453906A_ABST
Patent Text Reader

Abstract

The application provides a kind of arc workpiece observation viewpoint generation method, device and electronic equipment, for the workpiece file including each cylindrical structure of arc workpiece, generates the initial observation viewpoint list of cylindrical structure.Detect whether the connection of each observation viewpoint and target point penetrates other surface, if penetration, corresponding observation viewpoint is filtered out.Detect whether each observation viewpoint after filtering is located in the gap of thin plate structure, if located, the observation viewpoint located in the gap of thin plate structure is filtered out.Detect whether there is effective viewpoint in observation viewpoint after filtering, if there is no effective viewpoint, observation viewpoint generation retry and repair operation are executed, and based on the observation viewpoint determined after generation retry and repair operation, the final observation viewpoint list is output.In the scheme, penetration detection and thin plate filtering detection ensure that observation viewpoint is located in free space and has no interference with structure, and combined with observation viewpoint regeneration mechanism, complete observation viewpoint generation and iterative optimization mechanism is constructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of point cloud processing technology, and more specifically, to a method, apparatus, and electronic device for generating viewing points for circular arc workpieces. Background Technology

[0002] When a model file of a workpiece is provided, it is often necessary to extract the weld information present in the workpiece from the model file. Existing methods for extracting weld information from model files involve generating a viewpoint, performing planar detection and structure lookup on the point cloud from the viewpoint, and converting the final structure list into a weld database, thereby obtaining the weld information from the model file.

[0003] In the field of industrial automation 3D measurement, viewpoint planning is a crucial preliminary step for achieving automated inspection of complex parts. Current mainstream technical solutions can be categorized as follows: Category 1: Manual Teaching and Offline Programming Solution. This solution relies on experienced engineers manually operating measuring equipment or robots to record measurement poses for specific workpieces, generating fixed scanning paths; or manually setting several observation angles based on CAD models in offline software. This solution is currently the most common method used in industrial settings.

[0004] The second category is viewpoint generation schemes based on model coverage. These schemes take the CAD model of the workpiece as input and use methods such as spatial bounding boxes, spherical sampling of viewpoints, or uniform sampling of curved surfaces to generate a dense mesh of candidate viewpoints around the model. Then, through simple visibility checks (such as ray intersection with the model), viewpoints that can cover the target area are selected, forming a viewpoint set. Some methods introduce genetic algorithms or particle swarm optimization algorithms to optimize and compress the number of viewpoints.

[0005] The third category: Automated viewpoint planning solutions based on structured light or binocular vision. This type of solution mounts a binocular probe on the robot's end effector and predefines several standard shooting postures based on workpiece features (such as edges, hole features, and planar areas), or calculates the next optimal measurement position using 3D reconstruction results. Some commercial software (such as PowerVirtual Plan and GOMInspect) implements automatic viewpoint generation based on feature libraries.

[0006] Specifically, existing technologies suffer from several shortcomings, including insufficient planning efficiency and adaptability, lack of dedicated processing mechanisms for arc / cylindrical structures, incomplete penetration and occlusion judgment mechanisms, weak adaptive and iterative optimization capabilities, and a lack of constraints on the rationality of viewpoint spatial distribution.

[0007] In existing technologies, manual teaching methods heavily rely on engineers' experience. When dealing with multi-variety, small-batch production models, re-teaching is required every time a new workpiece is introduced, resulting in a cycle that can take hours or even days, making it unsuitable for flexible manufacturing needs. While offline programming reduces on-site time, the pre-generated viewpoints often become invalid when there is a deviation between the actual workpiece clamping position and the theoretical model, requiring manual adjustments.

[0008] Existing viewpoint planning algorithms are generally geared towards general curved or planar features, lacking specific strategies for arc-shaped or cylindrical workpieces. Arc surfaces possess continuous curvature variations and symmetry characteristics, making it easy for general sampling methods (such as uniform grid sampling) to generate viewpoint redundancy in regions of abrupt curvature changes and viewpoint blind spots at structural edges. More importantly, the angle bisector direction of cylindrical structures is the ideal incident orientation for optical measurements, but existing methods fail to embed this domain knowledge into the viewpoint generation logic.

[0009] Most methods use simple ray intersection to determine visibility: if the line connecting the viewpoint and the target point does not intersect with other parts of the model, it is considered valid. This mechanism is applicable when there is a single closed workpiece, but when there are multiple independent structural components in the scene (such as combinations of multiple cylinders, or combinations of cylinders and planes), the ray may penetrate the gaps between the plates—that is, the line passes through the blank area between two parts, but the algorithm misjudges it as "not occluded," causing the generated viewpoint to actually be located inside the gap between the parts or behind them, making it impossible to collect valid data. Existing technologies lack the ability to distinguish between "penetrating gaps" and "penetrating entities."

[0010] Traditional methods mostly follow a single-round generation-selection model: after viewpoints are generated, a visibility test is performed, and the result is output. When there are no valid viewpoints in a certain area, the system often directly reports an error or requires manual intervention, lacking an active repair mechanism. A few methods with iterative capabilities use random perturbation or global resampling, which has high computational costs and unclear convergence direction, failing to guide the directional regeneration of candidate viewpoints based on occlusion analysis results.

[0011] Existing algorithms often produce viewpoint lists with two main problems: First, a large number of viewpoints are excessively concentrated directly in front of the workpiece, resulting in a single perspective and hindering multi-side stitching measurements. Second, the viewpoints are too close together, leading to excessive overlap in data collected from adjacent viewpoints and wasting measurement efficiency. The root cause of this problem lies in the lack of an evaluation index for the rationality of spatial distribution in the viewpoint generation process, relying solely on "visibility" as the sole selection criterion.

[0012] In general, the common feature of existing technologies is that they simplify the viewpoint planning problem into a geometric visibility problem, namely, "whether the target point can be seen from a certain position", while lacking targeted design for engineering constraints in measurement operations (such as equipment physical dimensions, plate gaps, and multi-structure collaborative measurement). Summary of the Invention

[0013] The purpose of this invention is to provide a method, apparatus, and electronic device for generating an observation viewpoint for a circular arc workpiece, so as to ensure that the observation viewpoint is located in free space and does not interfere with the structural components.

[0014] In a first aspect, the present invention provides a method for generating a viewing point for an arc-shaped workpiece, the method comprising: Obtain the workpiece file of the arc workpiece, the workpiece file including a list of cylindrical structures; For each cylindrical structure in the list of cylindrical structures, generate an initial list of observation viewpoints for that cylindrical structure; The system detects whether the line connecting each observation point in the initial observation point list to the target point penetrates other surfaces. If it does, the corresponding observation point is filtered out. The other surfaces are other planes or other cylindrical surfaces. Check whether each of the filtered observation points is located within the gaps in the thin plate structure. If it is, then filter out the observation points located within the gaps in the thin plate structure. Check if there are any valid viewpoints among the filtered viewpoints. If no valid viewpoints are found, perform viewpoint generation, retry, and repair operations. Based on the observation points determined after generating retry and repair operations, the final list of observation points is output.

[0015] In an optional implementation, the step of generating an initial list of viewing points for the cylindrical structure includes: An adaptive distance reference is set based on the cylindrical structure; The angle bisector between the cylinder and the plane is determined based on the intersection information of the cylinder and the plane in the cylindrical structure. On the intersection of every two angle bisectors, a point is determined in the positive and negative directions according to the adaptive distance reference, serving as the initial observation point; Based on all the identified initial viewpoints, generate a list of initial viewpoints.

[0016] In an optional implementation, the step of setting an adaptive distance reference based on the cylindrical structure includes: Obtain the set scaling ratio and the theoretical intersection point of the cylindrical structure; Using the theoretical intersection point as a reference point, the axial direction of the bounding box is determined according to the normal vector of the cylindrical structure; Projecting each point in the point cloud of the arc workpiece onto the axial direction yields the projected dimensions; The projected size is scaled based on the scaling ratio to obtain the scaled size; The bounding box of the cylindrical structure is determined based on the scaled dimensions, and the diagonal length of the bounding box is calculated. The diagonal length is then multiplied by a preset scaling factor to obtain an adaptive distance reference.

[0017] In an optional implementation, the step of detecting whether the line connecting each observation point in the initial observation viewpoint list to the target point penetrates other surfaces includes: Iterate through each observation point in the initial observation point list and determine the concavity and convexity of the cylindrical structure under the observation point; If the cylindrical structure is not a fully convex structure under the observation viewpoint, then it is detected whether the line connecting the observation viewpoint and the target point penetrates any plane in the plane list and any cylinder in the cylinder list. If the line does not penetrate any plane or any cylinder, the viewpoint is retained.

[0018] In an optional implementation, when the cylindrical structure is a two-cylinder structure, the target point is the point where the arc is equally divided, and the point where the arc is equally divided is determined in the following way: Obtain the geometric parameters of the two-cylinder structure and the number of division points; A local coordinate system is constructed, and the arc range of the two cylindrical structures in the local coordinate system is determined. The angle increment is calculated based on the arc range and the number of division points. Multiple equally divided angle values ​​are generated based on the angle increment and the arc range; Based on the cylinder radius and equally divided angle values ​​of the two-cylinder structure, calculate the two-dimensional coordinates of the circle on the two-dimensional plane of the local coordinate system; The two-dimensional coordinates are transformed into three-dimensional coordinates in three-dimensional space, and the points for dividing the arc are determined based on the three-dimensional coordinates.

[0019] In an optional embodiment, the thin plate structure is composed of two planes whose normal vector angle is less than a set threshold and whose spacing is less than a distance threshold, or two arcs whose centers are the same and whose radii differ from a preset threshold. The step of detecting whether each observation point after filtering is located within the gap of the thin plate structure includes: The system detects whether each filtered observation point meets the set conditions. The set conditions are that the observation point is located between the two planes and the distance between the observation point and each of the planes is within a threshold range, or the observation point is located between the two arcs and the distance between the observation point and each of the arcs is within a threshold range. If the set conditions are met, it is determined that the observation point is located within the gap of the thin plate structure.

[0020] In an optional implementation, the step of performing the viewpoint generation retry and repair operation includes: Iterate through each observation point in the initial observation viewpoint list, perform penetration analysis based on the observation viewpoint, and obtain the intersection of the penetration surfaces corresponding to the observation viewpoint; Based on the distance between the observation point and each intersection point, they are sorted in ascending order; By sequentially translating each intersection point according to the order, a new observation point is obtained after the translation; Perform penetration analysis and thin-plate structure filtering analysis to verify the new observation viewpoint. If the verification is successful, the new observation viewpoint will be considered a valid viewpoint. If none of the new observation points obtained from the intersections corresponding to each of the aforementioned observation points pass the verification, then the cylindrical structure is determined to be an invalid structure.

[0021] In an optional implementation, the step of outputting the final list of observation viewpoints based on the observation viewpoints determined after the retry and repair operations includes: Obtain the position and viewing direction of each viewpoint after the generation of retry and repair operations; The observation viewpoints are clustered based on their location and observation direction. For observation points within the same cluster, a new observation point is determined based on the average position and observation direction of the observation points within that cluster. Output the final list of observation points based on the determined new observation points.

[0022] In a second aspect, the present invention provides a device for generating viewing points for an arc-shaped workpiece, the device comprising: The acquisition module is used to acquire the workpiece file of the arc workpiece, the workpiece file including a list of cylindrical structures; The first generation module is used to generate an initial viewpoint list for each cylindrical structure in the list of cylindrical structures. The first detection module is used to detect whether the line connecting each observation point in the initial observation point list to the target point penetrates other surfaces. If it penetrates, the corresponding observation point is filtered out. The other surfaces are other planes or other cylindrical surfaces. The second detection module is used to detect whether each of the filtered observation points is located within the gap of the thin plate structure. If it is, the observation points located within the gap of the thin plate structure are filtered out. The third detection module is used to detect whether there are valid viewpoints among the filtered observation viewpoints. If there are no valid viewpoints, the generation, retry, and repair operations of the observation viewpoints are performed. The second generation module is used to output the final list of observation viewpoints based on the observation viewpoints determined after the generation retry and repair operations.

[0023] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method described in any of the foregoing embodiments.

[0024] This invention provides a method, apparatus, and electronic device for generating observation viewpoints for arc-shaped workpieces. For each cylindrical structure in the cylindrical structure list included in the workpiece file of the arc-shaped workpiece, an initial list of observation viewpoints for the cylindrical structure is generated. The connection between each observation viewpoint and the target point is checked to see if it penetrates other surfaces; if so, the corresponding observation viewpoint is filtered out. Then, it is checked whether each of the filtered observation viewpoints is located within the gaps in the thin-plate structure; if so, the observation viewpoints located within the gaps in the thin-plate structure are filtered out. It is then checked whether there are any valid viewpoints among the filtered observation viewpoints; if no valid viewpoints are found, a retry and repair operation for generating observation viewpoints is performed. Based on the observation viewpoints determined after the retry and repair operation, the final list of observation viewpoints is output. In this solution, penetration detection and thin-plate filtering detection ensure that the observation viewpoints are located in free space and do not interfere with the structural components. Furthermore, combined with the observation viewpoint regeneration mechanism, a complete observation viewpoint generation and iterative optimization mechanism is constructed. Attached Figure Description

[0025] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments of the present invention will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 A flowchart of a method for generating viewing angles for circular arc workpieces provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a three-column structure; Figure 3 This is one of the structural diagrams of a two-column structure; Figure 4 This is the second schematic diagram of a two-column structure; Figure 5 for Figure 1 A flowchart of the sub-steps included in S12; Figure 6 This is a schematic diagram of a point cloud structure with three cylindrical surfaces. Figure 7 This is a schematic diagram of each face in a three-column structure; Figure 8 This is a logical diagram illustrating the generation of the observation viewpoint list for the three-column structure in this embodiment of the invention. Figure 9 This is a logical schematic diagram illustrating the generation of the observation viewpoint list for the two-cylinder structure in an embodiment of the present invention. Figure 10 for Figure 1 A flowchart of the sub-steps included in S13; Figure 11 A schematic diagram of a three-column structure with concave and convex surfaces; Figure 12 A schematic diagram of a three-column structure with a convex-concave-convex structure; Figure 13 One of the schematic diagrams of a concave-convex-convex three-column structure; Figure 14 The second schematic diagram of a three-column structure with a concave-convex-convex structure; Figure 15 This is a schematic diagram of the penetration detection and filtering logic of the three-column structure in an embodiment of the present invention; Figure 16 This is a schematic diagram of the penetration detection and filtering logic of the two cylindrical structures in an embodiment of the present invention; Figure 17 for Figure 1 A flowchart of the sub-steps included in S14; Figure 18 for Figure 1 A flowchart of the sub-steps included in S15; Figure 19 for Figure 1 A flowchart of the sub-steps included in S16; Figure 20 This is a functional block diagram of the arc workpiece observation viewpoint generation device provided in an embodiment of the present invention; Figure 21 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0027] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.

[0028] Please see Figure 1 The above is a flowchart of a method for generating viewing points of an arc workpiece according to an embodiment of the present invention. This method can be executed by an arc workpiece viewing point generation device, which can be implemented by software and / or hardware and can be configured in an electronic device, such as a computer device or a server. The detailed steps of the method for generating viewing points of an arc workpiece are described below.

[0029] S11, Obtain the workpiece file of the arc workpiece. The workpiece file includes a list of cylindrical structures. S12, For each cylindrical structure in the list of cylindrical structures, generate an initial list of observation viewpoints for the cylindrical structure; S13, check whether the line connecting each observation point in the initial observation point list to the target point penetrates other surfaces. If it penetrates, filter out the corresponding observation point. Other surfaces are other planes or other cylindrical surfaces. S14, detect whether each of the filtered observation points is located within the gap of the thin plate structure. If it is, filter out the observation points located within the gap of the thin plate structure. S15, check if there are any valid viewpoints among the filtered viewpoints. If there are no valid viewpoints, perform viewpoint generation retry and repair operations. S16, based on the observation points determined after generating retry and repair operations, output the final list of observation points.

[0030] There are three main types of cylindrical structures in arc-shaped workpieces: three-cylinder structures, such as... Figure 2 As shown, it consists of plane ①, plane ②, and a cylindrical surface; the two-cylinder structure type one (the plane normal is parallel to the cylinder axis), as shown... Figure 3 As shown, it consists of a plane ① and a cylindrical surface; the second type of cylindrical surface structure (the plane normal is perpendicular to the cylindrical surface axis), as shown... Figure 4 As shown, it consists of a plane ① and a cylindrical surface. The white part is a schematic diagram of the weld seam.

[0031] This embodiment aims to generate observation viewpoints based on cylindrical structures, and to generate relatively complete observation viewpoint coordinates for each workpiece with arcs, including weld seams and planar views.

[0032] The specific implementation methods of each of the above steps will be explained in detail below.

[0033] Please see Figure 5 In this embodiment, the step of generating an initial list of observation viewpoints for each cylindrical structure in the list of cylindrical structures can be implemented in the following way: S121, setting an adaptive distance reference based on a cylindrical structure; S122, Determine the angle bisector between the cylinder and the plane based on the intersection information of the cylinder and the plane in the cylindrical structure; S123, on the intersection line of every two angle bisectors, determine a point in the positive and negative directions respectively according to the adaptive distance reference, as the initial observation point; S124, Generate an initial viewpoint list based on all the determined initial viewpoints.

[0034] The adaptive distance benchmark based on the cylindrical structure can be achieved in the following ways: Obtain the set scaling ratio and the theoretical intersection point of the cylindrical structure; using the theoretical intersection point as the reference point, determine the axial direction of the bounding box based on the normal vector of the cylindrical structure; project each point in the point cloud of the arc workpiece onto the axial direction to obtain the projected size; scale the projected size based on the scaling ratio to obtain the scaled size; determine the bounding box of the cylindrical structure based on the scaled size, calculate the diagonal length of the bounding box, and multiply the diagonal length by a preset scaling factor to obtain the adaptive distance reference.

[0035] In this embodiment, an adaptive distance reference can be obtained based on the diagonal length of the bounding box of the cylindrical structure.

[0036] Taking a three-column structure as an example, such as Figure 6 As shown, the entire process begins with inputting the three-cylinder structure data, scaling ratio, and theoretical intersection of the three-cylinder structure. Through a series of geometric calculations and projection operations, the final output is the key dimension information.

[0037] First, the program uses the theoretical intersection of the three cylindrical structures as the reference point. It then uses the normal vector of plane 1 as the first axis. The cross product of the normal vectors of the two planes yields a normal vector perpendicular to both plane 1 and plane 2, which serves as the third axis. The cross product of the third axis and the first axis yields the second axis, which is used as the axial reference for the bounding box. This method of naturally determining direction using plane normal vectors ensures geometric consistency in subsequent calculations.

[0038] Next, the point cloud data for each face is projected onto the corresponding coordinate axes, and the original dimensions in three directions are determined by analyzing the projection range. These dimensions are then multiplied by a scaling factor to obtain the scaled dimensions. This step allows the system to flexibly adapt to different measurement units or design requirements.

[0039] Finally, the spatial diagonal length of the bounding box is calculated using the scaled dimensions, and multiplied by a preset scaling factor to obtain the adaptive distance reference. This entire process transforms discrete point cloud data into precise geometric parameters, providing crucial dimensional information for 3D modeling, industrial inspection, and reverse engineering applications.

[0040] Furthermore, for the two-cylinder structure, the plane normal vector is used as the first axis. The cross product of the first axis and the cylinder axis is used to obtain the third axis. The cross product of the first axis and the third axis is then used to obtain the second axis, which serves as the axial reference of the bounding box. The subsequent operations are similar to the algorithm flow for the three-cylinder structure: the dimensions in three directions are projected and scaled, and finally the diagonal length is output to obtain the adaptive distance reference.

[0041] Based on this, the initial observation viewpoint lists for the three-column structure and the two-column structure are generated.

[0042] For a three-cylinder structure, the normal vector of plane 1 is parallel to the axis of the cylinder, and the normal vector of plane 2 is perpendicular to the axis of the cylinder, as follows: Figure 7 As shown. The normal vector of plane 1 is n1, the normal vector of plane 2 is n2, there is an axis t on the cylinder, and a point P on the axis. The intersection of the three cylinders is C.

[0043] First, calculate the intersection point C of the two planes and the cylinder. Then calculate the angle bisectors of plane 1 and plane 2, plane 1 and the cylinder, and plane 2 and the cylinder: Calculate the angle bisector of plane 1 and plane 2: (1) Obtain the parameters of the two planes (normal vector and a point on the plane).

[0044] (2) If the two normal vectors are parallel, an error will be reported or special handling will be required.

[0045] (3) Calculate the sum and difference vectors of the two normal vectors and normalize them to obtain the normal vectors of the two angle bisectors.

[0046] (4) Calculate a point on the intersection line of the two planes by solving the system of linear equations.

[0047] (5) Construct two angle bisectors using the intersection point and the normal vectors of the two angle bisectors.

[0048] Calculate the angle bisectors between plane 1 and the cylinder, and between plane 2 and the cylinder: (1) Calculate the midpoint M of the intersection line (straight line / circular arc) between the plane and the cylinder.

[0049] (2) At point M, calculate the tangent plane T of the cylinder. For a cylindrical surface, the normal vector of the tangent plane is the direction of the line connecting point M to the axis (radial).

[0050] (3) Calculate the angle bisector between the tangent plane T and the plane.

[0051] For the angle bisectors obtained above, calculate the intersection line for every two angle bisectors (from different plane pairs).

[0052] On each angle bisector line of intersection, starting from point C, one point is selected in each of the positive and negative directions according to the adaptive distance reference, serving as the initial observation viewpoint, thus obtaining a list of initial observation viewpoints. Among them, Figure 8 A schematic diagram of the logic flow for generating the initial list of observation viewpoints for the three-cylinder structure is shown. Figure 8 The given distance threshold is the adaptive distance benchmark, and the candidate viewpoint is the observation viewpoint.

[0053] Furthermore, for the two-cylinder structure, firstly, the midpoint M of the intersection line (straight line / circular arc) between the plane and the cylinder is calculated. At point M, the tangent plane T of the cylinder is calculated. For the cylindrical surface, the normal vector of the tangent plane is the direction of the line connecting point M to the axis (radial). Then, the angle bisector of the tangent plane T and the plane is calculated. On the angle bisector, at a distance from the midpoint M, one point is selected in each of the positive and negative directions according to the adaptive distance reference as the initial observation viewpoint, resulting in a list of initial observation viewpoints. Figure 9 A schematic diagram of the logic flow for generating the initial list of observation viewpoints for a two-cylinder structure is shown.

[0054] Based on this, check whether the lines connecting each observation point in the initial observation point list to the target point penetrate other surfaces; that is, whether the line of sight of the observation point is obstructed by other structures in the workpiece. For details, please refer to [link to relevant documentation]. Figure 10 This step can be achieved in the following way: S131, Traverse each observation point in the initial observation point list and determine the concavity and convexity of the cylindrical structure under the observation point; S132, If the cylindrical structure is not a fully convex structure under the observation viewpoint, then check whether the line connecting the observation viewpoint and the target point penetrates any plane in the plane list and any cylinder in the cylinder list. S133: If the line does not penetrate any plane or any cylinder, the viewpoint is preserved.

[0055] In this embodiment, the schematic diagram of the concavity and convexity of the three-column structure is as follows: Figure 11 , 12 As shown in Figures 13 and 14.

[0056] Figure 11 The blue plane, red plane, and yellow cylinder form a three-cylinder structure. At viewpoint 0, where the complete structure can be observed, the blue plane and red plane are concave structures, the red plane and yellow cylinder are concave structures, and the blue plane and yellow cylinder are convex structures. The concavity-convexity of this three-cylinder structure is concave-concave-convex (110).

[0057] Figure 12 The blue plane, red plane, and yellow cylinder form a three-cylinder structure. At viewpoint 3, where the complete structure can be observed, the blue plane and red plane are convex structures, the red plane and yellow cylinder are concave structures, and the blue plane and yellow cylinder are convex structures. The concavity and convexity of this three-cylinder structure is convex-concave-convex (010).

[0058] Figure 13The blue plane, red plane, and yellow cylinder form a three-cylinder structure. At viewpoint 3, where the complete structure can be observed, the blue plane and red plane are concave structures, the red plane and yellow cylinder are concave structures, and the blue plane and yellow cylinder are concave structures. The concavity and convexity of this three-cylinder structure is concave-concave-concave (111).

[0059] Figure 14 The blue plane, red plane, and yellow cylinder form a three-cylinder structure. At viewpoint 5, where the complete structure can be observed, the blue plane and red plane are concave structures, the red plane and yellow cylinder are concave structures, and the blue plane and yellow cylinder are concave structures. The concavity and convexity of this three-cylinder structure is concave-concave-concave (111).

[0060] In this embodiment, the core objective is to select effective observation points from the initially generated list of observation points that both meet specific geometric constraints and ensure a clear and unobstructed viewing angle for key points of the weld.

[0061] For three-column structures, please refer to [the relevant documentation / reference]. Figure 15 The algorithm first takes into account a three-cylinder structure, an initial list of viewpoints to be filtered, and a list of planes and cylinders for determining spatial relationships. Then, the algorithm enters a loop, performing rigorous, multi-level filtering on each viewpoint in the initial list.

[0062] For the current viewpoint under review, first determine the concavity / convexity of the three-cylinder structure at that viewpoint. If it is not a "convex-convex-convex" structure, calculate the normal vector of the tangent plane at a point on the cylindrical surface, and uniformly adjust all plane normal vectors (plane 1, plane 2, tangent plane) and the cylinder axis to point towards the current viewpoint, establishing a consistent spatial reference datum. Then, perform two sets of spatial relationship checks. If it is a "convex-convex-convex" structure, record the cumulative number of times the three-convex structure is checked.

[0063] 1. Plane penetration test Iterate through each plane in the list, checking whether the current viewpoint and the target point (the intersection of the three-cylinder structure theory) are located on opposite sides of that plane (i.e., on opposite sides). If they are on opposite sides, further determine whether the connecting line penetrates the point cloud of that plane. Specific steps include: Check if there are any points on the plane that lie within the positive space of the three-column structure.

[0064] Calculate the distances from the point to structural plane 1, plane 2, and the calculated tangent plane. If all three are within the set threshold, the point is considered to be within the artificially constructed cube space and there is a risk of occlusion.

[0065] 2. Cylindrical penetration test Iterate through each cylinder in the list of cylinders and determine whether the line connecting the current viewpoint and the theoretical intersection point penetrates the cylinder. The verification process includes: By projecting the viewpoint and intersection point onto the two-dimensional plane of the cylinder, the three-dimensional penetration judgment is transformed into a two-dimensional geometric problem.

[0066] Determine whether the projected line segment intersects with the cylindrical cross-section circle, and verify whether the intersection point is within the effective curvature range of the cylinder.

[0067] Project the intersection point back onto the cylindrical axis to determine whether it is within the effective height range of the cylindrical point cloud, thereby confirming whether the line of sight is blocked by the cylindrical surface.

[0068] Only viewpoints that pass both planar and cylindrical verification are retained; viewpoints that fail either verification are immediately deleted.

[0069] In addition, special structural treatments are included, specifically for three-column structures with a concave-convex-convex shape, the following judgment steps are added: (1) Calculate the angle between the normal vector of structural plane 1 and the normal vector of the tangent plane at a point on the cylindrical surface. If it is less than 10°, then it may be... Figure 13 The three-concave structure shown.

[0070] (2) Further confirm the structure type by the relative positional relationship between the center of the circle and the viewpoint.

[0071] (3) If confirmed as Figure 13 The structure in the middle relaxes the distance threshold requirement from the point to the tangent plane in the plane penetration test to adapt to special observation needs.

[0072] After all initial viewpoints have been verified, the algorithm outputs the final list of valid viewpoints and the cumulative number of times the structure is identified as "convex-convex-convex".

[0073] For a two-cylinder structure, the core objective is to select effective viewpoints from the generated list of viewpoints to be filtered that both meet specific geometric constraints and ensure a clear and unobstructed viewing angle for the key points (circular arc division points) of the two-cylinder structure.

[0074] Please refer to the following: Figure 16 The algorithm first takes into account a two-cylinder structure, an initial list of viewpoints to be filtered, key points, and a list of planes and cylinders used for spatial relationship determination. Then, the algorithm enters a loop, performing rigorous, multi-level filtering on each viewpoint in the initial viewpoint list.

[0075] For the currently examined viewpoint, the algorithm first determines the concavity or convexity of its cylindrical structure. If the structure is not convex from the current viewpoint, it calculates the normal vector of the tangent plane at a point on the cylindrical surface and adjusts all plane normal vectors (planes, tangent planes) and the cylinder axis to point towards the current viewpoint to establish a consistent spatial reference. Subsequently, the algorithm performs two sets of core spatial relationship checks. If the structure is convex, it records the cumulative number of times the convex structure is defined.

[0076] 1. Plane penetration test Iterate through each plane in the plane list, checking whether the current viewpoint and the target point (arc bisector) in the two-cylinder structure are located on opposite sides of that plane (i.e., on opposite sides). If they are on opposite sides, further determine whether the connecting line penetrates the point cloud of that plane. Specific steps include: Check if there are any points on the plane that lie within the positive space of the two-column structure.

[0077] Calculate the distance from the point to the structural plane and the calculated tangent plane. If both are within the set threshold, the point is considered to be within the artificially constructed cube space and there is a risk of occlusion.

[0078] 2. Cylindrical penetration test Iterate through each cylinder in the list of cylinders, determining whether the line connecting the current viewpoint and the target point (the arc's dividing point) penetrates the cylinder. The verification process includes: By projecting the viewpoint and target point onto a two-dimensional plane of the cylinder, the three-dimensional penetration judgment is transformed into a two-dimensional geometric problem.

[0079] Determine whether the projected line segment intersects with the cylindrical cross-section circle, and verify whether the intersection point is within the effective curvature range of the cylinder.

[0080] Project the intersection point back onto the cylindrical axis to determine whether it is within the effective height range of the cylindrical point cloud, thereby confirming whether the line of sight is blocked by the cylindrical surface.

[0081] Only viewpoints that pass both planar and cylindrical verification are retained; viewpoints that fail either verification are immediately deleted.

[0082] Output the filtered list of viewpoints and the cumulative number of times a viewpoint is identified as convex.

[0083] In practical industrial applications, initial viewpoints are typically generated based on the intersection region between the cylindrical surface and other structures. However, since thin-plate structures often exist at the ends of sheet metal, these initial viewpoints are easily mistakenly deleted in the subsequent thin-plate filtering process, resulting in the loss of effective observation poses. To address this issue, this algorithm specifically generates uniformly distributed equally spaced points on the arc of the cylinder's base for bi-cylindrical (Type 1) structures, serving as the target points in the aforementioned penetration detection filtering. That is, when the cylindrical structure is a bi-cylindrical structure, the target points are the equally spaced arc points, which are determined in the following way: Obtain the geometric parameters of the two-cylinder structure and the number of division points; construct a local coordinate system and determine the arc range of the two-cylinder structure in the local coordinate system, and calculate the angle increment based on the arc range and the number of division points; generate multiple division angle values ​​based on the angle increment and the arc range; calculate the two-dimensional coordinates of the circle on the two-dimensional plane of the local coordinate system according to the cylinder radius and the division angle values ​​of the two-cylinder structure; transform the two-dimensional coordinates to three-dimensional coordinates in three-dimensional space, and determine the arc division points based on the three-dimensional coordinates.

[0084] The algorithm generates a specified number of uniformly distributed points on the base arc of a given cylinder, providing key geometric reference points for viewpoint generation and spatial analysis. The algorithm takes the cylinder's geometric parameters and the desired number of points as input, and outputs a list of coordinates for the equally divided points in 3D space.

[0085] The process is described in detail below: 1. Algorithm Startup: Receives input parameters, including the geometric definition of the cylindrical structure (radius, axial direction, reference point on the axial direction) and the number of equal division points to be generated, num.

[0086] 2. Establishing a local coordinate system: The z-axis direction is taken as the local coordinate system along the axis of the cylinder.

[0087] The direction of the projection of the circle from the center to the starting point onto the plane is the x-axis direction.

[0088] The local y-axis is determined by the cross product of the axis direction and the x-axis, forming a complete right-handed coordinate system.

[0089] 3. Angle parameter calculation: In the local coordinate system, determine the starting reference angle of the arc (usually set to 0 radians, corresponding to the positive direction of the local x-axis).

[0090] Calculate the angle increment delta_theta based on the arc range (default is a full circle from 0 to 2π) and the number of points generated (num): delta_theta = total radius of the arc / num If generated in a clockwise direction, the angle increment is negative; if generated in a counterclockwise direction, it is positive.

[0091] 4. Generation of angles at equal division points: Generate num equal angle values ​​delta_theta: theta_i = starting angle + i delta_theta, where i = 0, 1, ..., num-1.

[0092] Ensure all angle values ​​are within the range of [start angle, end angle].

[0093] 5. Calculation of coordinates on a two-dimensional circle: In the xy plane of the local coordinate system, calculate the coordinates of a point on the two-dimensional circle based on the cylinder radius and each equally divided angle: x_local = radius cos(theta_i) y_local = radius sin(theta_i) z_local = 0 6. Three-dimensional coordinate transformation: Transform two-dimensional points in the local coordinate system back to the original three-dimensional spatial coordinate system using a coordinate transformation matrix.

[0094] The transformation formula is: P_world = axis reference point + x_axis x_local + y_axis y_local (where z_local=0).

[0095] 7. Output Results and Algorithm Termination: The output contains a list of 3D coordinates of all generated points, arranged in the order of their generation.

[0096] Complete the algorithm flow.

[0097] After the aforementioned penetration detection process, for each remaining viewpoint after filtering, it is further checked whether each viewpoint is located within the gaps in the thin-plate structure. If it is, it indicates that the viewpoint is located inside the workpiece and is therefore invalid. Thin-plate filtering is a post-processing step for viewpoints designed for workpieces made of sheet metal in industrial vision scenarios. After completing the penetration plane and cylindrical surface filtering, although the viewpoints meet the condition of no external obstruction, they may still be invalid because they are located inside the sheet metal. Therefore, this step aims to identify and eliminate those viewpoints located within the gaps in the thin-plate structure.

[0098] The thin plate structure is composed of two planes whose normal vector angle is less than a set threshold and whose spacing is less than a distance threshold, or two arcs whose centers are the same and whose radii differ from a preset threshold.

[0099] Specifically, please refer to Figure 17 The step of detecting whether each observation point after filtering is located within the gap of the thin plate structure can be achieved in the following way: S141, detect whether each of the filtered observation points meets the set conditions. The set conditions are that the observation point is between two planes and the distance between it and each plane is within a threshold range, or the observation point is between two arcs and the distance between it and each arc is within a threshold range. S142, if the set conditions are met, it is determined that the observation point is located within the gap of the thin plate structure.

[0100] In this embodiment, firstly, it is determined whether a planar thin-plate structure exists in the scene, i.e., two planes are approximately parallel (the angle between their normal vectors is less than a set threshold), and the distance between the two planes is within a distance threshold range set based on the actual plate thickness. If the conditions are met, it is marked as a group of thin-plate structures. Subsequently, all observation points to be screened are traversed, and it is determined whether their spatial position is within the gap space defined by any group of thin-plate structures (i.e., the observation point is simultaneously between two planes and the distance is within the threshold range). If the observation point falls into the thin-plate gap, it is determined to be invalid for subsequent measurements and is deleted; otherwise, the observation point is retained and output.

[0101] Furthermore, due to the presence of cylindrical structures, there may be circular arc thin-plate structures with two arcs forming a ring. Therefore, it is also necessary to determine whether such circular arc thin-plate structures exist, i.e., the two arcs have the same center and the difference in their radii is less than a preset threshold. If these conditions are met, they are marked as a set of circular ring thin-plate structures. Subsequently, the observation viewpoints selected from the planar thin plates are traversed, and their spatial positions are determined one by one to see if they are located within the gap space defined by any set of thin-plate structures (i.e., the observation viewpoint is simultaneously located between two arcs and the distances are both within the threshold range). If the observation viewpoint falls into the thin-plate gap, it is determined to be invalid for subsequent measurements and is deleted; otherwise, the observation viewpoint is retained and output. This process further ensures that all observation viewpoints are located in the observable external space of the workpiece, improving the robustness and practicality of the vision measurement system.

[0102] If, due to parameter settings or model structure complexity, no valid viewpoint is generated after passing the above detection and filtering, a retry and repair operation for viewpoint generation is performed. The purpose is not to generate a large number of viewpoints, but rather to generate at least one usable viewpoint for the current structure, balancing effectiveness with subsequent computational burden.

[0103] Specifically, please refer to Figure 18The steps for performing viewpoint generation, retry, and repair operations can be implemented in the following ways: S151, traverse each observation point in the initial observation point list, perform penetration analysis based on the observation point, and obtain the intersection of the penetration surfaces corresponding to the observation point; S152, based on the distance between the observation point and each intersection point, sort them in ascending order; S153, the intersection points are translated sequentially according to the order to obtain the new observation point after translation; S154, Perform penetration analysis and thin plate structure filtering analysis to verify the new observation viewpoint. If the verification is successful, the new observation viewpoint will be used as a valid viewpoint. S155, if the new observation viewpoints obtained from the intersections corresponding to each observation viewpoint fail to pass the verification, the cylindrical structure is determined to be an invalid structure.

[0104] In this embodiment, the specific process for generating, retrying, and modifying the viewpoint is as follows: 1. Pre-screening of ineffective structures: Pre-screening is performed based on the concavity / convexity judgment results of the first round of viewpoints: if all first-round observation viewpoints generated for the current cylindrical structure are judged as "fully convex", then the cylindrical structure is considered an invalid structure and deleted, and the process of processing the next cylindrical structure is directly initiated.

[0105] 2. Initiate the retry process: If the cylindrical structure is not pre-screened and excluded, it is considered a potentially valid structure, and a second round of viewpoint retry generation is initiated.

[0106] 3. Penetration analysis and intersection sorting: Iterate through each viewpoint generated in the first round, perform viewpoint penetration analysis, and obtain a list of planes / cylinders penetrated by the line connecting the current viewpoint to the target point, along with the coordinates of the corresponding intersection points. Calculate the distance from the current viewpoint to all intersection points and sort the intersection points from closest to furthest. This sorting is based on a key assumption: generating a valid new viewpoint from a closer intersection point has a higher probability of success, contributing to faster success.

[0107] 4. Viewpoint generation and verification based on intersection points: Iterate through the list of intersections in the sorted manner described above, and perform the following operations for each intersection: (1) Generate a new viewpoint: Starting from the current intersection point, move a fixed distance dis1 along the direction from the intersection point to the target point to obtain a new viewpoint. This operation aims to actively avoid potential occlusion boundaries or thin plate areas and increase the probability of the new viewpoint passing subsequent filtering.

[0108] (2) Quick verification: Perform a complete concavity and convexity judgment, segmentation and penetration filtering and thin plate filtering on this new observation point. If it passes all verifications, immediately output the new observation point as the valid viewpoint of the current cylindrical structure and end the retry process for this cylindrical structure (i.e., "one-vote pass" system).

[0109] 5. Termination conditions: Success: Any valid viewpoint was generated in step 4.

[0110] Failure (current viewpoint): If none of the intersections corresponding to an initial viewpoint can generate a valid viewpoint, then try the next initial viewpoint.

[0111] Failure (Current Structure): If all initial observation viewpoints fail to generate a valid viewpoint, the current cylindrical structure is ultimately determined to be an invalid structure, the process ends, and the process proceeds to the next cylindrical structure.

[0112] After obtaining the observation viewpoints for each cylindrical structure using the above methods, the final list of observation viewpoints is output based on the viewpoints determined after retrying and repairing the process. Considering that complex workpieces may contain too many surface structures, potentially leading to an excessive number of viewpoints, please refer to [the relevant documentation / reference]. Figure 19 This step can be achieved in the following way: S161, obtain the position and observation direction of each observation point after generating retry and repair operations; S162, Cluster the observation viewpoints based on their positions and observation directions; S163, For observation viewpoints in the same cluster, determine a new observation viewpoint based on the average position and observation direction of the observation viewpoints in the cluster; S164, output the final list of observation points based on the determined new observation points.

[0113] In this embodiment, viewpoint simplification is the final optimization step in the viewpoint generation process, aiming to solve the problem that complex workpieces may have too many viewpoints due to containing a large number of surface structures. The core logic of this step is spatial clustering and merging.

[0114] Since each effective cylindrical structure independently generates at least one viewpoint, when the workpiece geometry is complex, these viewpoints may be densely distributed in three-dimensional space, with multiple viewpoints even being very close in position and having similar observation directions. The algorithm clusters these viewpoints with spatial distances less than a set threshold and compatible observation directions into a group, and replaces all the original viewpoints in the group with a representative new viewpoint (usually the average position and orientation of the cluster center). This operation significantly reduces the total number of viewpoints in the final output without losing effective observation coverage, thereby reducing the complexity of subsequent robot path planning and improving the overall execution efficiency of scanning or measurement tasks. This step, combined with the aforementioned "associative structure viewpoint reuse" mechanism, constitutes a full-link optimization system from the generation source to the result aggregation.

[0115] In summary, the real-time method for generating viewing points for circular arc workpieces firstly provides an initial viewing point generation mechanism based on angle bisectors and an adaptive distance reference. This involves calculating the diagonal length of the bounding box for each cylindrical structure, multiplying this length by a preset scaling factor to form an adaptive distance reference, extracting the angle bisector direction vector of the cylindrical structure, and offsetting it by an adaptive distance along the angle bisector direction with the geometric center of the structure as the base point to generate the reference viewing point position. Finally, micro-sampling is performed around the reference viewing point within its neighborhood space to form an initial viewing point list. This mechanism solves the fundamental problem of "how far and in what direction should the viewing point be placed," giving the generated viewing points both physical meaning and structural adaptability.

[0116] Secondly, a penetration judgment mechanism based on concavity / convexity analysis and segmentation strategy is provided. The line connecting the viewpoint and key points is discretized and segmented to generate a continuous sequence of sampling points. For each sampling point, it is determined which side of each geometric surface (plane, cylinder) it is located on. "Convex side" and "concave side" are defined according to the normal direction of the geometric surface. When the line enters from the convex side and exits from the concave side, it is judged as valid penetration (i.e., a normal observation path). Conversely, when the line is always on the same side of the geometric surface or the crossing sequence does not conform to the convexity / concave logic, it is judged as invalid penetration or gap crossing. This mechanism introduces the concept of concavity / convexity from differential geometry into viewpoint visibility judgment for the first time, achieving high-precision penetration semantic recognition.

[0117] Furthermore, a thin-plate filtering mechanism targeting sheet metal gaps is provided. This mechanism pre-identifies gap regions between planar structures in the scene and establishes a gap space index. After penetration detection, a secondary filtering is performed on viewpoints that pass the initial screening: it calculates whether the line connecting the viewpoint and the structural component passes through any gap region, or whether the viewpoint itself is located inside a gap; if a match is found, the viewpoint is discarded. This mechanism works in conjunction with the penetration detection mechanism to form a dual-protection mechanism of "penetration logic filtering + gap space filtering," representing a key breakthrough in viewpoint planning for complex sheet metal structural components.

[0118] Furthermore, a viewpoint regeneration iteration mechanism based on penetration object analysis is provided. When a structure has no effective viewpoints, all its initial viewpoints are traversed, and the geometric surface identifiers penetrated by the line connecting each viewpoint to the structure's intersection are recorded, forming a set of penetration surfaces. The set of penetration surfaces for all viewpoints is statistically analyzed to identify high-frequency obstruction surfaces. Starting from the reference viewpoint, a regeneration offset is applied along the normal or tangential direction of the high-frequency obstruction surface to generate a new round of candidate viewpoints. Penetration filtering and thin-plate filtering are repeatedly executed until an effective viewpoint is obtained or a preset number of iterations is reached. This mechanism endows the viewpoint planning system with active learning and directional repair capabilities, which is an essential feature that distinguishes it from traditional passive screening methods.

[0119] Furthermore, a complete architecture for differentiated processing flows between three-cylinder and two-cylinder structures is provided. For three-cylinder structures, the main process of "angle bisector - penetration analysis - regeneration iteration" is adopted to address the viewpoint coordination problem of multi-directional symmetrical structures. For two-cylinder structures, the main process of "bottom surface equidistant points - key point mapping - non-fully convex viewpoint analysis" is adopted to address the coverage uniformity problem of single-cylinder structures. The two processes share three core modules: penetration judgment, thin plate filtering, and regeneration iteration, forming a technical architecture with modular common technologies and configurable personalized processes.

[0120] Based on the same inventive concept, please refer to Figure 20 This invention also provides a functional module diagram of a device for generating viewing points for arc-shaped workpieces. This embodiment divides the device into functional modules based on the above method embodiment. For example, each function can be divided into its own module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this embodiment is illustrative and represents only a logical functional division; other division methods may exist in actual implementation.

[0121] The circular arc workpiece observation viewpoint generation device may include an acquisition module, a first generation module, a first detection module, a second detection module, a third detection module, and a second generation module. The functions of each functional module of the circular arc workpiece observation viewpoint generation device will be described in detail below.

[0122] The acquisition module is used to acquire the workpiece file of the arc workpiece. The workpiece file includes a list of cylindrical structures. The first generation module is used to generate an initial list of observation viewpoints for each cylindrical structure in the list of cylindrical structures. The first detection module is used to detect whether the line connecting each observation point in the initial observation point list to the target point penetrates other surfaces. If it penetrates, the corresponding observation point is filtered out. Other surfaces are other planes or other cylindrical surfaces. The second detection module is used to detect whether each of the filtered observation points is located within the gap of the thin plate structure. If it is, the observation points located within the gap of the thin plate structure are filtered out. The third detection module is used to detect whether there are valid viewpoints among the filtered observation viewpoints. If there are no valid viewpoints, the generation, retry, and repair operations of the observation viewpoints are performed. The second generation module is used to output the final list of observation viewpoints based on the observation viewpoints determined after the generation retry and repair operations.

[0123] The arc workpiece observation viewpoint generation device provided in this embodiment can be used to execute the arc workpiece observation viewpoint generation method under any of the above embodiments. For details not covered in this embodiment, please refer to the corresponding descriptions in the above embodiments. This embodiment will not elaborate further here.

[0124] Please see Figure 21 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. The electronic device can be, for example, a computer device or a server. The electronic device includes a memory, a processor, and a communication module. The memory, processor, and communication module are electrically connected directly or indirectly to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.

[0125] The memory is used to store computer programs or data. Memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc.

[0126] The processor is used to read / write data or programs stored in the memory and execute the method for generating viewing points of circular arc workpieces provided in any embodiment of the present invention.

[0127] The communication module is used to establish communication connections between electronic devices and other communication terminals via a network, and to send and receive data via the network.

[0128] It should be understood that, Figure 21 The structure shown is only a schematic diagram of an electronic device; the electronic device may also include components that are larger than those shown. Figure 21 The more or fewer components shown, or having the same Figure 21 The different configurations shown.

[0129] Furthermore, embodiments of the present invention also provide a computer-readable storage medium storing machine-executable instructions, which, when executed, implement the method for generating viewing points of arc-shaped workpieces provided in the above embodiments.

[0130] Specifically, the computer-readable storage medium can be a general-purpose storage medium, such as a removable disk or hard disk. When the computer program on the computer-readable storage medium is run, it can execute the above-described method for generating the viewing point of an arc-shaped workpiece. The processes involved in the execution of the executable instructions on the computer-readable storage medium can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.

[0131] In summary, the method, apparatus, and electronic device for generating viewing points of arc-shaped workpieces provided in the embodiments of the present invention have at least the following substantial technical advantages compared with the prior art: 1. Enable dedicated viewpoint generation for cylindrical structures: This invention abandons the general mesh sampling mode and pioneers a viewpoint generation logic based on the angle bisector of a cylindrical structure. For a three-cylinder structure, the algorithm fully utilizes its multi-directional symmetry to generate initial viewpoints in the angle bisector direction and its reasonable neighborhood. For a two-cylinder structure, key point-viewpoint pairs are generated based on the combined constraints of the base arc bisector and the angle bisector. This mechanism embeds measurement optics principles into the algorithm's underlying layer, making the initial viewpoint set inherently highly effective and measurement-adaptive, significantly reducing the number of invalid viewpoints generated.

[0132] 2. Construct a refined visibility judgment system for penetration identification and gap filtering: This invention breaks through the traditional binary "visible / invisible" judgment framework, introducing concavity / convexity analysis and segmentation strategies to accurately distinguish whether the viewpoint-key point connection "penetrates the solid geometry" or "passes through the gaps in the sheet metal." To address the problem of gap misjudgment, a specially designed thin-plate filtering module eliminates viewpoints located inside structural gaps or through which the line of sight passes. This technology enables viewpoint validity judgment to reach the "spatially physically realizable" level for the first time, completely solving the chronic problem of viewpoint misjudgment in scenarios with multiple structures coexisting.

[0133] 3. Establish a viewpoint regeneration iterative mechanism based on occlusion analysis: When a structure fails to retain any valid viewpoints after the first round of screening, this invention initiates a viewpoint regeneration mechanism: the system does not blindly resample, but precisely analyzes which specific geometric surfaces the line connecting each initial viewpoint to the structure's intersection penetrates, using the "penetration object list" as the offset basis for regenerated viewpoints, and directionally generating a new round of candidate viewpoints. This mechanism gives iterative optimization clear geometric semantics and convergence direction, and usually obtains a set of valid viewpoints after 1-2 rounds of regeneration, improving efficiency by more than 50% compared to the traditional random perturbation method, and avoiding the need for manual intervention.

[0134] 4. Output a reasonably distributed list of viewpoints that can be directly used for path planning: This invention introduces dual constraints of spatial effectiveness and distribution rationality in viewpoint selection. On the one hand, through penetration filtering and thin-plate filtering, it ensures that viewpoints are located in free space and do not interfere with structural components; on the other hand, it controls the viewpoint spacing based on an adaptive distance benchmark to avoid excessive clustering or excessive spacing of viewpoints. The final output viewpoint list does not require manual reorganization and can be directly input into the robot path planning module, achieving end-to-end integration from 3D file parsing to automated measurement.

[0135] 5. Three-cylinder and two-cylinder divide-and-conquer strategies ensure the breadth and depth of the algorithm: This invention designs differentiated processing flows for two typical cylindrical composite structures: the three-cylinder structure focuses on the collaborative optimization of multi-directional angle bisectors, while the two-cylinder structure focuses on the coupled generation of the base arc bisectors and angle bisectors. This divide-and-conquer architecture ensures both the algorithm's deep adaptation to specific structures and the preservation of clear extension interfaces for subsequent expansion to more cylindrical composite types (four-cylinder, ring array, etc.).

[0136] In the embodiments provided by this invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0137] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0138] Furthermore, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0139] It should be noted that if the functionality is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0140] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.

[0141] The above description is merely an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for generating a viewing point for an arc-shaped workpiece, characterized in that, The method includes: Obtain the workpiece file of the arc workpiece, the workpiece file including a list of cylindrical structures; For each cylindrical structure in the list of cylindrical structures, generate an initial list of observation viewpoints for that cylindrical structure; The system detects whether the line connecting each observation point in the initial observation point list to the target point penetrates other surfaces. If it does, the corresponding observation point is filtered out. The other surfaces are other planes or other cylindrical surfaces. Check whether each of the filtered observation points is located within the gaps in the thin plate structure. If it is, then filter out the observation points located within the gaps in the thin plate structure. Check if there are any valid viewpoints among the filtered viewpoints. If no valid viewpoints are found, perform viewpoint generation, retry, and repair operations. Based on the observation points determined after generating retry and repair operations, the final list of observation points is output.

2. The method for generating viewing points for circular arc workpieces according to claim 1, characterized in that, The step of generating the initial list of observation viewpoints for the cylindrical structure includes: An adaptive distance reference is set based on the cylindrical structure; The angle bisector between the cylinder and the plane is determined based on the intersection information of the cylinder and the plane in the cylindrical structure. On the intersection of every two angle bisectors, a point is determined in the positive and negative directions according to the adaptive distance reference, serving as the initial observation point; Based on all the identified initial viewpoints, generate a list of initial viewpoints.

3. The method for generating viewing points for circular arc workpieces according to claim 2, characterized in that, The step of setting an adaptive distance reference based on the cylindrical structure includes: Obtain the set scaling ratio and the theoretical intersection point of the cylindrical structure; Using the theoretical intersection point as a reference point, the axial direction of the bounding box is determined according to the normal vector of the cylindrical structure; Projecting each point in the point cloud of the arc workpiece onto the axial direction yields the projected dimensions; The projected size is scaled based on the scaling ratio to obtain the scaled size; The bounding box of the cylindrical structure is determined based on the scaled dimensions, and the diagonal length of the bounding box is calculated. The diagonal length is then multiplied by a preset scaling factor to obtain an adaptive distance reference.

4. The method for generating viewing points for an arc-shaped workpiece according to claim 1, characterized in that, The step of detecting whether the line connecting each observation point in the initial observation viewpoint list to the target point penetrates other surfaces includes: Iterate through each observation point in the initial observation point list and determine the concavity and convexity of the cylindrical structure under the observation point; If the cylindrical structure is not a fully convex structure under the observation viewpoint, then it is detected whether the line connecting the observation viewpoint and the target point penetrates any plane in the plane list and any cylinder in the cylinder list. If the line does not penetrate any plane or any cylinder, the viewpoint is retained.

5. The method for generating viewing points for an arc-shaped workpiece according to claim 1, characterized in that, When the cylindrical structure is a two-cylinder structure, the target point is the point where the arc is equally divided, and the point where the arc is equally divided is determined in the following way: Obtain the geometric parameters of the two-cylinder structure and the number of division points; A local coordinate system is constructed, and the arc range of the two cylindrical structures in the local coordinate system is determined. The angle increment is calculated based on the arc range and the number of division points. Multiple equally divided angle values ​​are generated based on the angle increment and the arc range; Based on the cylinder radius and equally divided angle values ​​of the two-cylinder structure, calculate the two-dimensional coordinates of the circle on the two-dimensional plane of the local coordinate system; The two-dimensional coordinates are transformed into three-dimensional coordinates in three-dimensional space, and the points for dividing the arc are determined based on the three-dimensional coordinates.

6. The method for generating viewing points for an arc-shaped workpiece according to claim 1, characterized in that, The thin plate structure is composed of two planes whose normal vector angle is less than a set threshold and whose spacing is less than a distance threshold, or two arcs whose arc centers are the same and whose arc radii differ from a preset threshold. The step of detecting whether each observation point after filtering is located within the gap of the thin plate structure includes: The system detects whether each filtered observation point meets the set conditions. The set conditions are that the observation point is located between the two planes and the distance between the observation point and each of the planes is within a threshold range, or the observation point is located between the two arcs and the distance between the observation point and each of the arcs is within a threshold range. If the set conditions are met, it is determined that the observation point is located within the gap of the thin plate structure.

7. The method for generating viewing points for an arc-shaped workpiece according to claim 1, characterized in that, The steps for performing the generation, retry, and repair operations of the observation viewpoint include: Iterate through each observation point in the initial observation viewpoint list, perform penetration analysis based on the observation viewpoint, and obtain the intersection of the penetration surfaces corresponding to the observation viewpoint; Based on the distance between the observation point and each intersection point, they are sorted in ascending order; By sequentially translating each intersection point according to the order, a new observation point is obtained after the translation; Perform penetration analysis and thin-plate structure filtering analysis to verify the new observation viewpoint. If the verification is successful, the new observation viewpoint will be considered a valid viewpoint. If none of the new observation points obtained from the intersections corresponding to each of the aforementioned observation points pass the verification, then the cylindrical structure is determined to be an invalid structure.

8. The method for generating viewing points for an arc-shaped workpiece according to claim 1, characterized in that, The step of outputting the final list of observation viewpoints based on the observation viewpoints determined after the generation of retry and repair operations includes: Obtain the position and viewing direction of each viewpoint after the generation of retry and repair operations; The observation viewpoints are clustered based on their location and observation direction. For observation points within the same cluster, a new observation point is determined based on the average position and observation direction of the observation points within that cluster. Output the final list of observation points based on the determined new observation points.

9. A device for generating viewing points for an arc-shaped workpiece, characterized in that, The device includes: The acquisition module is used to acquire the workpiece file of the arc workpiece, the workpiece file including a list of cylindrical structures; The first generation module is used to generate an initial viewpoint list for each cylindrical structure in the list of cylindrical structures. The first detection module is used to detect whether the line connecting each observation point in the initial observation point list to the target point penetrates other surfaces. If it penetrates, the corresponding observation point is filtered out. The other surfaces are other planes or other cylindrical surfaces. The second detection module is used to detect whether each of the filtered observation points is located within the gap of the thin plate structure. If it is, the observation points located within the gap of the thin plate structure are filtered out. The third detection module is used to detect whether there are valid viewpoints among the filtered observation viewpoints. If there are no valid viewpoints, the generation, retry, and repair operations of the observation viewpoints are performed. The second generation module is used to output the final list of observation viewpoints based on the observation viewpoints determined after the generation retry and repair operations.

10. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method of any one of claims 1 to 8.