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):
# Prolong the line at the beginning and at the end - to allow
# overlaps. Use factor "2" to take care for star-like structure
# where a complete convex triangle would get cropped (two lines
# get lost instead of just one).
in_line = line.dir().mul(2 * offset)
# get lost instead of just one). Use the "abs" value to
# compensate negative offsets.
in_line = line.dir().mul(2 * abs(offset))
return Line(line.p1.add(cross_offset).sub(in_line),
line.p2.add(cross_offset).add(in_line))
def do_lines_intersection(l1, l2):
......
......@@ -162,7 +162,7 @@ def generate_toolpath(model, tool_settings=None,
trimesh_model += support_grid_model
# Adapt the contour_model to the engraving offset. This offset is
# 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:
callback(text="Preparing contour model with offset ...")
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