Skip to content

Commit

Permalink
feat: switch to a deterministic hashmap in the mesh intersection algo…
Browse files Browse the repository at this point in the history
…rithm
  • Loading branch information
sebcrozet committed Nov 13, 2024
1 parent aa2a038 commit 8b75e1b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/transformation/mesh_intersection/mesh_intersection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ use na::{Point3, Vector3};
use rstar::RTree;
use spade::{ConstrainedDelaunayTriangulation, InsertionError, Triangulation as _};
use std::collections::BTreeMap;
use std::collections::{hash_map::Entry, HashMap, HashSet};
use crate::utils::hashmap::HashMap;
use std::collections::{hash_map::Entry, HashSet};
#[cfg(feature = "wavefront")]
use std::path::PathBuf;

Expand Down Expand Up @@ -163,7 +164,7 @@ pub fn intersect_meshes_with_tolerances(
// 4: Initialize a new mesh by inserting points into a set. Duplicate points should
// hash to the same index.
let mut point_set = RTree::<TreePoint, _>::new();
let mut topology_indices = HashMap::new();
let mut topology_indices = HashMap::default();
{
let mut insert_point = |position: Point3<Real>| {
insert_into_set(
Expand Down

0 comments on commit 8b75e1b

Please sign in to comment.