Skip to content

Add tapered-boss (convex cone) feature: detect, plan, rebuild as AdditiveCone - #12

Merged
MasoudMiM merged 1 commit into
mainfrom
feature/additive-cones
Oct 28, 2026
Merged

MasoudMiM merged 1 commit into
mainfrom
feature/additive-cones

Conversation

@MasoudMiM

Copy link
Copy Markdown
Owner

Why

Phase 2, item 1 (feature depth). The core already fit convex cones (coverage 1.0), but the planner/executor had no additive path — so a tapered boss (conical stud, draft-angled boss) was left unassigned, and the terrace machinery substituted a straight-walled pad of the base radius: the right footprint at the wrong profile, reported as a clean reconstruction.

What

  • Detection (features.py): new cone_boss rule — a full-revolution convex cone whose wide end (base) opens at a face and whose narrow end (tip) is capped by a disk or runs to a point. The convex mirror image of the existing cone_pocket rule; claimed only when both ends are explained, else left unassigned (honesty contract).
  • Planning (history.py): cone_boss → additive ConeOp (r_mouth=base radius, r_far=tip, additive=True). The tip cap is excluded from the base extent (like the cylindrical boss cap), so the base pad is not inflated to the boss top.
  • Executor (build.py): additive branch in the cone dispatch → PartDesign::AdditiveCone. The base leg is sunk a hair into the face (off the coincident-face boolean, the cut buffer doctrine applied to an add); the tip is placed exactly (it is the outermost point — extending it would overshoot the source).
  • Headless rebuilds: the additive profile was built for the pocket (subtractive) shape in both proxies; fixed in _rebuild_mesh (test) and plan_to_mesh (deviation-correction path) so a boss rebuilds as a boss.
  • Tests: 23 new test_cone_boss.py tests (detection, negatives, planning, round-trip) + a tapered-boss smoke case. Headless suite 525 passed / 1 xfailed; smoke 97/97 in FreeCAD 1.1.4.

Verification

  • Headless: .venv/bin/python -m pytest freecad/meshtofeatures_wb/tests/ -q → 525 passed, 1 xfailed (was 502).
  • FreeCAD smoke (1.1.4 AppImage): 97/97, tapered boss rebuilds to exact volume (20948.76 vs 20948.76) via a real PartDesign::AdditiveCone.
  • plan_to_mesh + corrections: <0.01% volume for both truncated and pointed bosses.

Docs synced: README (feature + limitations), CHANGELOG, ROADMAP (Phase 2 item 1 marked done).

…n a face, capped-or-pointed tip), plan as an additive ConeOp, and rebuild as a PartDesign::AdditiveCone (base sunk into the face off the coincident boolean, tip exact). The core already fit convex cones but had no additive path, so a tapered boss was left unassigned and the terrace machinery substituted a straight-walled pad of the base radius. Also exclude the tip cap from the base extent (like the cylindrical boss cap) so the base pad is not inflated to the boss top, and fix the additive profile in the two headless rebuilds (_rebuild_mesh, plan_to_mesh). 23 new test_cone_boss.py tests (detection/planning/round-trip) + a smoke case; headless suite 525 passed.
@MasoudMiM
MasoudMiM merged commit b6e14cb into main Oct 28, 2026
4 checks passed
@MasoudMiM
MasoudMiM deleted the feature/additive-cones branch October 31, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant