diff --git a/CHANGELOG.md b/CHANGELOG.md index 61032e09..1fb8b2f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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`. @@ -25,9 +32,9 @@ - Add `convex_polygons_intersection_points_with_tolerances`, `convex_polygons_intersection_with_tolerances`, and `intersect_meshes_with_tolerances` that let the user specify tolerances value for the collinearity check. -### 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 diff --git a/src/transformation/mesh_intersection/mesh_intersection.rs b/src/transformation/mesh_intersection/mesh_intersection.rs index 305f48dd..90033855 100644 --- a/src/transformation/mesh_intersection/mesh_intersection.rs +++ b/src/transformation/mesh_intersection/mesh_intersection.rs @@ -4,6 +4,7 @@ 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}; #[cfg(feature = "wavefront")] @@ -11,7 +12,7 @@ use obj::{Group, IndexTuple, ObjData, Object, SimplePolygon}; 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; @@ -706,6 +707,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(); } }