Commit 785c6d2b authored by sumpfralle's avatar sumpfralle

fixed slight GUI inconsistencies regarding the milling style

removed a shadow from an auxiliary GUI element


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@839 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 6d63da17
...@@ -6390,6 +6390,7 @@ The default port is 1250.</property> ...@@ -6390,6 +6390,7 @@ The default port is 1250.</property>
<object class="GtkViewport" id="viewport1"> <object class="GtkViewport" id="viewport1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="resize_mode">queue</property> <property name="resize_mode">queue</property>
<property name="shadow_type">none</property>
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
......
...@@ -1516,17 +1516,23 @@ class ProjectGui: ...@@ -1516,17 +1516,23 @@ class ProjectGui:
def update_process_controls(self, widget=None, data=None): def update_process_controls(self, widget=None, data=None):
# possible dependencies of the DropCutter # possible dependencies of the DropCutter
get_obj = self.gui.get_object get_obj = self.gui.get_object
cutter_name = None strategy = None
for one_cutter in ("PushRemoveStrategy", "ContourPolygonStrategy", for one_strategy in ("PushRemoveStrategy", "ContourPolygonStrategy",
"ContourFollowStrategy", "SurfaceStrategy", "EngraveStrategy"): "ContourFollowStrategy", "SurfaceStrategy", "EngraveStrategy"):
if get_obj(one_cutter).get_active(): if get_obj(one_strategy).get_active():
cutter_name = one_cutter strategy = one_strategy
break break
else: else:
raise ValueError("Invalid cutter selected") raise ValueError("Invalid cutter selected")
if cutter_name == "SurfaceStrategy" \ if strategy == "SurfaceStrategy" \
and get_obj("GridDirectionXY").get_active(): and get_obj("GridDirectionXY").get_active():
get_obj("GridDirectionX").set_active(True) get_obj("GridDirectionX").set_active(True)
if strategy == "ContourPolygonStrategy" \
and not get_obj("MillingStyleIgnore").get_active():
get_obj("MillingStyleIgnore").set_active(True)
if strategy in ("ContourFollowStrategy", "EngraveStrategy") \
and get_obj("MillingStyleIgnore").get_active():
get_obj("MillingStyleConventional").set_active(True)
all_controls = ("GridDirectionX", "GridDirectionY", "GridDirectionXY", all_controls = ("GridDirectionX", "GridDirectionY", "GridDirectionXY",
"MillingStyleConventional", "MillingStyleClimb", "MillingStyleConventional", "MillingStyleClimb",
"MillingStyleIgnore", "MaxStepDownControl", "MillingStyleIgnore", "MaxStepDownControl",
...@@ -1552,7 +1558,7 @@ class ProjectGui: ...@@ -1552,7 +1558,7 @@ class ProjectGui:
"MillingStyleConventional", "MillingStyleClimb"), "MillingStyleConventional", "MillingStyleClimb"),
} }
for one_control in all_controls: for one_control in all_controls:
get_obj(one_control).set_sensitive(one_control in active_controls[cutter_name]) get_obj(one_control).set_sensitive(one_control in active_controls[strategy])
def update_tool_controls(self, widget=None, data=None): def update_tool_controls(self, widget=None, data=None):
# disable the toroidal radius if the toroidal cutter is not enabled # disable the toroidal radius if the toroidal cutter is not enabled
......
...@@ -95,7 +95,8 @@ class PushCutter: ...@@ -95,7 +95,8 @@ class PushCutter:
other_models = self.models[1:] other_models = self.models[1:]
# TODO: this is complicated and hacky :( # TODO: this is complicated and hacky :(
# we don't use parallelism or ODE (for the sake of simplicity) # we don't use parallelism or ODE (for the sake of simplicity)
final_pa = pycam.PathProcessors.SimpleCutter.SimpleCutter() final_pa = pycam.PathProcessors.SimpleCutter.SimpleCutter(
reverse=self.pa.reverse)
for path in self.pa.paths: for path in self.pa.paths:
final_pa.new_scanline() final_pa.new_scanline()
pairs = [] pairs = []
......
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