mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-10 12:58:28 +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 {
|
struct VerticesFromSegments {
|
||||||
vertices: Vec<Handle<Vertex>>,
|
vertices: Vec<(SketchSegment, Handle<Vertex>)>,
|
||||||
coincident_vertices: BTreeSet<Handle<Vertex>>,
|
coincident_vertices: BTreeSet<Handle<Vertex>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ impl VerticesFromSegments {
|
|||||||
.or_default()
|
.or_default()
|
||||||
.push(vertex.clone());
|
.push(vertex.clone());
|
||||||
|
|
||||||
vertex
|
(segment, vertex)
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ impl VerticesFromSegments {
|
|||||||
|
|
||||||
fn iter(&self) -> impl Iterator<Item = ([Handle<Vertex>; 2], bool)> {
|
fn iter(&self) -> impl Iterator<Item = ([Handle<Vertex>; 2], bool)> {
|
||||||
self.vertices.iter().cloned().circular_tuple_windows().map(
|
self.vertices.iter().cloned().circular_tuple_windows().map(
|
||||||
|(start, end)| {
|
|((_, start), (_, end))| {
|
||||||
let [start_is_coincident, end_is_coincident] = [&start, &end]
|
let [start_is_coincident, end_is_coincident] = [&start, &end]
|
||||||
.map(|vertex| self.coincident_vertices.contains(vertex));
|
.map(|vertex| self.coincident_vertices.contains(vertex));
|
||||||
let is_internal = start_is_coincident && end_is_coincident;
|
let is_internal = start_is_coincident && end_is_coincident;
|
||||||
|
Loading…
Reference in New Issue
Block a user