Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ On headless Linux the viewer test needs `xvfb-run ctest …`. CI on all three pl

## OCCT dependency

`scripts/build-occt-deps.sh` clones OCCT at tag `V8_0_0_rc5` from `Open-Cascade-SAS/OCCT` and builds it as **static** libraries with a curated module subset (DataExchange, FoundationClasses, ModelingAlgorithms, ModelingData, Visualization). FreeType, FreeImage, RapidJSON, TBB, VTK, Draco, FFmpeg, OpenVR, Tcl are all disabled to keep the dependency minimal. Linux builds add `USE_XLIB=ON`. The script tolerates executable-link failures (`|| true`) because we only need the static `.a`/`.lib` files.
`scripts/build-occt-deps.sh` clones OCCT at tag `V8_0_0_beta1` from `Open-Cascade-SAS/OCCT` and builds it as **static** libraries with a curated module subset (DataExchange, FoundationClasses, ModelingAlgorithms, ModelingData, Visualization). FreeType, FreeImage, RapidJSON, TBB, VTK, Draco, FFmpeg, OpenVR, Tcl are all disabled to keep the dependency minimal. Linux builds add `USE_XLIB=ON`. The script tolerates executable-link failures (`|| true`) because we only need the static `.a`/`.lib` files.

**Known rc5 build quirk:** OCCT 8.0.0 rc5's generated Makefiles intermittently skip the `mkdir` for object subdirectories (e.g. `TKShHealing.dir/ShapeAlgo/`, `ShapeProcessAPI/`) under high `-j` parallelism, causing `error: unable to open output file ... 'No such file or directory'`. Workaround: re-run `cmake --build . --parallel N` from inside `deps/occt-build` until it converges, or pre-create the missing subdirs with `mkdir -p`. The script does not yet auto-recover from this, so a fresh clean build may need 1–2 retries.
**Known build quirk (rc5/beta1):** OCCT 8.0.0's generated Makefiles intermittently skip the `mkdir` for object subdirectories (e.g. `TKShHealing.dir/ShapeAlgo/`, `ShapeProcessAPI/`) under high `-j` parallelism, causing `error: unable to open output file ... 'No such file or directory'`. Workaround: re-run `cmake --build . --parallel N` from inside `deps/occt-build` until it converges, or pre-create the missing subdirs with `mkdir -p`. The script does not yet auto-recover from this, so a fresh clean build may need 1–2 retries.

`CMakeLists.txt` searches `${OCCT_INSTALL_DIR}` for headers under `include/opencascade`, `include`, or Windows-style `inc/`; libraries under `lib/` or `win64/vc14/lib/`. The required toolkit list is hand-maintained at `OCCT_LIBS`. **Linux linking** wraps these archives in `-Wl,--start-group … -Wl,--end-group` because OCCT's static archives have circular dependencies — adding a new `TK*` toolkit on Linux often surfaces as an unresolved-symbol error rather than a missing-library error; check the OCCT_LIBS list first. macOS/Windows do not need the group wrapping.

Expand Down
6 changes: 4 additions & 2 deletions scripts/build-occt-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
set -e

OCCT_VERSION="8.0.0"
OCCT_RC="rc5"
# RC tags use format V8_0_0_rc3, release uses V8_0_0
# Use beta1 (feature-frozen 2026-04-30; final 8.0.0 planned 2026-05-07).
# Switch to "" once the final V8_0_0 tag is published.
OCCT_RC="beta1"
# Pre-release tags use format V8_0_0_rc5 / V8_0_0_beta1; release uses V8_0_0
if [ -n "$OCCT_RC" ]; then
OCCT_TAG="V${OCCT_VERSION//./_}_${OCCT_RC}"
else
Expand Down
13 changes: 7 additions & 6 deletions src/occt_templot_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
#include <XCAFDoc_DocumentTool.hxx>
#include <XCAFDoc_ShapeTool.hxx>
#include <Message_ProgressRange.hxx>
#include <TColStd_IndexedDataMapOfStringString.hxx>
#include <NCollection_IndexedDataMap.hxx>
#include <TCollection_AsciiString.hxx>

// Healing (used by robust import)
#include <BRepBuilderAPI_Sewing.hxx>
Expand Down Expand Up @@ -322,7 +323,7 @@ OT_EXPORT OTShapeRef ot_import_step_robust(const char* path) {
shapeType == TopAbs_FACE) {

BRepBuilderAPI_Sewing sewing(1.0e-4);
sewing.SetNonManifoldMode(Standard_False);
sewing.SetNonManifoldMode(false);
sewing.Add(shape);
sewing.Perform();
TopoDS_Shape sewedShape = sewing.SewedShape();
Expand Down Expand Up @@ -398,7 +399,7 @@ OT_EXPORT OTImportResult ot_import_step_with_diagnostics(const char* path) {
if (shape.ShapeType() != TopAbs_SOLID) {
// Try sewing
BRepBuilderAPI_Sewing sewing(1.0e-4);
sewing.SetNonManifoldMode(Standard_False);
sewing.SetNonManifoldMode(false);
sewing.Add(shape);
sewing.Perform();
TopoDS_Shape sewedShape = sewing.SewedShape();
Expand Down Expand Up @@ -579,7 +580,7 @@ OT_EXPORT bool ot_export_stl(OTShapeRef shape, const char* path, double deflecti
mesher.Perform();

StlAPI_Writer writer;
writer.ASCIIMode() = Standard_False; // Binary STL for smaller files
writer.ASCIIMode() = false; // Binary STL for smaller files
bool result = writer.Write(s->shape, path);

if (!result) {
Expand Down Expand Up @@ -694,7 +695,7 @@ OT_EXPORT bool ot_export_obj(OTShapeRef shape, const char* path, double deflecti

// Write OBJ
RWObj_CafWriter writer(path);
bool success = writer.Perform(doc, TColStd_IndexedDataMapOfStringString(), Message_ProgressRange());
bool success = writer.Perform(doc, NCollection_IndexedDataMap<TCollection_AsciiString, TCollection_AsciiString>(), Message_ProgressRange());

app->Close(doc);

Expand Down Expand Up @@ -737,7 +738,7 @@ OT_EXPORT bool ot_export_ply(OTShapeRef shape, const char* path, double deflecti
// Write PLY
RWPly_CafWriter writer(path);
writer.SetNormals(true);
bool success = writer.Perform(doc, TColStd_IndexedDataMapOfStringString(), Message_ProgressRange());
bool success = writer.Perform(doc, NCollection_IndexedDataMap<TCollection_AsciiString, TCollection_AsciiString>(), Message_ProgressRange());

app->Close(doc);

Expand Down
Loading