From 7e2e99682efce46ee97a6b73dc232c1711c40c43 Mon Sep 17 00:00:00 2001 From: Ni Jingzhe <1448976235@qq.com> Date: Tue, 10 Nov 2026 04:08:07 +0800 Subject: [PATCH] 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 --- src/cpp/src/product/ops_projection.cpp | 2 +- src/cpp/tests/python/test_ops_features_booleans.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/src/product/ops_projection.cpp b/src/cpp/src/product/ops_projection.cpp index 85f9777d..1a08de93 100644 --- a/src/cpp/src/product/ops_projection.cpp +++ b/src/cpp/src/product/ops_projection.cpp @@ -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& out) { if (const auto* part = std::get_if(&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())); } diff --git a/src/cpp/tests/python/test_ops_features_booleans.py b/src/cpp/tests/python/test_ops_features_booleans.py index 81527eac..8a5face3 100644 --- a/src/cpp/tests/python/test_ops_features_booleans.py +++ b/src/cpp/tests/python/test_ops_features_booleans.py @@ -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"]