spacing/comments, and simplify an unneeded function composition.

This commit is contained in:
Julia Longtin 2019-05-07 04:50:30 +01:00
parent 973b78995b
commit 42c4fabcc3
3 changed files with 5 additions and 3 deletions

View File

@ -18,7 +18,9 @@ import Graphics.Implicit.ObjectUtil.GetBox2 (getBox2, getDist2)
import Data.Maybe (fromMaybe)
import Data.VectorSpace ((^-^), (^+^))
-- test to see whether a Box3 has area.
-- FIXME: many variables are being ignored here. no rounding for intersect, or difference.. etc.
-- Test to see whether a Box3 has area.
isEmpty :: (Eq a2, Eq a1, Eq a) =>
((a, a1, a2), (a, a1, a2)) -> Bool
isEmpty ((a,b,c),(d,e,f)) = a==d || b==e || c==f
@ -142,7 +144,7 @@ getBox3 (ExtrudeRM _ twist scale translate symbObj eitherh) =
Just _ -> (-d, -d, d, d)
where d = sval * getDist2 (0,0) symbObj
translate' = fromMaybe (const (0,0)) translate
(tvalsx, tvalsy) = unzip . map (translate' . (h*)) $ hrange
(tvalsx, tvalsy) = unzip $ map (translate' . (h*)) hrange
(tminx, tminy) = (minimum tvalsx, minimum tvalsy)
(tmaxx, tmaxy) = (maximum tvalsx, maximum tvalsy)
in

View File

@ -28,6 +28,7 @@ import Data.Cross (cross3)
-- Use getImplicit2 for handling extrusion of 2D shapes to 3D.
import Graphics.Implicit.ObjectUtil.GetImplicit2 (getImplicit2)
-- Get a function that describes the surface of the object.
getImplicit3 :: SymbolicObj3 -> Obj3
-- Primitives
getImplicit3 (Rect3R r (x1,y1,z1) (x2,y2,z2)) =

View File

@ -1,6 +1,5 @@
# ImplicitCAD Makefile. Build and test Implicitcad.
## Locations of binaries used when running tests, or generating the images to go along with our README.md.
# The location of stl2ps, from stltools, available from https://github.com/rsmith-nl/stltools/tree/develop
stl2ps=/disk4/faikvm.com/stltools/stltools/stl2ps.py