Commit 14811aea authored by paulusmax's avatar paulusmax

An attempt to get the resolution for each axis to be controlled individually. ...

An attempt to get the resolution for each axis to be controlled individually.  Now all axes properly named and working just fine...  changed the default to 0.0001 for now untill gcode resolution selection is available.

git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@946 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent e69391f9
......@@ -378,7 +378,9 @@ def execute(parser, opts, args, pycam):
handler, metric_units = (opts.unit_size == "mm"),
safety_height=opts.safety_height,
toggle_spindle_status=opts.gcode_no_start_stop_spindle,
minimum_step=opts.gcode_minimum_step)
minimum_step_x=opts.gcode_minimum_step_x,
minimum_step_y=opts.gcode_minimum_step_y,
minimum_step_z=opts.gcode_minimum_step_z)
generator.set_speed(opts.tool_feedrate, opts.tool_spindle_speed)
path_mode = opts.gcode_path_mode
PATH_MODES = pycam.Exporters.GCodeExporter.PATH_MODES
......@@ -616,7 +618,7 @@ if __name__ == "__main__":
action="store_false", help="do not start the spindle before " \
+ "and stop it after each operation (M3/M5)")
group_gcode.add_option("", "--gcode-minimum-step",
dest="gcode_minimum_step", default=0.0,
dest="gcode_minimum_step_x", default=0.0,
type="float", action="store", help="mimimum axial distance " \
+ "between two machine positions. Any shorter move is not " \
+ "written to GCode (default: 0.0).")
......
This diff is collapsed.
......@@ -38,7 +38,7 @@ class GCodeGenerator:
def __init__(self, destination, metric_units=True, safety_height=0.0,
toggle_spindle_status=False, header=None, comment=None,
minimum_step=0.0001, minimum_step_y=0.0001, minimum_step_z=0.0001):
minimum_step_x=0.0001, minimum_step_y=0.0001, minimum_step_z=0.0001):
if isinstance(destination, basestring):
# open the file
self.destination = file(destination,"w")
......@@ -53,7 +53,7 @@ class GCodeGenerator:
self.gcode = gcode(safetyheight=self.safety_height)
self.toggle_spindle_status = toggle_spindle_status
self.comment = comment
self._minimum_step = minimum_step
self._minimum_step_x = minimum_step_x
self._minimum_step_y = minimum_step_y
self._minimum_step_z = minimum_step_z
self._finished = False
......@@ -107,7 +107,7 @@ class GCodeGenerator:
self.append(self.gcode.delay(2))
# At minimum this will stop the duplicate gcode
# And this is a place holder for when the GUI is linked
res_limit_x = self._minimum_step
res_limit_x = self._minimum_step_x
#res_limit_y = self._minimum_step
#res_limit_z = self._minimum_step
res_limit_y = self._minimum_step_y
......
......@@ -127,7 +127,7 @@ PREFERENCES_DEFAULTS = {
"simulation_details_level": 3,
"drill_progress_max_fps": 2,
"gcode_safety_height": 25.0,
"gcode_minimum_step": 0.0001,
"gcode_minimum_step_x": 0.0001,
"gcode_minimum_step_y": 0.0001,
"gcode_minimum_step_z": 0.0001,
"gcode_path_mode": 0,
......@@ -892,9 +892,9 @@ class ProjectGui:
self._task_property_signals.append((obj,
obj.connect("changed", self._handle_task_setting_change)))
# gcode settings
gcode_minimum_step = self.gui.get_object("GCodeMinimumStep_x")
self.settings.add_item("gcode_minimum_step",
gcode_minimum_step.get_value, gcode_minimum_step.set_value)
gcode_minimum_step_x = self.gui.get_object("GCodeMinimumStep_x")
self.settings.add_item("gcode_minimum_step_x",
gcode_minimum_step_x.get_value, gcode_minimum_step_x.set_value)
gcode_minimum_step_y = self.gui.get_object("GCodeMinimumStep_y")
self.settings.add_item("gcode_minimum_step_y",
gcode_minimum_step_y.get_value, gcode_minimum_step_y.set_value)
......@@ -3784,7 +3784,7 @@ class ProjectGui:
safety_height=safety_height,
toggle_spindle_status=self.settings.get("gcode_start_stop_spindle"),
comment=all_info,
minimum_step=self.settings.get("gcode_minimum_step"),
minimum_step_x=self.settings.get("gcode_minimum_step_x"),
minimum_step_y=self.settings.get("gcode_minimum_step_y"),
minimum_step_z=self.settings.get("gcode_minimum_step_z"))
path_mode = self.settings.get("gcode_path_mode")
......
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