Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

Releases: tomasf/SwiftSCAD

0.9.0

19 Nov 15:16

Choose a tag to compare

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. Environment is now EnvironmentValues, aligning with SwiftUI. @EnvironmentValue is 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. The within feature replaces it with improved functionality.

0.8.1

01 Nov 11:21

Choose a tag to compare

  • Added readEnvironment variants for reading specific key paths from the environment
readEnvironment(\.naturalUpDirection) { naturalUp in
    Cylinder(diameter: 1, height: 10)
        .rotated(to: naturalUp ?? .up)
}
  • Added an @EnvironmentValue property wrapper that can be used in Shape2D/Shape3D for 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

30 Oct 21:39

Choose a tag to compare

  • SwiftSCAD now integrates with OpenSCAD, allowing you to directly export models to various formats such as STL. You can use the new usingOutputFormats method 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 the OPENSCAD environment 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 .macOS entry is no longer needed in platforms in package manifests.
  • measureBounds now gives you an optional BoundingBox, which is nil (instead of .empty) when there's no bounding box
  • Added new angle-based initializers for Cylinder.
  • All convexity parameters have been removed. Instead, there's a new previewConvexity environment property.
  • EnvironmentReader is now readEnvironment.
  • Tons of smaller additions, internal improvements and refactoring.

0.7.1

10 Oct 18:35

Choose a tag to compare

0.7.1 Pre-release
Pre-release

Improvements

  • Added Circle.correspondingCoordinate(for:)
  • Added rotate(x:y:[z:]around:) methods for rotating around a pivot, expressed as a GeometryAlignment.
  • Distribution methods now accept any Sequence instead 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 CrossSection where offsets were applied incorrectly with AxisDirection.positive.
  • Fixed bug with incorrect alignment in some cases when using Stack.

Release 0.7

04 Oct 14:18

Choose a tag to compare

Release 0.7 Pre-release
Pre-release

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.