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: ...@@ -1768,12 +1768,13 @@ class ProjectGui:
break break
else: else:
raise ValueError("Invalid path strategy selected") raise ValueError("Invalid path strategy selected")
if strategy == "SurfaceStrategy" \
and get_obj("GridDirectionXY").get_active():
get_obj("GridDirectionX").set_active(True)
if strategy == "ContourPolygonStrategy" \ if strategy == "ContourPolygonStrategy" \
and not get_obj("MillingStyleIgnore").get_active(): and not get_obj("MillingStyleIgnore").get_active():
get_obj("MillingStyleIgnore").set_active(True) 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") \ if strategy in ("ContourFollowStrategy", "EngraveStrategy") \
and get_obj("MillingStyleIgnore").get_active(): and get_obj("MillingStyleIgnore").get_active():
get_obj("MillingStyleConventional").set_active(True) get_obj("MillingStyleConventional").set_active(True)
...@@ -1795,9 +1796,9 @@ class ProjectGui: ...@@ -1795,9 +1796,9 @@ class ProjectGui:
"ContourFollowStrategy": ("MillingStyleConventional", "ContourFollowStrategy": ("MillingStyleConventional",
"MillingStyleClimb", "MaxStepDownControl"), "MillingStyleClimb", "MaxStepDownControl"),
"SurfaceStrategy": ("GridDirectionX", "GridDirectionY", "SurfaceStrategy": ("GridDirectionX", "GridDirectionY",
"MillingStyleConventional", "MillingStyleClimb", "GridDirectionXY", "MillingStyleConventional",
"MillingStyleIgnore", "MaterialAllowanceControl", "MillingStyleClimb", "MillingStyleIgnore",
"OverlapPercentControl"), "MaterialAllowanceControl", "OverlapPercentControl"),
"EngraveStrategy": ("MaxStepDownControl", "EngraveOffsetControl", "EngraveStrategy": ("MaxStepDownControl", "EngraveOffsetControl",
"MillingStyleConventional", "MillingStyleClimb", "MillingStyleConventional", "MillingStyleClimb",
"PocketingControl"), "PocketingControl"),
......
...@@ -88,12 +88,10 @@ class DropCutter: ...@@ -88,12 +88,10 @@ class DropCutter:
# Transfer the grid (a generator) into a list of lists and count the # Transfer the grid (a generator) into a list of lists and count the
# items. # items.
lines = [] 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 layer in motion_grid:
for line in layer: for line in layer:
lines.append(line) lines.append(line)
# ignore any other layers
break
num_of_lines = len(lines) num_of_lines = len(lines)
progress_counter = ProgressCounter(len(lines), draw_callback) progress_counter = ProgressCounter(len(lines), draw_callback)
......
...@@ -159,7 +159,7 @@ def get_fixed_grid_layer(minx, maxx, miny, maxy, z, line_distance, ...@@ -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, def get_fixed_grid(bounds, layer_distance, line_distance, step_width=None,
grid_direction=GRID_DIRECTION_X, milling_style=MILLING_STYLE_IGNORE, grid_direction=GRID_DIRECTION_X, milling_style=MILLING_STYLE_IGNORE,
start_position=START_Z): start_position=START_Z):
""" Calculate the grid positions for toolpath movements """ Calculate the grid positions for toolpath moves
""" """
low, high = bounds.get_absolute_limits() low, high = bounds.get_absolute_limits()
if isiterable(layer_distance): 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