Permalink
Browse files

- Moved ImplicitCAD into the Library Hierarchy

- Wrote cabal file, etc.
  • Loading branch information...
colah committed Oct 28, 2011
1 parent 709dbe3 commit 21cb2db1bf7ef8defa9ae940f1607fe91902031f
@@ -4,7 +4,7 @@
{- The sole purpose of this file it to pass on the
functionality we want to be accessible to the end user. -}
-module Implicit(
+module Graphics.Implicit(
-- Operations
translate,
scale,
@@ -32,8 +32,8 @@ module Implicit(
writeSVG
) where
-import Implicit.Definitions
-import Implicit.Primitives
-import Implicit.Operations
-import Implicit.Export
+import Graphics.Implicit.Definitions
+import Graphics.Implicit.Primitives
+import Graphics.Implicit.Operations
+import Graphics.Implicit.Export
@@ -1,7 +1,7 @@
-- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca)
-- Released under the GNU GPL, see LICENSE
-module Implicit.Definitions where
+module Graphics.Implicit.Definitions where
-- Let's make things a bit nicer.
-- Following math notation ℝ, ℝ², ℝ³...
@@ -1,10 +1,10 @@
-- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca)
-- Released under the GNU GPL, see LICENSE
-module Implicit.Export where
+module Graphics.Implicit.Export where
-import Implicit.Definitions
-import Implicit.Tracing
+import Graphics.Implicit.Definitions
+import Graphics.Implicit.Tracing
import System.IO
@@ -3,10 +3,10 @@
-- We'd like to parse openscad code, with some improvements, for backwards compatability.
-module Implicit.ExtOpenScad where
+module Graphics.Implicit.ExtOpenScad where
import Prelude hiding (lookup)
-import Implicit.Definitions
+import Graphics.Implicit.Definitions
import Data.Map hiding (map)
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Expr
@@ -1,7 +1,7 @@
-- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca)
-- Released under the GNU GPL, see LICENSE
-module Implicit.MathUtil (rmax, rmin) where
+module Graphics.Implicit.MathUtil (rmax, rmin) where
-- Rounded Maximum
-- Consider max(x,y) = 0, the generated curve
@@ -2,7 +2,7 @@
-- Released under the GNU GPL, see LICENSE
-module Implicit.Operations (
+module Graphics.Implicit.Operations (
translate,
scale,
complement,
@@ -18,9 +18,9 @@ module Implicit.Operations (
) where
import Prelude hiding ((+),(-),(*),(/))
-import Implicit.Definitions
-import Implicit.MathUtil
-import Implicit.SaneOperators
+import Graphics.Implicit.Definitions
+import Graphics.Implicit.MathUtil
+import Graphics.Implicit.SaneOperators
translate :: (Additive a a a, AdditiveInvertable a) => a -> (a -> b) -> a -> b
@@ -1,7 +1,7 @@
-- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca)
-- Released under the GNU GPL, see LICENSE
-module Implicit.Primitives (
+module Graphics.Implicit.Primitives (
sphere,
cube,
circle,
@@ -13,8 +13,8 @@ module Implicit.Primitives (
--ellipse
) where
-import Implicit.Definitions
-import qualified Implicit.SaneOperators as S
+import Graphics.Implicit.Definitions
+import qualified Graphics.Implicit.SaneOperators as S
sphere :: -> Obj3
sphere r = \(x,y,z) -> sqrt (x**2 + y**2 + z**2) - r
@@ -7,12 +7,12 @@
-- I'd rather not have to break every stupid vector into
-- its components to add them or scale them...
-module Implicit.SaneOperators where
+module Graphics.Implicit.SaneOperators where
import qualified Prelude as P
import Prelude hiding ((+),(-),(*),(/))
-import Implicit.Definitions
+import Graphics.Implicit.Definitions
class Additive a b c | a b -> c where
(+) :: a -> b -> c
@@ -1,7 +1,7 @@
-- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca)
-- Released under the GNU GPL, see LICENSE
-module Implicit.Tracing (
+module Graphics.Implicit.Tracing (
getTriangles,
getLineSeg,
orderLines,
@@ -11,8 +11,8 @@ module Implicit.Tracing (
polylineNotNull
) where
-import Implicit.Definitions
-import Implicit.Tracing.GetTriangles (getTriangles)
+import Graphics.Implicit.Definitions
+import Graphics.Implicit.Tracing.GetTriangles (getTriangles)
import Control.Parallel (par, pseq)
@@ -1,9 +1,9 @@
-- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca)
-- Released under the GNU GPL, see LICENSE
-module Implicit.Tracing.GetTriangles (getTriangles) where
+module Graphics.Implicit.Tracing.GetTriangles (getTriangles) where
-import Implicit.Definitions
+import Graphics.Implicit.Definitions
-- This monstrosity of a function gives triangles to divde negative interior
View
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
View
@@ -0,0 +1,27 @@
+Name: implicit
+Version: 0.0
+Synopsis: Math-inspired programmatic CAD: CSG, bevels, and shells; 2D & 3D; gcode generation..
+Description: A math-inspired programmatic CAD library in haskell.
+ Build objects with constructive solid geometry, bevels,
+ shells and more in 2D & 3D. Then export to SVGs, STLs,
+ or produce gcode directly!
+License: GPL
+License-file: LICENSE
+Author: Christopher Olah
+Maintainer: Christopher Olah <chris@colah.ca>
+Homepage: https://github.com/colah/ImplicitCAD
+Build-Depends: base, parsec, hashmap, parallel, containers
+Exposed-Modules:
+ Graphics.Implicit
+ Graphics.Implicit.Definitions
+ Graphics.Implicit.Export
+ Graphics.Implicit.ExtOpenScad
+ Graphics.Implicit.MathUtil
+ Graphics.Implicit.Operations
+ Graphics.Implicit.Primitives
+ Graphics.Implicit.SaneOperators
+ Graphics.Implicit.Tracing
+ Graphics.Implicit.Tracing.GetTriangles
+
+
+

0 comments on commit 21cb2db

Please sign in to comment.