use crate::topology::{CoedgeRecord, EdgeRecord, FaceRecord, LoopRecord, VertexRecord};
use crate::transform_topology::{transform_curve, transform_surface};
use crate::offset_retrim::{boundary_samples, retrim_face_in_solid};
use crate::offset_reintersect::{
arc_of_section, edge_seeds, match_marched_rim_direction, reintersect_carriers, section_corner,
MarchPolicy, ReintersectRefusal, RimLane,
};
use crate::{
build_pcurve_on_surface, build_pcurve_on_surface_range, intersect_analytic_pair,
intersect_curve_surface, make_line, make_revolution, parameter_space_area,
plane_ruled_section_arc,
project_point_to_curve, solid_model_scale, solid_signed_volume, AffineTransform,
AnalyticSurface, BrepSolid,
NurbsCurve, NurbsSurface, OffsetEvaluator, OffsetNormal, SurfaceSide, Vec3,
};
use rustc_hash::{FxHashMap as HashMap, FxHashSet as HashSet};
#[path = "direct_edit/geom.rs"]
mod geom;
#[path = "direct_edit/delete_face.rs"]
mod delete_face;
#[path = "direct_edit/delete_faces.rs"]
mod delete_faces;
#[path = "direct_edit/refit_faces.rs"]
mod refit_faces;
#[path = "direct_edit/face_move.rs"]
mod face_move;
#[path = "direct_edit/face_move_carrier.rs"]
mod face_move_carrier;
#[path = "direct_edit/face_move_recut.rs"]
mod face_move_recut;
#[path = "direct_edit/blend_rebuild.rs"]
mod blend_rebuild;
#[path = "direct_edit/face_rotate.rs"]
mod face_rotate;
#[path = "direct_edit/face_draft.rs"]
mod face_draft;
pub use face_draft::{draft_faces, draft_faces_parted};
#[path = "direct_edit/face_offset.rs"]
mod face_offset;
#[path = "direct_edit/face_offset_sphere.rs"]
mod face_offset_sphere;
#[path = "direct_edit/face_offset_torus.rs"]
mod face_offset_torus;
#[path = "direct_edit/face_offset_revolution.rs"]
mod face_offset_revolution;
#[path = "direct_edit/face_offset_freeform.rs"]
mod face_offset_freeform;
#[path = "direct_edit/closed_heal.rs"]
mod closed_heal;
#[path = "direct_edit/open_carriers.rs"]
mod open_carriers;
#[path = "direct_edit/open_heal.rs"]
mod open_heal;
#[path = "direct_edit/open_heal_census.rs"]
mod open_heal_census;
#[path = "direct_edit/closed_heal_census.rs"]
mod closed_heal_census;
#[path = "direct_edit/triple_point.rs"]
mod triple_point;
#[path = "direct_edit/corner_heal.rs"]
mod corner_heal;
#[path = "direct_edit/closed_band.rs"]
mod closed_band;
#[path = "direct_edit/split_band.rs"]
mod split_band;
#[path = "direct_edit/conical_cap.rs"]
mod conical_cap;
#[path = "direct_edit/prism_ring.rs"]
mod prism_ring;
#[path = "direct_edit/fill_gap.rs"]
mod fill_gap;
#[path = "direct_edit/blend_network_heal.rs"]
mod blend_network_heal;
use blend_network_heal::*;
use closed_band::*;
use split_band::*;
use prism_ring::*;
use closed_heal::*;
use closed_heal_census::*;
use corner_heal::*;
use delete_face::*;
use face_move_carrier::*;
use geom::*;
use open_carriers::*;
use open_heal::*;
use open_heal_census::*;
use triple_point::*;
pub mod face_refusal_slugs {
pub const SOLID_INVERSION: &str = "solid_inversion";
pub const SPHERE_SOLID_INVERSION: &str = "sphere_solid_inversion";
pub const INVERTED: &str = "inverted";
pub const EDGE_INVERSION: &str = "edge_inversion";
pub const CURVED_EDGE_INVERSION: &str = "curved_edge_inversion";
pub const PARALLEL_LIMIT: &str = "parallel_limit";
pub const AXIS_PARALLEL_LIMIT: &str = "axis_parallel_limit";
pub const RIGID_SCALE: &str = "scale";
pub const PIVOT_GEOMETRY: &str = "pivot_geometry";
}
use face_refusal_slugs::*;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FaceTransformReason {
InsideOut,
PastNeighbour,
TurnParallel,
RigidScale,
NoPivot,
}
pub fn face_transform_reason(refusal: &crate::KernelRefusal) -> Option<FaceTransformReason> {
use crate::RefusalClass::{Internal, InvalidInput, UnsupportedGeometry};
use FaceTransformReason::*;
match &refusal.class {
UnsupportedGeometry { what } if what == SOLID_INVERSION || what == SPHERE_SOLID_INVERSION => {
Some(InsideOut)
}
Internal { what } | InvalidInput { what } if what == INVERTED => Some(InsideOut),
UnsupportedGeometry { what } if what == EDGE_INVERSION || what == CURVED_EDGE_INVERSION => {
Some(PastNeighbour)
}
UnsupportedGeometry { what } if what == PARALLEL_LIMIT || what == AXIS_PARALLEL_LIMIT => {
Some(TurnParallel)
}
InvalidInput { what } if what == RIGID_SCALE => Some(RigidScale),
InvalidInput { what } if what == PIVOT_GEOMETRY => Some(NoPivot),
_ => None,
}
}
pub use delete_face::{delete_face_and_heal, resolve_face_by_point};
pub use delete_faces::delete_faces_and_heal;
pub use refit_faces::{
refit_faces_as_one, refit_refusal_phrases, RefitCarrier, RefitReport, RefitSurfaceKind,
};
pub use face_move::{move_faces, move_faces_unchecked};
pub use face_rotate::{rotate_faces, rotate_faces_unchecked};
pub(crate) use face_rotate::rotate_faces_rigid;
pub use face_move_carrier::{route_reading, RouteReading};
pub use face_move_recut::{recut_moved_planes, recut_moved_planes_rigid, reblend_lost_fillets};
pub use blend_rebuild::{rebuild_displaced_blends, with_blend_rebuild_decline};
pub use face_offset::{offset_ruled_face, offset_ruled_face_unchecked};
pub use face_offset_sphere::offset_sphere_face;
pub use face_offset_torus::offset_torus_face;
pub use face_offset_revolution::offset_revolution_face;
pub use face_offset_freeform::offset_freeform_face;