Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional documentation for Haskell eDSL #284

Merged
merged 1 commit into from
Nov 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions Graphics/Implicit/Primitives.hs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ circle ::
circle = Circle

rectR ::
-- ^ Rounding of corners
-> ℝ2 -- ^ Bottom left corner
-> ℝ2 -- ^ Top right corner
-> SymbolicObj2 -- ^ Resulting square (bottom right = (0,0) )
Expand Down Expand Up @@ -241,23 +241,25 @@ intersect = intersectR 0
extrudeR :: ℝ -> SymbolicObj2 -> ℝ -> SymbolicObj3
extrudeR = ExtrudeR

-- | This function is not implemented
extrudeRotateR :: ℝ -> ℝ -> SymbolicObj2 -> ℝ -> SymbolicObj3
extrudeRotateR = ExtrudeRotateR

extrudeRM :: ℝ
-> Either ℝ (ℝ -> ℝ)
-> ExtrudeRMScale
-> Either ℝ2 (ℝ -> ℝ2)
-> SymbolicObj2
-> Either ℝ (ℝ2 -> ℝ)
extrudeRM :: ℝ -- ^ rounding radius
-> Either ℝ (ℝ -> ℝ) -- ^ twist
-> ExtrudeRMScale -- ^ scale
-> Either ℝ2 (ℝ -> ℝ2) -- ^ translate
-> SymbolicObj2 -- ^ object to extrude
-> Either ℝ (ℝ2 -> ℝ) -- ^ height to extrude to
-> SymbolicObj3
extrudeRM = ExtrudeRM

rotateExtrude :: ℝ
-> Maybe ℝ
-> Either ℝ2 (ℝ -> ℝ2)
-> Either ℝ (ℝ -> ℝ)
-> SymbolicObj2

rotateExtrude :: ℝ -- ^ Angle to sweep to
-> (Maybe ℝ) -- ^ Loop or path (rounded corner)
-> (Either ℝ2 (ℝ -> ℝ2)) -- ^ translate
-> (Either ℝ (ℝ -> ℝ )) -- ^ rotate
-> SymbolicObj2 -- ^ object to extrude
-> SymbolicObj3
rotateExtrude = RotateExtrude

Expand Down