This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Waterfall | |
import qualified Waterfall.TwoD.Shape as Shape | |
import Waterfall.Internal.Solid (debug) | |
import Linear | |
import Control.Lens ((^.)) | |
import Data.Monoid (Endo (..)) | |
tSlotCrossSection :: Waterfall.Path2D | |
tSlotCrossSection = | |
let oneQuarter = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Waterfall | |
import qualified Waterfall.TwoD.Shape as Shape | |
import Waterfall.Internal.Solid (debug) | |
import Linear | |
import Control.Lens ((^.)) | |
pathFactor :: Double | |
pathFactor = 12.5 | |
heartPath :: Waterfall.Path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Waterfall.TwoD.Path2D as Path2D | |
import qualified Waterfall.TwoD.Shape as Shape | |
import qualified Waterfall.Path as Path | |
import qualified Waterfall.Solids as Solids | |
import qualified Waterfall.Transforms as Transforms | |
import Waterfall.Booleans | |
import Waterfall.Sweep (sweep) | |
import Waterfall.IO (writeSTL) | |
import Linear | |
footR = 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Waterfall | |
import Linear | |
import Algebra.Lattice | |
import Algebra.Lattice.Dropped | |
intersection :: (Functor f, Foldable f) => f Waterfall.Solid -> Waterfall.Solid | |
intersection = foldDropped Waterfall.nowhere id . meets . fmap Drop | |
cubes :: Waterfall.Solid | |
cubes = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Waterfall | |
import Linear | |
slotT :: Double | |
slotT = 36 | |
tableMount :: Waterfall.Solid | |
tableMount = | |
let tableR = 120 / (sqrt 2) | |
tableD = 18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Waterfall | |
import Linear | |
shaft :: Waterfall.Solid | |
shaft = | |
let r = 3 | |
h = 20 | |
cutOff = 2 | |
in (Waterfall.scale (V3 r r h) Waterfall.unitCylinder) `Waterfall.difference` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- stack script --resolver lts-21.13 | |
--package linear | |
--package lens | |
--package waterfall-cad | |
--extra-dep waterfall-cad-0.1.1.1 | |
--extra-dep opencascade-hs-0.1.1.1 | |
-} | |
import qualified Waterfall | |
import qualified Waterfall.TwoD.Shape as Shape |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# Language FlexibleInstances #-} | |
module SillyVersion where | |
import Data.Ratio | |
data SillyVersion = SillyVersion Integer Integer Integer | |
display :: (() -> SillyVersion) -> String | |
display f = let SillyVersion maj min pat = f () | |
in show maj <> "." <> show min <> "." <> show pat |
NewerOlder