mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-11 21:38:31 +00:00
Read vertex geometry in validation check
This commit is contained in:
parent
22433ac8b8
commit
be89c2ea12
@ -3,7 +3,7 @@ use itertools::Itertools;
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
geometry::Geometry,
|
geometry::Geometry,
|
||||||
queries::AllHalfEdgesWithSurface,
|
queries::{AllHalfEdgesWithSurface, CycleOfHalfEdge},
|
||||||
storage::Handle,
|
storage::Handle,
|
||||||
topology::{HalfEdge, Shell},
|
topology::{HalfEdge, Shell},
|
||||||
validation::{ValidationCheck, ValidationConfig},
|
validation::{ValidationCheck, ValidationConfig},
|
||||||
@ -130,8 +130,28 @@ impl ValidationCheck<Shell> for CurveGeometryMismatch {
|
|||||||
// we have right now are circles, 3 would be enough to check
|
// we have right now are circles, 3 would be enough to check
|
||||||
// for coincidence. But the first and last might be
|
// for coincidence. But the first and last might be
|
||||||
// identical, so let's add an extra one.
|
// identical, so let's add an extra one.
|
||||||
let [a, d] =
|
let [a, d] = [
|
||||||
geometry.of_half_edge(&half_edge_a).boundary.inner;
|
geometry
|
||||||
|
.of_vertex(half_edge_a.start_vertex())
|
||||||
|
.unwrap()
|
||||||
|
.local_on(half_edge_a.curve())
|
||||||
|
.unwrap()
|
||||||
|
.position,
|
||||||
|
geometry
|
||||||
|
.of_vertex(
|
||||||
|
object
|
||||||
|
.find_cycle_of_half_edge(&half_edge_a)
|
||||||
|
.unwrap()
|
||||||
|
.half_edges()
|
||||||
|
.after(&half_edge_a)
|
||||||
|
.unwrap()
|
||||||
|
.start_vertex(),
|
||||||
|
)
|
||||||
|
.unwrap()
|
||||||
|
.local_on(half_edge_a.curve())
|
||||||
|
.unwrap()
|
||||||
|
.position,
|
||||||
|
];
|
||||||
let b = a + (d - a) * 1. / 3.;
|
let b = a + (d - a) * 1. / 3.;
|
||||||
let c = a + (d - a) * 2. / 3.;
|
let c = a + (d - a) * 2. / 3.;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user