26.12.2023 • C3D Modeler

C3D Modeler Polygonal Modeling Tools for Reverse Engineering in KOMPAS-3D

Reverse engineering is the rebuilding or copying of an existing product. The data source for reserve engineering is usually a scanned polygonal model. In this paper, we will talk about working with such models.

The handling of polygonal models in KOMPAS-3D v20 and earlier versions has been quite a challenge. The reason is that polygonal files were converted to exact geometry (solid or surface), where each triangle was represented by a face. If the original STL file contained too many triangles, the resulting body was extremely “heavy” and difficult to edit. The developers realized that converting STL geometry to a solid was not the best approach.

KOMPAS-3D v21 introduced a new entity type: Polygonal Object. It represents the original triangulated mesh geometry in KOMPAS-3D. This representation uses the MbMesh object available in the C3D Modeler kernel. Representing triangulated meshes as polygonal objects reduces the model size and improves performance.

Polygonal objects in KOMPAS-3D are created by importing STL, OBJ, and JT files, by the APM FEM application, or by converting bodies or surfaces with a special command.

The KOMPAS-3D team has evaluated the opening times of STL files in v20 and v21. The results are summarized in the table below.

Model Properties v20 v21
Moto frame.stl 3D scan of the motorcycle frame (large scan: 2 mln. triangles) Import time, s 2791.2 12.4
File size, MB 1622.8 69.5
Memory used by the application, MB 27421 956
Response time, ms 2000 1.5
Pump casing.stl (medium size scan: 0.3 mln. triangles) Import time, s 116.796 13.7
File size, MB 259.7 9.1
Memory used by the application, MB 7000 541
Response time, ms 250 1.5

Motorcycle frame HD by Artec 3D
Figure. Motorcycle frame HD by Artec 3D

Pump housing
Figure. Pump housing

We introduced not only the Polygonal Object but also special commands to work with it. KOMPAS-3D v22 can build 2D sections of polygonal objects. The intersection curve is a sequence of contours. Each contour is a polyline consisting of individual rectilinear segments. In some cases, the resulting contours can be used directly to create 3D geometry, but more often they are used as reference objects for sketching to create solid models.

Intersection curve
Figure. Intersection curve

A polygonal object constructed from 3D scanned geometry may contain multiple irregularities. They are both manufacturing and scanning errors. Such an object is not very useful for creating solid models and requires some fitting.

Now KOMPAS-3D v 22 offers the new Surface Fit function. It approximates polygonal object surfaces by predefined surfaces (plane, cylindrical, spherical, etc.). A new surface is then constructed. It is inscribed in the area of the polygon object and is located as close as possible to the vertices of the triangles.

Such surfaces can be used to build polygonal object sections, local coordinate systems, and other objects of the solid model, to take measurements, etc. Besides, from such surfaces, you can build a body of surface very close in shape to the initial scanned product.

The figures show the original surface of the polygonal object and the surface after fitting.

Surface fit
Fig. Surface fit

The KOMPAS-3D team will enhance the Surface Fit functionality with the new functions added to C3D. In future releases, the command will have more user settings. For example, you will be able to specify constraints when creating a surface or adjust the major dimensions of the new geometry. Now the surface type is selected manually. In the future, it will be automated. Spline surface properties are also added to adjust the smoothness and accuracy of the spline.

Good luck to the KOMPAS-3D team with their plans! For its part, C3D Labs continues to expand the functionality of polygonal geometry: Boolean operations, projections, and several other important operations on polygonal objects are already available. In a recent Polygonal Modeling Webinar, C3D Labs math software engineers showed what else is planned for the near future. In 2024, C3D will have many new features for CAD developers to further improve their products.

Denis Statsenko. Head of Product Marketing. C3D Labs
Denis Statsenko
Head of Product Marketing
C3D Labs