Skip to content

Conversation

@theaniketgiri
Copy link

Summary

This PR adds the Curvature enum as the first step toward implementing #1833 (Make a shape's Segment table use handles from the Point table).

Changes

The Curvature enum describes segment curvature by referencing handle point indices in PointDomain, replacing inline coordinate storage. This enables:

  • Shared handle points across segments
  • Attribute-driven transformations
  • Future extensibility for Arc, NURBS, and other curve types

Variants

  • Linear: straight line between endpoints
  • Quadratic { handle: usize }: single control point (index reference)
  • Cubic { handle_start: usize, handle_end: usize }: two control points

Tests

Added 7 unit tests covering all methods.

Related Issues

Closes part of #1833

…1833)

This is the first step toward making SegmentDomain use handles from the
Point table instead of storing coordinates inline.

The Curvature enum describes segment curvature by referencing handle
point indices in PointDomain, enabling:
- Shared handle points across segments
- Attribute-driven transformations
- Future extensibility for Arc, NURBS, and other curve types

Variants:
- Linear: straight line between endpoints
- Quadratic: single control point (index reference)
- Cubic: two control points (index references)

Includes unit tests for all methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant