This repository was archived by the owner on Jul 11, 2025. It is now read-only.
Releases: tomasf/SwiftSCAD
Releases · tomasf/SwiftSCAD
0.9.0
New Features
- Added new ways to round boxes, allowing customization for a single side or corner.
- Introduced edge profile application for box edges.
- Added support for mixing colors and converting to/from HSBA.
- Introduced
addingExclusive(XOR)
Enhancements
- Environment-related features have been renamed, making them more convenient and familiar.
Environmentis nowEnvironmentValues, aligning with SwiftUI.@EnvironmentValueis now@Environment. - Coloring is now more flexible and applied from the leaves of the geometry tree, enabling more specific color application within an already-colored geometry tree.
- Batch saving is now concurrent, significantly speeding up the process of saving many variants of a model.
Removed Features
- Removed
crossSectioned. Thewithinfeature replaces it with improved functionality.
0.8.1
- Added
readEnvironmentvariants for reading specific key paths from the environment
readEnvironment(\.naturalUpDirection) { naturalUp in
Cylinder(diameter: 1, height: 10)
.rotated(to: naturalUp ?? .up)
}- Added an
@EnvironmentValueproperty wrapper that can be used inShape2D/Shape3Dfor accessing values from the environment.
struct HollowBall: Shape3D {
let diameter: Double
let mountDiameter: Double
@EnvironmentValue(\.tolerance) var tolerance
var body: any Geometry3D {
Sphere(diameter: diameter)
.subtracting {
Cylinder(diameter: mountDiameter + tolerance, height: diameter)
}
}
}0.8.0
- SwiftSCAD now integrates with OpenSCAD, allowing you to directly export models to various formats such as STL. You can use the new
usingOutputFormatsmethod to specify the desired formats. SwiftSCAD automatically detects your OpenSCAD installation. If the executable is not found or you prefer to specify a custom path, put your own path into theOPENSCADenvironment variable. - Bezier paths can now be constructed using a new result builder.
- Fillets can now be ellipse-shaped (different width and height).
- Added
within(x:y:[z:])for masking a geometry within limits for certain axes. - A
.macOSentry is no longer needed inplatformsin package manifests. measureBoundsnow gives you an optionalBoundingBox, which isnil(instead of.empty) when there's no bounding box- Added new angle-based initializers for
Cylinder. - All
convexityparameters have been removed. Instead, there's a newpreviewConvexityenvironment property. EnvironmentReaderis nowreadEnvironment.- Tons of smaller additions, internal improvements and refactoring.
0.7.1
Improvements
- Added
Circle.correspondingCoordinate(for:) - Added
rotate(x:y:[z:]around:)methods for rotating around a pivot, expressed as aGeometryAlignment. - Distribution methods now accept any
Sequenceinstead of just arrays. - Added convenience method
clonedAt(x:y:[z:]), for cloning + translating. - Batch saving now writes files in a predicable order every time.
- Added methods for applying prefixes or suffixes to all geometry names.
Bug fixes
- Fixed bug in
CrossSectionwhere offsets were applied incorrectly withAxisDirection.positive. - Fixed bug with incorrect alignment in some cases when using
Stack.
Release 0.7
This is the first versioned release of SwiftSCAD. A lot of internals have been cleaned up and tests now use Swift Testing, so the code seems mature enough. And for SPM, you now have a proper version number to hang your hats on.