mod carve;
mod chain;
mod collapse;
mod corner;
mod edge;
mod fold;
mod miter;
mod network;
mod planar_chart;
mod restrict;
mod runout;
mod stations;
mod rows;
mod track_fit;
thread_local! {
static REFINE_OFF_FOR_TEST: std::cell::Cell<bool> = const { std::cell::Cell::new(false) };
}
pub(crate) fn station_refinement_on() -> bool {
std::env::var("BREP_BLEND_REFINE").as_deref() != Ok("0")
&& !REFINE_OFF_FOR_TEST.with(|off| off.get())
}
thread_local! {
static BLEND_NOTES: std::cell::RefCell<Vec<String>> = const { std::cell::RefCell::new(Vec::new()) };
}
pub(crate) fn record_blend_note(note: String) {
BLEND_NOTES.with(|notes| notes.borrow_mut().push(note));
}
pub fn take_blend_notes() -> Vec<String> {
BLEND_NOTES.with(|notes| std::mem::take(&mut *notes.borrow_mut()))
}
pub(crate) fn blend_notes_mark() -> usize {
BLEND_NOTES.with(|notes| notes.borrow().len())
}
pub(crate) fn blend_notes_truncate(mark: usize) {
BLEND_NOTES.with(|notes| notes.borrow_mut().truncate(mark));
}
pub use chain::{blend_smooth_chain, blend_smooth_chain_if_closed};
pub(crate) use corner::round_concave_chain_corner;
pub use corner::round_convex_corner;
pub use edge::{blend_closed_edge, blend_edge_variable, blend_open_edge};
pub(crate) use collapse::is_full_width_collapse;
pub(crate) use planar_chart::{
fit_planar_charts_to_trims, is_planar_chart_refusal,
};
pub(crate) use track_fit::PCURVE_OFF_FLOOR;
pub(crate) use edge::{consumed_band, is_consumed_snap, is_rail_collapse};
pub(crate) use network::{
blend_star_network, degenerate_corner_setbacks, mixed_convexity_corner, DegenerateSetback,
MixedCorner,
};
pub(crate) use miter::is_marched_fit_off_carriers;
pub(crate) use runout::{plan_runout, RunoutPlan};
pub(crate) use fold::{is_wall_fold, WALL_FOLDS};
pub(crate) use stations::is_ball_off_carrier;