# HG changeset patch # User mbayer # Date 1467885518 -7200 # Node ID c82c30811edd66daab41569324a816d824de974f # Parent 5c98c7e24b02a54c52a5ef2aabc548410c90cdd6 svg crowbar fixes diff -r 5c98c7e24b02 -r c82c30811edd printrun-src/printrun/laser.py --- a/printrun-src/printrun/laser.py Sat Jun 04 15:18:06 2016 +0200 +++ b/printrun-src/printrun/laser.py Thu Jul 07 11:58:38 2016 +0200 @@ -312,8 +312,9 @@ self.log("Unable to get width and height for the svg!") return False - width = float(width.replace("px", "").replace("pt", "")) - height = float(height.replace("px", "").replace("pt", "")) + # TODO: use cm or mm as absolute dimensions! + width = float(width.replace("px", "").replace("pt", "").replace("mm", "")) + height = float(height.replace("px", "").replace("pt", "").replace("mm", "")) smoothness = self.settings.lc_svg_smoothness if smoothness < 0.1: smoothness = 0.1 @@ -377,8 +378,9 @@ E = E + (e_distance) fo.write("G1 X%0.2f Y%0.2f E%.4f F%.4f\n" % ( xs, ys, E * E_FACTOR, engrave_speed)) - else: - self.log("Position outside print dimension: %d, %d" % (xs, ys)) + #else: + # self.log("Position outside print dimension: %d, %d" % (xs, ys)) + if shape_obj.xml_node.get('fill'): # Close the polygon e_distance = math.hypot(object_xs - xo, object_ys - yo)