Skip to content

Commit

Permalink
Add cloned(_:)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasf committed Mar 10, 2024
1 parent 36d31ac commit d1d7d62
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Sources/SwiftSCAD/Operations/Duplication/Clone.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Foundation

public extension Geometry2D {
func cloned(@UnionBuilder2D _ transform: (any Geometry2D) -> any Geometry2D) -> any Geometry2D {
adding(transform(self))
}
}

public extension Geometry3D {
func cloned(@UnionBuilder3D _ transform: (any Geometry3D) -> any Geometry3D) -> any Geometry3D {
adding(transform(self))
}
}

0 comments on commit d1d7d62

Please sign in to comment.