cpp: comments no longer describe multi-body Parts

DECISION: only wording. ops_projection.cpp's loop over Part::bodies() stays (it has one element and the loop
shared the code with the appearance carrier); its comment said "every body of a multi-body part". The
on_split comment in the Python boolean test said the pieces of a split cut are "multi-body parts".

WHY: a Part holds exactly one solid since "part: a Part holds exactly one solid" in this series (the owner's
decision after the discussion recorded in design-docs/part-holds-one-solid.md: several solids side by side are
notebook values, not a Part). A comment that says otherwise sends the next reader to the withdrawn design.
No code changes, so the module that was built and verified is unaffected.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Ni Jingzhe
2026-11-10 04:08:07 +08:00
parent 0307aaa40f
commit 7e2e99682e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ namespace {
// Every Part body below `item`, placed by `placement` composed with the component chain.
void collect_placed_solids(const Item& item, const Placement& placement, std::vector<Solid>& out) {
if (const auto* part = std::get_if<PartPtr>(&item)) {
for (const Body& body : (*part)->bodies()) { // every body of a multi-body part, in order
for (const Body& body : (*part)->bodies()) { // the Part's one body
out.emplace_back(kernel::place_shape(body.solid().wrapped(), placement.origin(), placement.x_axis(),
placement.y_axis(), placement.z_axis()));
}
@@ -118,6 +118,6 @@ def test_2d_booleans():
def test_signatures_match_python():
assert parameter_names(scad.union_rsolid) == ["solids", "clean", "glue", "tol", "tracking_policy"] # *solids
# on_split: a cut that splits the body returns its pieces by default (multi-body parts), "error" refuses
# on_split: a cut that splits the body returns its pieces by default (notebook values; a Part holds one solid), "error" refuses
assert parameter_names(scad.cut_rsolid) == ["solids", "skip_non_intersecting", "tracking_policy", "on_split"]
assert parameter_names(scad.boolean_rsolidlist) == ["left", "right", "operation"]