./features/direct mesh-to-brep
Download Features Source code References Ask for support

Turning facets to faces

One straightforward approach to "reverse engineering" is the direct conversion of mesh facets to the corresponding B-rep entities (i.e., CAD faces). Although such a conversion is incapable of generating curved surfaces, it still has its application areas, especially if the following stars align:

Besides unlocking the data translation workflow (some applications could not work with mesh files, only with real CAD formats, such as STEP, IGES, SAT, XT, etc.), turning meshes to solids allows for running modeling operations, such as Booleans, for example. A typical workflow is then:

  1. Load a mesh (STL) file.
  2. Turn facets to faces.
  3. Maximize faces (unite all planar regions).
  4. Run whatever modeling API (e.g., drill a hole with Booleans).
  5. Save the final model to a CAD format (e.g., STEP).

The following image illustrates a "good" mesh model for conversion.

Use the following sequence of Tcl commands to turn facets to faces and maximize them into larger planar regions:

> convert-to-brep
> maximize-faces

The convert-to-brep command brings you a conventional CAD model that you can export to a STEP file and continue using in your downstream workflows.