mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-09 20:38:30 +00:00
Prepare to support arcs in sketches
This commit is contained in:
parent
12a3c597fc
commit
85f92c8098
@ -67,7 +67,7 @@ impl SketchSegment {
|
||||
}
|
||||
|
||||
struct VerticesFromSegments {
|
||||
vertices: Vec<Handle<Vertex>>,
|
||||
vertices: Vec<(SketchSegment, Handle<Vertex>)>,
|
||||
coincident_vertices: BTreeSet<Handle<Vertex>>,
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ impl VerticesFromSegments {
|
||||
.or_default()
|
||||
.push(vertex.clone());
|
||||
|
||||
vertex
|
||||
(segment, vertex)
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
@ -109,7 +109,7 @@ impl VerticesFromSegments {
|
||||
|
||||
fn iter(&self) -> impl Iterator<Item = ([Handle<Vertex>; 2], bool)> {
|
||||
self.vertices.iter().cloned().circular_tuple_windows().map(
|
||||
|(start, end)| {
|
||||
|((_, start), (_, end))| {
|
||||
let [start_is_coincident, end_is_coincident] = [&start, &end]
|
||||
.map(|vertex| self.coincident_vertices.contains(vertex));
|
||||
let is_internal = start_is_coincident && end_is_coincident;
|
||||
|
Loading…
Reference in New Issue
Block a user