Advanced point cloud meshing using Polygonica
Many software developers are already aware that Polygonica from MachineWorks is now established as the foremost polygon healing, Boolean and offsetting technology available. Fewer are aware that Polygonica also supports point cloud processing functionality that tests show rival the market leaders in this sector.
For the last few years the software development team at MachineWorks have been developing an advanced point cloud to mesh pipeline aimed at enabling existing software systems such as CAD, CAM and CAE products to import, mesh, heal and edit output from laser and optical scanners.
This easy to integrate functionality can be combined with Polygonica's existing polygon-modelling capabilities to rapidly provide workflows for analysing, repairing and re-manufacturing existing parts.
The starting point for many downstream algorithms used in CAM and CAE are not NURBS-like CAD surfaces but polygon meshes.
It is often possible to omit the reverse engineering step altogether and simply work with the polygons. Alternatively the mesh results from Polygonica can be used as the basis for reverse-engineering the part into the CAD engine.
In Polygonica 2.2, released in September 2018, major improvements included:
- A new method of generating meshes based on fitting surfaces to the original point cloud
- Order of magnitude speedups for the traditional meshing method for large scans
- Significantly reduced memory footprint for the traditional meshing method to support processing large scans in available system memory.
Manipulating Points
Polygonica's APIs support rapid manipulation and editing of point clouds, individual point sets and regions of points. Point sets can be filtered and smoothed using a variety of methods and if normals are not present they can be automatically calculated based on an intelligent assessment of the likely scanner position. Normals can also be made self-consistent across a number of sets or the entire point cloud.
Decimating large point datasets
Point datasets can often be very large and processing them can stress main memory. Polygonica provides a range of volume-based sampling methods to reduce point sets. Within each voxel the centroid (average) can be computed. Alternatively the actual point nearest the centroid can be chosen or simply the centre of the voxel. A range of methods are available to resample point properties such as colours and normals.
Future versions will support disk-based sampling for point sets that cannot be loaded into main memory. Adaptive sampling is being added to increase sample density in regions of higher curvature.
Automatic and Manual Registration
Fast and accurate registration of multiple scans is critical for good point cloud meshing and again Polygonica provides a range of methods for global registration and supports both user-assisted and automatic methods.
Meshing and Surface fitting
Once the point sets are registered Polygonica offers several methods to create a polygon mesh. The traditional method generates triangles that satisfy the Delaunay condition and also ensures that each mesh vertex was an original point from the point cloud. This latter condition is desirable in Metrology applications but the results are prone to noise even after smoothing.
In addition whilst Polygonica does an excellent job of merging overlapping regions of point sets there is always the possibility for poorly aligned point sets to introduce extra noise in these regions.
The innovative surface fitting approach introduced in Polygonica 2.2 first constructs a model of surface primitives fitted to the point cloud.
This model is then used directly to create the polygon mesh resulting in a much smoother surface finish and no requirement for specific algorithms to manage difficult to process overlap regions.
The surface fitting method is also very fast. Although performance of course varies with size and complexity of the source data, preview meshes from typical short-range scan can be built in seconds rather than minutes or hours whilst creation of full resolution meshes is often several times faster than traditional methods.
|
|
Hole-filling
It is typical for meshes created from laser scans to have missing regions i.e. holes. These gaps in the data can be caused by occlusions where one part of the scanned geometry prevented the laser from reaching another part. Depending on what is being scanned such gaps can be very large.
It is also possible for traditional meshing algorithms to leave small holes where noise in the laser scan data prevents a correct ‘fit’.
As reported in previous blogs Polygonica supports a variety of advanced hole-filling operations including automatic identification of islands and curvature-sensitive methods where regional curvature is maintained across the hole.
www.polygonica.com/polygonica-blog/New-Hole-Filling
Smoothing and Fairing
Polygon meshes generated from point clouds can often be noisy and irregular. Polygonica offers mesh smoothing and fairing functionality that can optionally be applied as a post-processing step.
Mesh smoothing can be applied to both regions of a mesh or the entire mesh. The fairing function can be used to minimise area or curvature and is targeted at more aggressive smoothing and interactive mesh-morphing such as is typical in dental modelling applications.
Smoothing and fairing can also be used as post-processing steps for hole-filling, improving the transition from the original mesh to the newly created mesh in the regions around each hole.
Simplification and Remeshing
Meshing of point clouds can result in large, over-dense meshes and for certain applications such as CAE triangle quality could be improved.
Polygonica's multi-threaded simplification algorithms are able to operate within a defined tolerance producing a mesh that has been adaptively decimated to retain detail in areas of high curvature whilst creating larger triangles in areas of low curvature. The result is guaranteed within the specified tolerance and the maximum distance of the simplified mesh from the original is optionally returned by the function.
The simplification algorithms in Polygonica also operate in an out-of-core manner so if the original mesh is too large to load into RAM it can be simplified in sections on disk until it is small enough to work with.
If triangle shape is important to the consuming application then Polygonica's quality based remeshing can be used to deliver a mesh or mesh region with consistent-sized triangles that are close to equilateral i.e. with an aspect ratio close to one.
Shrink-wrapping
Polygonica's new shrink-wrapping functionality can be used to tightly wrap meshes from sparse point clouds with very large holes and regions of missing data.
The shrink wrap approach also helps to remove undesirable internal data - for example when scanning an underground tunnel.
Performance
Based on a test scan of 8 million points in which 80% of the surface area had overlapping point sets. In each case a 3 million polygon mesh was generated. Tests were run on a Windows PC with an Intel Xeon CPU E5-1650 v3 @ 3.5GHz CPU and 16Gb RAM.
Traditional Method |
Surface Fitting |
||
Triangulate Point Sets |
50s |
Fit Surfaces to Points |
44s |
Join Point Sets |
200s |
Triangulate Surfaces |
20s |
Total |
250s |
Total |
64s |
Try it for yourself
MachineWorks offers a 60 day evaluation package for Polygonica for suitably qualified companies to test the Polygonica technology themselves. On-site consulting engineering support is available to get you started quickly whilst hotline customer support is available for the duration of the evaluation.