Integrate OpenCASCADE Technology (OCCT) as optional geometric kernel#1683
Draft
Integrate OpenCASCADE Technology (OCCT) as optional geometric kernel#1683
Conversation
…ean ops Co-authored-by: Evil-Spirit <[email protected]>
…Real include Co-authored-by: Evil-Spirit <[email protected]>
Copilot
AI
changed the title
[WIP] Integrate OpenCASCADE as a submodule for geometric kernel
Integrate OpenCASCADE Technology (OCCT) as optional geometric kernel
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SolveSpace's solid-model operations (Boolean ops, STEP export) are handled by a custom NURBS/BRep kernel. This PR wires in OCCT as an opt-in replacement via
find_package, providing more robust Boolean operations, standards-compliant STEP export, and new IGES export capability.Build system
cmake/FindOpenCASCADE.cmake— new module; triesOpenCASCADEConfig.cmakefirst, then pkg-config, then manual header/library searchCMakeLists.txt— newENABLE_OPENCASCADEcache option (defaultOFF); callsfind_package(OpenCASCADE REQUIRED)when enabled; setsHAVE_OPENCASCADEforconfig.hsrc/CMakeLists.txt— conditionally compilesocct_kernel.cppand links OCCT intosolvespace-corecmake -DENABLE_OPENCASCADE=ON .. # opt-in; requires OCCT 7.x installedOCCT integration layer (
src/occt_kernel.h/cpp)SSurfaceToGeomSurface/SBezierToGeomCurve— converts SolveSpace's single-span rational Bezier patches/curves toGeom_BSplineSurface/Geom_BSplineCurveComputePCurve— samples 3-D trim curves and projects them onto the surface UV domain viaShapeAnalysis_Surfaceto produce 2-D pcurves forBRepBuilderAPI_MakeFaceSShellToOCCTShape— full shell conversion: face per surface with trim wires, sewn withBRepBuilderAPI_Sewing, healed withShapeFix_ShapeOCCTShapeToSShell— reverse conversion after Boolean ops; handles rational/non-rational B-splines, falls back viaGeomConvertOCCTExportStepFile/OCCTExportIgesFile— delegates toSTEPControl_Writer/IGESControl_WriterOCCTBooleanUnion/Difference/Intersection— wrapsBRepAlgoAPI_Fuse/Cut/CommonGeometry kernel hooks
src/srf/boolean.cpp—MakeFromUnionOf/DifferenceOf/IntersectionOftry OCCT first; fall back to built-in kernel if conversion fails (no regression when OCCT is off or conversion is unsupported)STEP / IGES export
ExportSurfacesTo()short-circuits toOCCTExportStepFile()whenHAVE_OPENCASCADEis definedStepFileWriter::ExportIgesTo()delegates toOCCTExportIgesFile(); errors gracefully when built without OCCTsolvespace.cpp) and CLI (entrycli.cpp):.iges/.igs→ExportIgesTo, otherwise STEPSurfaceFileFiltersunder#ifdef HAVE_OPENCASCADE📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.