mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-09 04:18:28 +00:00
Read boundary from layer in shell validation code
This commit is contained in:
parent
f037fc979c
commit
a33bcc9add
@ -112,7 +112,7 @@ impl ShellValidationError {
|
|||||||
// 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] = edge_a.boundary().inner;
|
let [a, d] = geometry.of_half_edge(edge_a).boundary.inner;
|
||||||
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.;
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ impl ShellValidationError {
|
|||||||
for cycle in face.region().all_cycles() {
|
for cycle in face.region().all_cycles() {
|
||||||
for half_edge in cycle.half_edges() {
|
for half_edge in cycle.half_edges() {
|
||||||
let curve = half_edge.curve().clone();
|
let curve = half_edge.curve().clone();
|
||||||
let boundary = half_edge.boundary();
|
let boundary = geometry.of_half_edge(half_edge).boundary;
|
||||||
let vertices =
|
let vertices =
|
||||||
cycle.bounding_vertices_of_half_edge(half_edge).expect(
|
cycle.bounding_vertices_of_half_edge(half_edge).expect(
|
||||||
"`half_edge` came from `cycle`, must exist there",
|
"`half_edge` came from `cycle`, must exist there",
|
||||||
@ -262,8 +262,11 @@ impl ShellValidationError {
|
|||||||
.all(|d| d < config.distinct_min_distance)
|
.all(|d| d < config.distinct_min_distance)
|
||||||
{
|
{
|
||||||
let boundaries = Box::new(CoincidentHalfEdgeBoundaries {
|
let boundaries = Box::new(CoincidentHalfEdgeBoundaries {
|
||||||
boundaries: [half_edge_a, half_edge_b]
|
boundaries: [half_edge_a, half_edge_b].map(
|
||||||
.map(|half_edge| half_edge.boundary()),
|
|half_edge| {
|
||||||
|
geometry.of_half_edge(half_edge).boundary
|
||||||
|
},
|
||||||
|
),
|
||||||
});
|
});
|
||||||
let curves = Box::new(CoincidentHalfEdgeCurves {
|
let curves = Box::new(CoincidentHalfEdgeCurves {
|
||||||
curves: [half_edge_a, half_edge_b]
|
curves: [half_edge_a, half_edge_b]
|
||||||
@ -389,7 +392,7 @@ fn distances(
|
|||||||
(edge, surface): (&Handle<HalfEdge>, &SurfaceGeometry),
|
(edge, surface): (&Handle<HalfEdge>, &SurfaceGeometry),
|
||||||
geometry: &Geometry,
|
geometry: &Geometry,
|
||||||
) -> Point<3> {
|
) -> Point<3> {
|
||||||
let [start, end] = edge.boundary().inner;
|
let [start, end] = geometry.of_half_edge(edge).boundary.inner;
|
||||||
let path_coords = start + (end - start) * percent;
|
let path_coords = start + (end - start) * percent;
|
||||||
let surface_coords = geometry
|
let surface_coords = geometry
|
||||||
.of_half_edge(edge)
|
.of_half_edge(edge)
|
||||||
|
Loading…
Reference in New Issue
Block a user