Skip to content

Commit

Permalink
Make GeometryAlignment init public
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasf committed Sep 21, 2024
1 parent bb2b7c6 commit a77d6ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/SwiftSCAD/Operations/Alignment/Alignment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public struct GeometryAlignment2D: Equatable, Sendable {
internal let x: AxisAlignment?
internal let y: AxisAlignment?

internal init(x: AxisAlignment? = nil, y: AxisAlignment? = nil) {
public init(x: AxisAlignment? = nil, y: AxisAlignment? = nil) {
self.x = x
self.y = y
}
Expand All @@ -38,7 +38,7 @@ public struct GeometryAlignment3D: Equatable, Sendable {
internal let y: AxisAlignment?
internal let z: AxisAlignment?

internal init(x: AxisAlignment? = nil, y: AxisAlignment? = nil, z: AxisAlignment? = nil) {
public init(x: AxisAlignment? = nil, y: AxisAlignment? = nil, z: AxisAlignment? = nil) {
self.x = x
self.y = y
self.z = z
Expand Down
7 changes: 7 additions & 0 deletions Sources/SwiftSCAD/Values/Axis/Axis.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ public enum Axis3D: Int, CaseIterable, Sendable {
case y
case z

public init(_ axis: Axis2D) {
switch axis {
case .x: self = .x
case .y: self = .y
}
}

/// The unit vector pointing in the direction of the axis.
///
/// This property returns a `Vector3D` representing the direction of the axis with a magnitude of 1. It is useful for operations that require understanding or manipulating the orientation of geometry in 3D space.
Expand Down

0 comments on commit a77d6ce

Please sign in to comment.