extern crate core;
use std::error::Error;
pub mod airfoil;
pub mod common;
pub mod errors;
pub mod func1;
pub mod geom2;
pub mod geom3;
pub mod io;
pub mod metrology;
pub mod raster2;
pub mod raster3;
pub mod sensors;
pub mod stats;
#[cfg(feature = "three_d")]
pub mod td;
pub mod utility;
pub type Result<T> = std::result::Result<T, Box<dyn Error>>;
pub type ResultCode<T> = std::result::Result<T, usize>;
pub use alum;
pub use colorgrad;
pub use imageproc;
pub use imageproc::image;
pub use levenberg_marquardt;
pub use parry2d_f64 as parry2d;
pub use parry3d_f64 as parry3d;
pub use parry3d_f64::na;
pub use rayon;
pub use serde;
pub use serde_json;
#[cfg(feature = "three_d")]
pub use three_d;
pub use func1::{Func1, Gaussian1, Line1, Polynomial, Series1};
pub use common::{AngleDir, AngleInterval};
pub use geom2::{
Arc2, Circle2, Curve2, CurveStation2, Iso2, KdTree2, Point2, SurfacePoint2, SvdBasis2,
UnitVec2, Vector2,
};
pub use geom3::{
Curve3, CurveStation3, Iso3, KdTree3, Line3, Manifold1Pos3, Mesh, Plane3, Point3, PointCloud,
PointCloudFeatures, PointCloudKdTree, PointCloudOverlap, Sphere3, SurfacePoint3, SvdBasis3,
UnitVec3, Vector3,
};
pub use common::{To2D, To3D, TransformBy};
pub use common::{BestFit, Resample, SelectOp, Selection, Smoothing};
#[cfg(test)]
pub mod tests {
use crate::io::{deflate_bytes, u_bytes_to_mesh, u_bytes_to_mesh_data};
use crate::na::{Translation3, UnitQuaternion};
use crate::{Iso3, Mesh, Point3, Vector3};
use rand::distr::Uniform;
use std::f64::consts::PI;
pub fn stanford_bun_4() -> Mesh {
let bytes = include_bytes!("../tests/data/stanford_bun_4.umesh.gz");
u_bytes_to_mesh(&deflate_bytes(bytes).unwrap()).unwrap()
}
pub fn stanford_bun_2() -> Mesh {
let bytes = include_bytes!("../tests/data/stanford_bun_2.umesh.gz");
u_bytes_to_mesh(&deflate_bytes(bytes).unwrap()).unwrap()
}
pub fn stanford_bun_3() -> Mesh {
let bytes = include_bytes!("../tests/data/stanford_bun_3.umesh.gz");
u_bytes_to_mesh(&deflate_bytes(bytes).unwrap()).unwrap()
}
pub fn engine_blade() -> Mesh {
let bytes = include_bytes!("../tests/data/engine-blade.umesh.gz");
u_bytes_to_mesh(&deflate_bytes(bytes).unwrap()).unwrap()
}
pub fn get_test_data_path() -> std::path::PathBuf {
let mut path = std::env::current_dir().unwrap();
path.push("tests");
path.push("data");
path
}
pub fn get_test_file_path(str: &str) -> std::path::PathBuf {
let mut path = get_test_data_path();
path.push(str);
path
}
}