| CARVIEW |
cube: Cubic DSL for 3D printing
Cube is DSL for 3D printing.
This indents to make original blocks and prototypes for hobby.
This DSL is based on mathematical algebra.
Cube is the same as Quaternion.
Block is set of Cube. It allows boolean operations(and, subtruct and convolution).
[Skip to Readme]
Flags
Automatic Flags
| Name | Description | Default |
|---|---|---|
| sample | Build sample programs | Disabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- cube-0.2.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0, 0.2.0 |
|---|---|
| Change log | ChangeLog.md |
| Dependencies | base (>=4 && <5), bytestring (>=0.10.2), cereal, containers, cube, hspec, STL [details] |
| License | BSD-3-Clause |
| Author | Junji Hashimoto |
| Maintainer | junji.hashimoto@gmail.com |
| Uploaded | by junjihashimoto at 2015-04-15T20:42:02Z |
| Category | Language |
| Bug tracker | https://github.com/junjihashimoto/cube/issues |
| Source repo | head: git clone https://github.com/junjihashimoto/cube.git |
| Distributions | |
| Reverse Dependencies | 1 direct, 0 indirect [details] |
| Executables | house |
| Downloads | 1695 total (8 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2015-04-18 [all 1 reports] |
Readme for cube-0.2.0
[back to package description]Cube: Cubic DSL for 3D printing
Cube is DSL for 3D printing.
This indents to make original blocks and prototypes for hobby.
This DSL is based on mathematical algebra. Cube is the same as Quaternion. Block is set of Cube. It allows boolian operations(and, subtruct and convolution).
Getting started
Install this from Hackage.
cabal update && cabal install cube
Example
Block is converted to STL. Block is the same as set of cube. Following example shows example of DSL generating shape of house.
import Language.Cube
house :: Block Cube
house = let house'' = (house' + square)*line
in rfmap (12 * dz +) house''
where
house' :: Block Cube
house' = block $ [cube 1 x y| x<-[-10..10], y<-[-10..10], y < x , y < (-x)]
square :: Block Cube
square = rfmap ((+) (-12 * dz)) $ block $ [cube 1 x y| x<-[-5..5], y<-[-5..5]]
line :: Block Cube
line = block $ [cube x 0 0 | x<-[-5..5]]
main :: IO ()
main = do
writeFileStl "house.stl" $ house
