Commit 1310c800 authored by sumpfralle's avatar sumpfralle

fixed toolpath simulation


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@1233 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 3ddeba63
...@@ -2,31 +2,42 @@ ...@@ -2,31 +2,42 @@
<interface> <interface>
<!-- interface-requires gtk+ 2.12 --> <!-- interface-requires gtk+ 2.12 -->
<!-- interface-naming-policy project-wide --> <!-- interface-naming-policy project-wide -->
<object class="GtkDialog" id="SimulationDialog"> <object class="GtkAdjustment" id="SimulationProgressTimelineValue">
<property name="border_width">5</property> <property name="upper">1</property>
<property name="title" translatable="yes">PyCAM simulation</property> <property name="step_increment">1</property>
<property name="role">pycam-simulation</property> </object>
<property name="destroy_with_parent">True</property> <object class="GtkAdjustment" id="SimulationSpeedFactorValue">
<property name="type_hint">dialog</property> <property name="lower">0.01</property>
<child internal-child="vbox"> <property name="upper">10000</property>
<object class="GtkVBox" id="dialog-vbox9"> <property name="step_increment">0.25</property>
</object>
<object class="GtkAdjustment" id="SimulationDetailsValue">
<property name="lower">1</property>
<property name="upper">10</property>
<property name="step_increment">1</property>
</object>
<object class="GtkFrame" id="SimulationBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="orientation">vertical</property> <property name="label_xalign">0</property>
<property name="spacing">2</property> <property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="top_padding">3</property>
<property name="left_padding">12</property>
<child> <child>
<object class="GtkVBox" id="vbox23"> <object class="GtkVBox" id="vbox1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="spacing">3</property> <property name="spacing">3</property>
<child> <child>
<object class="GtkHBox" id="hbox20"> <object class="GtkHBox" id="hbox1">
<property name="spacing">2</property> <property name="visible">True</property>
<child> <child>
<object class="GtkLabel" id="SimulationDetailsControlLabel"> <object class="GtkLabel" id="SimulationProgressTimelineLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="xpad">5</property> <property name="label" translatable="yes">Progress:</property>
<property name="label" translatable="yes">Simulation detail level (1..10):</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -34,15 +45,12 @@ ...@@ -34,15 +45,12 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkSpinButton" id="SimulationDetailsControl"> <object class="GtkLabel" id="SimulationProgressTimeDisplay">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="xalign">1</property>
<property name="max_length">6</property> <property name="label" translatable="yes">0:20 / 4:45</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SimulationDetailsValue</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property>
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
...@@ -53,14 +61,12 @@ ...@@ -53,14 +61,12 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="label2"> <object class="GtkHScale" id="SimulationProgressTimeline">
<property name="xalign">0</property> <property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Hint:&lt;/b&gt; take a look at the "show drill" and <property name="can_focus">True</property>
"OpenGL: polygon" settings in preferences. <property name="update_policy">delayed</property>
&lt;b&gt;Beware:&lt;/b&gt; the simulation feature is new and <property name="adjustment">SimulationProgressTimelineValue</property>
experimental. Thus you will quite probably stumble <property name="draw_value">False</property>
upon interesting bugs and weird results.</property>
<property name="use_markup">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -68,90 +74,88 @@ upon interesting bugs and weird results.</property> ...@@ -68,90 +74,88 @@ upon interesting bugs and weird results.</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="SimulationProgressTimelineLabel"> <object class="GtkHButtonBox" id="hbuttonbox1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="xalign">0</property> <property name="spacing">3</property>
<property name="label" translatable="yes">Progress:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
<child> <child>
<object class="GtkHScale" id="SimulationProgressTimeline"> <object class="GtkButton" id="SimulationStartButton">
<property name="label">gtk-media-play</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="adjustment">SimulationProgressTimelineValue</property> <property name="receives_default">True</property>
<property name="draw_value">False</property> <property name="use_stock">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="position">3</property> <property name="fill">False</property>
<property name="position">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkHBox" id="hbox36"> <object class="GtkButton" id="SimulationPauseButton">
<property name="visible">True</property> <property name="label">gtk-media-pause</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="SimulationSpeedFactorLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="xalign">0</property> <property name="can_focus">True</property>
<property name="label" translatable="yes">Simulation speed factor:</property> <property name="receives_default">True</property>
<property name="use_stock">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="position">0</property> <property name="fill">False</property>
<property name="position">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="SimulationSpeedFactorValueLabel"> <object class="GtkButton" id="SimulationStopButton">
<property name="label">gtk-stop</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">1.00</property> <property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="position">1</property> <property name="fill">False</property>
<property name="position">2</property>
</packing> </packing>
</child> </child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="position">4</property> <property name="fill">False</property>
<property name="position">2</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkHScale" id="SimulationSpeedFactor"> <object class="GtkHSeparator" id="hseparator1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">SimulationSpeedFactorValueExponential</property>
<property name="draw_value">False</property>
<property name="value_pos">bottom</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="position">5</property> <property name="position">3</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkHBox" id="hbox36">
<property name="visible">True</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="SimulationSpeedFactorLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Simulation speed:</property>
</object> </object>
<packing> <packing>
<property name="position">1</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area8">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child> <child>
<object class="GtkButton" id="ExitSimulationButton"> <object class="GtkSpinButton" id="SimulationSpeedFactorControl">
<property name="label">gtk-close</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="can_default">True</property> <property name="invisible_char">&#x25CF;</property>
<property name="has_default">True</property> <property name="adjustment">SimulationSpeedFactorValue</property>
<property name="receives_default">True</property> <property name="digits">2</property>
<property name="use_stock">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -162,28 +166,20 @@ upon interesting bugs and weird results.</property> ...@@ -162,28 +166,20 @@ upon interesting bugs and weird results.</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="pack_type">end</property> <property name="fill">False</property>
<property name="position">0</property> <property name="position">4</property>
</packing> </packing>
</child> </child>
</object> </object>
</child> </child>
<action-widgets>
<action-widget response="0">ExitSimulationButton</action-widget>
</action-widgets>
</object> </object>
<object class="GtkAdjustment" id="SimulationProgressTimelineValue"> </child>
<property name="upper">100</property> <child type="label">
<property name="step_increment">1</property> <object class="GtkLabel" id="SimulationFrameLabel">
</object> <property name="visible">True</property>
<object class="GtkAdjustment" id="SimulationSpeedFactorValueExponential"> <property name="label" translatable="yes">&lt;b&gt;Simulation&lt;/b&gt;</property>
<property name="lower">-2</property> <property name="use_markup">True</property>
<property name="upper">4</property>
<property name="step_increment">1</property>
</object> </object>
<object class="GtkAdjustment" id="SimulationDetailsValue"> </child>
<property name="lower">1</property>
<property name="upper">10</property>
<property name="step_increment">1</property>
</object> </object>
</interface> </interface>
...@@ -102,23 +102,6 @@ def draw_direction_cone(p1, p2, position=0.5, precision=12, size=0.1): ...@@ -102,23 +102,6 @@ def draw_direction_cone(p1, p2, position=0.5, precision=12, size=0.1):
def draw_complete_model_view(settings): def draw_complete_model_view(settings):
GL.glMatrixMode(GL.GL_MODELVIEW) GL.glMatrixMode(GL.GL_MODELVIEW)
GL.glLoadIdentity() GL.glLoadIdentity()
# draw the material (for simulation mode)
if settings.get("show_simulation"):
obj = settings.get("simulation_object")
if not obj is None:
color = settings.get("color_material")
GL.glColor4f(color["red"], color["green"], color["blue"], color["alpha"])
# we need to wait until the color change is active
GL.glFinish()
obj.to_OpenGL()
# draw the toolpath simulation
if settings.get("show_simulation"):
moves = settings.get("simulation_toolpath_moves")
if not moves is None:
draw_toolpath(moves, settings.get("color_toolpath_cut"),
settings.get("color_toolpath_return"),
show_directions=settings.get("show_directions"),
lighting=settings.get("view_light"))
# draw the drill # draw the drill
if settings.get("show_drill"): if settings.get("show_drill"):
cutter = settings.get("cutter") cutter = settings.get("cutter")
......
...@@ -32,23 +32,25 @@ class OpenGLViewToolpath(pycam.Plugins.PluginBase): ...@@ -32,23 +32,25 @@ class OpenGLViewToolpath(pycam.Plugins.PluginBase):
def setup(self): def setup(self):
import OpenGL.GL import OpenGL.GL
self._GL = OpenGL.GL self._GL = OpenGL.GL
self.core.register_event("visualize-items", self.draw_toolpath) self.core.register_event("visualize-items", self.draw_toolpaths)
self.core.get("register_color")("color_toolpath_cut", "Toolpath cut", self.core.get("register_color")("color_toolpath_cut", "Toolpath cut",
60) 60)
self.core.get("register_color")("color_toolpath_return", self.core.get("register_color")("color_toolpath_return",
"Toolpath rapid", 70) "Toolpath rapid", 70)
self.core.register_chain("get_draw_dimension", self.get_draw_dimension) self.core.register_chain("get_draw_dimension", self.get_draw_dimension)
self.core.get("register_display_item")("show_toolpath", "Show Toolpath", 30), self.core.get("register_display_item")("show_toolpath", "Show Toolpath", 30),
self.core.set("draw_toolpath_moves_func", self._draw_toolpath_moves)
self.core.emit_event("visual-item-updated") self.core.emit_event("visual-item-updated")
return True return True
def teardown(self): def teardown(self):
self.core.unregister_chain("get_draw_dimension", self.core.unregister_chain("get_draw_dimension",
self.get_draw_dimension) self.get_draw_dimension)
self.core.unregister_event("visualize-items", self.draw_toolpath) self.core.unregister_event("visualize-items", self.draw_toolpaths)
self.core.get("unregister_color")("color_toolpath_cut") self.core.get("unregister_color")("color_toolpath_cut")
self.core.get("unregister_color")("color_toolpath_return") self.core.get("unregister_color")("color_toolpath_return")
self.core.get("unregister_display_item")("show_toolpath") self.core.get("unregister_display_item")("show_toolpath")
self.core.remove_item("draw_toolpath_moves_func")
self.core.emit_event("visual-item-updated") self.core.emit_event("visual-item-updated")
def get_draw_dimension(self, low, high): def get_draw_dimension(self, low, high):
...@@ -68,18 +70,20 @@ class OpenGLViewToolpath(pycam.Plugins.PluginBase): ...@@ -68,18 +70,20 @@ class OpenGLViewToolpath(pycam.Plugins.PluginBase):
def _is_visible(self): def _is_visible(self):
return self.core.get("show_toolpath") \ return self.core.get("show_toolpath") \
and not self.core.get("toolpath_in_progress") \ and not self.core.get("toolpath_in_progress") \
and not (self.core.get("show_simulation") \ and not self.core.get("show_simulation")
and self.core.get("simulation_toolpath_moves"))
def draw_toolpath(self): def draw_toolpaths(self):
if self._is_visible(): if self._is_visible():
for toolpath in self.core.get("toolpaths").get_visible():
moves = toolpath.get_moves(self.core.get("gcode_safety_height"))
self._draw_toolpath_moves(moves)
def _draw_toolpath_moves(self, moves):
GL = self._GL GL = self._GL
GL.glDisable(GL.GL_LIGHTING) GL.glDisable(GL.GL_LIGHTING)
show_directions = self.core.get("show_directions") show_directions = self.core.get("show_directions")
color_rapid = self.core.get("color_toolpath_return") color_rapid = self.core.get("color_toolpath_return")
color_cut = self.core.get("color_toolpath_cut") color_cut = self.core.get("color_toolpath_cut")
for toolpath in self.core.get("toolpaths").get_visible():
moves = toolpath.get_moves(self.core.get("gcode_safety_height"))
GL.glMatrixMode(GL.GL_MODELVIEW) GL.glMatrixMode(GL.GL_MODELVIEW)
GL.glLoadIdentity() GL.glLoadIdentity()
last_position = None last_position = None
......
...@@ -21,6 +21,8 @@ along with PyCAM. If not, see <http://www.gnu.org/licenses/>. ...@@ -21,6 +21,8 @@ along with PyCAM. If not, see <http://www.gnu.org/licenses/>.
""" """
import math import math
import datetime
import gobject
import pycam.Plugins import pycam.Plugins
# this requires ODE - we import it later, if necessary # this requires ODE - we import it later, if necessary
...@@ -30,128 +32,130 @@ import pycam.Plugins ...@@ -30,128 +32,130 @@ import pycam.Plugins
class ToolpathSimulation(pycam.Plugins.PluginBase): class ToolpathSimulation(pycam.Plugins.PluginBase):
UI_FILE = "toolpath_simulation.ui" UI_FILE = "toolpath_simulation.ui"
DEPENDS = ["Toolpaths", "OpenGLViewToolpath"]
CATEGORIES = ["Toolpath"] CATEGORIES = ["Toolpath"]
def setup(self): def setup(self):
self._running = None
if self.gui: if self.gui:
self._gtk_handlers = [] self._gtk_handlers = []
speed_factor_widget = self.gui.get_object("SimulationSpeedFactor") self._frame = self.gui.get_object("SimulationBox")
self.core.add_item("simulation_speed_factor", self.core.register_ui("toolpath_handling", "Simulation",
lambda: pow(10, speed_factor_widget.get_value()), self._frame, 25)
lambda value: speed_factor_widget.set_value(math.log10( self._speed_factor_widget = self.gui.get_object(
max(0.001, value)))) "SimulationSpeedFactorValue")
simulation_progress = self.gui.get_object( self._speed_factor_widget.set_value(1.0)
self._progress = self.gui.get_object(
"SimulationProgressTimelineValue") "SimulationProgressTimelineValue")
def update_simulation_progress(widget): self._timer_widget = self.gui.get_object(
if widget.get_value() == 100: "SimulationProgressTimeDisplay")
# a negative value indicates, that the simulation is finished self.core.set("show_simulation", False)
self.core.set("simulation_current_distance", -1) self._toolpath_moves = None
else: self._start_button = self.gui.get_object("SimulationStartButton")
complete = self.core.get("simulation_complete_distance") self._pause_button = self.gui.get_object("SimulationPauseButton")
partial = widget.get_value() / 100.0 * complete self._stop_button = self.gui.get_object("SimulationStopButton")
self.core.set("simulation_current_distance", partial) for obj, handler in ((self._start_button, self._start_simulation),
self._gtk_handlers.append((simulation_progress, "value-changed", (self._pause_button, self._pause_simulation),
update_simulation_progress)) (self._stop_button, self._stop_simulation)):
# update the speed factor label self._gtk_handlers.append((obj, "clicked", handler))
self._gtk_handlers.append((speed_factor_widget, "value-changed", self._gtk_handlers.append((self._progress, "value-changed",
lambda widget: self.gui.get_object( self._update_toolpath))
"SimulationSpeedFactorValueLabel").set_label("%.2f" % \
self.core.get("simulation_speed_factor"))))
self.simulation_window = self.gui.get_object("SimulationDialog")
self._gtk_handlers.append((self.simulation_window, "delete-event",
self.finish_toolpath_simulation))
sim_detail_obj = self.gui.get_object("SimulationDetailsValue")
self.core.add_item("simulation_details_level",
sim_detail_obj.get_value, sim_detail_obj.set_value)
self.register_gtk_handlers(self._gtk_handlers) self.register_gtk_handlers(self._gtk_handlers)
self.core.register_event("visualize-items", self.show_simulation)
return True return True
def teardown(self): def teardown(self):
if self.gui: if self.gui:
for name in ("simulation_speed_factor", "simulation_details_level"): self.core.remove_item("show_simulation")
self.core.remove_item(name) self.core.unregister_ui("toolpath_handling", self._frame)
self.core.unregister_event("visualize-items", self.show_simulation)
self.unregister_gtk_handlers(self._gtk_handlers) self.unregister_gtk_handlers(self._gtk_handlers)
def finish_toolpath_simulation(self, widget=None, data=None): def _update_visibility(self):
# hide the simulation tab toolpaths = self.core.get("toolpaths").get_selected()
self.simulation_window.hide() if toolpaths and (len(toolpaths) == 1):
# enable all other tabs again self._frame.show()
self.toggle_tabs_for_simulation(True)
self.core.set("simulation_object", None)
self.core.set("simulation_toolpath_moves", None)
self.core.set("show_simulation", False)
self.core.set("simulation_toolpath", None)
self.update_view()
# don't destroy the simulation window (for "destroy" event)
return True
def update_toolpath_simulation(self, widget=None, toolpath=None):
s = self.core
# update the GUI
while gtk.events_pending():
gtk.main_iteration()
if not s.get("show_simulation"):
# cancel
return False
safety_height = s.get("gcode_safety_height")
if not s.get("simulation_toolpath"):
# get the currently selected toolpath, if none is give
if toolpath is None:
toolpath_index = self._treeview_get_active_index(self.toolpath_table, self.toolpath)
if toolpath_index is None:
return
else: else:
toolpath = self.toolpath[toolpath_index] self._frame.hide()
s.set("simulation_toolpath", toolpath)
# set the current cutter def _start_simulation(self, widget=None):
self.cutter = toolpath.toolpath_settings.get_tool() if self._running is None:
# initial start of simulation (not just continuing)
toolpaths = self.core.get("toolpaths")
if not toolpaths:
# this should not happen
return
# we use only one toolpath
self._toolpath = toolpaths[0]
# calculate steps # calculate steps
s.set("simulation_machine_time", self._safety_height = self.core.get("gcode_safety_height")
toolpath.get_machine_time(safety_height=safety_height)) self._progress.set_upper(self._toolpath.get_machine_time(
s.set("simulation_complete_distance", safety_height=self._safety_height))
toolpath.get_machine_movement_distance( self._progress.set_value(0)
safety_height=safety_height)) self._distance = self._toolpath.get_machine_movement_distance(
s.set("simulation_current_distance", 0) safety_height=self._safety_height)
else: self._feedrate = self._toolpath.get_params().get("tool_feedrate",
toolpath = s.get("simulation_toolpath") 300)
if (s.get("simulation_current_distance") \ self._toolpath_moves = None
< s.get("simulation_complete_distance")): self.core.set("show_simulation", True)
if s.get("simulation_current_distance") < 0: self._running = True
# "-1" -> simulation is finished interval_ms = int(1000 / self.core.get("drill_progress_max_fps"))
updated_distance = s.get("simulation_complete_distance") gobject.timeout_add(interval_ms, self._next_timestep)
else: else:
time_step = 1.0 / s.get("drill_progress_max_fps") self._running = True
feedrate = toolpath.toolpath_settings.get_tool_settings( self._start_button.set_sensitive(False)
)["feedrate"] self._pause_button.set_sensitive(True)
distance_step = s.get("simulation_speed_factor") * \ self._stop_button.set_sensitive(True)
time_step * feedrate / 60
updated_distance = min(distance_step + \ def _pause_simulation(self, widget=None):
s.get("simulation_current_distance"), self._start_button.set_sensitive(True)
s.get("simulation_complete_distance")) self._pause_button.set_sensitive(False)
if updated_distance != s.get("simulation_current_distance"): self._running = False
s.set("simulation_current_distance", updated_distance)
moves = toolpath.get_moves(safety_height=safety_height, def _stop_simulation(self, widget=None):
max_movement=updated_distance) self._running = None
s.set("simulation_toolpath_moves", moves) self.core.set("show_simulation", False)
if moves: self._toolpath_moves = None
self.cutter.moveto(moves[-1][0]) self._timer_widget.set_label("")
self.update_view() self._progress.set_value(0)
progress_value_percent = 100.0 * s.get("simulation_current_distance") \ self._start_button.set_sensitive(True)
/ s.get("simulation_complete_distance") self._pause_button.set_sensitive(False)
self.gui.get_object("SimulationProgressTimelineValue").set_value( self._stop_button.set_sensitive(False)
progress_value_percent) self.core.emit_event("visual-item-updated")
def _next_timestep(self):
if self._running is None:
# stop operation
return False
if not self._running:
# pause -> no change
return True
if self._progress.get_value() < self._progress.get_upper():
time_step = self._speed_factor_widget.get_value() / \
self.core.get("drill_progress_max_fps")
new_time = self._progress.get_value() + time_step
new_time = min(new_time, self._progress.get_upper())
if new_time != self._progress.get_value():
# update the visualization
self._progress.set_value(new_time)
return True return True
def show_toolpath_simulation(self, toolpath=None): def _update_toolpath(self, widget=None):
# disable the main controls if (not self._running is None) and (self._progress.get_upper() > 0):
self.toggle_tabs_for_simulation(False) fraction = self._progress.get_value() / self._progress.get_upper()
# show the simulation controls current = datetime.timedelta(
self.simulation_window.show() seconds=int(self._progress.get_value()))
# start the simulation complete = datetime.timedelta(
self.core.set("show_simulation", True) seconds=int(self._progress.get_upper()))
time_step = int(1000 / self.core.get("drill_progress_max_fps")) self._timer_widget.set_label("%s / %s" % (current, complete))
# update the toolpath simulation repeatedly self._toolpath_moves = self._toolpath.get_moves(
gobject.timeout_add(time_step, self.update_toolpath_simulation) safety_height=self._safety_height,
max_movement=self._distance * fraction)
self.core.emit_event("visual-item-updated")
def show_simulation(self):
if self._toolpath_moves and self.core.get("show_simulation"):
self.core.get("draw_toolpath_moves_func")(self._toolpath_moves)
def update_toolpath_simulation_ode(self, widget=None, toolpath=None): def update_toolpath_simulation_ode(self, widget=None, toolpath=None):
import pycam.Simulation.ODEBlocks as ODEBlocks import pycam.Simulation.ODEBlocks as ODEBlocks
......
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