Ship workpiece point cloud reverse modeling method based on OpenCasCide
By using OpenCasCade's point cloud reverse modeling method and combining it with the characteristics of ship workpieces, a unique bottom plane, gap splicing, and topological stitching are constructed. This solves the problems of non-coplanar contour points, inclined plane deviation, and scattered data management in ship modeling, achieving high-precision and high-efficiency modeling results.
Patent Information
- Application Number
- CN202511412764.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2025-12-23
AI Technical Summary
Existing technologies are insufficient to meet the high-precision modeling needs of the shipbuilding industry, especially in addressing issues such as non-coplanar contour points, inclined plane deviation, low efficiency of topology repair, and scattered point cloud data management. They have failed to effectively solve the complex structural characteristics of shipworks.
A point cloud reverse modeling method based on OpenCasCade is adopted. By constructing a unique bottom plane, splicing gaps, fitting the minimum bounding contour, and using the OpenCasCade topology stitching tool, the point cloud processing process is optimized. Combined with the characteristics of ship workpieces, high-precision and high-efficiency modeling is achieved.
It significantly improves modeling accuracy and efficiency, corrects the problem of non-coplanar contour points, adapts to the complex structure of ship workpieces, forms a complete data flow closed loop, and improves the fit and stability of modeling results.
Smart Images

Figure CN121190676A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computer graphics and reverse engineering technology, and particularly relates to a ship workpiece point cloud reverse modeling method based on OpenCasCade. BACKGROUND
[0002] In the field of ship manufacturing and maintenance, reverse modeling technology is a key means to obtain a three-dimensional geometric model of a ship workpiece. Especially for old ships or customized workpieces without original design drawings, the actual shape of the workpiece needs to be restored through reverse modeling. At present, there are related reverse modeling technologies in the industry, for example, a Chinese invention patent with publication number CN111947595A discloses a ship plate reverse modeling implementation method based on three-dimensional laser scanning. The core process of this technical solution is as follows: through three-dimensional laser scanning, ship plate point cloud data is collected, the data is subjected to noise elimination and coordinate conversion, splicing error control is performed, after the point cloud data is segmented, surface reverse, curve and surface fitting are performed on the segmented point cloud, and finally a ship plate model is constructed.
[0003] However, the existing technology has obvious defects and cannot meet the high-precision modeling needs of the ship industry: 1. The characteristics of ship workpieces are not combined: the existing technology uses a general segmented surface reconstruction process and relies on traditional geometric processing methods, without considering the unique structural characteristics of ship workpieces (such as the fact that the outer plate is mostly a complex curved surface and has a large number of inclined surface connection structures), resulting in low fit degree between the modeling result and the actual shape of the workpiece; 2. The problem of contour point plane consistency has not been solved: after the point cloud is segmented, the contour points of each sub-region are often not coplanar, and the existing technology does not correct this problem, directly fitting the surface will cause modeling deviation and reduce the surface precision; 3. The industry common problems have not been broken through: the current ship industry reverse modeling generally faces the problems of low topological repair efficiency (a large amount of manual repair of topological defects is needed after splicing), insufficient surface precision (especially for inclined surface structures), and scattered point cloud data management (poor data connection between preprocessing and modeling stages), etc. The existing technology cannot effectively solve these problems and cannot meet the needs of actual production for high-precision and high-efficiency modeling.
[0004] Therefore, it is a technical problem to be solved in the field of reverse engineering in the ship industry to develop a reverse modeling method that combines the characteristics of ship workpieces, is based on a mature geometric kernel, and takes into account high precision and high efficiency. SUMMARY
[0005] The present application aims to overcome the deficiencies of the prior art, and provides an OpenCasCade-based ship workpiece point cloud reverse modeling method, which optimizes the point cloud processing flow, combines the high-precision geometric kernel of OpenCasCade and the structural characteristics of ship workpieces, realizes high-precision and high-efficiency reverse modeling of ship workpieces, solves the problems of non-coplanar contours, bevel deviation, and gap defects in the prior art, and meets the modeling needs in complex scenarios in the shipbuilding industry.
[0006] The above object is achieved by the following technical scheme: An OpenCasCade-based ship workpiece point cloud reverse modeling method, comprising the following steps: Step (1) Point cloud data acquisition: acquiring point cloud data of a ship workpiece by laser 3D scanning technology; Step (2) Point cloud preprocessing: performing data reduction and noise removal processing on the collected point cloud data by uniform sampling and radius filtering; Step (3) Point cloud classification: performing slice processing on the point cloud data to divide it into bottom surface point cloud and non-bottom surface point cloud, and then extracting the contour data of the two types of point cloud by region growing segmentation algorithm, wherein the contour data includes vertex information and normal vector of each region; Step (4) Constructing a unique bottom plane: based on the contour data of the bottom surface point cloud extracted in step (3), a unique reference bottom plane is formed by fitting calculation; Step (5) Region splicing: projecting the top surface region corresponding to the non-bottom surface point cloud and the bottom surface region corresponding to the bottom surface point cloud extracted in step (3) onto the unique reference bottom plane constructed in step (4), respectively, and performing gap splicing on the projected top surface region and fitting to form the minimum circumscribed contour on the projected bottom surface region; Step (6) Constructing a ship workpiece model: stretching the spliced top surface region along the normal direction of the unique reference bottom plane, cutting the entity formed by stretching using the original unprojected top surface region, and then splicing the cut top surface entity and the bottom surface region to obtain a complete ship workpiece model.
[0007] As an optimization of the OpenCasCade-based ship workpiece point cloud reverse modeling method described in the present application, the purpose of the uniform sampling in step (2) is to reduce the point cloud data density while maintaining the overall spatial distribution characteristics of the point cloud; the purpose of the radius filtering is to remove isolated noise points in the point cloud and reduce the influence of invalid data on the subsequent modeling accuracy.
[0008] As the optimization of the ship workpiece point cloud reverse modeling method based on OpenCasCade, the direction of the slice processing in step (3) is consistent with the height direction of the ship workpiece, and the regional growth segmentation algorithm realizes the sub-regional division of the bottom surface point cloud and the non-bottom surface point cloud by judging the normal vector similarity and the spatial neighborhood relationship of the point cloud.
[0009] As the optimization of the ship workpiece point cloud reverse modeling method based on OpenCasCade, the specific process of constructing the unique bottom plane in step (4) includes: Step (401) calculates the area of each segmented region of the bottom surface point cloud, and selects the bottom surface region with the largest area; Step (402) calculates the centroid of the area maximum region, and calculates the average value of the normal vectors of all bottom surface regions to obtain the average normal vector; Step (403) constructs the unique reference bottom plane based on the centroid and the average normal vector.
[0010] As the optimization of the ship workpiece point cloud reverse modeling method based on OpenCasCade, the calculation method of the area of the bottom surface region in step (401) is to connect the contour vertices of each bottom surface region in order to form a polygon, and calculate the area of the region based on the geometric shape of the polygon.
[0011] As the optimization of the ship workpiece point cloud reverse modeling method based on OpenCasCade, the process of gap splicing of the projected top surface region in step (5) includes: Step (501) constructs a bounding box for each projected top surface sub-region, and judges and excludes intersecting top surface sub-regions through the positional relationship of the bounding box; Step (502) queries whether there is an edge between two regions that meets the splicing requirements in terms of distance for the non-intersecting top surface sub-regions; Step (503) for two regions with edges that meet the requirements, by extending the edge line segment of one region, calculating the intersection point with the edge of the other region, supplementing the contour vertices and refitting the region contour, the gap splicing is realized.
[0012] As the optimization of the ship workpiece point cloud reverse modeling method based on OpenCasCade, the fitting process of the minimum circumscribed contour of the bottom surface region in step (5) is to combine the projected bottom surface region contour and the projected top surface region contour, and based on the combined contour point set, a minimum circumscribed contour that can completely contain all the contours is fitted.
[0013] As an optimization of the reverse modeling method for point cloud of ship workpiece based on OpenCasCade described in this scheme, the stretching length of the top surface region in step (6) needs to cover the three-dimensional space range of the ship workpiece to ensure that the stretched entity can intersect with the bottom surface region.
[0014] As an optimization of the reverse modeling method of point cloud of ship workpiece based on OpenCasCade described in this scheme, the step (6) uses the original unprojected top surface area to cut the stretched entity, the purpose of which is to correct the top surface shape of the stretched entity so that the cut top surface is consistent with the actual top surface shape of the ship workpiece.
[0015] As an optimization of the reverse modeling method of ship workpiece point cloud based on OpenCasCade described in this scheme, when splicing and cutting the top surface entity and the bottom surface region in step (6), the topology stitching tool of OpenCasCade is used to achieve seamless connection between the top surface entity and the bottom surface region, forming a closed ship workpiece entity model.
[0016] This invention provides a reverse modeling method for ship workpiece point clouds based on OpenCasCade. It significantly improves modeling accuracy by constructing a unique bottom plane to correct the non-coplanarity of contour points and by cutting and stretching the solid using the original top surface. It simplifies the process and improves efficiency by using bounding boxes to arrange intersecting regions and leveraging OpenCasCade tools. Furthermore, it adapts to the characteristics of ship workpieces with dedicated stitching and fitting steps, forming a complete data flow loop and enhancing modeling stability and repeatability. Specific advantages are as follows: 1. Higher modeling accuracy: By constructing a unique bottom plane, the problem of non-coplanar contour points is corrected, avoiding modeling errors caused by planar deviations; at the same time, the original top surface area is used to cut and extrude the solid, ensuring that even if the top surface of the workpiece is inclined, the modeling result can still be consistent with the actual shape, significantly improving modeling accuracy; 2. Higher modeling efficiency: Bounding boxes are used to quickly eliminate intersecting areas, reducing the computational load of splicing gaps on the top surface; combined with OpenCasCade's automated modeling and topology stitching tools, the topology repair process is simplified, reducing manual operation costs, and the overall modeling efficiency is significantly improved compared to existing technologies; 3. Adapting to the characteristics of ship workpieces: For the complex curved surfaces and inclined connections of ship workpieces, special steps such as top surface gap splicing and bottom surface minimum circumscribed contour fitting are designed, which solves the problem of mismatch between the "generalized processing" of existing technologies and the characteristics of ship workpieces, and the modeling results are more in line with the actual workpieces; 4. Smoother data integration: From point cloud acquisition, preprocessing, and classification to planar construction, region stitching, and entity modeling, a complete data flow loop is formed, avoiding the problem of scattered point cloud data management and improving the stability and repeatability of the modeling process. Attached Figure Description
[0017] Figure 1 This is a flowchart of a point cloud reverse modeling method for ship workpieces based on OpenCasCade, as described in this invention. Detailed Implementation
[0018] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. The described embodiments are merely some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] like Figure 1 As shown, this solution provides a reverse modeling method for point clouds of ship components based on OpenCasCade, which includes the following six core steps: Step (1): Point cloud data acquisition A laser 3D scanning device is used to comprehensively scan the ship's workpiece, acquiring its three-dimensional point cloud data. During the scanning process, it is necessary to ensure that the scanning path covers key areas such as the outer surface, inner surface (if any), and edge connection points of the workpiece to avoid data loss. After the scanning is completed, the point cloud data is exported as the raw data for subsequent processing to ensure that the data can fully reflect the geometry of the ship's workpiece.
[0020] Step (2): Point cloud preprocessing For the raw point cloud data acquired in step 1, uniform sampling and radius filtering are performed to optimize the point cloud quality, specifically including: Uniform sampling: By reducing the density of point cloud data through uniform sampling, the amount of data and subsequent computing pressure are reduced while maintaining the overall spatial distribution characteristics of the point cloud, ensuring that the point cloud can still accurately reflect the geometric contour of the workpiece. Radius filtering: Remove isolated noise points in the point cloud by radius filtering. For each point cloud data point, count the number of its neighboring points within a preset radius. If the number of neighboring points is less than the set value, the point is determined to be an isolated noise point and deleted, thereby reducing the impact of invalid data on the accuracy of subsequent modeling.
[0021] Step (3): Point Cloud Classification The point cloud data is sliced and segmented using region growing to achieve point cloud classification and extract contour data. Specifically, this includes: Slicing process: The point cloud data is sliced along the height direction of the ship workpiece (or the preset reference direction), dividing the point cloud into multiple parallel point cloud slices; by analyzing the area, shape and spatial position of each slice, the bottom surface point cloud slice corresponding to the workpiece mounting reference surface and the non-bottom surface point cloud slice (i.e. top surface area point cloud) corresponding to the outer surface of the workpiece are distinguished. Region growing segmentation: The region growing segmentation algorithm is used to segment the bottom point cloud and non-bottom point cloud into sub-regions respectively. The growth criteria are based on the similarity of the normal vectors of the point cloud and the spatial neighborhood relationship, and point clouds with similar features are grouped into the same sub-region. Contour data extraction: For each segmented sub-region, extract the vertex information of its edge contour, and calculate the normal vector of each sub-region to form contour data containing vertex data and normal vectors, which provides the basis for subsequent plane construction and region stitching.
[0022] Step (4): Construct a unique bottom plane Since the bottom surface sub-region contour points extracted in step (3) cannot be guaranteed to be all on the same plane, which will affect the accuracy of subsequent modeling, it is necessary to construct a unique reference bottom plane based on the bottom surface point cloud contour data. The specific process is as follows: First, calculate the area of each segmented region of the bottom point cloud, and select the region with the largest area from all bottom sub-regions (this region is usually the main mounting reference surface of the workpiece, and its geometry is more stable). Secondly, calculate the centroid of the region with the largest area, and at the same time calculate the average value of the normal vectors of all bottom areas to obtain the average normal vector; Finally, based on the calculated centroid and average normal vector, a unique reference plane is constructed in the OpenCasCade platform, which will serve as a unified reference for subsequent region projection and modeling.
[0023] This step (4) specifically involves: Step (401) First, calculate the area of each region on the bottom surface, find the region with the largest area, and calculate the centroid P of this region. avg The contour points of the largest region are P1, P2, ... P. n Then we have: , Step (402) is based on the normal vectors N1, N2, ... N of each region on the bottom surface. n Calculate the average normal vector N avg .
[0024] Step (403) constructs a unique bottom plane C based on the centroid and the average normal vector.
[0025] Step (5): Region stitching Due to errors in point cloud acquisition and segmentation, the contour data of each region cannot be guaranteed to be on the same plane, and there may be gaps between the top surface sub-regions. Therefore, it is necessary to project the top surface region and the bottom surface region onto a unique bottom plane respectively, and perform stitching processing, including the following steps: Step (501) Top surface area gap splicing First, bounding boxes are constructed for each projected top face sub-region. By judging the positional relationship of the bounding boxes, the intersecting top face sub-regions are quickly excluded (the intersecting regions do not need to be spliced), reducing the subsequent calculation amount; Secondly, for non-intersecting top face sub-regions, query whether there are edges with distances meeting the splicing requirements between pairwise regions - if the distance between the edges of two regions is within the preset range, it is determined to meet the splicing conditions; Finally, for two top face sub-regions meeting the splicing conditions, such as region A and region B, extract the edge segments with similar distances; compare the lengths of the two segments. If the length of the segment in region A is less than the length of the segment in region B, extend the adjacent segments on both sides of this segment in region A, and calculate the intersection points of the extended segments and the segment in region B; supplement the intersection points to the contour vertex set of region A, and refit the contour of region A to achieve the gap splicing of the two regions; if the length of the segment in region A is greater than or equal to the length of the segment in region B, process region B with the same logic, and finally complete the overall splicing of the top face region, eliminating the gaps between regions.
[0026] Specifically, in step (501), when processing the top face region, all regions of the top face are projected onto the bottom plane C, and then it is detected whether the projected regions can be spliced with gaps. The gap splicing rule is: loop through all regions, accelerate the judgment and exclusion of intersecting regions by constructing bounding boxes, and then further query whether there are edges with similar distances in the two regions. If so, splice the two regions; if not, do not splice. The splicing method is as follows: Assume that the line segment a in region A and the line segment b in region B meet the splicing conditions. Compare the lengths of a and b. When a < b, obtain the line segments a1 and a2 on both sides of the line segment a in region A, extend these line segments a1 and a2 respectively to calculate the intersection points p1 and p2 with the line segment b, obtain all the intersection points of region A and add p1 and p2, and refit the new region A'.
[0027] Step (502) Fitting the minimum circumscribed contour of the bottom face region To ensure that the entity formed by stretching the top face subsequently can intersect with the bottom face region (avoiding the model defect of "hanging in the air"), it is necessary to fit the minimum circumscribed contour of the projected bottom face region: Merge the contour of the projected bottom face region and the contour of the projected top face region, and based on the merged contour point set, fit to form a minimum circumscribed contour - this contour can completely contain all the bottom face projected regions and the top face projected regions, ensuring that there must be an intersection between the subsequent top face stretched entity and the bottom face region.
[0028] Specifically, in step (502), the bottom area is processed by projecting all areas of the bottom surface onto a unique bottom plane C. In order to ensure that the model after the top surface is stretched will intersect with the bottom surface, a minimum bounding contour needs to be fitted based on the area after the previous top surface projection and the area after the current bottom surface projection. This ensures that a complete bottom surface is constructed.
[0029] Step (6): Constructing the ship component model Based on the spliced top surface region and the bottom surface region after fitting the minimum bounding contour obtained in step (5), a complete solid model of the ship workpiece is constructed using OpenCasCade's modeling tools, including: First, stretch the spliced top surface area in the opposite direction of the normal to the unique bottom plane. The stretching length must be sufficient to cover the three-dimensional space of the ship workpiece, ensuring that the stretched solid can completely cover the thickness direction of the workpiece. Secondly, since the top surface of the ship workpiece may have a sloping structure, direct stretching will cause the top surface shape to deviate from the actual workpiece. Therefore, it is necessary to use the original unprojected top surface area (which retains the actual three-dimensional shape of the top surface of the workpiece) to cut the stretched entity. Based on the outline of the original top surface area, the part of the stretched entity that exceeds the range of the original top surface area is removed so that the top surface of the cut entity is consistent with the actual top surface shape of the workpiece. Finally, the cut top surface solid is spliced with the bottom surface region (i.e. the fitted minimum circumscribed contour bottom surface). Using OpenCasCade's topology stitching tool, the bottom edge of the top surface solid is seamlessly stitched with the contour edge of the bottom surface region to form a complete and closed ship workpiece solid model.
[0030] Specifically, in step (6), based on the bottom and top surfaces constructed above, each area of the spliced top surface is stretched in the opposite direction of the normal direction of the unique bottom surface C. The stretching length is set to be long enough. Then, the original top surface areas before projection are used to cut the corresponding stretching entities. This ensures that the top surface is a sloping surface and accurate modeling can be completed. The cut entities of each top surface area are spliced with the bottom surface to form a complete ship model.
[0031] The above description is merely illustrative of the embodiments of the present invention and is not intended to limit the present invention. For those skilled in the art, any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for reverse modeling point clouds of ship components based on OpenCasCade, characterized in that, Includes the following steps: Step (1) Point cloud data acquisition: Point cloud data of the ship workpiece is acquired by laser 3D scanning technology; Step (2) Point cloud preprocessing: The collected point cloud data is processed by uniform sampling and radius filtering to simplify the data and remove noise; Step (3) Point cloud classification: The point cloud data is sliced and divided into bottom point cloud and non-bottom point cloud. The contour data of the two types of point clouds are then extracted by the region growing segmentation algorithm. The contour data includes vertex information and normal vector of each region. Step (4) Construct a unique base plane: Based on the contour data of the bottom point cloud extracted in step (3), a unique reference base plane is formed by fitting calculation; Step (5) Region stitching: Project the top surface region corresponding to the non-bottom surface point cloud extracted in step (3) and the bottom surface region corresponding to the bottom surface point cloud onto the unique reference bottom plane constructed in step (4), perform gap stitching on the projected top surface region, and fit the projected bottom surface region to form the minimum bounding contour. Step (6) Constructing the ship workpiece model: Stretch the spliced top surface area in the opposite direction of the normal of the unique reference bottom plane, cut the extruded solid using the original unprojected top surface area, and then splice the cut top surface solid with the bottom surface area to obtain a complete ship workpiece model.
2. The method for reverse modeling point clouds of ship components based on OpenCasCade according to claim 1, characterized in that, The purpose of uniform sampling in step (2) is to reduce the density of point cloud data while maintaining the overall spatial distribution characteristics of the point cloud; the purpose of radius filtering is to remove isolated noise points in the point cloud and reduce the impact of invalid data on the accuracy of subsequent modeling.
3. The method for reverse modeling point clouds of ship components based on OpenCasCade according to claim 1, characterized in that, The slicing direction in step (3) is consistent with the height direction of the ship workpiece. The region growth segmentation algorithm divides the bottom point cloud and the non-bottom point cloud into sub-regions by judging the similarity of the normal vectors of the point cloud and the spatial neighborhood relationship.
4. The method for reverse modeling point clouds of ship components based on OpenCasCade according to claim 1, characterized in that, The specific process of constructing the unique bottom plane in step (4) includes: Step (401) Calculate the area of each segmented region of the bottom point cloud and select the bottom region with the largest area; Step (402) Calculate the centroid of the region with the largest area, and at the same time calculate the average value of the normal vectors of all bottom regions to obtain the average normal vector; Step (403) constructs the unique reference bottom plane based on the centroid and the average normal vector.
5. The method for reverse modeling point clouds of ship components based on OpenCasCade according to claim 4, characterized in that, The calculation method for the area of the bottom surface region in step (401) is as follows: connect the outline vertices of each bottom surface region in sequence to form a polygon, and calculate the area of the region based on the geometry of the polygon.
6. The method for reverse modeling point clouds of ship components based on OpenCasCade according to claim 1, characterized in that, The process of splicing the projected top surface area in step (5) includes: Step (501) constructs a bounding box for each projected top surface sub-region, and determines and excludes intersecting top surface sub-regions based on the positional relationship of the bounding boxes; Step (502) For non-intersecting top surface sub-regions, query whether there are edges between each pair of regions that meet the splicing requirements; Step (503) For two regions with edges that meet the requirements, the region contour is refitted after the edge segment of one region is extended, the intersection point with the edge of the other region is calculated, the contour vertices are supplemented, and the gap splicing is achieved.
7. The method for reverse modeling point clouds of ship components based on OpenCasCade according to claim 1, characterized in that, The fitting process of the minimum bounding contour of the bottom area in step (5) is as follows: merge the bottom area contour after projection with the top area contour after projection, and fit the minimum bounding contour that can completely contain all contours based on the merged contour point set.
8. The method for reverse modeling point clouds of ship components based on OpenCasCade according to claim 5, characterized in that, The stretching length of the top surface region in step (6) must meet the three-dimensional spatial range of the ship workpiece to ensure that the stretched solid can intersect with the bottom surface region.
9. The method for reverse modeling point clouds of ship components based on OpenCasCade according to claim 1, characterized in that, The purpose of cutting the stretched entity using the original unprojected top surface area in step (6) is to correct the top surface shape of the stretched entity so that the cut top surface is consistent with the actual top surface shape of the ship workpiece.
10. A method for reverse modeling point clouds of ship components based on OpenCasCade according to claim 1, characterized in that, When splicing and cutting the top surface entity and the bottom surface area in step (6), the topology stitching tool of OpenCasCade is used to achieve a seamless connection between the top surface entity and the bottom surface area, forming a closed ship workpiece solid model.
Citation Information
Patent Citations
Ship planking reverse modeling implementation method based on three-dimensional laser scanning
CN111947595A
Cited By
Workpiece modeling method and device based on point cloud data
CN122244342A
