Declare std::offsetPlane in KCL (#6344)

* Declare std::offsetPlane in KCL

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Use two axes to define planes in KCL

Signed-off-by: Nick Cameron <nrc@ncameron.org>

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-04-24 22:01:27 +12:00
committed by GitHub
parent 20c2ce3bac
commit 83a87b046f
187 changed files with 115960 additions and 133737 deletions

View File

@ -1108,7 +1108,6 @@ impl<'a> FromKclValue<'a> for super::sketch::PlaneData {
origin: value.origin,
x_axis: value.x_axis,
y_axis: value.y_axis,
z_axis: value.z_axis,
});
}
// Case 1: predefined plane
@ -1129,13 +1128,7 @@ impl<'a> FromKclValue<'a> for super::sketch::PlaneData {
let origin = plane.get("origin").and_then(FromKclValue::from_kcl_val)?;
let x_axis = plane.get("xAxis").and_then(FromKclValue::from_kcl_val)?;
let y_axis = plane.get("yAxis").and_then(FromKclValue::from_kcl_val)?;
let z_axis = plane.get("zAxis").and_then(FromKclValue::from_kcl_val)?;
Some(Self::Plane {
origin,
x_axis,
y_axis,
z_axis,
})
Some(Self::Plane { origin, x_axis, y_axis })
}
}