Skip to content

Commit

Permalink
Add BoundingBox.transformed
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasf committed Mar 22, 2024
1 parent 559b98a commit b4edc06
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/SwiftSCAD/Values/Boundary/BoundingBox.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,8 @@ extension BoundingBox {
public func offset(_ expansion: V) -> BoundingBox {
.init(minimum: minimum - expansion, maximum: maximum + expansion)
}

public func transformed(_ transform: V.Transform) -> BoundingBox {
.init([transform.apply(to: minimum), transform.apply(to: maximum)])
}
}

0 comments on commit b4edc06

Please sign in to comment.