Commit 33769b2d authored by sumpfralle's avatar sumpfralle

fixed metric scaling for "color_as_height" import


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@931 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 6e315d9b
......@@ -310,6 +310,11 @@ def import_model(filename, program_locations=None, unit=None,
if unit == "mm":
# pstoedit uses inch internally - we need to scale
log.info("DXFImporter: scaling model from inch to mm")
if color_as_height:
# don't scale z (should be between 0 and 1)
model.scale(scale_x=25.4, scale_y=25.4, scale_z=1,
callback=callback)
else:
model.scale(25.4, callback=callback)
log.info("DXFImporter: Imported DXF model: %d lines / %d polygons" \
% (len(lines), len(model.get_polygons())))
......
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