Changelog¤
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.1.20] 2026-09-01¤
Added¤
OCCBrep.to_curves()converts the edges of a Brep to COMPAS curves -- aLinefor a straight edge, aCirclefor a circular one, and so on, down to aNurbsCurvefor a general B-spline edge. Unlike theedgesandcurvesattributes it reports each edge once: exploring a shape for edges visits every face, so an edge shared by two faces came back twice, and a box handed back 24 curves for its 12 edges. Repeats are filtered byis_same, bucketed by endpoint coordinates first so the pass stays linear on large models instead of quadratic.OCCBrep.to_polylines()converts a Brep whose faces are all flat polygons to one closed polyline per face loop, the outer loop of a face preceding its holes. Such a Brep is fully described by the points of its loops, so nothing is lost; anything else -- a cylinder, a sphere, a planar face with an arc in its boundary -- would silently lose its curvature, so the conversion raisesBrepErrornaming the offending face rather than approximating it. This is the guaranteeto_polygons()does not make: that method reduces the outer loop of every face whatever its geometry.OCCBrep.is_polygonalandOCCBrepFace.is_polygonreport whether the faces are flat polygons, so the precondition ofto_polylines()can be checked up front. A face is a flat polygon when both its surface and every bounding edge carry the corresponding exact geometry -- a plane and straight lines -- which is what makes its vertices a faithful description of it.
Changed¤
Removed¤
[0.1.19] 2026-08-25¤
Added¤
Changed¤
- Booleans no longer sew or heal their result. An OCCT boolean already returns a valid shape --
normally a COMPOUND holding one solid per connected piece -- and sewing that compound flattened
it into loose shells. Because
make_solid()only rewraps a shape whose own type isSHELL, the compound was then skipped entirely, so a boolean that split its target came back with.solids == []and.is_solid == Falseeven though the operation had succeeded. Selecting the real body out of a fragmenting cut (a carved part plus slivers) was therefore impossible, and.volumesilently summed every fragment instead of measuring one part. Affects all six entry points:from_boolean_difference/_intersection/_unionand theboolean_*methods. A result holding exactly one solid is now unwrapped to that solid, so.is_solidand.volumeanswer correctly in the common case too. - Performance and exactness:
quad_to_faceandngon_to_facenow build a planar face when their input points are coplanar (withinPrecision::Confusion()), instead of always fitting a surface -- a ruled surface for quads, aBRepFill_Fillingn-sided patch for n-gons. Flat input is the overwhelmingly common case and it has a plane; fitting a surface to it was slow, less exact, and invisible toface.is_plane, so callers lost the cheap planar filters that face comparison and contact detection rely on. Measured on a 145-part timber model, through the publicOCCBrep.from_polygonsAPI: face construction 2.95 ms -> 0.105 ms (28x), building all 145 solids 4.43 s -> 0.62 s (7.1x), and the same solids through a boolean cut 34.9 s -> 3.2 s (10.9x), with no change in volume -- all 1190 faces come back planar, and a carved column reproduces its reference volume to 1.4e-13. Genuinely warped input still takes the fitted-surface path. Both functions take an optionaltolargument controlling the flatness threshold.
Removed¤
[0.1.18] 2026-06-28¤
Added¤
Changed¤
Removed¤
[0.1.17] 2026-06-27¤
Added¤
Changed¤
- Performance:
OCCBrep.overlap(and thereforeoverlap_intersection) no longer meshes each shape twice. TheBRepMesh_IncrementalMeshconstructor already triangulates (it auto-callsPerform), so the extra explicitPerform()calls were redundant -- removing them makesoverlap~1.7x faster end-to-end (thebrep_overlapexample: 8.5 ms -> 4.9 ms here). - Examples:
brep_from_extrusion2no longer usespythonocc(OCC.Core.ShapeAnalysis); the free-boundary check is now a nativeedge_facesnaked-edge count. There is nopythonoccusage anywhere in the project.
Removed¤
- Duplicate example
brep_from_extrusion3.py(byte-identical tobrep_from_extrusion2.py).
[0.1.16] 2026-06-27¤
Added¤
- Full
compas_occpublic API:OCCCurve,OCCCurve2d,OCCNurbsCurve,OCCSurface,OCCNurbsSurface,OCCBrep(+ vertex/edge/loop/face/builder),conversions, and the COMPAS plugin factories. - Direct nanobind bindings to OCCT 8.0.0_p1 in a single
compas_occt._occtmodule (one OCCT copy). - STEP / IGES / STL / BREP read & write.
OCCBrep.to_step_with_attributes/from_step_with_attributes: STEP read & write with a per-shape name and user-defined string/integer/real attributes, stored asgeneral_propertyentities via the OCCT XDE layer (cf. OCCT PR #634).OCCBrep.overlap_intersection: the common (shared) region of the faces where two Breps overlap (the boolean intersection of the overlapping faces found byoverlap).- Zero-copy
numpytransfer for tessellation, NURBS control points, and curve discretisation. - Tests for I/O round-trips (incl. STEP attributes), booleans, and zero-copy transfer.
- Example pages: Brep Booleans (union/difference/intersection), Merge Coplanar Faces, and STEP File With Attributes, each with a generated screenshot.
- Tutorial sections for curves, surfaces, breps, and visualisation.
Fixed¤
- Pass
STABLE_ABItonanobind_add_moduleso the compiled_occtextension actually targets Python's stable ABI, matchingwheel.py-api = "cp312". Previously the wheel was taggedcp312-abi3but contained a version-specific module, so cibuildwheel's cp313/cp314 test stage failed withImportError: cannot import name '_occt' from 'compas_occt'. - Pin
typing-extensions>=4.14.1in the cibuildwheel test environment to silence thepydanticdependency-conflict warning.
Changed¤
- Consolidated the per-domain extension modules into a single
_occtmodule so OCCT RTTI/memory is shared across the whole API (this is what makes STEP/IGES round-trip geometry). - CMake builds OCCT 8.0.0_p1 with DataExchange enabled and FreeType disabled; links the Win32 system libraries plus
TKV3d/TKService(required by the XDEXCAFDoc_VisMaterialpath). OCCT is cached underexternal/occt(like Eigen). - Performance: curve
point_at/tangent_at/curvature_at/frame_atdo the domain bounds-check in C++ (one boundary crossing instead of two, ~16% faster); bulk point-list conversions (points,to_points,to_polyline, control points) build COMPAS points from a singlenumpy.tolist()(~25-30% faster).
Removed¤
- Dependency on
pythonocc-core. - Obsolete proof-of-concept demo modules and the Sphinx docs skeleton (replaced by an mkdocs site mirroring
compas_occ).
[0.1.15] 2025-05-21¤
Added¤
Changed¤
Removed¤
[0.1.14] 2025-05-19¤
Added¤
Changed¤
- CMakeLists.txt is fixed to build OCCT static libraries.
Removed¤
[0.1.13] 2025-05-19¤
Added¤
Changed¤
- WIP
Removed¤
[0.1.12] 2025-05-19¤
Added¤
Changed¤
- WIP
Removed¤
[0.1.12] 2025-05-19¤
Added¤
Changed¤
- WIP
Removed¤
[0.1.11] 2025-05-19¤
Added¤
Changed¤
- WIP
Removed¤
[0.1.10] 2025-05-18¤
Added¤
Changed¤
- WIP
Removed¤
[0.1.9] 2025-05-18¤
Added¤
Changed¤
- WIP
Removed¤
[0.1.8] 2025-05-18¤
Added¤
Changed¤
- WIP
Removed¤
[0.1.7] 2025-05-18¤
Added¤
Changed¤
- WIP
Removed¤
[0.1.6] 2025-05-18¤
Added¤
Changed¤
- WIP Universal Binary Support for macOS.
Removed¤
[0.1.5] 2025-05-18¤
Added¤
- Universal Binary Support for macOS.
- OCCT Configuration Fixed
- OCCT Configuration Fixed
Changed¤
Removed¤
[0.1.7] 2025-05-18¤
Added¤
Changed¤
- Ninja generator for windows, disables modules, add clear build status messages.
Removed¤
[0.1.6] 2025-05-18¤
Added¤
Changed¤
- WIP
Removed¤
[0.1.5] 2025-05-18¤
Added¤
Changed¤
- WIP
Removed¤
[0.1.4] 2025-05-18¤
Added¤
Changed¤
- Revert back github release action to build 3 OS jobs.
Removed¤
[0.1.3] 2025-05-18¤
Added¤
Changed¤
- Fix release github action to build 12 jobs.
Removed¤
- Remove unnecessary bash commands in pyproject.toml.
[0.1.2] 2025-05-18¤
Added¤
Changed¤
- Split release into multiple python versions.
Removed¤
[0.1.1] 2025-05-16¤
Added¤
- CMakeLists.txt for building OCCT extensions.
Changed¤
Removed¤
[0.1.0] 2025-05-15¤
Added¤
- Initial release for CI testing purposes.