Workpiece modeling method and device based on point cloud data
By fitting the base plane, segmenting the point cloud, constructing a local coordinate system, performing projection clustering segmentation, and bonding fusion processing, the accuracy problem of modeling workpieces with complex topological relationships was solved, and a complete small-group stand-alone workpiece model was generated.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SPEEDBOT ROBOTICS CO LTD
- Filing Date
- 2026-05-22
- Publication Date
- 2026-06-19
AI Technical Summary
Existing technologies struggle to accurately model ship assembly workpieces that contain multiple stiffeners and have complex topological relationships such as intersections, T-shapes, and Y-shapes. Traditional methods often remain at the stage of single structure identification or local modeling, failing to achieve accurate workpiece modeling.
By acquiring the workpiece point cloud of the small-scale structural component, fitting the base plate plane and segmenting it into the base plate point cloud and the remaining point cloud, extracting the point cloud of the upper surface of the stiffener plate, constructing a local planar coordinate system to determine the two-dimensional projection boundary of the base plate, extruding it into a base plate entity with thickness, clustering and segmenting the projected stiffener plate point cloud, extracting the stiffener plate endpoints to determine the center line and weld type, combining the point cloud to calculate the stiffener plate height and thickness, and finally fitting and merging the stiffener plate entity with the base plate entity.
It achieves accurate modeling of workpieces with complex topological relationships, generates complete and gapless small-scale workpiece models, provides an independent modeling basis for the base plate and stiffening plate, and ensures the geometric accuracy and integrity of the model.
Smart Images

Figure CN122244342A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of 3D modeling technology, and in particular to a workpiece modeling method, apparatus, computer equipment, storage medium and computer program product based on point cloud data. Background Technology
[0002] Currently, in the field of modeling and welding automation of ship assembly workpieces, the main approach relies on manual modeling or offline programming based on CAD models. Some methods introduce 3D vision technology, which uses structured light or line scan cameras to acquire point cloud data and combines it with traditional geometric algorithms such as plane fitting and line fitting to achieve the recognition and reconstruction of simple structures.
[0003] In point cloud processing, RANSAC (RANdom Sample Consensus) is typically used for plane segmentation. Local structures are extracted through threshold segmentation or clustering methods, and parametric modeling is performed based on regular geometry.
[0004] However, for workpieces containing multiple stiffeners and complex topological relationships such as intersections, T-shapes, and Y-shapes, traditional methods often remain at the stage of single structure identification or local modeling, and cannot achieve accurate workpiece modeling. Summary of the Invention
[0005] Therefore, it is necessary to provide an accurate workpiece modeling method, apparatus, computer equipment, computer-readable storage medium, and computer program product based on point cloud data to address the aforementioned technical problems.
[0006] Firstly, this application provides a workpiece modeling method based on point cloud data. The method includes:
[0007] Obtain the workpiece point cloud of the small-scale stand-up structure, which includes a flat base plate and reinforcing ribs;
[0008] The workpiece point cloud is fitted to the base plate plane, and the workpiece point cloud is divided into the base plate point cloud and the remaining point cloud according to the base plate plane. The point cloud of the upper surface of the rib plate is extracted from the remaining point cloud.
[0009] Based on the plane equation of the base plate, a local plane coordinate system is constructed to determine the two-dimensional projection boundary of the base plate. Based on the two-dimensional projection boundary of the base plate, a rectangular plane is constructed and the rectangular plane is stretched into a base plate solid with thickness.
[0010] The point cloud on the upper surface of the stiffener is projected onto the plane of the base plate using the plane equation of the base plate to form a projected stiffener point cloud. The projected stiffener point cloud is then clustered and segmented to obtain multiple independent stiffener point cloud clusters.
[0011] Extract the stiffener endpoints from the independent stiffener point cloud clusters, determine the stiffener centerline based on the extracted stiffener endpoints, and determine the weld type. Combine the stiffener centerline, weld type, and the height and thickness of the stiffener by cloud computing the bottom plate plane and the stiffener upper surface points to construct the stiffener entity.
[0012] The stiffener plate and the base plate are fitted and fused together to obtain a small-scale workpiece model.
[0013] In one embodiment, the workpiece point cloud is fitted to the base plate plane, and the workpiece point cloud is segmented into a base plate point cloud and a remaining point cloud according to the base plate plane. Extracting the upper surface point cloud of the rib plate from the remaining point cloud includes:
[0014] The workpiece point cloud is fitted to the base plate plane, and the workpiece point cloud is divided into the base plate point cloud and the remaining point cloud according to the base plate plane.
[0015] Using the minimum value of the base plate point cloud in the Z-axis direction of the world coordinate system as the upper limit of the pass-through filter, the remaining point cloud is subjected to pass-through filtering to extract the point cloud on the upper surface of the rib plate.
[0016] In one embodiment, constructing a local planar coordinate system based on the base plate plane equation to determine the two-dimensional projection boundary of the base plate, and constructing a rectangular plane based on the two-dimensional projection boundary of the base plate, and stretching the rectangular plane into a base plate solid with thickness includes:
[0017] A local planar coordinate system is constructed based on the equation of the base plate, and a two-way transformation relationship between the world coordinate system and the local planar coordinate system is established.
[0018] Based on the extreme points of the base point cloud, the corner points of the bounding box are constructed and transformed to the local planar coordinate system based on the bidirectional transformation relationship, and the two-dimensional projection boundary is statistically obtained.
[0019] Construct a rectangle in the local planar coordinate system based on the two-dimensional projection boundary, and transform the vertices of the rectangle back to the world coordinate system to generate a planar patch;
[0020] The planar surface is stretched to a preset thickness along the plane normal vector to form a solid base plate.
[0021] In one embodiment, the point cloud on the upper surface of the stiffener is projected onto the plane of the base plate using the base plate plane equation to form a projected stiffener point cloud. The projected stiffener point cloud is then clustered and segmented to obtain multiple independent stiffener point cloud clusters, including:
[0022] The point cloud on the upper surface of the stiffener is projected onto the plane of the base plate using the plane equation of the base plate, forming the projected point cloud of the stiffener;
[0023] The point cloud of the projected stiffener is sequentially subjected to statistical filtering noise reduction and uniform downsampling preprocessing.
[0024] Clustering and segmentation are performed on the preprocessed projected stiffener point cloud to obtain multiple independent stiffener point cloud clusters.
[0025] In one embodiment, the stiffener endpoints are extracted from the independent stiffener point cloud clusters. Based on the extracted stiffener endpoints, the stiffener centerline is determined, and the weld type is identified. Combining the stiffener centerline, weld type, and the height and thickness of the stiffener calculated from the point cloud of the bottom plate plane and the stiffener upper surface, the stiffener entity is constructed, including:
[0026] For points downsampled from the point cloud cluster of independent stiffeners, vectors are constructed based on neighborhood points within the local window and the cosine value of the included angle of the vectors is calculated. Candidate endpoints are identified based on the consistency of the positive and negative cosine values. Radius clustering is performed on each candidate endpoint, and the geometric center of each cluster is selected as the stiffener endpoint.
[0027] Weld type is identified based on the endpoints of the stiffener plate, and the centerline of the stiffener plate is determined.
[0028] Using the normal direction of the base plate plane as a constraint and fitting a plane based on the center line of the stiffener, the maximum distance between points in the fitted plane and the base plate plane is calculated as the stiffener height.
[0029] Multiple sampling points are selected on the center line of the stiffener plate. The thickness direction is obtained by cross product of the tangent direction of the weld at each sampling point and the normal vector of the base plate. Neighborhood search is performed on the point cloud on the upper surface of the stiffener plate along the thickness direction, and the maximum distance between the projection point pairs is calculated as the local thickness. The average value of the local thickness of each sampling point is taken as the stiffener plate thickness.
[0030] Based on the centerline of the stiffener, the thickness direction is obtained by cross product of the height direction with the normal direction of the reverse bottom plate plane and the length direction with the centerline of the stiffener. The bottom contour of the stiffener is determined by combining the height direction, length direction and thickness direction with the stiffener thickness.
[0031] Using the bottom contour as a reference, stretch the height of the stiffener plate along the height direction to generate the stiffener plate solid.
[0032] In one embodiment, identifying the weld type based on the stiffener endpoints and determining the stiffener centerline includes:
[0033] If there are two stiffener endpoints, a straight line is constructed through the two stiffener endpoints as the stiffener centerline. The vertical distance from each point in the independent stiffener point cloud cluster to the constructed straight line is calculated, and the average vertical distance is calculated. If the average distance is less than a preset threshold, it is determined to be a straight weld. If the average distance is not less than the preset threshold, it is determined to be a curved weld.
[0034] If the number of rib endpoints is greater than two, then iteratively fit a straight line to the point cloud cluster of the independent ribs to obtain the corresponding rib centerline.
[0035] In one embodiment, before determining the bottom profile of the stiffener based on the stiffener centerline, with the reverse bottom plate plane normal as the height direction and the stiffener centerline direction as the length direction, the thickness direction is obtained by cross product. This process further includes:
[0036] For each stiffener centerline, determine the intersection relationship between each pair of centers, and calculate and save candidate intersection points that meet the conditions according to the corresponding strategy based on the weld type.
[0037] Spatial clustering is performed on each candidate intersection point, and each cluster is merged into a single intersection point. The endpoints of the stiffener centerline are updated based on the intersection point.
[0038] In one embodiment, based on the stiffener centerline, the thickness direction is obtained by cross product of the height direction (using the reverse bottom plate plane normal as the height direction and the stiffener centerline direction as the length direction), and the bottom surface profile of the stiffener is determined by combining the height direction, length direction, and thickness direction with the stiffener thickness.
[0039] For straight stiffeners, the reverse normal to the bottom plate plane is taken as the height direction. The length direction is constructed based on the start and end points of the centerline of the straight stiffener. The thickness direction is obtained by cross-product of the normal to the bottom plate plane and the length direction. The start and end points of the centerline of the straight stiffener are orthogonally projected onto the bottom plate plane. The midpoint of the projection point is taken as the center of the bottom surface. The length of the stiffener is determined based on the distance between the projected start and end points. The dimensions of the bottom rectangle are calculated based on the stiffener thickness. Based on the length direction, the thickness direction, and the dimensions of the bottom rectangle, the corner points of the bottom rectangle are constructed in the world coordinate system to form the bottom outline.
[0040] For the curved stiffener, iterate through all points in the point cloud on the upper surface of the stiffener corresponding to the curved stiffener; calculate the local tangent direction through the current point and its adjacent points, and perform a cross product with the normal of the bottom plate plane to obtain the lateral thickness direction; at each point, offset the stiffener thickness by 1 / 2 on both sides along the lateral thickness direction to construct two boundary point sequences on the left and right; reproject the points in the two boundary point sequences on the left and right back to the bottom plate plane; fit B-spline curves based on the projected left and right boundary points, and connect the boundaries with the first and last straight line segments to form the bottom surface profile.
[0041] In one embodiment, generating a stiffener solid by stretching the height of the stiffener plate along the height direction, using the bottom contour as a reference, includes:
[0042] For straight stiffeners, the planar surface formed by the four corner points of the bottom rectangle is used as a reference, and the stiffener height is stretched along the height direction to generate a straight three-dimensional stiffener solid.
[0043] For curved stiffeners, construct a target surface based on the bottom contour, and stretch the stiffener height along the normal direction of the target surface and toward the side opposite to the normal direction of the bottom plate plane to generate a curved three-dimensional stiffener solid.
[0044] In one embodiment, the stiffening plate entity and the base plate entity are fitted and fused together to obtain a small assembled workpiece model, including:
[0045] Obtain a preset displacement vector along the normal direction of the base plate plane, and apply a translation transformation to the stiffener plate entity based on the preset displacement vector so that the stiffener plate entity fits against the upper surface of the base plate entity.
[0046] Starting with the base plate solid as the initial accumulator, iterate through each translated rib solid in turn, perform a Boolean difference operation on the current rib solid and the accumulator, and remove the overlapping parts of the rib solid and the accumulator; if the Boolean difference operation is successful, replace the original rib solid with the trimmed geometry and add it to the geometry set, perform a Boolean union operation on the trimmed geometry and the accumulator, and update the accumulator; if the Boolean difference or Boolean union operation fails, either revert to using the original rib solid before trimming or keep the original accumulator unchanged.
[0047] Once all stiffener entities have been processed, the final updated accumulator will be used as the small-scale assembled workpiece model.
[0048] Secondly, this application also provides a workpiece modeling device based on point cloud data. The device includes:
[0049] The point cloud acquisition module is used to acquire the workpiece point cloud of the small-scale stand-up structural component, which includes a planar base plate and reinforcing ribs.
[0050] The point cloud segmentation module is used to fit the base plate plane based on the workpiece point cloud, and to segment the workpiece point cloud into the base plate point cloud and the remaining point cloud according to the base plate plane, and to extract the upper surface point cloud of the rib plate from the remaining point cloud.
[0051] The base plate solid construction module is used to construct a local planar coordinate system based on the base plate plane equation to determine the two-dimensional projection boundary of the base plate, and construct a rectangular plane based on the two-dimensional projection boundary of the base plate, and stretch the rectangular plane into a base plate solid with thickness.
[0052] The clustering and segmentation module is used to project the point cloud of the upper surface of the stiffener onto the plane of the base plate using the plane equation of the base plate, forming a projected stiffener point cloud, and then performing clustering and segmentation on the projected stiffener point cloud to obtain multiple independent stiffener point cloud clusters.
[0053] The stiffener solid construction module is used to extract stiffener endpoints from independent stiffener point cloud clusters, determine the stiffener centerline based on the extracted stiffener endpoints, and determine the weld type. Combining the stiffener centerline, weld type, and the height and thickness of the stiffener by cloud computing the bottom plate plane and the stiffener upper surface points, the stiffener solid is constructed.
[0054] The bonding and fusion module is used to bond and fuse the rib plate entity and the base plate entity to obtain a small-scale workpiece model.
[0055] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0056] Obtain the workpiece point cloud of the small-scale stand-up structure, which includes a flat base plate and reinforcing ribs;
[0057] The workpiece point cloud is fitted to the base plate plane, and the workpiece point cloud is divided into the base plate point cloud and the remaining point cloud according to the base plate plane. The point cloud of the upper surface of the rib plate is extracted from the remaining point cloud.
[0058] Based on the plane equation of the base plate, a local plane coordinate system is constructed to determine the two-dimensional projection boundary of the base plate. Based on the two-dimensional projection boundary of the base plate, a rectangular plane is constructed and the rectangular plane is stretched into a base plate solid with thickness.
[0059] The point cloud on the upper surface of the stiffener is projected onto the plane of the base plate using the plane equation of the base plate to form a projected stiffener point cloud. The projected stiffener point cloud is then clustered and segmented to obtain multiple independent stiffener point cloud clusters.
[0060] Extract the stiffener endpoints from the independent stiffener point cloud clusters, determine the stiffener centerline based on the extracted stiffener endpoints, and determine the weld type. Combine the stiffener centerline, weld type, and the height and thickness of the stiffener by cloud computing the bottom plate plane and the stiffener upper surface points to construct the stiffener entity.
[0061] The stiffener plate and the base plate are fitted and fused together to obtain a small-scale workpiece model.
[0062] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0063] Obtain the workpiece point cloud of the small-scale stand-up structure, which includes a flat base plate and reinforcing ribs;
[0064] The workpiece point cloud is fitted to the base plate plane, and the workpiece point cloud is divided into the base plate point cloud and the remaining point cloud according to the base plate plane. The point cloud of the upper surface of the rib plate is extracted from the remaining point cloud.
[0065] Based on the plane equation of the base plate, a local plane coordinate system is constructed to determine the two-dimensional projection boundary of the base plate. Based on the two-dimensional projection boundary of the base plate, a rectangular plane is constructed and the rectangular plane is stretched into a base plate solid with thickness.
[0066] The point cloud on the upper surface of the stiffener is projected onto the plane of the base plate using the plane equation of the base plate to form a projected stiffener point cloud. The projected stiffener point cloud is then clustered and segmented to obtain multiple independent stiffener point cloud clusters.
[0067] Extract the stiffener endpoints from the independent stiffener point cloud clusters, determine the stiffener centerline based on the extracted stiffener endpoints, and determine the weld type. Combine the stiffener centerline, weld type, and the height and thickness of the stiffener by cloud computing the bottom plate plane and the stiffener upper surface points to construct the stiffener entity.
[0068] The stiffener plate and the base plate are fitted and fused together to obtain a small-scale workpiece model.
[0069] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0070] Obtain the workpiece point cloud of the small-scale stand-up structure, which includes a flat base plate and reinforcing ribs;
[0071] The workpiece point cloud is fitted to the base plate plane, and the workpiece point cloud is divided into the base plate point cloud and the remaining point cloud according to the base plate plane. The point cloud of the upper surface of the rib plate is extracted from the remaining point cloud.
[0072] Based on the plane equation of the base plate, a local plane coordinate system is constructed to determine the two-dimensional projection boundary of the base plate. Based on the two-dimensional projection boundary of the base plate, a rectangular plane is constructed and the rectangular plane is stretched into a base plate solid with thickness.
[0073] The point cloud on the upper surface of the stiffener is projected onto the plane of the base plate using the plane equation of the base plate to form a projected stiffener point cloud. The projected stiffener point cloud is then clustered and segmented to obtain multiple independent stiffener point cloud clusters.
[0074] Extract the stiffener endpoints from the independent stiffener point cloud clusters, determine the stiffener centerline based on the extracted stiffener endpoints, and determine the weld type. Combine the stiffener centerline, weld type, and the height and thickness of the stiffener by cloud computing the bottom plate plane and the stiffener upper surface points to construct the stiffener entity.
[0075] The stiffener plate and the base plate are fitted and fused together to obtain a small-scale workpiece model.
[0076] The aforementioned workpiece modeling method, apparatus, computer equipment, storage medium, and computer program products based on point cloud data acquire the workpiece point cloud and fit it to the base plate plane, dividing the workpiece point cloud into the base plate point cloud and the remaining point cloud. This effectively separates the base plate and stiffener structure from the original point cloud, laying the foundation for subsequent independent modeling. A local planar coordinate system is constructed based on the base plate plane equation to determine the two-dimensional projection boundary, and a rectangular plane is constructed and stretched into a base plate solid to accurately reconstruct the three-dimensional shape of the base plate based on its own geometric characteristics. The point cloud of the stiffener plate's upper surface is projected onto the base plate plane using the base plate plane equation and then clustered and segmented. On a unified reference plane, each stiffener plate is separated into an independent point cloud cluster, providing accurate data for individual modeling of each stiffener plate. Endpoints are extracted from the independent stiffener plate point cloud clusters, and the centerline of the stiffener plate is determined. Combining the weld type, the base plate plane, and the point cloud of the stiffener plate's upper surface, the height and thickness of the stiffener plate are calculated, accurately generating the stiffener plate solid. Finally, the stiffener plate solid and the base plate solid are fitted and merged to eliminate the gap between the stiffener plate and the base plate, ultimately generating a complete and accurate small-scale assembled workpiece model. Attached Figure Description
[0077] Figure 1 This is an application environment diagram of a workpiece modeling method based on point cloud data in one embodiment;
[0078] Figure 2 This is a flowchart illustrating a workpiece modeling method based on point cloud data in one embodiment;
[0079] Figure 3 A schematic diagram of point cloud data for the shipbuilding group's workpieces;
[0080] Figure 4 This is a flowchart illustrating a workpiece modeling method based on point cloud data in another embodiment;
[0081] Figure 5 A schematic diagram of the sub-process for constructing the stiffener plate entity;
[0082] Figure 6 A schematic diagram of the centerline of the stiffener obtained from the fitting;
[0083] Figure 7 This is a schematic diagram of a straight-line 3D stiffener.
[0084] Figure 8 This is a schematic diagram of a three-dimensional curved stiffener.
[0085] Figure 9 A schematic diagram of the small-scale workpiece model;
[0086] Figure 10 This is a structural block diagram of a workpiece modeling device based on point cloud data in one embodiment;
[0087] Figure 11This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0088] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0089] The workpiece modeling method based on point cloud data provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Terminal 102 sends a workpiece modeling request to server 104, carrying the workpiece point cloud of a small assembled structural component collected by terminal 102. Server 104 receives and parses the workpiece modeling request, obtaining the workpiece point cloud of the small assembled structural component, which includes a planar base plate and reinforcing ribs. Based on the workpiece point cloud, a base plate plane is fitted, and the workpiece point cloud is divided into a base plate point cloud and a remaining point cloud according to the base plate plane. The point cloud of the upper surface of the reinforcing rib is extracted from the remaining point cloud. A local planar coordinate system is constructed based on the base plate plane equation to determine the two-dimensional projection boundary of the base plate. The process involves constructing a rectangular plane and stretching it into a solid base plate with thickness. The point cloud of the upper surface of the stiffener plate is projected onto the base plate plane using the base plate plane equation, forming a projected stiffener plate point cloud. This projected stiffener plate point cloud is then clustered to obtain multiple independent stiffener plate point cloud clusters. The stiffener plate endpoints are extracted from these clusters. Based on these endpoints, the stiffener plate centerline is determined, and the weld type is identified. Combining the stiffener plate centerline, weld type, and the points on the upper surface of the base plate plane and stiffener plate, the height and thickness of the stiffener plate are calculated, and a stiffener plate solid is constructed. The stiffener plate solid and the base plate solid are then fitted and fused to obtain a small-scale workpiece model. The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster composed of multiple servers. It is understandable that the workpiece modeling method based on point cloud data in this application can also be directly applied to the terminal. Its specific processing is similar to that described above and will not be repeated here.
[0090] In one embodiment, such as Figure 2 As shown, a workpiece modeling method based on point cloud data is provided, which can be applied to... Figure 1Taking server 104 as an example, the following steps are included:
[0091] S100: Obtain the workpiece point cloud of a small-scale structural component, which includes a flat base plate and reinforcing ribs.
[0092] Specifically, a line scan camera can be used to scan the assembled structural components, acquiring 3D point cloud data of their surfaces. The point cloud data is then unified to a specified coordinate system using camera calibration parameters to obtain the workpiece point cloud. The line scan camera can be mounted on a motion platform, which moves the camera relative to the workpiece to completely cover its surface. Alternatively, a structured light camera or other 3D vision sensors can also be used to acquire the workpiece point cloud.
[0093] In practical applications, point cloud data acquisition and subsequent data processing can be performed based on a pre-built system. This system includes a welding robot, a ground-rail cantilever, a line scan camera, a weld seam tracking sensor, a welding machine, a PLC, and an industrial control computer. The welding robot is mounted upside down on the ground-rail cantilever, while the line scan camera is fixedly mounted on the cantilever, maintaining a constant relative position with the welding robot's coordinate system. During operation, the ground-rail cantilever drives the line scan camera to move at a constant linear speed relative to the workpiece, scanning the small assembled structure and acquiring its surface 3D point cloud data. Subsequently, using pre-calibrated visual calibration parameters, the acquired raw point cloud data is transformed from the camera coordinate system to the robot coordinate system to obtain the workpiece point cloud. This embodiment, through the uniform motion of the ground rail and the fixed mounting of the camera, can stably and completely acquire point cloud data of the entire workpiece surface, and the data is unified in the robot coordinate system, facilitating subsequent modeling. In one specific application example, the acquired point cloud data of a small assembled ship workpiece is as follows: Figure 3 As shown.
[0094] S200: Fit the base plate plane based on the workpiece point cloud, and divide the workpiece point cloud into the base plate point cloud and the remaining point cloud according to the base plate plane, and extract the upper surface point cloud of the stiffener from the remaining point cloud.
[0095] Since the base plate of the sub-assembly structure is an approximate planar structure, a plane fitting algorithm can be used to fit the plane of the base plate from the workpiece point cloud, and the mathematical equation of this plane, i.e., the base plate plane equation, can be obtained. Based on this base plate plane equation, the points belonging to the base plate in the workpiece point cloud (i.e., the base plate point cloud) can be separated from the remaining points (i.e., the residual point cloud). The residual point cloud contains the points corresponding to the stiffeners and possible noise points. The stiffeners usually stand vertically on the base plate, and their top surface (i.e., the upper surface) is the key data required for subsequent stiffener modeling. The extreme positions of the base plate point cloud in the vertical direction can be used as a reference to filter the residual point cloud, thereby extracting the point cloud belonging to the upper surface of the stiffeners, i.e., the upper surface point cloud of the stiffeners. Through this step, the initial separation of the base plate and stiffener structure is achieved, and the core point cloud data required for subsequent stiffener modeling is obtained.
[0096] S300: Based on the plane equation of the base plate, a local plane coordinate system is constructed to determine the two-dimensional projection boundary of the base plate. Based on the two-dimensional projection boundary of the base plate, a rectangular plane is constructed and the rectangular plane is stretched into a base plate solid with thickness.
[0097] To generate a regular solid model of the base plate from a discrete point cloud, the geometric boundaries of the base plate need to be determined. Based on the plane equation of the base plate, a local planar coordinate system can be established. By projecting the base plate point cloud onto this local coordinate system and statistically analyzing the distribution range of the point cloud along the two axes of the coordinate system, the projected boundary of the base plate on the two-dimensional plane can be obtained. Based on this projected boundary, a rectangular plane covering the area of the base plate can be constructed. This rectangular plane represents the upper or lower surface of the base plate. Subsequently, the base plate is stretched along the normal direction of this rectangular plane by a distance equal to the preset thickness of the base plate, thus forming a three-dimensional solid base plate with thickness.
[0098] S400: Project the point cloud on the upper surface of the stiffener plate onto the plane of the base plate using the plane equation of the base plate to form a projected stiffener plate point cloud. Then, perform clustering and segmentation on the projected stiffener plate point cloud to obtain multiple independent stiffener plate point cloud clusters.
[0099] To separate each stiffener into independent objects for processing, segmentation is required on a unified reference plane. Using the base plate plane as this reference plane, the point cloud of the upper surface of the stiffener obtained in S200 is projected onto the base plate plane, resulting in a projected stiffener point cloud. The projection operation ensures that the point clouds of each stiffener form a clear two-dimensional distribution on the base plate. In the above projected stiffener point cloud, points belonging to different stiffeners are spatially separated. Using a clustering segmentation algorithm, the projected stiffener point cloud can be segmented into multiple independent subsets based on the spatial distance between points. Each subset is an independent stiffener point cloud cluster, corresponding to one stiffener.
[0100] S500: Extract the stiffener endpoints from the independent stiffener point cloud clusters, determine the stiffener centerline based on the extracted stiffener endpoints, and determine the weld type. Combine the stiffener centerline, weld type, and the height and thickness of the stiffener by cloud computing the bottom plate plane and the stiffener upper surface points to construct the stiffener entity.
[0101] For each stiffener, its geometry and key dimensional parameters need to be determined. First, the two endpoints of the stiffener are extracted from the point cloud cluster of individual stiffeners. These endpoints determine the approximate orientation and length range of the stiffener. Based on the extracted endpoints, a centerline running through the stiffener can be constructed. According to the number of endpoints and the distribution relationship between the points in the point cloud cluster and this centerline, the weld type corresponding to the stiffener can be determined, such as a straight weld or a curved weld. The height of the stiffener characterizes its verticality above the base plate. An auxiliary plane can be established based on the stiffener centerline, and the maximum distance between the stiffener points and the base plate plane within this plane can be calculated as the stiffener height. The thickness of the stiffener characterizes the plate thickness itself. Multiple locations can be sampled along the stiffener centerline. At each sampling location, a neighborhood search is performed on the point cloud above the stiffener's surface along a direction perpendicular to the centerline and parallel to the base plate plane (i.e., the thickness direction) to obtain the local thickness at that location, and the average value of all sampling locations is taken as the stiffener thickness. After obtaining the stiffener's centerline, height, and thickness parameters, a solid model of the stiffener can be constructed. The bottom outline is determined based on the center line of the stiffener plate, and the bottom shape is expanded according to the thickness of the stiffener plate. Then, the bottom surface is stretched along the height direction to the height of the stiffener plate to generate the corresponding stiffener plate entity.
[0102] S600: The stiffener plate and the base plate are fitted and fused together to obtain a small-scale workpiece model.
[0103] After each rib and base plate entity is generated independently, they need to be combined to form a complete workpiece model. First, to ensure tight contact between the bottom surface of the rib and the top surface of the base plate, each rib entity can be slightly translated along the normal direction of the base plate plane, allowing the rib to fit against the top surface of the base plate. Then, the fitted rib entities and the base plate entity are merged. During the merging process, any potential overlap between the ribs needs to be considered. Boolean operations are used to sequentially merge each rib entity and the base plate entity into a single unit, automatically handling the assignment of overlapping areas. After merging, a complete, geometrically conflict-free 3D solid model of the assembled workpiece, including the base plate and all ribs, is obtained.
[0104] The above-described workpiece modeling method based on point cloud data acquires the workpiece point cloud and fits it to the base plate plane, dividing the workpiece point cloud into base plate point cloud and remaining point cloud. This effectively separates the base plate and stiffener structure from the original point cloud, laying the foundation for subsequent independent modeling. A local planar coordinate system is constructed based on the base plate plane equation to determine the two-dimensional projection boundary, and a rectangular plane is constructed and stretched into a base plate solid to accurately reconstruct the three-dimensional shape of the base plate based on its own geometric features. The point cloud of the stiffener plate's upper surface is projected onto the base plate plane using the base plate plane equation and then clustered. On a unified reference plane, each stiffener is separated into an independent point cloud cluster, providing accurate data for individual modeling of each stiffener. Endpoints are extracted from the independent stiffener point cloud clusters, and the centerline of the stiffener is determined. Combining the weld type, the base plate plane, and the point cloud of the stiffener plate's upper surface, the height and thickness of the stiffener are calculated, accurately generating the stiffener solid. Finally, the stiffener solid and the base plate solid are fitted and merged to eliminate the gap between the stiffener and the base plate, ultimately generating a complete and accurate small-scale assembled workpiece model.
[0105] In one embodiment, such as Figure 4 As shown, the workpiece point cloud is fitted to the base plate plane, and the workpiece point cloud is divided into the base plate point cloud and the remaining point cloud according to the base plate plane. The point cloud of the upper surface of the stiffener is extracted from the remaining point cloud, including:
[0106] S220: Fit the base plate plane based on the workpiece point cloud, and divide the workpiece point cloud into the base plate point cloud and the remaining point cloud according to the base plate plane.
[0107] In this step, the RANSAC algorithm or the least squares method can be used to perform planar fitting on the workpiece point cloud. Interior points that satisfy the planar model are classified as the base plate point cloud, while points that do not satisfy the model are classified as the residual point cloud. Simultaneously, the base plate planar equation describing the spatial position and orientation of the base plate is obtained. Preferably, the RANSAC algorithm is chosen here. The RANSAC algorithm is a robust model parameter estimation method that, through random sampling and iterative verification, can estimate mathematical model parameters from data containing a large number of outliers. The residual point cloud mainly contains points corresponding to the stiffeners and potentially noisy points. This base plate planar equation will be used in subsequent steps such as base plate entity generation and stiffener point cloud projection.
[0108] S240: Using the minimum value of the base plate point cloud in the Z-axis direction of the world coordinate system as the upper limit of the pass-through filter, perform pass-through filtering on the remaining point cloud to extract the point cloud on the upper surface of the rib plate.
[0109] The stiffening rib stands upright on the base plate, and its upper surface point cloud and the base plate point cloud are spatially separated in the vertical direction. Pass-through filtering is a method for filtering point clouds along a specified coordinate axis and based on a set threshold range. This step uses the vertical distribution boundary of the base plate point cloud as a reference to determine the filtering threshold, performs pass-through filtering on the remaining point cloud, thereby filtering out residual non-stiffening rib points near the base plate and extracting the upper surface point cloud of the stiffening rib. This provides a clear data foundation for subsequent stiffening rib segmentation and geometric parameter extraction.
[0110] In one embodiment, the Z-axis of the world coordinate system points vertically downwards. In this coordinate system, the rib is located above the base plate, meaning the Z-coordinate value of the point cloud on the upper surface of the rib is less than the Z-coordinate value of the point cloud on the base plate. The minimum value of the point cloud on the base plate along the Z-axis is obtained, and this minimum value is used as the maximum value threshold for the pass-through filter in the Z-axis direction. When performing pass-through filtering on the remaining point cloud, points with Z-coordinate values greater than this threshold are filtered out, and points with Z-coordinate values less than or equal to this threshold are retained. The retained point cloud is the point cloud on the upper surface of the rib.
[0111] In one embodiment, constructing a local planar coordinate system based on the base plate plane equation to determine the two-dimensional projection boundary of the base plate, and constructing a rectangular plane based on the two-dimensional projection boundary of the base plate, and stretching the rectangular plane into a base plate solid with thickness includes:
[0112] Step 1: Construct a local plane coordinate system based on the equation of the base plate plane, and establish a two-way transformation relationship between the world coordinate system and the local plane coordinate system.
[0113] The equations of the base plate plane describe the spatial position and orientation of the base plate in the world coordinate system. To facilitate two-dimensional geometric processing on the base plate plane, a local planar coordinate system attached to the base plate needs to be established. This local planar coordinate system uses the base plate plane as its reference plane, its origin can be any point on the base plate plane, two coordinate axes lie in the base plate plane, and the third coordinate axis is along the normal to the base plate plane. Simultaneously, a bidirectional transformation relationship is established between the world coordinate system and this local planar coordinate system, including the transformation from the world coordinate system to the local planar coordinate system and its inverse transformation, allowing spatial points to be freely transformed between the two coordinate systems, providing a coordinate transformation basis for subsequent boundary statistics and rectangle construction. In practical applications, the corresponding local planar coordinate system can be constructed based on the equations of the base plate plane using the Open CASCADE geometry library. A local planar coordinate system is established by taking a point on the base plate plane as the origin, two orthogonal directions within the base plate plane as the U-axis and V-axis, and the normal to the base plate plane as the W-axis. A bidirectional transformation matrix between the world coordinate system and this local planar coordinate system is also established.
[0114] Step 2: Construct bounding box corner points based on the extreme points of the base point cloud, and transform them to the local plane coordinate system based on the bidirectional transformation relationship to obtain the two-dimensional projection boundary.
[0115] The base plate point cloud is a discrete set of spatial points. To determine the geometric boundary of the base plate in the plane, we can first find the extreme points of the base plate point cloud along each coordinate axis in the world coordinate system. Based on the extreme points, we construct a 3D bounding box for the base plate point cloud. The bounding box is the smallest cuboid that can enclose all base plate points. The eight corner points of the bounding box can be obtained by combining the extreme coordinates. Subsequently, using the bidirectional transformation relationship established in step 1, we transform these eight corner points from the world coordinate system to the local planar coordinate system. In the local planar coordinate system, we statistically analyze the distribution range of these corner points along the two planar coordinate axes. This range is the 2D projection boundary of the base plate in the base plate plane.
[0116] In one embodiment, the minimum and maximum points of the base plate point cloud in each direction in the world coordinate system are found, and the eight corner points of the bounding box are combined based on the coordinate values of the minimum and maximum points. These corner points are transformed from the world coordinate system to the local planar coordinate system, and the minimum and maximum values of each corner point in the U-axis and V-axis directions are calculated to obtain the U-direction range and V-direction range, i.e., the two-dimensional projection boundary. Furthermore, a preset boundary margin can be added to this boundary range to ensure that the subsequently generated base plate range can cover all stiffeners, preventing the stiffeners from exceeding the base plate range.
[0117] Step 3: Construct a rectangle in the local planar coordinate system based on the two-dimensional projection boundary, and convert the vertices of the rectangle back to the world coordinate system to generate a planar patch.
[0118] The two-dimensional projection boundary obtained in step 2 defines the range of the base plate in the U and V directions in the local planar coordinate system. Based on this range, a rectangle can be constructed in the local planar coordinate system, with its four sides parallel to the U and V axes respectively, and its boundary determined by the minimum and maximum values in the U and V directions. After construction, the inverse transformation in the bidirectional transformation relationship established in step 1 is used to transform the four vertices of the rectangle from the local planar coordinate system back to the world coordinate system. In the world coordinate system, these four vertices form a planar polygon, and a corresponding planar patch can be generated based on this polygon.
[0119] Step 4: Stretch the planar patch along the plane normal vector to a preset thickness to form a solid base plate.
[0120] The planar patch generated in step 3 only has two-dimensional geometric information and needs to be given thickness to form a three-dimensional entity. The base plate is usually made of sheet metal with a certain thickness specification. It can be stretched along the normal vector direction of the planar patch, and the stretching distance is the preset thickness value of the base plate. The stretching direction can be selected according to actual needs. If necessary, the direction should be consistent with the Z-axis direction of the world coordinate system to ensure that the spatial posture of the base plate entity meets the expectations. In one embodiment, the planar patch is used as a reference, and it is stretched along the normal direction of the plane (if necessary, this direction should be consistent with the Z-axis direction of the world coordinate system) for a specified thickness value, thereby generating a three-dimensional base plate entity with thickness. Subsequently, by traversing each surface of the base plate entity, the normal vector of each surface at a certain point can be calculated, and the normal vector of each surface can be compared with the normal vector of the base plate plane to identify the upper surface of the base plate entity, providing a reference for the subsequent bonding of the stiffener entity. Furthermore, the preset thickness here can be set according to actual needs, for example, it can be 20mm.
[0121] In one embodiment, the point cloud on the upper surface of the stiffener is projected onto the plane of the base plate using the base plate plane equation to form a projected stiffener point cloud. The projected stiffener point cloud is then clustered and segmented to obtain multiple independent stiffener point cloud clusters, including:
[0122] Step 1: Project the point cloud on the upper surface of the stiffener plate onto the plane of the base plate using the base plate plane equation to form the projected stiffener plate point cloud.
[0123] The point cloud of the stiffener's upper surface is a set of three-dimensional points located above the base plate plane, with each point at a different height from the base plate plane. To facilitate the separation of each stiffener on a unified reference plane, the point cloud of the stiffener's upper surface needs to be projected onto the base plate plane. Knowing the spatial position and normal vector direction of the base plate plane equation, the corresponding points in the stiffener's upper surface point cloud projected onto the base plate plane along the normal vector direction can be calculated. After the projection operation, all stiffener point clouds lie within the same base plate plane, forming the projected stiffener point cloud. This projected stiffener point cloud preserves the two-dimensional distribution information of each stiffener on the base plate plane, providing a unified geometric reference for subsequent clustering and segmentation.
[0124] Step 2: Perform statistical filtering noise reduction and uniform downsampling preprocessing on the point cloud of the projected stiffeners in sequence.
[0125] The projected point cloud of the ribbed slab may contain some noise points after projection. These noise points may originate from scanning errors or outliers introduced during the projection process. Simultaneously, the point cloud density may be uneven, affecting the accuracy of subsequent clustering and segmentation. Therefore, preprocessing of the projected ribbed slab point cloud is necessary before clustering and segmentation. Statistical filtering is a denoising method based on the statistical characteristics of the point cloud's neighborhood. By statistically analyzing the distribution of the point set within the neighborhood of each point, it identifies and removes outliers that deviate from the main distribution, thereby reducing noise interference. Uniform downsampling is a method to reduce point cloud density. Through spatial grid partitioning and other methods, it makes the point cloud density more uniform while preserving the overall shape of the point cloud, reducing the computational load of subsequent processing and improving algorithm stability.
[0126] Step 3: Cluster and segment the preprocessed projected stiffener point cloud to obtain multiple independent stiffener point cloud clusters.
[0127] On the base plate plane, the projected point clouds of different stiffeners are spatially separated. A clustering segmentation algorithm, based on the spatial distance or density distribution between points, automatically divides the preprocessed projected stiffener point clouds into several subsets. Points within each subset are spatially close to each other, belonging to the same stiffener; points in different subsets are spatially far apart. Each subset constitutes an independent stiffener point cloud cluster, corresponding to one stiffener.
[0128] In one embodiment, such as Figure 5 As shown, the stiffener endpoints are extracted from the point cloud clusters of independent stiffeners. Based on the extracted stiffener endpoints, the stiffener centerline is determined, and the weld type is identified. Combining the stiffener centerline, weld type, and the height and thickness of the stiffener from the point cloud of the bottom plate plane and the stiffener surface, the stiffener entity is constructed, including:
[0129] S510: For points downsampled from independent stiffener point cloud clusters, construct vectors based on neighboring points within a local window and calculate the cosine of the included angle of the vectors. Identify candidate endpoints based on the consistency of the positive and negative cosine values, perform radius clustering on each candidate endpoint, and select the geometric center of each cluster as the stiffener endpoint.
[0130] Accurately extracting the endpoints of stiffeners from individual stiffener point cloud clusters is fundamental for determining stiffener orientation and subsequent modeling. To further reduce point cloud density and highlight the skeletal features of the stiffeners, each individual stiffener point cloud cluster can be downsampled. For the downsampled points, neighborhood points are extracted using a local window. By analyzing the cosine of the angle between a point and its neighbors, it can be determined whether the point is at the end of the stiffener. If all cosine values are positive or negative, it indicates that other points in the neighborhood of that point are located approximately on the same side, and this point is a possible endpoint, i.e., a candidate endpoint. To avoid duplicate endpoint identification caused by fluctuations in local point cloud distribution, radius clustering is further applied to the candidate endpoints, grouping spatially close candidate endpoints into clusters. The geometric center of each cluster is taken as the final endpoint of the stiffener, thereby improving the stability and accuracy of endpoint extraction.
[0131] S520: Identify weld type based on stiffener endpoints and determine stiffener centerline.
[0132] The number of endpoints of a stiffener and the distribution characteristics of its point cloud relative to the lines connecting those endpoints can reflect the type of weld corresponding to that stiffener. Weld types can include straight welds and curved welds. When a stiffener has two endpoints, the straight line constructed from those two endpoints reflects the main extension direction of the stiffener. By calculating the perpendicular distance from each point in the stiffener's point cloud cluster to this straight line and calculating the average, it can be determined whether the actual point cloud closely approximates the straight line. If the average distance is less than a preset threshold, it indicates that the stiffener's point cloud is distributed in a straight line, and it is determined to be a straight weld, which can be directly used as the stiffener's centerline. If the average distance is not less than the threshold, it indicates that the stiffener is curved, and it is determined to be a curved weld. When a stiffener has more than two endpoints, it indicates that the stiffener intersects with other stiffeners, and the main straight line segments can be extracted from the point cloud cluster using an iterative fitting method as the stiffener's centerline.
[0133] In one embodiment, the weld type is determined based on the number of final endpoints extracted. If there are two endpoints, a straight line is constructed through these two endpoints, and the perpendicular distance from each point in the stiffener point cloud cluster to the straight line is calculated, with the average of these distances taken. If the average distance is less than a preset threshold, the weld is determined to be a straight weld, and the straight line is used as the stiffener centerline; otherwise, it is determined to be a curved weld, and the straight line is still used as the initial centerline for subsequent processing. If there are multiple endpoints, it indicates that the stiffener has welds with intersection points. In this case, a straight line is fitted to the stiffener point cloud cluster, and points far from the straight line are iteratively removed until the number of remaining points is less than a set threshold. The fitted straight line is the corresponding stiffener centerline, as detailed below. Figure 6 As shown.
[0134] S530: Using the normal direction of the base plate plane as a constraint and fitting a plane based on the center line of the stiffener, calculate the maximum distance between points in the fitted plane and the base plate plane as the stiffener height.
[0135] The height of a stiffener refers to its vertical dimension above the base plate. To calculate this height, the normal vector of the base plate plane can be used as a constraint direction. Combined with the obtained stiffener centerline, an auxiliary plane is constructed. This auxiliary plane passes through the stiffener centerline and satisfies the base plate normal constraint. This auxiliary plane can roughly section the point cloud on the upper surface of the stiffener. Within this auxiliary plane, the point with the smallest vertical coordinate value (or the largest distance to the base plate plane) in the stiffener point cloud cluster is found. The distance from this point to the base plate plane can be taken as the height of the stiffener. This method can automatically adapt to possible local height variations of the stiffener and provide a reliable height value. In one embodiment, a plane is fitted based on the obtained stiffener centerline, using the base plate plane normal as a constraint. The points in the stiffener point cloud cluster within this plane are traversed, and the point with the smallest vertical coordinate value in the world coordinate system is found. The distance from this point to the base plate plane is calculated, and this distance is taken as the height of the stiffener.
[0136] S540: Select multiple sampling points on the center line of the stiffener plate, and use the cross product of the tangent direction of the weld at each sampling point and the normal vector of the base plate to obtain the thickness direction. Perform a neighborhood search on the point cloud on the upper surface of the stiffener plate along the thickness direction, and calculate the maximum distance between the projection point pairs as the local thickness. Take the average value of the local thickness of each sampling point as the stiffener plate thickness.
[0137] The thickness of a stiffener plate refers to the thickness dimension of the plate itself. To accurately measure this thickness, multiple discrete sampling points are selected along the centerline of the stiffener plate to reflect the thickness variation along the weld direction. At each sampling point, the tangent direction of the weld is determined, and this tangent direction is cross-multiplied by the normal direction of the base plate plane. The resulting direction is the thickness direction at that sampling point; this direction is perpendicular to the centerline and parallel to the base plate plane. A neighborhood search is performed on the point cloud on the upper surface of the stiffener plate along this thickness direction, centered on the sampling point. The searched neighborhood points are projected onto the thickness direction, and the maximum distance between the projected points is calculated. This distance is the local thickness at that sampling point location. The average of the local thicknesses at all sampling points yields the overall thickness of the stiffener plate.
[0138] In one embodiment, multiple sampling points are selected along the centerline of the stiffener at preset proportional positions (e.g., 0.1, 0.2, 0.4, 0.6, 0.8, 0.9, etc.). For straight welds, the coordinates of the sampling points are obtained through linear interpolation of the two endpoints; for curved welds, the corresponding points on the centerline are directly selected as sampling points according to the index. At each sampling point, the tangent direction of the weld is calculated (for straight welds, the tangent direction is directly taken as the straight direction vector; for curved welds, the tangent direction is estimated through the neighborhood points of that point), and the tangent direction is cross-multiplied with the normal to the bottom plate plane to obtain the thickness direction at that sampling point. Subsequently, a neighborhood search with a certain radius is performed in the point cloud on the upper surface of the stiffener, centered on the sampling point, and the points in the neighborhood are projected onto the thickness direction to form a one-dimensional projected point cloud; the two farthest points are found in this one-dimensional projected point cloud, and the farthest distance is the local thickness at the sampling point location. The above process is repeated for all sampling locations, and the average of the multiple local thickness values obtained is taken as the final thickness of the stiffener.
[0139] S550: Based on the centerline of the stiffener, the thickness direction is obtained by cross product of the height direction with the reverse bottom plate plane normal and the stiffener centerline direction. The bottom profile of the stiffener is determined by combining the height direction, length direction and thickness direction with the stiffener thickness.
[0140] After obtaining the centerline, height, and thickness of the stiffener, a two-dimensional profile of the bottom surface needs to be constructed to prepare for solid extrusion. The height direction of the stiffener is the opposite of the normal to the bottom plane; this direction will be used for subsequent solid extrusion. The start and end directions (or overall orientation) of the stiffener's centerline are used as the length direction of the stiffener. The thickness direction, perpendicular to both the height and length directions, can be obtained by cross-product operation. These three orthogonal directions constitute the local directional reference describing the geometric orientation of the stiffener. Based on this reference, combined with the calculated stiffener thickness parameters, the positions of each boundary point on the bottom surface of the stiffener can be determined in the world coordinate system, thus forming the bottom surface profile. Furthermore, different methods can be used to determine the bottom surface profile of straight and curved stiffeners.
[0141] S560: Based on the bottom contour, stretch the height of the stiffener plate along the height direction to generate a stiffener plate solid.
[0142] After obtaining the bottom contour, this two-dimensional contour can be extruded along the height direction of the rib, with the extruded distance equal to the calculated rib height, thus generating a three-dimensional solid model of the rib. Specifically, for straight ribs, the extruded object is a planar patch formed by the four corner points of the bottom rectangle; for curved ribs, the extruded object is a plane constructed from a closed contour. The extruded direction is always along the height direction, and if necessary, it can be uniformly ensured to extrude upwards from the bottom plate to obtain the correct three-dimensional shape. The final result for a straight rib is as follows: Figure 7The straight-line 3D stiffener solid shown; for curved stiffeners, the final result is as follows: Figure 8 The shown is a three-dimensional stiffener solid with a curved shape.
[0143] In one embodiment, before determining the bottom profile of the stiffener based on the stiffener centerline, with the reverse bottom plate plane normal as the height direction and the stiffener centerline direction as the length direction, the thickness direction is obtained by cross product. This process further includes:
[0144] Step 1: Determine the intersection relationship of each pair of center lines of the stiffeners, calculate and save candidate intersection points that meet the conditions according to the corresponding strategy based on the weld type.
[0145] In substructure components, multiple stiffeners may intersect, form T-shapes, or Y-shapes. These intersections need to be accurately identified and processed before modeling. Therefore, the centerlines of each stiffener are paired to determine if spatial intersection exists between each pair. When determining intersection, an appropriate calculation strategy is adopted based on the weld type corresponding to each centerline. For example, when both are straight welds, the judgment can be based on the geometric relationship between the lines; when at least one is a curved weld, the judgment can be made by searching for the nearest point. Using this method, all intersection points that meet the intersection conditions are selected and saved as candidate intersection points, providing a data foundation for subsequent topological unification.
[0146] In one embodiment, all stiffener centerlines are traversed and paired, and intersection points are calculated using different strategies based on the weld type corresponding to the centerlines. For combinations of two straight centerlines, the angle between the two lines is first calculated to eliminate near-parallel, non-intersecting cases. For non-parallel cases, the shortest distance between the two line segments is calculated. If this shortest distance is less than a preset threshold, an intersection is considered to exist, and the theoretical intersection point of the two lines is further calculated. For combinations with curved welds (straight line and curve, or curve and curve), the nearest point search method is used to determine whether the two centerlines are sufficiently close within a given threshold range. If so, the intersection point is obtained. All intersection points that meet the above criteria are saved as candidate intersection points.
[0147] Step 2: Perform spatial clustering on each candidate intersection point, merge each cluster into a single intersection point, and update the endpoints of the stiffener centerline based on the intersection point.
[0148] Due to the discreteness of point cloud data and numerical errors in algorithm processing, multiple candidate intersection points that are spatially close but slightly different may be obtained for the same actual intersection location. To unify the intersection locations, spatial clustering is first performed on the candidate intersection points obtained in step 1. Spatial clustering can group candidate intersection points that are spatially close to each other into the same cluster based on a preset distance threshold, with each cluster corresponding to an actual intersection point. Subsequently, each cluster is merged into a single intersection point, the coordinates of which can be obtained by calculating the geometric center of each candidate intersection point within the cluster. After determining each intersection point, to achieve strict geometric alignment of the intersecting welds, the endpoints of each stiffener plate involved in the intersection need to be updated to the intersection point. Specifically, for each intersection point, all associated welds involved in the intersection (i.e., stiffener plates where the centerlines intersect) are traversed, and the spatial distance between the beginning and end endpoints of these welds and the intersection point is checked. If an endpoint is less than a preset distance threshold from the intersection point, the coordinates of that endpoint are forcibly adjusted to the intersection point coordinates, and the endpoint information of the stiffener centerline is updated accordingly. This ensures that all intersecting welds are geometrically aligned to the same intersection point, achieving uniformity in weld topology and correction of endpoint consistency.
[0149] In one embodiment, based on the stiffener centerline, the thickness direction is obtained by cross product of the height direction (using the reverse bottom plate plane normal as the height direction and the stiffener centerline direction as the length direction), and the bottom surface profile of the stiffener is determined by combining the height direction, length direction, and thickness direction with the stiffener thickness.
[0150] Step 1: For the straight stiffener, take the reverse normal of the bottom plate plane as the height direction. Construct the length direction based on the start and end points of the center line of the straight stiffener. Obtain the thickness direction by cross product of the normal of the bottom plate plane and the length direction. Project the start and end points of the center line of the straight stiffener orthogonally onto the bottom plate plane. Take the midpoint of the projection point as the center of the bottom surface. Determine the stiffener length based on the distance between the projected start and end points. Calculate the dimensions of the bottom rectangle based on the stiffener thickness. Based on the length direction, thickness direction, and dimensions of the bottom rectangle, construct the corner points of the bottom rectangle in the world coordinate system to form the bottom outline.
[0151] For stiffeners with straight weld seams, their bottom profile is a regular rectangle. To determine the position and orientation of this rectangle in the world coordinate system, three orthogonal directional references need to be established. The direction opposite to the normal to the bottom plate plane is taken as the height direction of the stiffener, which determines the orientation of subsequent solid stretching. Based on the start and end points of the centerline of the straight stiffener, a direction vector pointing from the start to the end point can be constructed as the length direction of the stiffener, which reflects the extension direction of the stiffener on the bottom plate. The cross product of the height direction and the length direction yields the thickness direction, which is orthogonal to both. To determine the specific position and dimensions of the bottom rectangle on the bottom plate plane, the start and end points of the centerline of the straight stiffener are orthogonally projected onto the bottom plate plane along the height direction. The midpoint between the two projection points is the geometric center of the bottom rectangle. The distance between the two projection points is the length of the stiffener. Based on this length value and the previously calculated stiffener thickness value, the length and width dimensions of the bottom rectangle can be determined. In the world coordinate system, by taking the center of the bottom surface as the reference and expanding the corresponding dimensions along the length and thickness directions, the four corner points of the bottom rectangle can be constructed. The rectangular area enclosed by these corner points is the bottom outline of the straight stiffener.
[0152] In one embodiment, for the centerline of the straight stiffener, the reverse normal to the bottom plate plane is used as the height direction of the stiffener. A direction vector is constructed based on the start and end points of the centerline of the straight stiffener as the length direction of the stiffener. By performing a cross product between the normal and the length direction, a thickness direction orthogonal to both is constructed. The start and end points of the centerline of the straight stiffener are orthogonally projected onto the bottom plate plane. The midpoint of the two projected points is used as the center of the bottom surface. The length of the stiffener is determined based on the distance between the projected start and end points, and the dimensions of the bottom rectangle are calculated based on the previously calculated thickness. Based on the length and thickness directions, the four corner points of the bottom rectangle are constructed in the world coordinate system, and a planar patch is generated accordingly to form the bottom contour.
[0153] Step 2: For the curved stiffener, traverse all points in the point cloud on the upper surface of the stiffener corresponding to the curved stiffener; calculate the local tangent direction through the current point and its adjacent points, and perform a cross product with the normal of the bottom plate plane to obtain the lateral thickness direction; at each point, offset the stiffener thickness by 1 / 2 on both sides along the lateral thickness direction to construct two boundary point sequences on the left and right; reproject the points in the two boundary point sequences on the left and right back to the bottom plate plane; fit B-spline curves based on the projected left and right boundary points, and connect the boundaries with the first and last straight line segments to form the bottom surface profile.
[0154] For stiffeners with curved welds, their bottom profile is a curved strip. Due to the curvature variation in the extension direction, the bottom profile cannot be directly described by a rectangle; a boundary needs to be constructed point-by-point along the weld direction. First, the distribution of points in the point cloud on the upper surface of the corresponding curved stiffener is determined. For each point in the point cloud, the local tangent direction at that location is calculated using the current point and its adjacent points. This tangent direction reflects the extension direction of the stiffener at that point. The cross product of this local tangent direction and the normal to the bottom plate plane is taken; the resulting direction is the lateral thickness direction at that point, which is perpendicular to the extension direction of the stiffener and parallel to the bottom plate plane. At each point, the stiffener thickness is offset by 1 / 2 on both the positive and negative sides along the lateral thickness direction, generating a boundary point on each side. After traversing all points, two boundary point sequences are obtained. To ensure geometric consistency, all points in these two boundary point sequences are reprojected back onto the bottom plate plane. Subsequently, B-spline curve fitting is performed on the projected left and right sets of boundary points to obtain two smooth boundary curves. Finally, the beginning and end of the two boundary curves on the left and right sides are connected by straight line segments to form a closed strip-shaped profile, which is the bottom profile of the curved stiffener.
[0155] In one embodiment, for the centerline of the curved stiffener, each point in the point cloud corresponding to the curved stiffener is traversed. The local tangent direction is calculated through adjacent points, and the cross product with the normal to the base plate plane is used to obtain the lateral thickness direction. At each sampling point, half the stiffener thickness is offset on both sides along the lateral thickness direction to construct two boundary point sequences, left and right. At the same time, these points are reprojected back onto the base plate plane to ensure geometric consistency. B-spline curves are fitted based on the left and right sets of points, and the left and right boundaries are connected by the first and last straight line segments to form a closed contour, which serves as the bottom contour.
[0156] In one embodiment, the stiffening plate entity and the base plate entity are fitted and fused together to obtain a small assembled workpiece model, including:
[0157] Step 1: Obtain the preset displacement vector along the normal of the base plate plane, and apply a translation transformation to the stiffener plate entity based on the preset displacement vector so that the stiffener plate entity fits into the upper surface of the base plate entity.
[0158] The rib plate and the base plate are constructed independently. Since the point cloud data used in the modeling process originates from the upper surface of the rib plate, there may be minute gaps between the bottom surface of the generated rib plate and the upper surface of the base plate, or positional deviations introduced by numerical calculations. To ensure a geometrically tight contact between the rib plate and the base plate, a uniform fitting process is required for each rib plate entity. Specifically, a preset displacement vector is obtained along the normal direction of the base plate plane. The direction and magnitude of this displacement vector can be determined based on the normal direction of the base plate plane and a preset minute distance (e.g., 2mm). A translation transformation is constructed based on this displacement vector and applied to all rib plate entities. After translation, each rib plate entity moves as a whole towards the base plate, ensuring a tight fit between its bottom surface and the upper surface of the base plate, eliminating any gaps between them.
[0159] Step 2: Using the base plate solid as the initial accumulator, iterate through each translated rib plate solid in turn, perform a Boolean difference operation on the current rib plate solid and the accumulator, and remove the overlapping parts of the rib plate solid and the accumulator; if the Boolean difference operation is successful, replace the original rib plate solid with the trimmed geometry and add it to the geometry set, perform a Boolean union operation on the trimmed geometry and the accumulator, and update the accumulator; if the Boolean difference or Boolean union operation fails, revert to using the original rib plate solid before trimming or keep the original accumulator unchanged.
[0160] Multiple stiffeners may spatially intersect on the base plate, and the stiffener entities may geometrically overlap or intersect at the intersections. To avoid geometric conflicts in the final workpiece model, each stiffener entity needs to be processed iteratively, gradually merging them into a unified accumulator. First, the base plate entity is used as the initial accumulator. Then, each translated stiffener entity is traversed sequentially according to a preset order. For the currently processed stiffener entity, a Boolean difference operation is performed between it and the current accumulator. The Boolean difference operation subtracts the overlapping portion of the current stiffener entity from the accumulator, thus eliminating geometric insertion areas caused by stiffener intersections. After a successful Boolean difference operation, a trimmed stiffener entity is obtained. The trimmed geometry replaces the original stiffener entity and is added to the geometry set. Subsequently, a Boolean union operation is performed between the trimmed geometry and the current accumulator. The Boolean union operation merges the two into a single entity, and the updated result serves as the new accumulator for subsequent stiffener entity processing. If an exception or failure occurs during Boolean difference or Boolean union operations, a rollback strategy is adopted: if the Boolean difference operation fails, the original stiffener solid before trimming is retained; if the Boolean union operation fails, the original accumulator remains unchanged. This fault-tolerance mechanism ensures the robustness of the overall modeling process.
[0161] Step 3: When all stiffener entities have been processed, the final updated accumulator is used as the small-scale workpiece model.
[0162] After all the translated rib plates have undergone trimming and fusion processing according to the iterative process in step 2, the accumulator has sequentially merged the base plate entity and all trimmed rib plate entities, forming a complete geometry. There is no geometric overlap or insertion between the rib plates in this final accumulator, and each rib plate is tightly fitted to the base plate. This final accumulator is output as a small modular workpiece model, resulting in a 3D solid model where the base plate and all rib plates are completely fused. The final small modular workpiece model is shown below. Figure 9 As shown.
[0163] In at least one of the above embodiments, the workpiece modeling method based on point cloud data in this application can achieve high-precision reconstruction of base plate and multi-stiffening plate structures in complex assembly scenarios. By introducing plane fitting based on normal constraints, robust endpoint detection, and weld type identification methods, unified processing of straight and curved welds is achieved; by combining multi-point sampling with local projection, the thickness and height parameters of the stiffening plates are accurately estimated, improving the engineering accuracy of the model; at the same time, by intersection detection and clustering, automatic alignment of the topological relationships of multiple welds is achieved, ensuring structural continuity; in the modeling stage, parametric entity construction is achieved by combining Open CASCADE, and geometric overlap and interpenetration problems are avoided by Cut and Fuse operations, thereby generating a topologically consistent complete workpiece model that can be directly used for welding planning, significantly improving the degree of automation and engineering practicality.
[0164] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0165] Based on the same inventive concept, this application also provides a workpiece modeling apparatus based on point cloud data for implementing the workpiece modeling method based on point cloud data described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method. Therefore, the specific limitations in one or more workpiece modeling apparatus embodiments based on point cloud data provided below can be found in the limitations of the workpiece modeling method based on point cloud data described above, and will not be repeated here.
[0166] In one embodiment, such as Figure 10As shown, a workpiece modeling device based on point cloud data is provided, comprising:
[0167] The point cloud acquisition module 100 is used to acquire the workpiece point cloud of the small-scale stand-up structural component, which includes a planar base plate and reinforcing ribs.
[0168] The point cloud segmentation module 200 is used to fit the base plate plane based on the workpiece point cloud, and to segment the workpiece point cloud into the base plate point cloud and the remaining point cloud according to the base plate plane, and to extract the upper surface point cloud of the rib plate from the remaining point cloud.
[0169] The base plate solid construction module 300 is used to construct a local planar coordinate system based on the base plate plane equation to determine the two-dimensional projection boundary of the base plate, and to construct a rectangular plane based on the two-dimensional projection boundary of the base plate and to stretch the rectangular plane into a base plate solid with thickness.
[0170] The clustering and segmentation module 400 is used to project the point cloud of the upper surface of the stiffener onto the plane of the base plate using the plane equation of the base plate to form a projected stiffener point cloud, and to perform clustering and segmentation on the projected stiffener point cloud to obtain multiple independent stiffener point cloud clusters.
[0171] The stiffener plate entity construction module 500 is used to extract stiffener plate endpoints from independent stiffener plate point cloud clusters, determine the stiffener plate centerline based on the extracted stiffener plate endpoints, and determine the weld type. Combining the stiffener plate centerline, weld type, and the height and thickness of the stiffener plate by cloud computing the bottom plate plane and the stiffener plate surface points, the stiffener plate entity is constructed.
[0172] The bonding and fusion module 600 is used to bond and fuse the rib plate entity and the base plate entity to obtain a small-scale workpiece model.
[0173] In one embodiment, the point cloud segmentation module 200 is further configured to fit the base plate plane based on the workpiece point cloud, and segment the workpiece point cloud into the base plate point cloud and the remaining point cloud according to the base plate plane; and perform pass-through filtering on the remaining point cloud with the minimum value of the base plate point cloud in the Z-axis direction of the world coordinate system as the upper bound of the pass-through filtering to extract the point cloud on the upper surface of the stiffener.
[0174] In one embodiment, the base plate entity construction module 300 is further configured to construct a local planar coordinate system based on the base plate plane equation, establish a two-way transformation relationship between the world coordinate system and the local planar coordinate system; construct bounding box corner points based on the extreme points of the base plate point cloud, and transform them to the local planar coordinate system based on the two-way transformation relationship, and statistically obtain the two-dimensional projection boundary; construct a rectangle in the local planar coordinate system according to the two-dimensional projection boundary, transform the vertices of the rectangle back to the world coordinate system to generate a planar patch; stretch the planar patch along the plane normal vector to a preset thickness to form a base plate entity.
[0175] In one embodiment, the clustering and segmentation module 400 is further configured to project the point cloud on the upper surface of the stiffener onto the plane of the base plate using the base plate plane equation to form a projected stiffener point cloud; perform statistical filtering noise reduction and uniform downsampling preprocessing on the projected stiffener point cloud in sequence; and perform clustering and segmentation on the preprocessed projected stiffener point cloud to obtain multiple independent stiffener point cloud clusters.
[0176] In one embodiment, the stiffener entity construction module 500 is further configured to: construct vectors based on neighborhood points within a local window for points downsampled from independent stiffener point cloud clusters; calculate the cosine value of the included angle of the vectors; identify candidate endpoints based on the consistency of the positive and negative cosine values; perform radius clustering on each candidate endpoint; select the geometric center of each cluster as the stiffener endpoint; identify the weld type based on the stiffener endpoints; determine the stiffener centerline; fit a plane with the base plate plane normal as a constraint and based on the stiffener centerline; calculate the maximum distance between points in the fitted plane and the base plate plane as the stiffener height; and select multiple sampling points on the stiffener centerline. The thickness direction is obtained by cross-product of the tangent direction of the weld at each sampling point and the normal vector of the base plate. A neighborhood search is performed on the point cloud of the upper surface of the stiffener along the thickness direction, and the maximum distance between the projected point pairs is calculated as the local thickness. The average local thickness of each sampling point is taken as the stiffener thickness. Based on the center line of the stiffener, the thickness direction is obtained by cross-product of the reverse normal vector of the base plate plane as the height direction and the direction of the stiffener center line as the length direction. The bottom contour of the stiffener is determined based on the height direction, length direction, and thickness direction combined with the stiffener thickness. The stiffener height is stretched along the height direction using the bottom contour as a reference to generate the stiffener solid.
[0177] In one embodiment, the stiffener entity construction module 500 is further configured to, if the number of stiffener endpoints is two, construct a straight line through the two stiffener endpoints as the stiffener centerline, calculate the vertical distance from each point in the independent stiffener point cloud cluster to the constructed straight line, and calculate the average vertical distance; if the average distance is less than a preset threshold, it is determined to be a straight weld; if the average distance is not less than the preset threshold, it is determined to be a curved weld; if the number of stiffener endpoints is greater than two, iteratively fit a straight line to the independent stiffener point cloud cluster to obtain the corresponding stiffener centerline.
[0178] In one embodiment, the stiffener entity construction module 500 is further used to determine the intersection relationship of each stiffener centerline pairwise, calculate and save candidate intersection points that meet the conditions according to the weld type using the corresponding strategy; perform spatial clustering on each candidate intersection point, merge each cluster after spatial clustering into a single intersection point, and update the endpoints of the stiffener centerlines based on the intersection points.
[0179] In one embodiment, the stiffener entity construction module 500 is further configured to, for a straight stiffener, use the reverse bottom plate plane normal as the height direction, construct the length direction based on the start and end points of the straight stiffener centerline, obtain the thickness direction by cross product of the bottom plate plane normal and the length direction, orthogonally project the start and end points of the straight stiffener centerline onto the bottom plate plane, using the midpoint of the projection point as the bottom center, determine the stiffener length based on the distance between the projected start and end points, and calculate the bottom rectangle size based on the stiffener thickness; based on the length direction, thickness direction, and bottom rectangle size, in world coordinates... The corner points of the bottom rectangle are constructed to form the bottom profile. For the curved stiffener, each point in the point cloud of the upper surface of the corresponding stiffener is traversed. The local tangent direction is calculated through the current point and its adjacent points, and the cross product with the normal of the bottom plate plane is used to obtain the lateral thickness direction. At each point, the stiffener thickness is offset by 1 / 2 on both sides along the lateral thickness direction to construct two boundary point sequences on the left and right. The points in the two boundary point sequences on the left and right are reprojected back onto the bottom plate plane. Based on the projected left and right boundary points, B-spline curves are fitted respectively, and the boundaries are connected by the first and last straight line segments to form the bottom profile.
[0180] In one embodiment, the rib plate entity construction module 500 is further configured to, for a straight rib plate, use the planar surface formed by the four corner points of the bottom rectangle as a reference, stretch the height of the rib plate along the height direction to generate a straight three-dimensional rib plate entity; for a curved rib plate, construct a target surface based on the bottom contour, stretch the height of the rib plate along the normal direction of the target surface and toward the side opposite to the normal direction of the bottom plate plane to generate a curved three-dimensional rib plate entity.
[0181] In one embodiment, the bonding and fusion module 600 is further configured to obtain a preset displacement vector along the normal direction of the base plate plane, apply a translation transformation to the rib plate entity based on the preset displacement vector so that the rib plate entity is bonded to the upper surface of the base plate entity; using the base plate entity as the initial accumulator, it iterates through each translated rib plate entity in sequence, performs a Boolean difference operation on the current rib plate entity and the accumulator, and removes the overlapping part of the rib plate entity and the accumulator; if the Boolean difference operation is successful, the original rib plate entity is replaced with the trimmed geometry and added to the geometry set, and a Boolean union operation is performed on the trimmed geometry and the accumulator to update the accumulator; if the Boolean difference or Boolean union operation fails, it reverts to using the original rib plate entity before trimming or keeps the original accumulator unchanged; when all rib plate entities have been processed, the finally updated accumulator is used as the small-scale assembled workpiece model.
[0182] Each module in the aforementioned workpiece modeling device based on point cloud data can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0183] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 11 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores preset data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a workpiece modeling method based on point cloud data.
[0184] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0185] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described workpiece modeling method based on point cloud data.
[0186] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described workpiece modeling method based on point cloud data.
[0187] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described workpiece modeling method based on point cloud data.
[0188] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0189] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0190] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A workpiece modeling method based on point cloud data, characterized in that, The method includes: Obtain the workpiece point cloud of a small-scale stand-up structure, wherein the small-scale stand-up structure includes a planar base plate and reinforcing ribs; The workpiece point cloud is fitted to the base plate plane, and the workpiece point cloud is divided into the base plate point cloud and the remaining point cloud according to the base plate plane. The point cloud of the upper surface of the rib plate is extracted from the remaining point cloud. Based on the plane equation of the base plate, a local plane coordinate system is constructed to determine the two-dimensional projection boundary of the base plate. Based on the two-dimensional projection boundary of the base plate, a rectangular plane is constructed and the rectangular plane is stretched into a base plate solid with thickness. The point cloud on the upper surface of the stiffener plate is projected onto the plane of the base plate using the plane equation of the base plate to form a projected stiffener plate point cloud. The projected stiffener plate point cloud is then clustered and segmented to obtain multiple independent stiffener plate point cloud clusters. Extract the rib endpoints from the independent rib point cloud clusters, determine the rib centerline based on the extracted rib endpoints, and determine the weld type. Combine the rib centerline, the weld type, and the height and thickness of the rib by clouding the point cloud of the bottom plate plane and the upper surface of the rib to construct the rib entity. The stiffening plate entity and the base plate entity are bonded and fused together to obtain a small-scale workpiece model.
2. The method according to claim 1, characterized in that, The step of fitting the base plate plane based on the workpiece point cloud, and segmenting the workpiece point cloud into a base plate point cloud and a remaining point cloud according to the base plate plane, and extracting the upper surface point cloud of the rib plate from the remaining point cloud includes: The workpiece point cloud is fitted to the base plate plane, and the workpiece point cloud is divided into the base plate point cloud and the remaining point cloud according to the base plate plane. Using the minimum value of the base plate point cloud in the Z-axis direction of the world coordinate system as the upper limit of the pass-through filter, the remaining point cloud is subjected to pass-through filtering to extract the point cloud on the upper surface of the rib plate.
3. The method according to claim 1, characterized in that, The step of constructing a local planar coordinate system based on the base plate plane equation to determine the two-dimensional projection boundary of the base plate, and constructing a rectangular plane based on the two-dimensional projection boundary of the base plate, and stretching the rectangular plane into a base plate solid with thickness includes: A local planar coordinate system is constructed based on the equation of the base plate plane, and a two-way transformation relationship between the world coordinate system and the local planar coordinate system is established. Based on the extreme points of the base point cloud, the corner points of the bounding box are constructed, and the coordinates are transformed to the local plane coordinate system based on the bidirectional transformation relationship, and the two-dimensional projection boundary is statistically obtained. A rectangle is constructed in the local planar coordinate system based on the two-dimensional projection boundary, and the vertices of the rectangle are transformed back to the world coordinate system to generate a planar patch; The planar sheet is stretched to a predetermined thickness along the plane normal vector to form a base plate solid.
4. The method according to claim 1, characterized in that, The point cloud on the upper surface of the stiffener is projected onto the plane of the base plate using the plane equation of the base plate to form a projected stiffener point cloud. The projected stiffener point cloud is then clustered and segmented to obtain multiple independent stiffener point cloud clusters, including: The point cloud on the upper surface of the stiffener is projected onto the plane of the base plate using the plane equation of the base plate, forming the projected point cloud of the stiffener; The point cloud of the projected stiffener is subjected to statistical filtering noise reduction and uniform downsampling preprocessing in sequence; The preprocessed projected stiffener point cloud is clustered and segmented to obtain multiple independent stiffener point cloud clusters.
5. The method according to claim 1, characterized in that, The step of extracting stiffener endpoints from the independent stiffener point cloud cluster, determining the stiffener centerline based on the extracted stiffener endpoints, and judging the weld type, and constructing the stiffener entity by combining the stiffener centerline, the weld type, and the height and thickness of the stiffener based on the point cloud of the bottom plate plane and the stiffener upper surface, includes: After downsampling the points of the independent stiffener point cloud cluster, a vector is constructed based on the neighborhood points within the local window and the cosine value of the included angle of the vector is calculated. Candidate endpoints are identified based on the consistency of the positive and negative cosine values. Radius clustering is performed on each candidate endpoint, and the geometric center of each cluster is selected as the stiffener endpoint. The weld type is identified based on the endpoints of the stiffener, and the centerline of the stiffener is determined. Using the normal direction of the base plate plane as a constraint and fitting a plane based on the center line of the stiffener, the maximum distance from a point in the fitted plane to the base plate plane is calculated as the stiffener height. Multiple sampling points are selected on the center line of the stiffener plate. The thickness direction is obtained by cross product of the tangent direction of the weld at each sampling point and the normal vector of the base plate. A neighborhood search is performed on the point cloud on the upper surface of the stiffener plate along the thickness direction, and the maximum distance between the projected point pairs is calculated as the local thickness. The average value of the local thickness of each sampling point is taken as the stiffener plate thickness. Based on the centerline of the stiffener, the thickness direction is obtained by cross product of the reverse bottom plate plane normal as the height direction and the stiffener centerline direction as the length direction. Based on the height direction, length direction and thickness direction combined with the stiffener thickness, the bottom surface profile of the stiffener is determined. Using the bottom contour as a reference, the height of the rib plate is stretched along the height direction to generate a rib plate solid.
6. The method according to claim 5, characterized in that, The step of identifying the weld type based on the stiffener endpoints and determining the stiffener centerline includes: If there are two rib plate endpoints, a straight line is constructed using the two rib plate endpoints as the rib plate centerline. The vertical distance from each point in the independent rib plate point cloud cluster to the constructed straight line is calculated, and the average distance of the vertical distance is obtained. If the average distance is less than a preset threshold, it is determined to be a straight weld. If the average distance is not less than the preset threshold, it is determined to be a curved weld. If the number of the rib endpoints is greater than two, then the independent rib point cloud cluster is iteratively fitted with a straight line to obtain the corresponding rib centerline.
7. The method according to claim 6, characterized in that, Before determining the bottom profile of the stiffener based on the stiffener centerline, using the reverse bottom plate plane normal as the height direction and the stiffener centerline direction as the length direction, and obtaining the thickness direction through cross product, and combining the height direction, length direction, and thickness direction with the stiffener thickness, the process further includes: The intersection relationship of each of the center lines of the stiffeners is determined pairwise, and candidate intersection points that meet the conditions are calculated and saved according to the weld type using the corresponding strategy. Spatial clustering is performed on each of the candidate intersection points, and each cluster is merged into a single intersection point. The endpoints of the stiffener centerline are updated based on the intersection points.
8. The method according to claim 6, characterized in that, The step of determining the bottom profile of the stiffener plate based on the centerline of the stiffener plate, using the reverse bottom plate plane normal as the height direction and the stiffener plate centerline direction as the length direction, by cross product, and then combining the height direction, length direction, and thickness direction with the stiffener plate thickness includes: For straight stiffeners, the reverse normal of the base plate plane is taken as the height direction. The length direction is constructed based on the start and end points of the centerline of the straight stiffener. The thickness direction is obtained by cross-product of the normal of the base plate plane and the length direction. The start and end points of the centerline of the straight stiffener are orthogonally projected onto the base plate plane. The midpoint of the projection point is taken as the center of the bottom surface. The length of the stiffener is determined based on the distance between the projected start and end points. The size of the bottom rectangle is calculated based on the thickness of the stiffener. Based on the length direction, the thickness direction, and the size of the bottom rectangle, the corner points of the bottom rectangle are constructed in the world coordinate system to form the bottom outline. For the curved stiffener, traverse all points in the point cloud on the upper surface of the stiffener corresponding to the curved stiffener; calculate the local tangent direction through the current point and its adjacent points, and perform a cross product with the normal of the bottom plate plane to obtain the lateral thickness direction; at each point, offset by 1 / 2 of the stiffener thickness on both sides along the lateral thickness direction to construct two boundary point sequences on the left and right; reproject the points in the two boundary point sequences on the left and right back to the bottom plate plane; fit B-spline curves based on the projected left and right boundary points, and connect the boundaries with the first and last straight line segments to form the bottom surface profile.
9. The method according to claim 8, characterized in that, The step of stretching the rib plate height along the height direction based on the bottom contour to generate the rib plate solid includes: For a straight stiffener, using the planar patch formed by the four corner points of the bottom rectangle as a reference, the stiffener is stretched along the height direction to generate a straight three-dimensional stiffener solid. For a curved stiffener, a target surface is constructed based on the bottom contour. The stiffener height is stretched along the normal direction of the target surface and toward the side opposite to the normal direction of the bottom plate plane to generate a curved three-dimensional stiffener solid.
10. The method according to claim 1, characterized in that, The process of bonding and fusing the stiffening plate entity with the base plate entity to obtain a small assembled workpiece model includes: Obtain a preset displacement vector along the normal direction of the base plate plane, and apply a translation transformation to the stiffener entity based on the preset displacement vector so that the stiffener entity fits against the upper surface of the base plate entity; Using the base plate entity as the initial accumulator, each translated rib plate entity is traversed sequentially. A Boolean difference operation is performed between the current rib plate entity and the accumulator to remove the overlapping parts of the rib plate entity and the accumulator. If the Boolean difference operation is successful, the original rib plate entity is replaced with the trimmed geometry and added to the geometry set. A Boolean union operation is performed between the trimmed geometry and the accumulator to update the accumulator. If the Boolean difference or Boolean union operation fails, the original rib plate entity before trimming is used or the original accumulator remains unchanged. Once all stiffener entities have been processed, the final updated accumulator will be used as the small-scale assembled workpiece model.
11. A workpiece modeling device based on point cloud data, characterized in that, The device includes: The point cloud acquisition module is used to acquire the workpiece point cloud of the small-scale stand-up structure, which includes a planar base plate and reinforcing ribs. The point cloud segmentation module is used to fit the base plate plane based on the workpiece point cloud, and to segment the workpiece point cloud into the base plate point cloud and the remaining point cloud according to the base plate plane, and to extract the upper surface point cloud of the rib plate from the remaining point cloud. The base plate solid construction module is used to construct a local planar coordinate system based on the base plate plane equation to determine the two-dimensional projection boundary of the base plate, and to construct a rectangular plane based on the two-dimensional projection boundary of the base plate and to stretch the rectangular plane into a base plate solid with thickness. The clustering and segmentation module is used to project the point cloud of the upper surface of the stiffener onto the plane of the base plate using the plane equation of the base plate to form a projected stiffener point cloud, and to perform clustering and segmentation on the projected stiffener point cloud to obtain multiple independent stiffener point cloud clusters. The stiffener plate entity construction module is used to extract stiffener plate endpoints from the independent stiffener plate point cloud clusters, determine the stiffener plate centerline based on the extracted stiffener plate endpoints, and determine the weld type. Combining the stiffener plate centerline, the weld type, and the height and thickness of the stiffener plate by the point cloud of the bottom plate plane and the stiffener plate surface, the stiffener plate entity is constructed. The bonding and fusion module is used to bond and fuse the stiffener plate entity with the base plate entity to obtain a small-scale workpiece model.