Commit Graph

4 Commits

Author SHA1 Message Date
Brett Lawson fcd5421b29 wire: AdvSurfaceIntersector::set_surface_caches builds missing trees (SmSurfaceCache::GetTree)
set_surface_caches now takes the kernel and the caches mutably and asks each
for its tree with SurfaceCache::get_tree, as SmSurfaceIntersector::Intersect
does (pSC->GetTree(), NER), instead of returning Unported for a cache without
tree. The m_apTrees assignment for callers that ran GetTree themselves
(DoIntersection) is bind_caches.

difftest: a build-trees mode (trees flag 2) in the intersect.adv_surface_intersector
runner, shim and ffi builds both trees with GetTree on fresh caches, compares
them node by node and runs solves over them (18 inline edge_built_tree_* cases).
The shim now sets the intersector's m_cpContext as DoIntersection does before
FindInteriorCurves; left NULL, FlushCurve made context-less curves whose
DropPoint failed, so IsPointOnCurve reported every later start point on a curve.

Regression test: crates/solidcore/tests/adv_surface_intersector_get_tree.rs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MNXLXj2sJf943y2dDF36Vy
2026-10-30 13:31:23 +01:00
Alex Lytvynenko 2e0e38baa4 Serialize native shim calls around the shared API context
Guard common and handwritten entrypoints through native cleanup and callback restoration. Add exclusion, recursive forwarding and exception-unwind probes; p2 adds its concurrent cross-wrapper regression with the port.

Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
2026-10-17 20:33:34 +02:00
jijinbei 875291c4d9 shim: share identical C++ helpers through sc_sm.h, sc_nlib.h, sc_gw.h
125 shims carried private copies of the same small helpers (put_vec, st,
nl_status, Rd, dump_crv, read_nurb, ...). Move the most common, byte-identical
form of each into three headers grouped by the upstream API they need, and have
those shims pull them in with `using sc::<name>;`. Shims with a different
variant keep their own copy; files touched by open PRs are left alone.
`the_context()` stays per shim (its function-local SmContext must not be shared).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FBLgPenT24P1dunqnZR1Dj
2026-10-17 06:43:03 +09:00
bherbruck 995eccc1f0 port: intersect.adv_surface_intersector
SmAdvSurfaceIntersector: singular point classification (Dupin
indicatrices), MakeDupin, the interior-curve global solve
(SolveBranch/LocalSolve/FindBestSubdivisionNode/BranchIsGaussSeparate)
and FindInteriorCurves, with shim, ffi binding and difftest runner.
Base SmGlobalSolver::SolveBranch is now a free function callable from
overrides; surface p2 wires its two intersector stubs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FsWWaoeGNWKgzeGrF2Pkn5
2026-10-13 21:32:11 -04:00