Skip to content

Commit da92206

Browse files
committed
Prepare to support arcs in sketches
1 parent aa86ce0 commit da92206

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

experiments/2025-03-18/src/geometry/sketch.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ impl Sketch {
2828
radius: impl Into<Scalar>,
2929
) -> Self {
3030
let start = start.into();
31-
let _ = radius.into();
31+
let radius = radius.into();
3232

33-
self.segments.push(SketchSegment::Arc { start });
33+
self.segments.push(SketchSegment::Arc { start, radius });
3434

3535
self
3636
}
@@ -48,7 +48,9 @@ impl Sketch {
4848
.iter()
4949
.map(|([segment, next_segment], is_internal)| {
5050
let curve = match segment.segment {
51-
SketchSegment::Arc { .. } => {
51+
SketchSegment::Arc { radius, .. } => {
52+
let _ = radius;
53+
5254
// We are creating a line here, temporarily, while
5355
// support for arcs is being implemented.
5456
Handle::new(Curve::line_from_vertices([
@@ -78,7 +80,7 @@ impl Sketch {
7880

7981
#[derive(Clone, Copy)]
8082
enum SketchSegment {
81-
Arc { start: Point<2> },
83+
Arc { start: Point<2>, radius: Scalar },
8284
Line { start: Point<2> },
8385
}
8486

0 commit comments

Comments
 (0)