Polygonal Tools for Reverse Engineering in KOMPAS-3D

We use cookies to help provide you with the best possible online experience

Design with ASCON Solutions:
Powerful Functionality • Easy-Learning • Cost-Effective
article 20 March 2025

Polygonal Tools for Reverse Engineering in KOMPAS-3D

This article explores the integration of polygonal modeling tools into KOMPAS-3D, a parametric CAD software, using the C3D Toolkit. By representing polygonal objects as lightweight shells, the software enhances performance, reduces resource use, and simplifies complex tasks. Tools such as MeshSection and FitSurfaceToGrid provide the foundation for accurate parametric modelling, while manual and automated segmentation meet a wide range of user needs.

Comparative tests show that KOMPAS-3D delivers competitive results, and ongoing development focuses on challenges such as noisy mesh handling and semi-automatic segmentation. Future updates promise advanced features such as curvature-based segmentation and mesh diagnostics, solidifying KOMPAS-3D as a versatile tool for modern engineering.

Reverse Engineering

Reverse engineering is a critical process in modern engineering workflows, enabling the reconstruction of physical objects into digital models for further analysis, modification, or reproduction. Central to this process is the efficient handling of polygonal objects—digital representations often derived from 3D scans. KOMPAS-3D, a parametric CAD software, historically relied on resource-intensive methods to process such objects. Recognizing these methods limitations, the development team at ASCON integrated advanced polygonal modeling tools into the KOMPAS-3D environment, leveraging the C3D Toolkit's capabilities.


Reverse Enigineering in KOMPAS-3D

This article presents the methodologies employed to overcome traditional constraints, evaluates the enhancements achieved, and explores the potential for future innovations. The primary focus is on enabling reverse engineering within KOMPAS-3D, specifically converting polygonal objects into parametric solid models efficiently and accurately.

To address the challenges of processing polygonal objects in KOMPAS-3D, the development team implemented significant methodological advancements using the C3D Toolkit. Below is a detailed overview of the approaches and tools introduced:

Addressing Traditional Challenges

Previously, polygonal objects in KOMPAS-3D were imported as solid bodies by automatically converting each triangle in a mesh into flat faces. This process involved stitching adjacent triangles with identical normal directions into single faces, followed by generating a triangulation mesh for visualization. Although optimized to some extent, this method had several drawbacks:

  • Slow import times, as the system first constructed a solid body.
  • High resource consumption, both in disk space and computational effort.
  • Limited editability, with challenges in applying associative relationships to the resulting solids.

These issues motivated the development of an alternative approach, which emphasized retaining polygonal objects in their native form for more efficient handling.


Polygonal objects imported as a solid

Introduction of Polygonal Objects

The integration of polygonal objects into KOMPAS-3D's design tree marked a fundamental shift. Using the MbMesh class, the system now represents polygonal objects as lightweight shells rather than immediately converting them into solids. This approach:

  • Preserves the original mesh structure for visualization.
  • Defers solid conversion to later stages, optimizing both time and resources.
  • Enables efficient visualization using the source file's triangulated mesh.

Polygonal objects imported directly

Tools for Reverse Engineering

To facilitate reverse engineering, a suite of tools was developed to enhance interaction with polygonal objects:

  • Associative Relationships: These allow entities within polygonal objects to be referenced for tasks like measurements or generating sketches.
  • MeshSection Function: This tool generates polylines by cutting polygonal meshes, which can then be used for solid modeling operations such as rotation or extrusion.

Associative tools
  • Segmentation: The segmentation process, supported by the MbMeshProcessor class, automates the identification of regions for surface fitting. However, manual segmentation tools, such as the Brush tool, were also introduced to give users finer control over the process.

Selecting a mesh region with the brush tool
  • FitSurfaceToGrid Function: This feature fits analytical surfaces (e.g., planes, cylinders, cones) onto selected triangles of a polygonal mesh, allowing parametric models to be reconstructed with specified accuracy.

Conical surface fitting

Constraints and Enhancements

The reverse engineering workflow was further refined through:

  • The ability to apply constraints during surface fitting, such as enforcing perpendicularity or setting a fixed radius for cylindrical surfaces.
  • Improvements in auto-detection functionality, which now relies on a representative subset of mesh points for faster and more accurate surface type identification.

These methods collectively transformed KOMPAS-3D into a more robust platform for reverse engineering, capable of handling complex polygonal meshes with greater efficiency and precision.


Use of constraints for best fit

Results

The introduction of polygonal modeling tools in KOMPAS-3D has led to substantial improvements in performance, usability, and reverse engineering capabilities. The results of these advancements are summarized below.

1. Performance Improvements

A comparison between KOMPAS-3D versions 20 (without polygonal support) and 21 (with polygonal object integration) demonstrated significant performance enhancements:

  • Import times for polygonal models have been drastically reduced. The transformation into a solid has been postponed for the next steps.
  • Polygonal objects, being lightweight, require less disk space and computational power, enabling smoother workflows even with complex models like high-resolution 3D scans.

Polygonal object integration effect

2. Enhanced Reverse Engineering Capabilities

Several tools were evaluated for their effectiveness in converting polygonal meshes into parametric solid models:

  • The MeshSection function allowed the creation of sketches by slicing through polygonal meshes. These sketches could be used for solid modeling operations such as extrusion or rotation.
  • The FitSurfaceToGrid function proved highly effective in fitting analytical surfaces (planes, cylinders, cones) to mesh regions, as demonstrated in various tests. Constraints like fixed radii and enforced perpendicularity further enhanced precision.

3. Comparison with Competitor Software

Tests comparing KOMPAS-3D’s functionality to that of competing software revealed the following:

  • While competitor software struggled with performance and user interface challenges, KOMPAS-3D achieved comparable or superior results in surface fitting tasks.
  • After abandoning automatic segmentation due to its limitations, we created the Brush tool to give the user more control over the segmentation process.

Comparison of different surface matching

4. Quality Assessment of Reverse Engineering

To assess the accuracy of reverse-engineered models, KOMPAS-3D provided tools for:

  • Aligning parametric models with the original polygonal objects.
  • Calculating deviations between the two and visualizing these as heat maps. Regions with minimal deviations appeared green, while areas with higher deviations were color-coded in blue and red.

5. Future Potential

Ongoing enhancements in surface auto-detection showed promising results, with faster and more reliable identification of surface types. This was achieved by analyzing representative points on the mesh rather than the entire surface, significantly reducing processing time.

Discussion

The integration of polygonal modeling tools into KOMPAS-3D has addressed longstanding challenges in reverse engineering workflows, though certain areas for improvement and future expansion remain.

Challenges in Automation

Automated segmentation of polygonal meshes remains a challenging area, particularly when dealing with noisy or defective data from 3D scans. Initial attempts at fully automated segmentation with the MbMeshProcessor class highlighted limitations in efficiency and accuracy. These findings led to the development of manual tools, such as the Brush tool, which provide users with greater control but require additional effort.

User Feedback and Comparisons

Comparative testing with competitor software revealed areas where KOMPAS-3D excelled, particularly in performance and user interface design. However, feedback also highlighted opportunities for improvement, such as better handling of complex surface types during fitting. User input has driven refinements in the segmentation and surface-fitting workflows, ensuring that the tools align with practical engineering needs.

Opportunities for Future Development

Several promising directions for future enhancements were identified:

  • Automated Segmentation: Developing curvature-based algorithms to enable automated identification of surface regions.
  • Combined Solids and Polygonal Objects: Expanding the functionality to seamlessly integrate solids and polygonal objects within the same modeling environment.
  • Mesh Diagnostics and Healing: Introducing tools to identify and repair defects in polygonal meshes, ensuring higher-quality inputs for reverse engineering.

Alignment of polygonal objects

These innovations will further establish KOMPAS-3D as a robust solution for reverse engineering, capable of competing with specialized tools while offering a more streamlined user experience.

Conclusion

The integration of polygonal modeling tools into KOMPAS-3D has transformed its reverse engineering capabilities, addressing key limitations in handling 3D scan data and polygonal meshes. By representing polygonal objects as lightweight shells and deferring solid conversion to later stages, the system has significantly improved performance, resource efficiency, and usability.

Tools such as MeshSection and FitSurfaceToGrid have enhanced the ability to create parametric models from polygonal meshes, while manual and automated segmentation approaches provide flexibility in handling complex surfaces. Comparative tests demonstrated that KOMPAS-3D delivers performance and functionality comparable to leading competitor software, with unique advantages in user control and interface design.

Despite these advancements, challenges such as automated segmentation for noisy meshes and seamless integration of polygonal objects with solids remain areas for improvement. Ongoing development efforts, including curvature-based segmentation, mesh diagnostics, and advanced fitting algorithms, promise to expand the scope and precision of KOMPAS-3D's polygonal modeling tools.

As the C3D polygonal API continues to evolve, KOMPAS-3D is well-positioned to meet the growing demands of reverse engineering and beyond, offering a versatile, efficient, and user-friendly solution for modern engineering applications.

Explore original article by ©C3D Labs via the link.

Anton Sidyakin