Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix enhanced-determinism compilation #287

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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