Commit 8338a3ff authored by Jan Koniarik's avatar Jan Koniarik
Browse files

fixed issues with lazy render and resolution

parent 0e36027e
Pipeline #70533 passed with stage
in 35 minutes and 37 seconds
......@@ -189,7 +189,7 @@ generateSCAD = concatMap generate
stlRenderCommands :: Filename -> Filename -> [Command]
stlRenderCommands scad_source stl_file =
[ Command $ Text.pack ("mkdir -p `dirname " ++ stl_file ++ "`")
, Command $ Text.pack ("openscad -o " ++ stl_file ++ " " ++ scad_source)
, Command $ Text.pack ("openscad -D'$$fa=0.5' -D'$$fs=0.5' -o " ++ stl_file ++ " " ++ scad_source)
, Command $ Text.pack
("admesh --write-binary-stl=" ++ stl_file ++ " --no-check " ++ stl_file)
]
......
......@@ -22,6 +22,7 @@ import Numeric.Units.Dimensional.Prelude ( (*~)
import qualified System.IO.Strict as IOS
import qualified Numeric.Units.Dimensional.Prelude
as U
import System.Directory
type Effort = Double
......@@ -102,7 +103,10 @@ quatToRPY (Quaternion w (V3 x y z)) = V3 roll pitch yaw
writeFileIfChanged :: Filename -> String -> IO ()
writeFileIfChanged fname content = do
present_content <- IOS.readFile fname
fileExists <- doesFileExist fname
present_content <- if fileExists
then IOS.readFile fname
else return ""
if present_content == content then
return ()
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment