mirror of
https://github.com/hannobraun/Fornjot
synced 2025-07-19 08:26:05 +00:00
Prepare for follow-on change
This commit is contained in:
parent
8dbb2e4a95
commit
25542f76a0
@ -1,3 +1,7 @@
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use itertools::Itertools;
|
||||
|
||||
use crate::{
|
||||
math::{Plane, Point},
|
||||
object::Handle,
|
||||
@ -20,6 +24,19 @@ impl Sketch {
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let mut internal_pairs = BTreeMap::new();
|
||||
|
||||
for (a, b) in vertices.iter().circular_tuple_windows() {
|
||||
let mut pair = [a, b];
|
||||
pair.sort();
|
||||
|
||||
if let Some(internal) = internal_pairs.get_mut(&pair) {
|
||||
*internal = true;
|
||||
} else {
|
||||
internal_pairs.insert(pair, false);
|
||||
}
|
||||
}
|
||||
|
||||
let half_edges = vertices
|
||||
.into_iter()
|
||||
.map(|start| Handle::new(HalfEdge { start }));
|
||||
|
Loading…
x
Reference in New Issue
Block a user