Skip to content

Commit

Permalink
Merge pull request #742 from hannobraun/sweep
Browse files Browse the repository at this point in the history
Address coherence issues in sweep algorithm
  • Loading branch information
hannobraun authored Jun 29, 2022
2 parents ac00fa0 + 481dc1c commit c8a51ac
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions crates/fj-kernel/src/algorithms/sweep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,20 @@ fn reverse_local_coordinates_in_cycle(cycles: &CyclesInFace) -> CyclesInFace {
.iter()
.map(|edge| {
let curve = LocalForm::new(
edge.local().curve.local().reverse(),
// This is wrong. We have reversed the direction of the
// surface, thereby modifying its coordinate system. So we
// can't just use the local form of the curve, which is
// expressed in surface coordinates, as-is.
//
// This is a coherence issue, but since coherence validation
// is not complete, and the whole local form stuff is still
// a work in progress, this doesn't lead to any observable
// bugs.
*edge.local().curve.local(),
edge.local().curve.canonical(),
);
let vertices = edge.local().vertices.clone().map(|vertex| {
let local = -(*vertex.local());
LocalForm::new(local, vertex.canonical())
LocalForm::new(*vertex.local(), vertex.canonical())
});
let local = Edge { curve, vertices };
LocalForm::new(local, edge.canonical())
Expand Down

0 comments on commit c8a51ac

Please sign in to comment.