Commit 874a0362 authored by sumpfralle's avatar sumpfralle

support negative engraving offsets


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@554 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 02e7c001
...@@ -431,8 +431,9 @@ class LineGroup(TransformableContainer): ...@@ -431,8 +431,9 @@ class LineGroup(TransformableContainer):
# Prolong the line at the beginning and at the end - to allow # Prolong the line at the beginning and at the end - to allow
# overlaps. Use factor "2" to take care for star-like structure # overlaps. Use factor "2" to take care for star-like structure
# where a complete convex triangle would get cropped (two lines # where a complete convex triangle would get cropped (two lines
# get lost instead of just one). # get lost instead of just one). Use the "abs" value to
in_line = line.dir().mul(2 * offset) # compensate negative offsets.
in_line = line.dir().mul(2 * abs(offset))
return Line(line.p1.add(cross_offset).sub(in_line), return Line(line.p1.add(cross_offset).sub(in_line),
line.p2.add(cross_offset).add(in_line)) line.p2.add(cross_offset).add(in_line))
def do_lines_intersection(l1, l2): def do_lines_intersection(l1, l2):
......
...@@ -162,7 +162,7 @@ def generate_toolpath(model, tool_settings=None, ...@@ -162,7 +162,7 @@ def generate_toolpath(model, tool_settings=None,
trimesh_model += support_grid_model trimesh_model += support_grid_model
# Adapt the contour_model to the engraving offset. This offset is # Adapt the contour_model to the engraving offset. This offset is
# considered to be part of the material_allowance. # considered to be part of the material_allowance.
if (not contour_model is None) and (engrave_offset > 0): if (not contour_model is None) and (engrave_offset != 0):
if not callback is None: if not callback is None:
callback(text="Preparing contour model with offset ...") callback(text="Preparing contour model with offset ...")
progress_callback = ProgressCounter( progress_callback = ProgressCounter(
......
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