Veldrex CAD Import · CAD data exchange for C++
Exact CAD import for C++ software.
It reads CAD files into exact solids, ready to measure and mesh, across 32 file types from STEP and IGES to DWG, Parasolid and JT. It's developed from scratch, with no third-party libraries inside.
It's our own in-house CAD importer, built for our own software. It powers Veldrex CAM and Veldrex Design.
It's open source. All of its source code goes up on GitHub on 1 January 2027, free under the GNU General Public License v3 (GPL v3).
Under the GPL v3, any software that has this code inside it and is passed on has to be released open source as well. Any company that doesn't want the GPL v3 licence conditions can contact sales for a written agreement with Veldrex instead. That agreement replaces the GPL v3 for the company, so it can, for example, put the code inside its own software and keep that software closed source.
It reads and writes all 32 file types listed below, and converts between any two.
It opens CAD files straight out of zip and gzip archives, and handles multi-file STEP assemblies. Part names, placements, colours and layers are kept, and hidden layers stay hidden.
It reads AP242 PMI (the dimensions, tolerances and datums) and the saved views. In testing it read 11,807 PMI items, every tolerance and datum, with none missed. It checks itself against the sending CAD's own volume, area and centre, where the file carries them.
It brings in exact B-rep solids, shells and surfaces, not just a pile of triangles.
That covers planes, cylinders, cones, spheres, tori, NURBS (rational B-splines), surfaces of revolution, extrusions and offsets, and lines, circles, ellipses, parabolas, hyperbolas, B-spline and offset curves. Solids with voids come in too, and wireframes and sketches come in as curves.
Exact volume, surface area and bounding box are worked out from the true surfaces, with no meshing, along with centre of mass, inertia, principal axes and radii of gyration. Each body's measured on its own, and every placed copy is counted. Test parts are checked against their exact answers, to one part in a million.
Exact volumes agree with OCCT's to within 0.0002 mm³: 49,554.1433 mm³ against 49,554.1435.
It measures distances and clashes between parts, cuts plane sections, finds the smallest turned bounding box, and tells whether a point's inside or outside a part.
A validity check names each fault and where it is. Meshes come as Draft, Normal, Fine and SuperFine, or a custom distance and angle, absolute or relative to each edge.
CAD edges come through as lines, repeated parts only get meshed once, and it runs on every core.
It's about 25 times faster than OCCT on big assemblies.
It measured 70,542 solids in one assembly in 0.6 s, and checked an assembly of 19,008 placed copies in under a second.
It's one C++17 library with one header, and nothing else inside it to carry or license.
A command-line tool checks files. Damaged files are read as far as they're sound, with a warning, or turned away with a reason. It was tested with files damaged on purpose, and every bad one ended in a warning or a refusal, never a crash or a hang.
Validation so far
1,370,309 generated test files, 99.90 % read correctly
Every one of its 32 file types was tested with files made for it, each checked against its known answer or its own exact geometry, plus 94,963 real-world files from public collections that allow commercial use.
Real-world files: where they come from
- NIST engineering design models (ACIS, STEP, VRML, IGES, Parasolid, DXF and DWG)
- 55,047
- Web3D Consortium examples (X3D and VRML)
- 24,141
- KiCad 3D library: electronic parts (STEP)
- 7,253
- FreeCAD parts library (STEP, STL and more)
- 5,467
- resvg test drawings (SVG)
- 1,827
- Google Scanned Objects: scanned everyday things (OBJ)
- 1,030
- John Burkardt's data files (PLY, OBJ, OFF, STL, 3DS, SVG, IGES, DXF and X3D)
- 141
- CADGenBench (STEP)
- 32
- US highway sign drawings (FHWA) and NIST model-based drawings (PDF)
- 25
With thanks to the makers of each collection, used under its own licence, every one allowing commercial use: NIST and FHWA, US government works; Web3D Consortium, its open-source licence; KiCad, CC BY-SA 4.0 with the KiCad libraries exception; FreeCAD parts library, CC BY 3.0; resvg, MIT; Google Scanned Objects, CC BY 4.0; John Burkardt's files, LGPL; CADGenBench, ODC-BY.
File formats
Every file type it reads and writes
3D CAD 12
- STEPAP203 · AP214 · AP242
- STEP/XML
- IGES
- BREP
- ACISSAT · SAB
- ParasolidX_T · X_B
- JT
- Rhino3DM
- IFCIFC2X3 · IFC4 · IFCZIP
- 3DXML
- QIF
- VDA-FS
2D drawings 6
- DXF
- DWG
- DGN
- DWFDWFX
- SVG
Meshes, scenes and 3D printing 14
- STL
- OBJ
- PLY
- glTFGLB
- VRMLWRL
- X3D
- 3MF
- AMF
- OFF
- USDUSDA · USDC · USDZ
- COLLADADAE
- FBX
- 3DS
- U3D
Program names are trade marks of their owners, listed to show which files open. Open CASCADE and OCCT are trade marks of Open Cascade SAS.
Open source
See it on our open source page
Free under the GPL v3, made for hobbyists and small businesses. It goes up on GitHub on 1 January 2027.