diff --git a/crates/kicad-parser/src/board.rs b/crates/kicad-parser/src/board.rs index febf37f3..d198f6fb 100644 --- a/crates/kicad-parser/src/board.rs +++ b/crates/kicad-parser/src/board.rs @@ -101,7 +101,7 @@ impl<'a> From<&'a BoardLayer> for &'a str { BoardLayer::In2Cu => "In2.Cu", BoardLayer::In3Cu => "In3.Cu", BoardLayer::In4Cu => "In4.Cu", - BoardLayer::User(ref s) => &s, + BoardLayer::User(ref s) => s, } } } @@ -201,8 +201,7 @@ impl KicadBoard { } pub fn outline(&self, _offset: f64) -> Face { - let outline = self.layer_face(BoardLayer::EdgeCuts); // TODO apply offset around the face - outline + self.layer_face(BoardLayer::EdgeCuts) } } diff --git a/crates/kicad-parser/src/main.rs b/crates/kicad-parser/src/main.rs index a857f45b..12a94cdf 100644 --- a/crates/kicad-parser/src/main.rs +++ b/crates/kicad-parser/src/main.rs @@ -1,3 +1,4 @@ +use opencascade::primitives::Shape; use anyhow::{anyhow, Result}; use glam::DVec3; @@ -14,7 +15,7 @@ fn main() -> Result<()> { // let outline: Face = Into::::into(&board.graphic_rects[0]); let solid = outline.extrude(DVec3 { x: 0.0, y: 0.0, z: 10.0 }); - let mut shape = solid.to_shape(); + let mut shape: Shape = solid.into(); shape.clean(); shape.write_stl("outline.stl")?;