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