solid.hole: position takes length expressions and follows them (#1678) (#1683)

Thanks @DuBearte.
This commit is contained in:
DuBearte authored and GitHub committed 2026-10-16 08:26:23 -04:00
1 parent 838d0e86f2
commit dd5278a402
8 files changed
+128 -17

No files matched your search

+4 -2
View File
@@ -21,7 +21,8 @@
//! `|i: usize, n: usize| -> &'static str`; it may read the other fields;
//! - `pinned`: a face pick that stays where it is when the feature moves;
//! `pick_if = cond`: a face pick when `cond` holds, else a position;
//! - `placement`: a primitive's placement point (its X, Y and Z expressions are not inputs);
//! - `placement`: a primitive's placement point, or an optional one (its X, Y and Z expressions
//! are not inputs);
//! - `profiles_of = sketch_field`, optionally with `when = cond`: a profile selection;
//! - `after = field`: visit this field right after `field` instead of in declaration order (where
//! the parameter names already given need it);
@@ -162,7 +163,8 @@ fn walk_field(b: &Ident, r: &Roles, which: Which, mutable: bool) -> Tokens {
#w::Each::<#w::Vec3>::#each(#b, &mut |p| f(if #pick { #w::Geo::Pick(p) } else { #w::Geo::Pos(p) }));
}
}
Some(Geo::Placement) => quote! { f(#w::Geo::Placement(#b)); },
// A point or an optional one (a hole's `at`, #1678).
Some(Geo::Placement) => quote! { #w::Each::<crate::PointExpr>::#each(#b, &mut |p| f(#w::Geo::Placement(p))); },
Some(Geo::Profiles { .. }) => {
let (id, when) = (pre(b, "sketch"), pre(b, "when"));
quote! {