Feature fields: a type for each role (Expr, BodyName, FacePick…) (#1273)
Thanks @jijinbei.
This commit is contained in:
1 parent
3333f8a62b
commit
44968dbfe6
59 files changed
+1505
-1043
No files matched your search
@@ -1193,7 +1193,7 @@ fn offset_length(s: &Session, p: &Value, key: &str, positive: bool) -> Result<(f
|
||||
let cmd = "sketch.offset";
|
||||
let expression = match num(p, key) {
|
||||
Some(v) => format!("{v} mm"),
|
||||
None => expr(p, key).ok_or_else(|| bad(cmd, format!("`{key}` must be a length expression")))?,
|
||||
None => expr(p, key).ok_or_else(|| bad(cmd, format!("`{key}` must be a length expression")))?.into_string(),
|
||||
};
|
||||
let expression = s.doc.with_design_unit(&expression, solidcraft_doc::expr::Kind::Length);
|
||||
let value = s.doc.eval(&expression, solidcraft_doc::expr::Kind::Length)?;
|
||||
|
||||
Reference in new issue
Block a user