Skip to content

v0.1.0a3

Pre-release
Pre-release

Choose a tag to compare

@DavidMStraub DavidMStraub released this 20 Nov 09:47
· 13 commits to main since this release

Breaking API changes

  • polygon() and rectangle() return closed Path2D boundaries. Fill them with profile(). rectangle() is centred on center instead of starting at origin.
  • extrude(), revolve(), sweep(), and loft() accept only a Profile and raise TypeError for curves and paths.
  • box() and cylinder() are centred in XY with their base at z = 0, and origin is removed. Position them with place() or translate().
  • Renamed: loft(interpolation_deg=) to loft(degree=), spline() to spline3d(), Face.center to Face.centroid, and Face.normal to Face.planar_normal.
  • a - b raises EmptyResultError, a ValueError subclass, when no material remains. difference() still returns None.

Modeling

  • place(shape, plane) carries a shape from world XY onto a plane, and Plane.offset() moves a plane along its own axes, for example place(stud, Plane.from_face(top).offset(x=3)).
  • union() accepts any number of shapes and combines them in one kernel operation.
  • a & b intersects two shapes and raises EmptyResultError when they share no material. intersection() still returns None.
  • polyline() builds open planar paths. profile() accepts a single closed curve, so profile(circle(radius=5)) fills a disk, and rectangles, polygons, and circles can all be holes.
  • cylinder() and circle() accept diameter as an alternative to radius.
  • bounds() returns a Bounds named tuple with min, max, size, and center.

Fixes

  • Faces, edges, and vertices from separate queries of one shape compare equal and hash alike, so sets and in work. fillet() and chamfer() round a repeated edge once instead of failing.

See the API reference for signatures and conventions.