mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-21 16:11:00 +00:00
916b91e8d0
solidcore's main at c0d3cc0124, rewritten to one commit per same-author run per PR (2,800 commits, author credit kept; tree identical). Full original history: tangency-labs/solidcore archive/full-history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> git-subtree-dir: solidcore git-subtree-mainline:44525da669git-subtree-split:c440e5f892
1.9 KiB
Vendored
1.9 KiB
Vendored
surface.surface_cache_p1
GetSurfaceContinuityskips the last internal v knot. The v loop runsiv + 1 < size - 1(the u loopiu + 1 < size), so the continuity at the last internal v knot is never looked at. Kept; the difftest covers it.sm_CullArrayon an empty array ends withSetSize(1), which callocs one0.0element; the port returns[0.0]too.BuildTreeTopre-initialisesm_sAuxMgr(active count 0, blocks kept), so the head nodes it makes reuse the aux memory of any earlierSM_AD_AUX_DATA/SM_AD_BEZIER_SURFACE_HEADnodes; upstream only calls it on first generationSmBezierPatchnodes, which the difftest (and the ffi) keep to.SmBezierAux2d::BuildPolarBoxdereferencesmBA_pSurfaceof every node on the chain;BuildTreeTopheads have a null one untilBuildTreeresets them to the owner surface. The port returnsInvalidInputfor a node without surface.SmTreeNode::GetFirstBezierPatchfrom a bare tree. The decomposition data (SmBezierPatchinm_sBezMgr,SmBezierAux2dinm_sAuxMgr, the subdivision surfaces) lives in theSurfaceCachearenas; tree nodes carry the arena slot (SurfaceAux::slot).SurfaceCache::first_bezier_patchanswers from the cache, the tree-onlyTree::first_bezier_patch(andSmSurfaceGridElement::Init,sm_CsArePerpenDisjoint, which start from a bare tree node) stayUnporteduntil the tree construction (surface.surface_cache_p3) hands the data to the tree, asCurveCache::build_treedoes withset_curve_data.- Deferred cases: every polar box (
SmBSplineSurface::CalculateBoundingBoxsamplesSmSurface::EvaluateNormal,surface.surface_p7), boundary bounding planes with collinear samples (straight boundaries:EvaluateNormal), everysm_ComputeBezierApproximation(SmSurface::IsSingularity,surface.surface_p5) andGetFace(surface.surface_p1).