bindings: one vocabulary for signature types (Renamed<T, Tag>, AnyOf<Tag> and the meanings built from them); every operation's parameters are typed

The three branches had each grown a helper header (Typed/Shown, Renamed/Named, TypedObject/Choice/...); they are one
semantic_types.hpp now, with Length, Angle, Point3, Direction3, Vector3, Count, Choice and the plain-double/Vec3 variants as
names over the two tools. test_catalog now requires that no parameter of any operation reads "object". Stubs and API pages
regenerated. Full suite: 2494 passed, 63 skipped (the 7 collection errors are the untracked stale test files that predate
this work).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
NiJingzhe
2026-11-04 05:20:34 +08:00
parent 56d887be2f
commit 8ffc8c0d4d
16 changed files with 168 additions and 496 deletions
+3 -4
View File
@@ -5,7 +5,6 @@
// the member or its string value ("local"), and returns members. The casters below are the only
// ones for these types in the module.
#include "bindings.hpp"
#include "typed_args.hpp"
#include <algorithm>
#include <type_traits>
@@ -651,9 +650,9 @@ void bind_operators(py::module_& m) {
m.def(
"apply_tag_rselection",
[](const Shape& scope, const scad::pybind::Typed<TagTargetsName>& targets, const std::string& tag,
scad::pybind::Shown<TopologyPropagation, TopologyPropagationName> topology,
scad::pybind::Shown<LineagePolicy, LineagePolicyName> lineage) {
[](const Shape& scope, const scad::pybind::AnyOf<TagTargetsName>& targets, const std::string& tag,
scad::pybind::Renamed<TopologyPropagation, TopologyPropagationName> topology,
scad::pybind::Renamed<LineagePolicy, LineagePolicyName> lineage) {
static const ErrorSpec spec{
"apply_tag_rselection",
"Failed to attach the tag to the selected shapes.",