Add gizmos for interacting with the Spiral node (#2851)

* made spiral node

* number of turns in decimal and arc-angle implementation

* logarithmic spiral

* unified log and arc spiral into spiral node

* add spiral shape in shape tool

* fix min value and degree unit

* make it compile

* impl turns handle gizmo

* chore : Refactoring PR #2851 for current code base with some fixes

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Annonnymmousss <jatin02012006@gmail.com>
This commit is contained in:
0SlowPoke0
2026-02-13 04:03:40 +05:30
committed by GitHub
parent cd241095a2
commit ea68d62ec4
6 changed files with 353 additions and 3 deletions

View File

@@ -348,7 +348,7 @@ impl<PointId: Identifier> Subpath<PointId> {
let mut prev_in_handle = None;
let theta_end = turns * std::f64::consts::TAU + start_angle;
let b = calculate_b(a, turns, outer_radius, spiral_type);
let b = calculate_growth_factor(a, turns, outer_radius, spiral_type);
let mut theta = start_angle;
while theta < theta_end {
@@ -381,7 +381,7 @@ impl<PointId: Identifier> Subpath<PointId> {
}
}
pub fn calculate_b(a: f64, turns: f64, outer_radius: f64, spiral_type: SpiralType) -> f64 {
pub fn calculate_growth_factor(a: f64, turns: f64, outer_radius: f64, spiral_type: SpiralType) -> f64 {
match spiral_type {
SpiralType::Archimedean => {
let total_theta = turns * TAU;