impl radius 1 and radius 2 for inner-radius and tightness,need to fix for turns

This commit is contained in:
0SlowPoke0
2025-07-13 23:21:07 +05:30
parent 0ec46dbd12
commit 8e43744d7f
12 changed files with 420 additions and 374 deletions

View File

@@ -83,13 +83,21 @@ fn spiral(
#[default(25)] outer_radius: f64,
#[default(5.)] turns: f64,
#[default(90.)] angle_offset: f64,
#[default(0.)] start_angle: f64,
) -> VectorDataTable {
let spiral_type = match spiral_type {
SpiralType::Archimedean => bezier_rs::SpiralType::Archimedean,
SpiralType::Logarithmic => bezier_rs::SpiralType::Logarithmic,
};
VectorDataTable::new(VectorData::from_subpath(Subpath::new_spiral(inner_radius, outer_radius, turns, angle_offset.to_radians(), spiral_type)))
VectorDataTable::new(VectorData::from_subpath(Subpath::new_spiral(
inner_radius,
outer_radius,
turns,
start_angle.to_radians(),
angle_offset.to_radians(),
spiral_type,
)))
}
#[node_macro::node(category("Vector: Shape"))]