mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-05 10:28:27 +00:00
Add SketchSegment::Arc
This commit is contained in:
parent
5952f78037
commit
823486cc64
@ -24,9 +24,7 @@ impl Sketch {
|
||||
|
||||
pub fn arc_from(mut self, start: impl Into<Point<2>>) -> Self {
|
||||
let start = start.into();
|
||||
// Temporarily, while arcs are still being implemented, we are actually
|
||||
// creating a line.
|
||||
self.segments.push(SketchSegment::Line { start });
|
||||
self.segments.push(SketchSegment::Arc { start });
|
||||
self
|
||||
}
|
||||
|
||||
@ -88,12 +86,14 @@ impl Sketch {
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
enum SketchSegment {
|
||||
Arc { start: Point<2> },
|
||||
Line { start: Point<2> },
|
||||
}
|
||||
|
||||
impl SketchSegment {
|
||||
fn start(&self) -> &Point<2> {
|
||||
match self {
|
||||
SketchSegment::Arc { start } => start,
|
||||
SketchSegment::Line { start } => start,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user