add helper functions for each conic type to calculate (x,y) points

This commit is contained in:
benjamaan476
2025-06-02 21:08:49 +01:00
parent fad8b8209f
commit afe0550e3e
3 changed files with 290 additions and 33 deletions

View File

@ -1156,7 +1156,7 @@ pub enum Path {
Conic {
#[serde(flatten)]
base: BasePath,
}
},
}
/// What kind of path is this?
@ -1409,8 +1409,11 @@ impl Path {
_minor_radius: *minor_radius,
ccw: *ccw,
},
Path::Conic { .. } |
Path::ToPoint { .. } | Path::Horizontal { .. } | Path::AngledLineTo { .. } | Path::Base { .. } => {
Path::Conic { .. }
| Path::ToPoint { .. }
| Path::Horizontal { .. }
| Path::AngledLineTo { .. }
| Path::Base { .. } => {
let base = self.get_base();
GetTangentialInfoFromPathsResult::PreviousPoint(base.from)
}