Skip to content

Commit

Permalink
fix enhanced-determinism compilation (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrixyz authored Nov 15, 2024
1 parent 91bd280 commit d107f87
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Unreleased

### Fix

- Fix compiling with `enhanced-determinism` feature enabled.
- This is now checked on CI.

## v0.17.2

### Added

- Implement `::to_trimesh` in 2d for `Cuboid` and `Aabb`.
Expand All @@ -21,9 +28,9 @@
- Removed `IntersectionCompositeShapeShapeBestFirstVisitor` (which had been deprecated for a while):
use `IntersectionCompositeShapeShapeVisitor` instead.

### Fixed
### Fix

- Fixed some robustness issues in mesh/mesh intersection when parts of both meshes overlap perfectly.
- Fix some robustness issues in mesh/mesh intersection when parts of both meshes overlap perfectly.
- Improve robustness of convex polygons intersections when all the vertices of one polygon are located in either the
edges or vertices of the other polygon.
- Fix incorrect orientation sometimes given to the polygon output by the convex polygon intersections when one of the
Expand Down
6 changes: 5 additions & 1 deletion src/transformation/mesh_intersection/mesh_intersection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ use crate::query::point::point_query::PointQueryWithLocation;
use crate::query::{visitors::BoundingVolumeIntersectionsSimultaneousVisitor, PointQuery};
use crate::shape::{TriMesh, Triangle};
use crate::utils;
use crate::utils::hashmap::Entry;
use crate::utils::hashmap::HashMap;
use na::{Point3, Vector3};
use rstar::RTree;
use spade::{ConstrainedDelaunayTriangulation, InsertionError, Triangulation as _};
use std::collections::BTreeMap;
use std::collections::{hash_map::Entry, HashSet};
use std::collections::HashSet;
#[cfg(feature = "wavefront")]
use std::path::PathBuf;

Expand Down Expand Up @@ -705,6 +706,9 @@ fn merge_triangle_sets(
// If we are inserting two identical triangles but with mismatching
// orientations, we can just ignore both because they cover a degenerate
// 2D plane.
#[cfg(feature = "enhanced-determinism")]
let _ = e.swap_remove();
#[cfg(not(feature = "enhanced-determinism"))]
let _ = e.remove();
}
}
Expand Down

0 comments on commit d107f87

Please sign in to comment.