Commit ba42d3de authored by sumpfralle's avatar sumpfralle

fixed GUI handling of x/y direction for ContourPolygon strategy

added xy direction for DropCutter


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@998 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent ebb5eea8
......@@ -1768,12 +1768,13 @@ class ProjectGui:
break
else:
raise ValueError("Invalid path strategy selected")
if strategy == "SurfaceStrategy" \
and get_obj("GridDirectionXY").get_active():
get_obj("GridDirectionX").set_active(True)
if strategy == "ContourPolygonStrategy" \
and not get_obj("MillingStyleIgnore").get_active():
get_obj("MillingStyleIgnore").set_active(True)
if strategy == "ContourPolygonStrategy" \
and not get_obj("GridDirectionX").get_active():
# only "x" direction for ContourPolygon
get_obj("GridDirectionX").set_active(True)
if strategy in ("ContourFollowStrategy", "EngraveStrategy") \
and get_obj("MillingStyleIgnore").get_active():
get_obj("MillingStyleConventional").set_active(True)
......@@ -1795,9 +1796,9 @@ class ProjectGui:
"ContourFollowStrategy": ("MillingStyleConventional",
"MillingStyleClimb", "MaxStepDownControl"),
"SurfaceStrategy": ("GridDirectionX", "GridDirectionY",
"MillingStyleConventional", "MillingStyleClimb",
"MillingStyleIgnore", "MaterialAllowanceControl",
"OverlapPercentControl"),
"GridDirectionXY", "MillingStyleConventional",
"MillingStyleClimb", "MillingStyleIgnore",
"MaterialAllowanceControl", "OverlapPercentControl"),
"EngraveStrategy": ("MaxStepDownControl", "EngraveOffsetControl",
"MillingStyleConventional", "MillingStyleClimb",
"PocketingControl"),
......
......@@ -88,12 +88,10 @@ class DropCutter:
# Transfer the grid (a generator) into a list of lists and count the
# items.
lines = []
# there should be only one layer for DropCutter
# usually there is only one layer - but an xy-grid consists of two
for layer in motion_grid:
for line in layer:
lines.append(line)
# ignore any other layers
break
num_of_lines = len(lines)
progress_counter = ProgressCounter(len(lines), draw_callback)
......
......@@ -159,7 +159,7 @@ def get_fixed_grid_layer(minx, maxx, miny, maxy, z, line_distance,
def get_fixed_grid(bounds, layer_distance, line_distance, step_width=None,
grid_direction=GRID_DIRECTION_X, milling_style=MILLING_STYLE_IGNORE,
start_position=START_Z):
""" Calculate the grid positions for toolpath movements
""" Calculate the grid positions for toolpath moves
"""
low, high = bounds.get_absolute_limits()
if isiterable(layer_distance):
......
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