Commit 7edff56e authored by sumpfralle's avatar sumpfralle

added missing support structure options


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@973 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 957bced6
...@@ -256,10 +256,23 @@ def execute(parser, opts, args, pycam): ...@@ -256,10 +256,23 @@ def execute(parser, opts, args, pycam):
tps.set_tool(opts.tool_id, tool_shape, 0.5 * opts.tool_diameter, tps.set_tool(opts.tool_id, tool_shape, 0.5 * opts.tool_diameter,
0.5 * opts.tool_torus_diameter, opts.tool_spindle_speed, 0.5 * opts.tool_torus_diameter, opts.tool_spindle_speed,
opts.tool_feedrate) opts.tool_feedrate)
if opts.support_grid_enabled: if opts.support_type == "grid":
tps.set_support_grid(opts.support_grid_distance_x, tps.set_support_grid(opts.support_grid_distance_x,
opts.support_grid_distance_y, opts.support_grid_thickness, opts.support_grid_distance_y,
opts.support_grid_height) opts.support_profile_thickness, opts.support_profile_height,
opts.support_grid_offset_x, opts.support_grid_offset_y)
elif opts.support_type in ("distributed-edges", "distributed-corners"):
start_at_corners = (opts.support_type == "distributed-corners")
tps.set_support_distributed(opts.support_distributed_distance,
opts.support_distributed_minimum,
opts.support_profile_thickness, opts.support_profile_height,
opts.support_distributed_length,
start_at_corners=start_at_corners)
elif opts.support_type == "none":
pass
else:
raise NotImplemented, "Invalid support type specified: %s" % \
opts.support_type
if opts.collision_engine == "ode": if opts.collision_engine == "ode":
tps.set_calculation_backend("ODE") tps.set_calculation_backend("ODE")
tps.set_unit_size(opts.unit_size) tps.set_unit_size(opts.unit_size)
...@@ -444,11 +457,12 @@ if __name__ == "__main__": ...@@ -444,11 +457,12 @@ if __name__ == "__main__":
+ "and 'custom' (absolute coordinates of the bounding box - " \ + "and 'custom' (absolute coordinates of the bounding box - " \
+ "regardless of the model size and position). Negative values " \ + "regardless of the model size and position). Negative values " \
+ "are allowed and can make sense (e.g. negative margin).") + "are allowed and can make sense (e.g. negative margin).")
group_support_grid = parser.add_option_group("Support grid", group_support_structure = parser.add_option_group("Support structure",
"An optional support grid can be used to keep the object in " \ "An optional support structure can be used to keep the object in " \
+ "place during the mill operation. The support grid can be " \ + "place during the mill operation. The support structure can be " \
+ "removed manually afterwards. The support grid can have a " \ + "removed manually afterwards. Various types of support " \
+ "rectangular profile. By default the support grid is disabled.") + "structures are available. Support structures are disabled " \
+ "by default.")
group_gcode = parser.add_option_group("GCode settings", group_gcode = parser.add_option_group("GCode settings",
"Specify some details of the generated GCode.") "Specify some details of the generated GCode.")
group_external_programs = parser.add_option_group("External programs", group_external_programs = parser.add_option_group("External programs",
...@@ -475,12 +489,13 @@ if __name__ == "__main__": ...@@ -475,12 +489,13 @@ if __name__ == "__main__":
+ "defined processing boundary.") + "defined processing boundary.")
group_general.add_option("", "--disable-psyco", dest="disable_psyco", group_general.add_option("", "--disable-psyco", dest="disable_psyco",
default=False, action="store_true", help="disable the Psyco " \ default=False, action="store_true", help="disable the Psyco " \
+ "just-in-time-compiler even when it is available") + "just-in-time-compiler even if it is available")
group_general.add_option("", "--number-of-processes", group_general.add_option("", "--number-of-processes",
dest="parallel_processes", default=None, type="int", action="store", dest="parallel_processes", default=None, type="int", action="store",
help="override the default detection of multiple CPU cores. " \ help="override the default detection of multiple CPU cores. " \
+ "Parallel processing only works with Python 2.6 or " \ + "Parallel processing only works with Python 2.6 (or " \
+ "later.") + "later) or with the additional 'multiprocessing' " \
+ "module.")
group_general.add_option("", "--enable-server", dest="enable_server", group_general.add_option("", "--enable-server", dest="enable_server",
default=False, action="store_true", help="enable a local server " \ default=False, action="store_true", help="enable a local server " \
+ "and (optionally) remote worker servers.") + "and (optionally) remote worker servers.")
...@@ -497,7 +512,7 @@ if __name__ == "__main__": ...@@ -497,7 +512,7 @@ if __name__ == "__main__":
+ "connecting to a remote server or for granting access " \ + "connecting to a remote server or for granting access " \
+ "to remote clients.") + "to remote clients.")
group_general.add_option("-q", "--quiet", dest="quiet", group_general.add_option("-q", "--quiet", dest="quiet",
default=False, action="store_true", help="show only warnings and " \ default=False, action="store_true", help="output only warnings and " \
+ "errors.") + "errors.")
group_general.add_option("-d", "--debug", dest="debug", group_general.add_option("-d", "--debug", dest="debug",
default=False, action="store_true", help="enable output of debug " \ default=False, action="store_true", help="enable output of debug " \
...@@ -511,7 +526,7 @@ if __name__ == "__main__": ...@@ -511,7 +526,7 @@ if __name__ == "__main__":
action="store", type="string", action="store", type="string",
help="store profiling statistics in a file (only for debugging)") help="store profiling statistics in a file (only for debugging)")
group_general.add_option("-v", "--version", dest="show_version", group_general.add_option("-v", "--version", dest="show_version",
default=False, action="store_true", help="show the current " \ default=False, action="store_true", help="output the current " \
+ "version of PyCAM and exit") + "version of PyCAM and exit")
# export options # export options
group_export.add_option("", "--export-gcode", dest="export_gcode", group_export.add_option("", "--export-gcode", dest="export_gcode",
...@@ -593,23 +608,43 @@ if __name__ == "__main__": ...@@ -593,23 +608,43 @@ if __name__ == "__main__":
help="comma-separated x/y/z combination of the upper boundary " \ help="comma-separated x/y/z combination of the upper boundary " \
+ "(e.g. '12,5.5,0')") + "(e.g. '12,5.5,0')")
# support grid settings # support grid settings
group_support_grid.add_option("", "--enable-support-grid", group_support_structure.add_option("", "--support-type",
dest="support_grid_enabled", default=False, action="store_true", dest="support_type", default="none", type="choice", action="store",
help="enable the support grid") choices=["none", "grid", "distributed-edges",
group_support_grid.add_option("", "--support-grid-distance-x", "distributed-corners"],
help="type of the support structure (default: none)")
group_support_structure.add_option("", "--support-profile-height",
dest="support_profile_height", default=2.0, action="store",
type="float", help="height of the support profile")
group_support_structure.add_option("", "--support-profile-thickness",
dest="support_profile_thickness", default=0.5, action="store",
type="float", help="width of the support profile")
group_support_structure.add_option("", "--support-grid-distance-x",
dest="support_grid_distance_x", default=10.0, action="store", dest="support_grid_distance_x", default=10.0, action="store",
type="float", help="distance along the x-axis between two " \ type="float", help="distance along the x-axis between two " \
+ "adjacent parallel lines of the support grid pattern") + "adjacent parallel lines of the support structure" \
group_support_grid.add_option("", "--support-grid-distance-y", + "(only for grid type)")
group_support_structure.add_option("", "--support-grid-distance-y",
dest="support_grid_distance_y", default=10.0, action="store", dest="support_grid_distance_y", default=10.0, action="store",
type="float", help="distance along the y-axis between two " \ type="float", help="distance along the y-axis between two " \
+ "adjacent parallel lines of the support grid pattern") + "adjacent parallel lines of the support structure " \
group_support_grid.add_option("", "--support-grid-height", + "(only for grid type)")
dest="support_grid_height", default=2.0, action="store", group_support_structure.add_option("", "--support-grid-offset-x",
type="float", help="height of the support grid profile") dest="support_grid_offset_x", default=0.0, action="store",
group_support_grid.add_option("", "--support-grid-thickness", type="float", help="shift the support grid along the x axis")
dest="support_grid_thickness", default=0.5, action="store", group_support_structure.add_option("", "--support-grid-offset-y",
type="float", help="width of the support grid profile") dest="support_grid_offset_y", default=0.0, action="store",
type="float", help="shift the support grid along the y axis")
group_support_structure.add_option("", "--support-distributed-distance",
dest="support_distributed_distance", default=30.0, action="store",
type="float", help="average distance between two adjacent " \
+ "support bridges")
group_support_structure.add_option("", "--support-distributed-minimum",
dest="support_distributed_minimum", default=2, action="store",
type="int", help="minimum number of support bridges per polygon")
group_support_structure.add_option("", "--support-distributed-length",
dest="support_distributed_length", default=5.0, action="store",
type="float", help="length of each support bridge")
# gcode options # gcode options
group_gcode.add_option("", "--gcode-no-start-stop-spindle", group_gcode.add_option("", "--gcode-no-start-stop-spindle",
dest="gcode_no_start_stop_spindle", default=True, dest="gcode_no_start_stop_spindle", default=True,
......
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