mecha-0.1.1: A constructive solid geometry (CSG) modeling language.

Language.Mecha.Solid

Synopsis

Documentation

data Primitive Source

Constructors

Sphere Double

Diameter.

Cone Double Double Double

Bottom diameter, top diameter, height.

Box (Double, Double) (Double, Double) (Double, Double)

(x min, x max) (y min, ymax) (z min, z max).

Torus Double Double

Major diameter, minor diameter.

Instances

sphere :: Double -> SolidSource

A sphere with diameter, centered at origin.

cone :: Double -> Double -> Double -> SolidSource

A cone with base at the origin, given base diameter, top diameter, and height.

box :: (Double, Double) -> (Double, Double) -> (Double, Double) -> SolidSource

A hollow cylinder with base at the origin, given outer diameter, inner diamter, and height.

A box with ranges or X, Y, and Z positions.

cube :: Double -> SolidSource

A cube with edge length, centered at origin.

cylinder :: Double -> Double -> SolidSource

A cylinder with base at the origin, given diameter and height.

cylinder' :: Double -> Double -> SolidSource

Same as cylinder, but centered at the origin.

radial :: (Double -> Solid) -> Int -> SolidSource

Arranges a solid in a radial pattern.

torus :: Double -> Double -> SolidSource

A torus centered at the origin, aligned on the z-axis, with the major and minor diameters.