Skip to content

Commit

Permalink
Add public method for getting points from a Polygon
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasf committed Feb 16, 2024
1 parent d67a215 commit 2f6dad5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/SwiftSCAD/Shapes/2D/Polygon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ public struct Polygon: CoreGeometry2D {
pointsProvider = bezierPath
}

public func points(in environment: Environment) -> [Vector2D] {
pointsProvider.points(in: environment)
}

func call(in environment: Environment) -> SCADCall {
return SCADCall(
name: "polygon",
params: ["points": pointsProvider.points(in: environment)]
params: ["points": points(in: environment)]
)
}
}
Expand Down

0 comments on commit 2f6dad5

Please sign in to comment.