Skip to content

v0.7.0

Choose a tag to compare

@knipknap knipknap released this 14 Jun 03:07
· 189 commits to main since this release

Highlights

Type system cleanup

  • Remove IntPoint/IntPolygon parallel type system — nesting now composes cleanly with the float-based Geometry pipeline (Point/Polygon). Eliminates polygon_to_int_path / int_path_to_polygon manual conversions.
  • Convert Rect, CubicBezier, BezierControls from type aliases to newtype structs — stronger typing, no more raw tuple confusion.
  • Migrate Point and Point3D to newtype structs (previously type aliases).
  • Remove duplicate and obsolete scaling mechanisms throughout the entire API.

Nesting / packing

  • Add nesting module with NFP, IFP, placement, collision detection, spatial grid, gravity, and genetic algorithm optimizer.
  • Enhance placement module: hulls on PlacedPart/NestResult, improved candidate generation and evaluation.
  • Group polygon operations and fitness calculation functions.

Geometry engine

  • Migrate geo::Geometry to Vec<Command> internal representation — simpler, more composable.
  • Geometry builder methods (move_to, line_to, etc.) now return &mut Self for chaining.
  • Command::Bezier control points are now 3D, eliminating Z-heuristic in from_geometry.
  • Add segment_bounds, segments_in_frame, get_positions_at_distances, get_combined_rect, get_arc_sweep.
  • Remove redundant dump/load API (use to_dict/from_dict), obsolete segments alias.

SVG parsing

  • Extend SVG parser with full path command support (arcs, quadratics, smooth cubics), transforms (scale, rotate, skew, matrix), basic shapes (rect, circle, ellipse, line, polyline, polygon), visibility (display:none, visibility:hidden), and nested group transforms.
  • Return Result from SVG parsing with expanded RaygeoError enum instead of panicking.
  • Fix edge cases returning empty lists.

Toolpath / Ops

  • Single-pass gap clipping replaces multi-pass clip_at loop (faster, correct).
  • Tab gaps wrap around the seam on closed paths.
  • Wire on_progress callback in fit_curves.
  • Do not split scanlines in optimizer.
  • Rename disable_air_assistenable_air_assist(false), MoveCmd::BezierTo fields c1/c2control1/control2.

Build & ergonomics

  • Make PyO3 optional — core library works without Python (cargo build --no-default-features).
  • Gate Python-only ops modules behind cfg(feature = "python").
  • Split large algo.rs into submodules, shape.rs into per-shape Python submodules.
  • Replace unsafe unwrap() calls with proper error handling.
  • Replace glob re-exports with explicit listings.
  • Remove root-level re-exports of Geometry, Ops, Rect; canonical paths now geo::geometry::Geometry, etc.
  • Bump rand to 0.9.