Create parametric helix entities

This commit is contained in:
ramox81 committed 2026-08-28 12:48:33 +03:00
1 parent 4d0c2b5389
commit 1c88bb96ba
2 files changed
+359 -186

No files matched your search

+14
View File
@@ -28,6 +28,10 @@ thread_local! {
static RECT_FILLET: Cell<f64> = Cell::new(0.0);
static DONUT_INNER_DIAMETER: Cell<f64> = Cell::new(0.5);
static DONUT_OUTER_DIAMETER: Cell<f64> = Cell::new(1.0);
static HELIX_BASE_RADIUS: Cell<f64> = Cell::new(1.0);
static HELIX_HEIGHT: Cell<f64> = Cell::new(1.0);
static HELIX_TURNS: Cell<f64> = Cell::new(3.0);
static HELIX_COUNTER_CLOCKWISE: Cell<bool> = Cell::new(true);
}
macro_rules! accessors {
@@ -70,6 +74,16 @@ accessors!(get_rect_rotation, set_rect_rotation, RECT_ROTATION);
accessors!(get_rect_chamfer1, set_rect_chamfer1, RECT_CHAMFER1);
accessors!(get_rect_chamfer2, set_rect_chamfer2, RECT_CHAMFER2);
accessors!(get_rect_fillet, set_rect_fillet, RECT_FILLET);
accessors!(get_helix_base_radius, set_helix_base_radius, HELIX_BASE_RADIUS);
accessors!(get_helix_height, set_helix_height, HELIX_HEIGHT);
accessors!(get_helix_turns, set_helix_turns, HELIX_TURNS);
pub fn get_helix_counter_clockwise() -> bool {
HELIX_COUNTER_CLOCKWISE.with(|value| value.get())
}
pub fn set_helix_counter_clockwise(value: bool) {
HELIX_COUNTER_CLOCKWISE.with(|current| current.set(value));
}
accessors!(
get_donut_inner_diameter,
set_donut_inner_diameter,