pub fn check_overlapping_points(mesh: &Mesh, tol: f64) -> Result<(), StrError> {
    let (min, max) = get_mesh_limits(mesh);
    let mut grid = GridSearch::new(&min, &max, 0.01, GsNdiv::Prop(5), GsTol::Spec(tol, tol, tol))?;
    for point in &mesh.points {
        grid.insert(point.id, &point.coords)?;
    }
    for point in &mesh.points {
        match grid.find(&point.coords)? {
            Some(id) => {
                if id != point.id {
                    println!("found overlapping points: {} => {}", id, point.id);
                    return Err("found overlapping points");
                }
            }
            None => (),
        }
    }
    Ok(())
}
/// Checks if there are overlapping points
Checks if there are overlapping points
Checks if there are overlapping points
pub fn check_overlapping_points(mesh: &Mesh, tol: f64) -> Result<(), StrError> {
    let (min, max) = get_mesh_limits(mesh);
    let mut grid = GridSearch::new(&min, &max, 0.01, GsNdiv::Prop(5), GsTol::Spec(tol, tol, tol))?;
    for point in &mesh.points {
        grid.insert(point.id, &point.coords)?;
    }
    for point in &mesh.points {
        match grid.find(&point.coords)? {
            Some(id) => {
                if id != point.id {
                    println!("found overlapping points: {} => {}", id, point.id);
                    return Err("found overlapping points");
                }
            }
            None => (),
        }
    }
    Ok(())
}
pub fn check_overlapping_points ( mesh : & Mesh , tol : f64 ) -> Result < ( ) , StrError > { let ( min , max ) = get_mesh_limits ( mesh ) ; let mut grid = GridSearch :: new ( & min , & max , 0.01 , GsNdiv :: Prop ( 5 ) , GsTol :: Spec ( tol , tol , tol ) ) ? ; for point in & mesh . points { grid . insert ( point . id , & point . coords ) ? ; } for point in & mesh . points { match grid . find ( & point . coords ) ? { Some ( id ) => { if id != point . id { println ! ( " " id point id ) ; return Err ( " " ) ; } } None => ( ) , } } Ok ( ( ) ) }
Checks if there are overlapping points
Checks if there are overlapping points
mesh
&Mesh
tol
f64
mesh
&Mesh
tol
f64