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 and sebcrozet committed Nov 19, 2024
1 parent 2438b42 commit aa2a0c2
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 @@ -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
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,14 +4,15 @@ 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")]
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;

Expand Down Expand Up @@ -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();
}
}
Expand Down

0 comments on commit aa2a0c2

Please sign in to comment.