The program STEPToPoints is a command line utility to generate point clouds out of solids contained in STEP files. The supported output file format is xyz (vertex positions and normal vectors). A popular viewer for the supported file format is MeshLab (https://www.meshlab.net). STEPToPoints is based on OpenCASCADE (https://www.opencascade.com). The program uses cxxops (https://github.com/jarro2783/cxxopts) for parsing the command line.
- CMake installation (https://cmake.org)
- OpenCASCADE installation (https://old.opencascade.com/content/latest-release, download needs registration)
For OpenCASCADE if it is not found it will be fetched and built via CMake FetchContent. For that, you need the following additional libs installed:
- tcl-dev
- tk-dev
On Linux you can install these packages via the package manager, e.g. on ubuntu:
sudo apt-get install tcl-dev tk-devListing the contents (solids) of a STEP file:
STEPToPoints -c -i <step file>Generating point clouds for selected solids of the file:
STEPToPoints -i <step file> -o <output file> -g <sampling distance> -s <solid1>,<solid2>,<...>`Note that the selection of solids can be done by name or index (comma separated list, index starts with 1). For the indices, the range is also supported, e.g. 1-3 for the first three solids.
Following the help text from the command line:
STEPToPoints.exe
STEP to point cloud conversion by regular sampling
Usage:
STEPToPoints [OPTION...]
-i, --in arg Input file
-o, --out arg Output file (.obj, .ply, .xyz)
-c, --content List content (solids)
-s, --select arg Select solids by name or index (comma separated list, index starts with 1). For the indices, the range is also supported, e.g. `1-3` for the first three solids.
-g, --sampling arg Sampling distance
-b, --binary Write binary file (only for .ply files)
-h, --help Print usageNote
As output file, xyz, obj, and ply files are supported.
Examples are from the examples directory.
| Solids |
|---|
![]() |
| Point cloud with normal vectors |
|---|
STEPToPoints.exe -i basic_shapes.stp -o out.xyz -g 0.5 |
![]() |
This code has been tested with an OpenCASCADE 7.5.0 prebuilt binary (opencascade-7.5.0-vc14-64.exe) on Windows, as well as OpenCASCADE system packages on openSUSE Linux. With changes in the configuration section in the CMakeLists.txt file the build should also work with other OpenCASCADE versions.

