Skip to content
Browse files

Fix automatic suffix detection to work when a filename is specified w…

…ith a suffix
  • Loading branch information...
1 parent 1c4ac85 commit 1e8571cc4034e670b749077aa6df8d232622a7a8 @shkoo shkoo committed Dec 13, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 extopenscad.hs
View
6 extopenscad.hs
@@ -90,8 +90,7 @@ executeAndExportSpecifiedTargetType content targetname formatname = case runOpen
let
res = getRes s
case (obj2s, obj3s) of
- ([], _) -> do
- let obj = head obj2s
+ (obj : objs, _) -> do
putStrLn $ "Rendering 2D object to " ++ targetname
putStrLn $ "With resolution " ++ show res
putStrLn $ "In box " ++ show (getBox2 obj)
@@ -102,8 +101,7 @@ executeAndExportSpecifiedTargetType content targetname formatname = case runOpen
"png" -> writePNG2 res targetname obj
"ngc" -> writeGCodeHacklabLaser res targetname obj
_ -> putStrLn $ "Unrecognized 2D format: " ++ formatname
- (_, []) -> do
- let obj = head obj3s
+ (_, obj : objs) -> do
putStrLn $ "Rendering 3D object to " ++ targetname
putStrLn $ "With resolution " ++ show res
putStrLn $ "In box " ++ show (getBox3 obj)

0 comments on commit 1e8571c

Please sign in to comment.
Something went wrong with that request. Please try again.