TL;DR
Since I had 1000$ in credits as a gift from Anthropic I needed to burn before the 18/11/2025.
So I created a github project to read IGES and STEP files.
That works great and could open possibilities to replace the slow importers from OpenCascade. I have been trying out VTK as well, and although VTK has interesting features, also towards lidar support, it uses OCC to read CAD files and it will only show the representation.
GIThub location
https://github.com/lucwens/VTKOpenCascade
Further ideas
Currently the project does
- Read IGES into an array of entitites
- Read STEP into an array of entities
- Visualize in a simple OpenGL render window
Future extensions
- Write to step or iges
Create an MFC MDI project where we can
- Choose render engine OpenGL or Direct3D
- Open IGES / STEP
- Write IGES / STEP
Mouse selection of
- Points
- Edges
- Surfaces
- Entities
- Add VTK and OCC
- Feed our entities into VTK / OCC
When we get there we would have a way of loading CAD files much faster in OpenCascade, and in VTK we would be able to load CAD files without the need to add OCC and with the advantage of retaining geometric true values, so that a circular hole can be used to extract the exact circle, and not fitting vertices of the brep.
Adding VTK via VCPKG
Some note, we have our vcpkg as git submodule procedure as described in the knowledge base : 🗜️ Using VCPKG as a git submodule. Key is to download the two scripts and set the project to manifest mode. For a port like FMT that will work, but when adding VTK like that, it does not.
Make sure to add the feature atlmfc
{
"dependencies": [
{
"name": "vtk",
"features": [ "atlmfc" ]
}
]
}
So to fix this, we still need to manually go to the project->C/C++->General->Additional Include Directories and add :
$(VcpkgManifestRoot)\vcpkg_installed\$(VcpkgTriplet)\include;$(VcpkgManifestRoot)\vcpkg_installed\$(VcpkgTriplet)\include\vtk-9.3;$(VcpkgManifestRoot)\vcpkg_installed\$(VcpkgTriplet)\include\opencascade;%(AdditionalIncludeDirectories)