Sketch: explicit planes take a frame (world or component) and the reply says which (#6000) (#6015)

* claim: #6000

* Sketch: explicit planes take a frame, world or component (#6000)

sketch.create and sketch.redefine take frame: "world" (the default,
as before) or "component" for an explicit {origin, x_dir, y_dir}
plane. The reply says which frame the plane was read in, with a note
when a world plane goes into a moved or turned component. frame on a
named plane or a face is refused: those are where they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DuBearte
2026-10-25 01:56:10 +00:00
committed by GitHub
parent 2e3f27f06e
commit ab03aa5bc5
4 changed files with 89 additions and 6 deletions
+5 -2
View File
@@ -409,8 +409,11 @@ pub fn to_local(s: &Session, id: &str, params: &Value) -> Option<Value> {
out["params"] = inner;
return Some(out);
}
// Exact face capture retains the original world pick and occurrence identity.
if matches!(id, "sketch.create" | "sketch.redefine") && params.get("plane").and_then(|plane| plane.get("face")).is_some() {
// Exact face capture retains the original world pick and occurrence identity; an explicit
// plane with `frame: "component"` is already in the component's own coordinates (#6000).
if matches!(id, "sketch.create" | "sketch.redefine")
&& (params.get("plane").and_then(|plane| plane.get("face")).is_some() || params.get("frame").and_then(Value::as_str) == Some("component"))
{
return None;
}
let keys = table(id);