Edge Shaping
New shapingEdges(_:matching:) cuts or fills a symmetric cross-section (chamfer or fillet) along the edges of a 3D geometry, selected by criteria rather than hand-picked by side/corner:
Box(10).shapingEdges(.fillet(radius: 2), matching: .along(.z))EdgeShapedescribes the cross-section:.chamfer(depth:),.chamfer(width:),.fillet(radius:),.fillet(depth:), or a fully custom profile via.custom(name:parameters:curve:).EdgeQuerycomposes selection criteria: sharpness range, convexity (.convex/.concave), open/closed, length, direction (along/parallel/perpendicular), spatial bounds (within), and an arbitrary mask shape (within(mask:)).withMaxTurn(_:)controls how sharply a chain of segments can bend and still count as one continuous edge (default 45°).readingEdges(matching:)exposes the matched edges (position, direction, dihedral angle, convexity) for programmatic use and filtering;visualizingEdges(matching:)/visualizingEdges(_:)adds a debug visualization of a selection.
This is a first release of edge shaping. It covers a lot of ground already, but you may still run into rough edges (pun intended) on some geometry. Expect it to keep improving. If you find a case that doesn't work well, please file an issue.
Additions
Importcan import a single element (by id) and its descendants from an SVG file, skipping the rest of the document.withoutMaterials()removes all colors/materials previously applied anywhere within a geometry's subtree.evaluating(_:)lets you perform several geometry reads (bounds, outlines, etc.) inside one async closure via aGeometryEvaluator, instead of nesting single-purpose readers.
Improvements
- Environment directives set inside a
Modelbuilder are now visible to@Environmentreads directly inside that same builder, instead of only affecting geometry built afterward. - Geometry evaluation is significantly faster across the board. 3MF export is 3-5 times faster.
- Fixed occasional mesh defects at edge-profile seams and sharp vertices in
cuttingEdgeProfile/formingEdgeProfile, which is also now up to 5x faster. - Improved SVG font handling.
swept(along:)no longer squishes the cross-section at sharp corners in the path; corners are now mitered so the swept surface keeps a consistent width through the bend.
Bug fixes
- SVG export now properly declares
width/heightin millimeters. Metadata(license, date, application) can now be overridden when combining multiple option sources; a more specific value was previously discarded in favor of an earlier one.- Fixed curve subcurve extraction (e.g.
curve[..<x]) with an upper-bound-only range returning the wrong bounds instead of resolving against the curve's domain.