Browse Source

hinzufügen eine z-offset für ein LaserPad (verschieben der Ebenen-Höhe)

master
Jörg Kurlbaum 3 years ago
parent
commit
4a6b08035f
  1. 5
      freecad/LaserCladdingWorkbench/pad.py

5
freecad/LaserCladdingWorkbench/pad.py

@ -37,6 +37,9 @@ class LaserPad: @@ -37,6 +37,9 @@ class LaserPad:
obj.addProperty("App::PropertyFloat", "hatch_contour_offset", "Parameters", "Contour Offset")
obj.hatch_contour_offset = 2.3
obj.addProperty("App::PropertyFloat", "z_offset", "Parameters", "Height (Z) Offset")
obj.z_offset = 0
obj.addProperty("App::PropertyLinkGlobal","ref_body","Reference","body")
obj.ref_body = face[0]
@ -94,6 +97,7 @@ class LaserPad: @@ -94,6 +97,7 @@ class LaserPad:
LaserPath(contours_comp)
contours_comp.Shape = p
contours_comp.ViewObject.LineColor = (0.5, 0.8, 0.9)
contours_comp.Placement.Base.z = obj.z_offset
print("Creating Hatch Part")
hatches_comp = obj.newObject("Part::Feature", "Hatchlines")
@ -104,6 +108,7 @@ class LaserPad: @@ -104,6 +108,7 @@ class LaserPad:
LaserPath(hatches_comp)
hatches_comp.Shape = p
hatches_comp.ViewObject.LineColor = (0.9, 0.2, 0.2)
hatches_comp.Placement.Base.z = obj.z_offset
print("Group: ", obj.Group)
def onChanged(self, fp, prop):

Loading…
Cancel
Save