You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make the adacpp CAD backend stand on its own — no pythonocc fallback (it
also targets wasm, where pythonocc doesn't exist). Two parts:
1. Correct the backend boundary. Phases 3 & 5 routed several ada.occ
*internal* helpers (transform_shape/_to_pos, rotate_shp_3_axis,
apply_booleans, apply_geom_booleans, get_points_from_occ_shape,
get_face_normal, iter_faces_with_normal, serialize_shape, the STEP-writer
validity check) through active_backend(). Those run on raw pythonocc
TopoDS shapes mid-construction — a no-op under OccBackend but broken under
adacpp. Reverted them to pythonocc-direct: they are OccBackend's private
implementation. The backend *verbs* stay and are used only on final
handles (cache build, bbox, clash distance) and the tessellation seam.
2. AdacppBackend.build() now dispatches ada.geom natively:
Box/Cylinder/Sphere/Cone → adacpp.cad.build_* (+ booleans via
adacpp.cad.boolean); unported types raise NotImplementedError (no
fallback). transform/face_plane signatures fixed to the C++ surface;
is_handle uses the real ShapeHandle type. Tessellation routes adacpp
handles through the active backend's tessellate verb (adacpp's native
ShapeTesselator port), pythonocc handles keep the rich ShapeTesselator
path; vertex normals computed for the lean backend mesh.
End-to-end under ADAPY_CAD_BACKEND=adacpp: build + bbox + native tessellate +
GLB + boolean-cut all work for primitives, fully independent of pythonocc.
OccBackend unchanged: tests/core 655 pass (same 4 pre-existing failures),
ruff clean. Toward full ada.geom parity (ExtrudedAreaSolid + surfaces next).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments