Commit 0b069aaf authored by sumpfralle's avatar sumpfralle

parallel processing separated into plugin

improved toolpath simulation plugin (not done, yet)


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@1126 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent a19f544c
<?xml version="1.0"?>
<interface>
<!-- interface-requires gtk+ 2.12 -->
<!-- interface-naming-policy project-wide -->
<object class="GtkListStore" id="ProcessPoolStatisticsModel">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
<!-- column-name last_notify -->
<column type="guint"/>
<!-- column-name tasks -->
<column type="guint"/>
<!-- column-name process_time -->
<column type="gfloat"/>
<!-- column-name avg_process_time -->
<column type="gfloat"/>
<!-- column-name avg_transfer_time -->
<column type="gfloat"/>
</columns>
</object>
<object class="GtkDialog" id="ProcessPoolWindow">
<property name="border_width">5</property>
<property name="title" translatable="yes">PyCAM pool of processes</property>
<property name="role">pycam-processes</property>
<property name="type_hint">normal</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox5">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkVBox" id="vbox32">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkVBox" id="ProcessPoolStatisticsBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow4">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">etched-in</property>
<child>
<object class="GtkTreeView" id="ProcessPoolView">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="model">ProcessPoolStatisticsModel</property>
<property name="search_column">0</property>
<child>
<object class="GtkTreeViewColumn" id="ProcessPoolColumn1">
<property name="resizable">True</property>
<property name="title">Name</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>
<property name="sort_column_id">0</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext1"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="ProcessPoolColumn2">
<property name="resizable">True</property>
<property name="title">Ping age</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>
<property name="sort_column_id">1</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext2"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="ProcessPoolColumn3">
<property name="resizable">True</property>
<property name="title">Processed</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>
<property name="sort_column_id">2</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext3"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="ProcessPoolColumn4">
<property name="resizable">True</property>
<property name="title">Processing time</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>
<property name="sort_column_id">3</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext4"/>
<attributes>
<attribute name="text">3</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="ProcessPoolColumn5">
<property name="resizable">True</property>
<property name="title">Avg. process time</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>
<property name="sort_column_id">4</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext5"/>
<attributes>
<attribute name="text">4</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="ProcessPoolColumn6">
<property name="resizable">True</property>
<property name="title">Avg. transfer time</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>
<property name="sort_column_id">5</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext6"/>
<attributes>
<attribute name="text">5</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox32">
<property name="visible">True</property>
<property name="spacing">3</property>
<child>
<object class="GtkLabel" id="ProcessPoolConnectedWorkersLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Number of connected workers:</property>
<property name="pattern">&lt;b&gt;____&lt;/b&gt;</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="ProcessPoolConnectedWorkersValue">
<property name="visible">True</property>
<property name="label" translatable="yes">0</property>
<property name="use_markup">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="ProcessPoolDetails">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="use_markup">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="ProcessPoolDisabledBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="ProcessPoolDisabledLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">The server mode is currently not enabled on your system.
Take a look at the &lt;i&gt;Preferences&lt;/i&gt; for &lt;i&gt;Parallel processing&lt;/i&gt; if you want to enable it.
Please read the description of the Server Mode (linked below) to understand the related security implications.</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
<property name="width_chars">60</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLinkButton" id="ProcessPoolHelpLink">
<property name="label" translatable="yes">Read more about the Server Mode.</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="xalign">0</property>
<property name="uri">http://sourceforge.net/apps/mediawiki/pycam/index.php?title=ServerMode</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area6">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
<object class="GtkHBox" id="hbox30">
<property name="visible">True</property>
<child>
<object class="GtkLabel" id="ProcessPoolRefreshIntervalLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Refresh interval:</property>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="ProcessPoolRefreshInterval">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">ProcessPoolRefreshIntervalValue</property>
<property name="numeric">True</property>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="ProcessPoolWindowClose">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">ProcessPoolWindowClose</action-widget>
</action-widgets>
</object>
<object class="GtkAdjustment" id="ServerPortLocalValue">
<property name="upper">65535</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="RemoteServerPortValue">
<property name="upper">65535</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="NumberOfProcessesValue">
<property name="upper">1000</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="ProcessPoolRefreshIntervalValue">
<property name="lower">1</property>
<property name="upper">60</property>
<property name="step_increment">1</property>
</object>
<object class="GtkFrame" id="MultiprocessingFrame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment15">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<object class="GtkVBox" id="vbox34">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="EnableParallelProcesses">
<property name="label" translatable="yes">Enable parallel processes</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="ParallelProcessSettingsBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkAlignment" id="alignment45">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="left_padding">10</property>
<child>
<object class="GtkTable" id="table13">
<property name="visible">True</property>
<property name="n_rows">3</property>
<property name="n_columns">2</property>
<property name="column_spacing">3</property>
<property name="row_spacing">2</property>
<child>
<object class="GtkLabel" id="AvailableCoresLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Available cores:</property>
</object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="AvailableCores">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">1</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="NumberOfProcesses">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">NumberOfProcessesValue</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="NumberOfProcessesLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Number of processes:</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkViewport" id="viewport2">
<property name="visible">True</property>
<property name="resize_mode">queue</property>
<property name="shadow_type">none</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="ZeroProcessesWarning">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;span foreground="red"&gt;Warning: no local processes enabled.
You will need remote workers.&lt;/span&gt;</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHSeparator" id="hseparator15">
<property name="visible">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="ServerModeDisabledLabel">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Server mode is currently not available on your system.
You are probably using the Windows standalone executable.
Instead you could use the PyCAM installer package along with the all-in-one installer of all dependencies.
See the &lt;a href="http://sf.net/apps/mediawiki/pycam/?title=Parallel_Processing_on_different_Platforms"&gt;platform feature matrix&lt;/a&gt; for details.</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="ServerModeSettingsFrame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkVBox" id="vbox36">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkHBox" id="hbox34">
<property name="visible">True</property>
<child>
<object class="GtkCheckButton" id="EnableServerMode">
<property name="label">gtk-connect</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment48">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment46">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="left_padding">10</property>
<child>
<object class="GtkTable" id="ServerModeSettingsTable">
<property name="visible">True</property>
<property name="n_rows">5</property>
<property name="n_columns">3</property>
<property name="column_spacing">3</property>
<property name="row_spacing">2</property>
<child>
<object class="GtkSpinButton" id="RemoteServerPort">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">RemoteServerPortValue</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="RemoteServerHostname">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="width_chars">18</property>
<property name="truncate_multiline">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="RemoteServerLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Remote server:</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="ServerPortLocalLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Local port:</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="ServerPasswordLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label" translatable="yes">Password:</property>
</object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkButton" id="ServerPasswordGenerate">
<property name="label">Generate</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="ServerPasswordShow">
<property name="label" translatable="yes">Show password</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ServerPassword">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="visibility">False</property>
<property name="invisible_char">&#x25CF;</property>
<property name="truncate_multiline">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment24">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLinkButton" id="ServerModeHelp">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="use_stock">True</property>
<property name="uri">http://sourceforge.net/apps/mediawiki/pycam/index.php?title=ServerMode</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment25">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="ServerPortLocal">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">ServerPortLocalValue</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment49">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="ServerModeFrameLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Distributed processing&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="ParallelProcessingDisabledLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Parallel processing is currently not available on your system.
You need to switch to Python v2.6 (or higher) or install the Python module "multiprocessing".
Note: The Windows standalone executable does not support parallel processing. Please install PyCAM's package for Windows and its dependencies if you need this feature.
</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="MultiprocessingFrameLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Settings for parallel processing&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<object class="GtkToggleAction" id="ToggleProcessPoolWindow">
<property name="label">_Process Pool Window</property>
<property name="short_label">_Process Pool Window</property>
<property name="tooltip">Show the current pool of workers</property>
</object>
</interface>
...@@ -52,22 +52,6 @@ ...@@ -52,22 +52,6 @@
</row> </row>
</data> </data>
</object> </object>
<object class="GtkListStore" id="ProcessPoolStatisticsModel">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
<!-- column-name last_notify -->
<column type="guint"/>
<!-- column-name tasks -->
<column type="guint"/>
<!-- column-name process_time -->
<column type="gfloat"/>
<!-- column-name avg_process_time -->
<column type="gfloat"/>
<!-- column-name avg_transfer_time -->
<column type="gfloat"/>
</columns>
</object>
<object class="GtkListStore" id="TouchOffLocationModel"> <object class="GtkListStore" id="TouchOffLocationModel">
<columns> <columns>
<!-- column-name key --> <!-- column-name key -->
...@@ -180,17 +164,12 @@ ...@@ -180,17 +164,12 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkNotebook" id="notebook1"> <object class="GtkNotebook" id="PreferencesNotebook">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="tab_pos">left</property> <property name="tab_pos">left</property>
<child> <child>
<object class="GtkVBox" id="vbox7"> <object class="GtkFrame" id="GeneralSettingsPrefTab">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<child>
<object class="GtkFrame" id="GeneralSettingsFrame">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label_xalign">0</property> <property name="label_xalign">0</property>
<property name="shadow_type">none</property> <property name="shadow_type">none</property>
...@@ -209,10 +188,6 @@ ...@@ -209,10 +188,6 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">False</property> <property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">The toolpath generation is based on detecting collisions.
The Open-Dynamic-Engine (ODE) is an alternative to the manual computation of these collisions.
It is significantly faster, but the current release of ODE contains a nasty bug that rarely causes erroneous toolpaths at the corner of the model. Thus ODE is disabled by default.
ODE can't be used in combination with parallel processing or server mode.</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
</object> </object>
<packing> <packing>
...@@ -263,16 +238,6 @@ ODE can't be used in combination with parallel processing or server mode.</prope ...@@ -263,16 +238,6 @@ ODE can't be used in combination with parallel processing or server mode.</prope
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkHBox" id="unit_box">
<property name="visible">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child> <child>
<object class="GtkCheckButton" id="AutoLoadTaskFile"> <object class="GtkCheckButton" id="AutoLoadTaskFile">
<property name="label" translatable="yes">Load custom task settings on startup</property> <property name="label" translatable="yes">Load custom task settings on startup</property>
...@@ -282,7 +247,8 @@ ODE can't be used in combination with parallel processing or server mode.</prope ...@@ -282,7 +247,8 @@ ODE can't be used in combination with parallel processing or server mode.</prope
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
</object> </object>
<packing> <packing>
<property name="position">3</property> <property name="expand">False</property>
<property name="position">2</property>
</packing> </packing>
</child> </child>
<child> <child>
...@@ -298,7 +264,7 @@ ODE can't be used in combination with parallel processing or server mode.</prope ...@@ -298,7 +264,7 @@ ODE can't be used in combination with parallel processing or server mode.</prope
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="position">4</property> <property name="position">3</property>
</packing> </packing>
</child> </child>
</object> </object>
...@@ -313,12 +279,6 @@ ODE can't be used in combination with parallel processing or server mode.</prope ...@@ -313,12 +279,6 @@ ODE can't be used in combination with parallel processing or server mode.</prope
</object> </object>
</child> </child>
</object> </object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child> </child>
<child type="tab"> <child type="tab">
<object class="GtkLabel" id="GeneralSettingsTabLabel"> <object class="GtkLabel" id="GeneralSettingsTabLabel">
...@@ -330,7 +290,7 @@ ODE can't be used in combination with parallel processing or server mode.</prope ...@@ -330,7 +290,7 @@ ODE can't be used in combination with parallel processing or server mode.</prope
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkFrame" id="GCodeTabFrame"> <object class="GtkFrame" id="GCodePrefTab">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label_xalign">0</property> <property name="label_xalign">0</property>
<property name="shadow_type">none</property> <property name="shadow_type">none</property>
...@@ -1182,7 +1142,7 @@ Everyone else should use the option for M3/M5 (see above).</property> ...@@ -1182,7 +1142,7 @@ Everyone else should use the option for M3/M5 (see above).</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkFrame" id="frame13"> <object class="GtkFrame" id="DisplayItemsPrefTab">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label_xalign">0</property> <property name="label_xalign">0</property>
<property name="shadow_type">none</property> <property name="shadow_type">none</property>
...@@ -1328,7 +1288,7 @@ for contour lines and toolpaths, triangle's normals, et cetera).</property> ...@@ -1328,7 +1288,7 @@ for contour lines and toolpaths, triangle's normals, et cetera).</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkFrame" id="ColorSelectionFrame"> <object class="GtkFrame" id="ColorPrefTab">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label_xalign">0</property> <property name="label_xalign">0</property>
<property name="shadow_type">none</property> <property name="shadow_type">none</property>
...@@ -1606,7 +1566,7 @@ for contour lines and toolpaths, triangle's normals, et cetera).</property> ...@@ -1606,7 +1566,7 @@ for contour lines and toolpaths, triangle's normals, et cetera).</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkFrame" id="OpenGLSettingsFrame"> <object class="GtkFrame" id="OpenGLPrefTab">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label_xalign">0</property> <property name="label_xalign">0</property>
<property name="shadow_type">none</property> <property name="shadow_type">none</property>
...@@ -1739,7 +1699,7 @@ Hotkey: &lt;p&gt;</property> ...@@ -1739,7 +1699,7 @@ Hotkey: &lt;p&gt;</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkFrame" id="ProgramsSettingsFrame"> <object class="GtkFrame" id="ProgramsPrefTab">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label_xalign">0</property> <property name="label_xalign">0</property>
<property name="shadow_type">none</property> <property name="shadow_type">none</property>
...@@ -1919,152 +1879,156 @@ Hotkey: &lt;p&gt;</property> ...@@ -1919,152 +1879,156 @@ Hotkey: &lt;p&gt;</property>
<property name="tab_fill">False</property> <property name="tab_fill">False</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkFrame" id="MultiprocessingFrame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment15">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<object class="GtkVBox" id="vbox34">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="EnableParallelProcesses">
<property name="label" translatable="yes">Enable parallel processes</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">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">3</property>
</packing> </packing>
</child> </child>
<child> <child internal-child="action_area">
<object class="GtkVBox" id="ParallelProcessSettingsBox"> <object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkAlignment" id="alignment45">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="left_padding">10</property>
<child>
<object class="GtkTable" id="table13">
<property name="visible">True</property> <property name="visible">True</property>
<property name="n_rows">3</property> <property name="layout_style">end</property>
<property name="n_columns">2</property>
<property name="column_spacing">3</property>
<property name="row_spacing">2</property>
<child> <child>
<object class="GtkLabel" id="AvailableCoresLabel"> <object class="GtkButton" id="ResetPreferencesButton">
<property name="label">gtk-revert-to-saved</property>
<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">Available cores:</property> <property name="receives_default">True</property>
<property name="use_stock">True</property>
</object> </object>
<packing> <packing>
<property name="top_attach">2</property> <property name="expand">False</property>
<property name="bottom_attach">3</property> <property name="fill">False</property>
<property name="x_options">GTK_FILL</property> <property name="position">0</property>
<property name="y_options">GTK_FILL</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="AvailableCores"> <object class="GtkButton" id="CloseSettingsWindow">
<property name="label">gtk-close</property>
<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">1</property> <property name="receives_default">True</property>
<property name="use_stock">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="expand">False</property>
<property name="right_attach">2</property> <property name="fill">False</property>
<property name="top_attach">2</property> <property name="position">1</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkSpinButton" id="NumberOfProcesses">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">NumberOfProcessesValue</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="expand">False</property>
<property name="right_attach">2</property> <property name="pack_type">end</property>
<property name="x_options">GTK_FILL</property> <property name="position">0</property>
<property name="y_options">GTK_FILL</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkLabel" id="NumberOfProcessesLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Number of processes:</property>
</object> </object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child> </child>
<child> <action-widgets>
<object class="GtkViewport" id="viewport2"> <action-widget response="0">ResetPreferencesButton</action-widget>
<action-widget response="0">CloseSettingsWindow</action-widget>
</action-widgets>
</object>
<object class="GtkAboutDialog" id="AboutWindow">
<property name="border_width">5</property>
<property name="title" translatable="yes">About PyCAM</property>
<property name="role">pycam-about</property>
<property name="window_position">center-on-parent</property>
<property name="type_hint">normal</property>
<property name="gravity">center</property>
<property name="program_name">PyCAM</property>
<property name="version">0.1</property>
<property name="copyright" translatable="yes">Copyright &#xA9; 2008-2010 Lode Leroy
Copyright &#xA9; 2010 Lars Kruse</property>
<property name="comments" translatable="yes">Toolpath Generation for 3-Axis CNC machining</property>
<property name="website">http://sourceforge.net/projects/pycam/</property>
<property name="website_label" translatable="yes">Webseite des PyCAM-Projekts</property>
<property name="license" translatable="yes">This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PyCAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</property>
<property name="logo">logo_gui.png</property>
<property name="wrap_license">True</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="resize_mode">queue</property> <property name="orientation">vertical</property>
<property name="shadow_type">none</property> <property name="spacing">2</property>
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="AboutWindowButtons">
<property name="visible">True</property>
<property name="layout_style">end</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="expand">False</property>
<property name="right_attach">2</property> <property name="pack_type">end</property>
<property name="top_attach">1</property> <property name="position">0</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing> </packing>
</child> </child>
</object>
</child>
</object>
<object class="GtkAction" id="About">
<property name="label">_About</property>
<property name="stock_id">gtk-about</property>
</object>
<object class="GtkAction" id="ExportEMCToolDefinition">
<property name="label">_Export EMC tools ...</property>
</object>
<object class="GtkDialog" id="UnitChangeDialog">
<property name="border_width">5</property>
<property name="title" translatable="yes">Unit change compensation</property>
<property name="role">pycam-units</property>
<property name="modal">True</property>
<property name="icon_name">accessories-calculator</property>
<property name="type_hint">normal</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox7">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkFrame" id="UnitChangeFrame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment28">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<object class="GtkVBox" id="vbox24">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child> <child>
<object class="GtkLabel" id="ZeroProcessesWarning"> <object class="GtkLabel" id="UnitChangeHelpLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="label" translatable="yes">&lt;span foreground="red"&gt;Warning: no local processes enabled. <property name="label" translatable="yes">Switching the unit size causes a change of the real world size of the various dimensions within PyCAM.
You will need remote workers.&lt;/span&gt;</property> This change can be compensated by applying the unit conversion factor to the current dimensions.
<property name="use_markup">True</property> Any selected group of dimensions will be scaled accordingly.</property>
<property name="wrap">True</property> <property name="wrap">True</property>
<property name="width_chars">40</property>
</object> </object>
<packing> <packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkHSeparator" id="hseparator15"> <object class="GtkCheckButton" id="UnitChangeModel">
<property name="label" translatable="yes">Model</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -2072,913 +2036,53 @@ You will need remote workers.&lt;/span&gt;</property> ...@@ -2072,913 +2036,53 @@ You will need remote workers.&lt;/span&gt;</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="ServerModeDisabledLabel"> <object class="GtkCheckButton" id="UnitChangeTools">
<property name="label" translatable="yes">Tools</property>
<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">Server mode is currently not available on your system. <property name="receives_default">False</property>
You are probably using the Windows standalone executable. <property name="draw_indicator">True</property>
Instead you could use the PyCAM installer package along with the all-in-one installer of all dependencies.
See the &lt;a href="http://sf.net/apps/mediawiki/pycam/?title=Parallel_Processing_on_different_Platforms"&gt;platform feature matrix&lt;/a&gt; for details.</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
</object> </object>
<packing> <packing>
<property name="position">2</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkFrame" id="ServerModeSettingsFrame"> <object class="GtkCheckButton" id="UnitChangeProcesses">
<property name="visible">True</property> <property name="label" translatable="yes">Processes</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkVBox" id="vbox36">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkHBox" id="hbox34">
<property name="visible">True</property>
<child>
<object class="GtkCheckButton" id="EnableServerMode">
<property name="label">gtk-connect</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="receives_default">False</property> <property name="receives_default">False</property>
<property name="use_stock">True</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">False</property> <property name="position">3</property>
<property name="position">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkAlignment" id="alignment48"> <object class="GtkCheckButton" id="UnitChangeBounds">
<property name="label" translatable="yes">Bounds</property>
<property name="visible">True</property> <property name="visible">True</property>
<child> <property name="can_focus">True</property>
<placeholder/> <property name="receives_default">False</property>
</child> <property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">False</property> <property name="position">4</property>
<property name="position">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkAlignment" id="alignment46"> <object class="GtkHButtonBox" id="hbuttonbox2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="left_padding">10</property>
<child>
<object class="GtkTable" id="ServerModeSettingsTable">
<property name="visible">True</property>
<property name="n_rows">5</property>
<property name="n_columns">3</property>
<property name="column_spacing">3</property>
<property name="row_spacing">2</property>
<child>
<object class="GtkSpinButton" id="RemoteServerPort">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">The TCP port of the remote server. You need to set a hostname or IP as well.
PyCAM's default port is 1250.</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">RemoteServerPortValue</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="RemoteServerHostname">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">Type in a hostname or IP address if you want to connect to a remote PyCAM server.
Leave this field empty for running a local server.</property>
<property name="invisible_char">&#x25CF;</property>
<property name="width_chars">18</property>
<property name="truncate_multiline">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="RemoteServerLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Remote server:</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="ServerPortLocalLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Local port:</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="ServerPasswordLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label" translatable="yes">Password:</property>
</object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkButton" id="ServerPasswordGenerate">
<property name="label">Generate</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Generate a new random shared secret.</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="ServerPasswordShow">
<property name="label" translatable="yes">Show password</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ServerPassword">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="visibility">False</property>
<property name="invisible_char">&#x25CF;</property>
<property name="truncate_multiline">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment24">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLinkButton" id="ServerModeHelp">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="use_stock">True</property>
<property name="uri">http://sourceforge.net/apps/mediawiki/pycam/index.php?title=ServerMode</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment25">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="ServerPortLocal">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">ServerPortLocalValue</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment49">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="ServerModeFrameLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Distributed processing&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="ParallelProcessingDisabledLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Parallel processing is currently not available on your system.
You need to switch to Python v2.6 (or higher) or install the Python module "multiprocessing".
Note: The Windows standalone executable does not support parallel processing. Please install PyCAM's package for Windows and its dependencies if you need this feature.
</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="MultiprocessingFrameLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Settings for parallel processing&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="position">6</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="MultiprocessingSettings">
<property name="visible">True</property>
<property name="label" translatable="yes">Parallel processing</property>
</object>
<packing>
<property name="position">6</property>
<property name="tab_fill">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="ResetPreferencesButton">
<property name="label">gtk-revert-to-saved</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="CloseSettingsWindow">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">ResetPreferencesButton</action-widget>
<action-widget response="0">CloseSettingsWindow</action-widget>
</action-widgets>
</object>
<object class="GtkAboutDialog" id="AboutWindow">
<property name="border_width">5</property>
<property name="title" translatable="yes">About PyCAM</property>
<property name="role">pycam-about</property>
<property name="window_position">center-on-parent</property>
<property name="type_hint">normal</property>
<property name="gravity">center</property>
<property name="program_name">PyCAM</property>
<property name="version">0.1</property>
<property name="copyright" translatable="yes">Copyright &#xA9; 2008-2010 Lode Leroy
Copyright &#xA9; 2010 Lars Kruse</property>
<property name="comments" translatable="yes">Toolpath Generation for 3-Axis CNC machining</property>
<property name="website">http://sourceforge.net/projects/pycam/</property>
<property name="website_label" translatable="yes">Webseite des PyCAM-Projekts</property>
<property name="license" translatable="yes">This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PyCAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</property>
<property name="logo">logo_gui.png</property>
<property name="wrap_license">True</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<placeholder/>
</child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="AboutWindowButtons">
<property name="visible">True</property>
<property name="layout_style">end</property>
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkAction" id="About">
<property name="label">_About</property>
<property name="stock_id">gtk-about</property>
</object>
<object class="GtkAction" id="ExportEMCToolDefinition">
<property name="label">_Export EMC tools ...</property>
</object>
<object class="GtkAdjustment" id="SimulationDetailsValue">
<property name="value">1</property>
<property name="lower">1</property>
<property name="upper">10</property>
<property name="step_increment">1</property>
</object>
<object class="GtkDialog" id="UnitChangeDialog">
<property name="border_width">5</property>
<property name="title" translatable="yes">Unit change compensation</property>
<property name="role">pycam-units</property>
<property name="modal">True</property>
<property name="icon_name">accessories-calculator</property>
<property name="type_hint">normal</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox7">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkFrame" id="UnitChangeFrame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment28">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<object class="GtkVBox" id="vbox24">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="UnitChangeHelpLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Switching the unit size causes a change of the real world size of the various dimensions within PyCAM.
This change can be compensated by applying the unit conversion factor to the current dimensions.
Any selected group of dimensions will be scaled accordingly.</property>
<property name="wrap">True</property>
<property name="width_chars">40</property>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="UnitChangeModel">
<property name="label" translatable="yes">Model</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="UnitChangeTools">
<property name="label" translatable="yes">Tools</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="UnitChangeProcesses">
<property name="label" translatable="yes">Processes</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="UnitChangeBounds">
<property name="label" translatable="yes">Bounds</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkHButtonBox" id="hbuttonbox2">
<property name="visible">True</property>
<child>
<object class="GtkButton" id="UnitChangeSelectAll">
<property name="label">gtk-select-all</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="UnitChangeSelectNone">
<property name="label">gtk-clear</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="padding">4</property>
<property name="position">5</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="UnitChangeFrameLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Change of unit size&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area5">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="UnitChangeApply">
<property name="label">gtk-apply</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">UnitChangeApply</action-widget>
</action-widgets>
</object>
<object class="GtkAction" id="HelpMenu">
<property name="label">_Help</property>
</object>
<object class="GtkAction" id="HelpMenuMisc">
<property name="label">Mis_cellaneous</property>
</object>
<object class="GtkAction" id="HelpMenuGUI">
<property name="label">_GUI description</property>
</object>
<object class="GtkAction" id="HelpUserManual">
<property name="label">User _Manual: Overview</property>
<property name="stock_id">gtk-help</property>
</object>
<object class="GtkAction" id="HelpIntroduction">
<property name="label">_Introduction</property>
</object>
<object class="GtkAction" id="HelpSupportedFormats">
<property name="label">Supported _Formats</property>
</object>
<object class="GtkAction" id="HelpModelTransformations">
<property name="label">_Model Transformations</property>
</object>
<object class="GtkAction" id="HelpToolTypes">
<property name="label">T_ool Types</property>
</object>
<object class="GtkAction" id="HelpProcessSettings">
<property name="label">_Process Settings</property>
</object>
<object class="GtkAction" id="HelpBoundsSettings">
<property name="label">_Bounds Settings</property>
</object>
<object class="GtkAction" id="HelpTaskSetup">
<property name="label">_Task Setup</property>
</object>
<object class="GtkAction" id="HelpGCodeExport">
<property name="label">_GCode Export</property>
</object>
<object class="GtkAction" id="HelpSimulation">
<property name="label">_Simulation</property>
</object>
<object class="GtkAction" id="Help3DView">
<property name="label">3D _View</property>
</object>
<object class="GtkAction" id="HelpCommandLine">
<property name="label">_Command Line Usage</property>
</object>
<object class="GtkAction" id="ProjectWebsite">
<property name="label">Project _Website</property>
<property name="stock_id">gtk-network</property>
</object>
<object class="GtkAction" id="Forum">
<property name="label">_Forum</property>
</object>
<object class="GtkAction" id="BugTracker">
<property name="label">Report a _Bug</property>
</object>
<object class="GtkAction" id="FeatureRequest">
<property name="label">Re_quest a Feature</property>
</object>
<object class="GtkAction" id="HelpHotkeys">
<property name="label">_Keyboard Shortcuts</property>
</object>
<object class="GtkAdjustment" id="GCodeCornerStyleMotionToleranceValue">
<property name="upper">100</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="GCodeCornerStyleCAMToleranceValue">
<property name="upper">100</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAction" id="OpenRecentModel">
<property name="label">Open _Recent</property>
</object>
<object class="GtkDialog" id="ProcessPoolWindow">
<property name="border_width">5</property>
<property name="title" translatable="yes">PyCAM pool of processes</property>
<property name="role">pycam-processes</property>
<property name="type_hint">normal</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox5">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkVBox" id="vbox32">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkVBox" id="ProcessPoolStatisticsBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow4">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">etched-in</property>
<child>
<object class="GtkTreeView" id="ProcessPoolView">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="model">ProcessPoolStatisticsModel</property>
<property name="search_column">0</property>
<child>
<object class="GtkTreeViewColumn" id="ProcessPoolColumn1">
<property name="resizable">True</property>
<property name="title">Name</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>
<property name="sort_column_id">0</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext1"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="ProcessPoolColumn2">
<property name="resizable">True</property>
<property name="title">Ping age</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>
<property name="sort_column_id">1</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext2"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="ProcessPoolColumn3">
<property name="resizable">True</property>
<property name="title">Processed</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>
<property name="sort_column_id">2</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext3"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="ProcessPoolColumn4">
<property name="resizable">True</property>
<property name="title">Processing time</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>
<property name="sort_column_id">3</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext4"/>
<attributes>
<attribute name="text">3</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="ProcessPoolColumn5">
<property name="resizable">True</property>
<property name="title">Avg. process time</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>
<property name="sort_column_id">4</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext5"/>
<attributes>
<attribute name="text">4</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="ProcessPoolColumn6">
<property name="resizable">True</property>
<property name="title">Avg. transfer time</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>
<property name="sort_column_id">5</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext6"/>
<attributes>
<attribute name="text">5</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox32">
<property name="visible">True</property>
<property name="spacing">3</property>
<child>
<object class="GtkLabel" id="ProcessPoolConnectedWorkersLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Number of connected workers:</property>
<property name="pattern">&lt;b&gt;____&lt;/b&gt;</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="ProcessPoolConnectedWorkersValue">
<property name="visible">True</property>
<property name="label" translatable="yes">0</property>
<property name="use_markup">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="ProcessPoolDetails">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="use_markup">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="ProcessPoolDisabledBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child> <child>
<object class="GtkLabel" id="ProcessPoolDisabledLabel"> <object class="GtkButton" id="UnitChangeSelectAll">
<property name="label">gtk-select-all</property>
<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">The server mode is currently not enabled on your system. <property name="receives_default">True</property>
Take a look at the &lt;i&gt;Preferences&lt;/i&gt; for &lt;i&gt;Parallel processing&lt;/i&gt; if you want to enable it. <property name="use_stock">True</property>
Please read the description of the Server Mode (linked below) to understand the related security implications.</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
<property name="width_chars">60</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -2987,15 +2091,12 @@ Please read the description of the Server Mode (linked below) to understand the ...@@ -2987,15 +2091,12 @@ Please read the description of the Server Mode (linked below) to understand the
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLinkButton" id="ProcessPoolHelpLink"> <object class="GtkButton" id="UnitChangeSelectNone">
<property name="label" translatable="yes">Read more about the Server Mode.</property> <property name="label">gtk-clear</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="receives_default">True</property> <property name="receives_default">True</property>
<property name="has_tooltip">True</property> <property name="use_stock">True</property>
<property name="relief">none</property>
<property name="xalign">0</property>
<property name="uri">http://sourceforge.net/apps/mediawiki/pycam/index.php?title=ServerMode</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -3006,53 +2107,36 @@ Please read the description of the Server Mode (linked below) to understand the ...@@ -3006,53 +2107,36 @@ Please read the description of the Server Mode (linked below) to understand the
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">False</property> <property name="padding">4</property>
<property name="position">1</property> <property name="position">5</property>
</packing> </packing>
</child> </child>
</object> </object>
<packing>
<property name="position">1</property>
</packing>
</child> </child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area6">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
<object class="GtkHBox" id="hbox30">
<property name="visible">True</property>
<child>
<object class="GtkLabel" id="ProcessPoolRefreshIntervalLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Refresh interval:</property>
</object> </object>
<packing>
<property name="position">0</property>
</packing>
</child> </child>
<child> <child type="label">
<object class="GtkSpinButton" id="ProcessPoolRefreshInterval"> <object class="GtkLabel" id="UnitChangeFrameLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="label" translatable="yes">&lt;b&gt;Change of unit size&lt;/b&gt;</property>
<property name="invisible_char">&#x25CF;</property> <property name="use_markup">True</property>
<property name="adjustment">ProcessPoolRefreshIntervalValue</property>
<property name="numeric">True</property>
</object> </object>
<packing>
<property name="position">1</property>
</packing>
</child> </child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="position">1</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing> </packing>
</child> </child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area5">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
<placeholder/>
</child>
<child> <child>
<object class="GtkButton" id="ProcessPoolWindowClose"> <object class="GtkButton" id="UnitChangeApply">
<property name="label">gtk-close</property> <property name="label">gtk-apply</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="receives_default">True</property> <property name="receives_default">True</property>
...@@ -3074,228 +2158,97 @@ Please read the description of the Server Mode (linked below) to understand the ...@@ -3074,228 +2158,97 @@ Please read the description of the Server Mode (linked below) to understand the
</object> </object>
</child> </child>
<action-widgets> <action-widgets>
<action-widget response="0">ProcessPoolWindowClose</action-widget> <action-widget response="0">UnitChangeApply</action-widget>
</action-widgets> </action-widgets>
</object> </object>
<object class="GtkAdjustment" id="ProcessPoolRefreshIntervalValue"> <object class="GtkAction" id="HelpMenu">
<property name="value">3</property> <property name="label">_Help</property>
<property name="lower">1</property>
<property name="upper">60</property>
<property name="step_increment">1</property>
</object> </object>
<object class="GtkToggleAction" id="ToggleProcessPoolWindow"> <object class="GtkAction" id="HelpMenuMisc">
<property name="label">_Process Pool Window</property> <property name="label">Mis_cellaneous</property>
<property name="tooltip">Show the current pool of workers</property>
</object> </object>
<object class="GtkAction" id="DevelopmentBlog"> <object class="GtkAction" id="HelpMenuGUI">
<property name="label">_Development Blog</property> <property name="label">_GUI description</property>
</object> </object>
<object class="GtkAction" id="HelpServerMode"> <object class="GtkAction" id="HelpUserManual">
<property name="label">Server Mode</property> <property name="label">User _Manual: Overview</property>
<property name="stock_id">gtk-help</property>
</object> </object>
<object class="GtkAction" id="ExtrasMenu"> <object class="GtkAction" id="HelpIntroduction">
<property name="label">E_xtras</property> <property name="label">_Introduction</property>
</object> </object>
<object class="GtkAction" id="EditMenu"> <object class="GtkAction" id="HelpSupportedFormats">
<property name="label">_Edit</property> <property name="label">Supported _Formats</property>
</object> </object>
<object class="GtkAction" id="UndoButton"> <object class="GtkAction" id="HelpModelTransformations">
<property name="label">Undo latest model change</property> <property name="label">_Model Transformations</property>
<property name="stock_id">gtk-undo</property>
</object> </object>
<object class="GtkAdjustment" id="NumberOfProcessesValue"> <object class="GtkAction" id="HelpToolTypes">
<property name="upper">1000</property> <property name="label">T_ool Types</property>
<property name="step_increment">1</property>
</object> </object>
<object class="GtkAdjustment" id="RemoteServerPortValue"> <object class="GtkAction" id="HelpProcessSettings">
<property name="value">1250</property> <property name="label">_Process Settings</property>
<property name="upper">65535</property>
<property name="step_increment">1</property>
</object> </object>
<object class="GtkAdjustment" id="ServerPortLocalValue"> <object class="GtkAction" id="HelpBoundsSettings">
<property name="value">1250</property> <property name="label">_Bounds Settings</property>
<property name="upper">65535</property>
<property name="step_increment">1</property>
</object> </object>
<object class="GtkAdjustment" id="SimulationSpeedFactorValueExponential"> <object class="GtkAction" id="HelpTaskSetup">
<property name="value">1</property> <property name="label">_Task Setup</property>
<property name="lower">-2</property>
<property name="upper">4</property>
<property name="step_increment">1</property>
</object> </object>
<object class="GtkDialog" id="SimulationDialog"> <object class="GtkAction" id="HelpGCodeExport">
<property name="border_width">5</property> <property name="label">_GCode Export</property>
<property name="title" translatable="yes">PyCAM simulation</property>
<property name="role">pycam-simulation</property>
<property name="destroy_with_parent">True</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox9">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkVBox" id="vbox23">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<child>
<object class="GtkHBox" id="hbox20">
<property name="spacing">2</property>
<child>
<object class="GtkLabel" id="SimulationDetailsControlLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="xpad">5</property>
<property name="label" translatable="yes">Simulation detail level (1..10):</property>
</object> </object>
<packing> <object class="GtkAction" id="HelpSimulation">
<property name="expand">False</property> <property name="label">_Simulation</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="SimulationDetailsControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="max_length">6</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SimulationDetailsValue</property>
</object> </object>
<packing> <object class="GtkAction" id="Help3DView">
<property name="expand">False</property> <property name="label">3D _View</property>
<property name="position">1</property>
</packing>
</child>
</object> </object>
<packing> <object class="GtkAction" id="HelpCommandLine">
<property name="expand">False</property> <property name="label">_Command Line Usage</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label2">
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Hint:&lt;/b&gt; take a look at the "show drill" and
"OpenGL: polygon" settings in preferences.
&lt;b&gt;Beware:&lt;/b&gt; the simulation feature is new and
experimental. Thus you will quite probably stumble
upon interesting bugs and weird results.</property>
<property name="use_markup">True</property>
</object> </object>
<packing> <object class="GtkAction" id="ProjectWebsite">
<property name="expand">False</property> <property name="label">Project _Website</property>
<property name="position">1</property> <property name="stock_id">gtk-network</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="SimulationProgressTimelineLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Progress:</property>
</object> </object>
<packing> <object class="GtkAction" id="Forum">
<property name="expand">False</property> <property name="label">_Forum</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkHScale" id="SimulationProgressTimeline">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">SimulationProgressTimelineValue</property>
<property name="draw_value">False</property>
</object> </object>
<packing> <object class="GtkAction" id="BugTracker">
<property name="expand">False</property> <property name="label">Report a _Bug</property>
<property name="position">3</property>
</packing>
</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 factor:</property>
</object> </object>
<packing> <object class="GtkAction" id="FeatureRequest">
<property name="expand">False</property> <property name="label">Re_quest a Feature</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="SimulationSpeedFactorValueLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">1.00</property>
</object> </object>
<packing> <object class="GtkAction" id="HelpHotkeys">
<property name="expand">False</property> <property name="label">_Keyboard Shortcuts</property>
<property name="position">1</property>
</packing>
</child>
</object> </object>
<packing> <object class="GtkAdjustment" id="GCodeCornerStyleMotionToleranceValue">
<property name="expand">False</property> <property name="upper">100</property>
<property name="position">4</property> <property name="step_increment">1</property>
</packing>
</child>
<child>
<object class="GtkHScale" id="SimulationSpeedFactor">
<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> <object class="GtkAdjustment" id="GCodeCornerStyleCAMToleranceValue">
<property name="expand">False</property> <property name="upper">100</property>
<property name="position">5</property> <property name="step_increment">1</property>
</packing>
</child>
</object> </object>
<packing> <object class="GtkAction" id="OpenRecentModel">
<property name="position">1</property> <property name="label">Open _Recent</property>
</packing>
</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>
<object class="GtkButton" id="ExitSimulationButton">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object> </object>
<packing> <object class="GtkAction" id="DevelopmentBlog">
<property name="expand">False</property> <property name="label">_Development Blog</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object> </object>
<packing> <object class="GtkAction" id="HelpServerMode">
<property name="expand">False</property> <property name="label">Server Mode</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object> </object>
</child> <object class="GtkAction" id="ExtrasMenu">
<action-widgets> <property name="label">E_xtras</property>
<action-widget response="0">ExitSimulationButton</action-widget>
</action-widgets>
</object> </object>
<object class="GtkAdjustment" id="SimulationProgressTimelineValue"> <object class="GtkAction" id="EditMenu">
<property name="upper">100</property> <property name="label">_Edit</property>
<property name="step_increment">1</property> </object>
<object class="GtkAction" id="UndoButton">
<property name="label">Undo latest model change</property>
<property name="stock_id">gtk-undo</property>
</object> </object>
<object class="GtkAdjustment" id="GCodeMinimumStepValue_x"> <object class="GtkAdjustment" id="GCodeMinimumStepValue_x">
<property name="upper">100</property> <property name="upper">100</property>
......
...@@ -2,10 +2,188 @@ ...@@ -2,10 +2,188 @@
<interface> <interface>
<!-- interface-requires gtk+ 2.12 --> <!-- interface-requires gtk+ 2.12 -->
<!-- interface-naming-policy project-wide --> <!-- interface-naming-policy project-wide -->
<object class="GtkButton" id="toolpath_simulate"> <object class="GtkDialog" id="SimulationDialog">
<property name="label" translatable="yes">Simulate</property> <property name="border_width">5</property>
<property name="title" translatable="yes">PyCAM simulation</property>
<property name="role">pycam-simulation</property>
<property name="destroy_with_parent">True</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox9">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkVBox" id="vbox23">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<child>
<object class="GtkHBox" id="hbox20">
<property name="spacing">2</property>
<child>
<object class="GtkLabel" id="SimulationDetailsControlLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="xpad">5</property>
<property name="label" translatable="yes">Simulation detail level (1..10):</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="SimulationDetailsControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="max_length">6</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SimulationDetailsValue</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label2">
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Hint:&lt;/b&gt; take a look at the "show drill" and
"OpenGL: polygon" settings in preferences.
&lt;b&gt;Beware:&lt;/b&gt; the simulation feature is new and
experimental. Thus you will quite probably stumble
upon interesting bugs and weird results.</property>
<property name="use_markup">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="SimulationProgressTimelineLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Progress:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkHScale" id="SimulationProgressTimeline">
<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="draw_value">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">3</property>
</packing>
</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 factor:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="SimulationSpeedFactorValueLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">1.00</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkHScale" id="SimulationSpeedFactor">
<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>
<packing>
<property name="expand">False</property>
<property name="position">5</property>
</packing>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</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>
<object class="GtkButton" id="ExitSimulationButton">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">ExitSimulationButton</action-widget>
</action-widgets>
</object>
<object class="GtkAdjustment" id="SimulationProgressTimelineValue">
<property name="upper">100</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="SimulationSpeedFactorValueExponential">
<property name="lower">-2</property>
<property name="upper">4</property>
<property name="step_increment">1</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>
</interface> </interface>
...@@ -22,6 +22,20 @@ along with PyCAM. If not, see <http://www.gnu.org/licenses/>. ...@@ -22,6 +22,20 @@ along with PyCAM. If not, see <http://www.gnu.org/licenses/>.
""" """
import os
import sys
import re
import math
import time
import datetime
import gtk
import gobject
import webbrowser
import ConfigParser
import StringIO
import pickle
import logging
import pycam.Exporters.EMCToolExporter import pycam.Exporters.EMCToolExporter
import pycam.Gui.Settings import pycam.Gui.Settings
import pycam.Cutters import pycam.Cutters
...@@ -44,24 +58,6 @@ from pycam.Toolpath import Bounds ...@@ -44,24 +58,6 @@ from pycam.Toolpath import Bounds
import pycam.Plugins import pycam.Plugins
from pycam import VERSION from pycam import VERSION
import pycam.Physics.ode_physics import pycam.Physics.ode_physics
# this requires ODE - we import it later, if necessary
#import pycam.Simulation.ODEBlocks
import gtk
import gobject
import webbrowser
import ConfigParser
import string
import StringIO
import pickle
import time
import logging
import datetime
import random
import math
import re
import os
import sys
GTKBUILD_FILE = "pycam-project.ui" GTKBUILD_FILE = "pycam-project.ui"
GTKMENU_FILE = "menubar.xml" GTKMENU_FILE = "menubar.xml"
...@@ -81,7 +77,6 @@ FILTER_EMC_TOOL = (("EMC tool files", "*.tbl"),) ...@@ -81,7 +77,6 @@ FILTER_EMC_TOOL = (("EMC tool files", "*.tbl"),)
PREFERENCES_DEFAULTS = { PREFERENCES_DEFAULTS = {
"enable_ode": False, "enable_ode": False,
"boundary_mode": -1,
"unit": "mm", "unit": "mm",
"default_task_settings_file": "", "default_task_settings_file": "",
"show_model": True, "show_model": True,
...@@ -104,7 +99,6 @@ PREFERENCES_DEFAULTS = { ...@@ -104,7 +99,6 @@ PREFERENCES_DEFAULTS = {
"view_shadow": True, "view_shadow": True,
"view_polygon": True, "view_polygon": True,
"view_perspective": True, "view_perspective": True,
"simulation_details_level": 3,
"drill_progress_max_fps": 2, "drill_progress_max_fps": 2,
"gcode_safety_height": 25.0, "gcode_safety_height": 25.0,
"gcode_minimum_step_x": 0.0001, "gcode_minimum_step_x": 0.0001,
...@@ -118,10 +112,6 @@ PREFERENCES_DEFAULTS = { ...@@ -118,10 +112,6 @@ PREFERENCES_DEFAULTS = {
"gcode_spindle_delay": 3, "gcode_spindle_delay": 3,
"external_program_inkscape": "", "external_program_inkscape": "",
"external_program_pstoedit": "", "external_program_pstoedit": "",
"server_auth_key": "",
"server_port_local": pycam.Utils.threading.DEFAULT_PORT,
"server_port_remote": pycam.Utils.threading.DEFAULT_PORT,
"server_hostname": "",
"touch_off_on_startup": False, "touch_off_on_startup": False,
"touch_off_on_tool_change": False, "touch_off_on_tool_change": False,
"touch_off_position_type": "absolute", "touch_off_position_type": "absolute",
...@@ -314,7 +304,6 @@ class ProjectGui(object): ...@@ -314,7 +304,6 @@ class ProjectGui(object):
if pycam.Utils.get_platform() == pycam.Utils.PLATFORM_WINDOWS: if pycam.Utils.get_platform() == pycam.Utils.PLATFORM_WINDOWS:
gtkrc_file = get_ui_file_location(GTKRC_FILE_WINDOWS) gtkrc_file = get_ui_file_location(GTKRC_FILE_WINDOWS)
if gtkrc_file: if gtkrc_file:
print "GTKRC: %s" % str(gtkrc_file)
gtk.rc_add_default_file(gtkrc_file) gtk.rc_add_default_file(gtkrc_file)
gtk.rc_reparse_all_for_settings(gtk.settings_get_default(), True) gtk.rc_reparse_all_for_settings(gtk.settings_get_default(), True)
self.window = self.gui.get_object("ProjectWindow") self.window = self.gui.get_object("ProjectWindow")
...@@ -340,7 +329,6 @@ class ProjectGui(object): ...@@ -340,7 +329,6 @@ class ProjectGui(object):
self.last_dirname = None self.last_dirname = None
self.last_task_settings_uri = None self.last_task_settings_uri = None
self.last_model_uri = None self.last_model_uri = None
self.last_toolpath_file = None
# define callbacks and accelerator keys for the menu actions # define callbacks and accelerator keys for the menu actions
for objname, callback, data, accel_key in ( for objname, callback, data, accel_key in (
("LoadTaskSettings", self.load_task_settings_file, None, "<Control>t"), ("LoadTaskSettings", self.load_task_settings_file, None, "<Control>t"),
...@@ -352,7 +340,6 @@ class ProjectGui(object): ...@@ -352,7 +340,6 @@ class ProjectGui(object):
("ExportEMCToolDefinition", self.export_emc_tools, None, None), ("ExportEMCToolDefinition", self.export_emc_tools, None, None),
("Quit", self.destroy, None, "<Control>q"), ("Quit", self.destroy, None, "<Control>q"),
("GeneralSettings", self.toggle_preferences_window, None, "<Control>p"), ("GeneralSettings", self.toggle_preferences_window, None, "<Control>p"),
("ToggleProcessPoolWindow", self.toggle_process_pool_window, None, None),
("UndoButton", self._restore_undo_state, None, "<Control>z"), ("UndoButton", self._restore_undo_state, None, "<Control>z"),
("HelpUserManual", self.show_help, "User_Manual", "F1"), ("HelpUserManual", self.show_help, "User_Manual", "F1"),
("HelpIntroduction", self.show_help, "Introduction", None), ("HelpIntroduction", self.show_help, "Introduction", None),
...@@ -375,9 +362,6 @@ class ProjectGui(object): ...@@ -375,9 +362,6 @@ class ProjectGui(object):
("BugTracker", self.show_help, "http://sourceforge.net/tracker/?group_id=237831&atid=1104176", None), ("BugTracker", self.show_help, "http://sourceforge.net/tracker/?group_id=237831&atid=1104176", None),
("FeatureRequest", self.show_help, "http://sourceforge.net/tracker/?group_id=237831&atid=1104179", None)): ("FeatureRequest", self.show_help, "http://sourceforge.net/tracker/?group_id=237831&atid=1104179", None)):
item = self.gui.get_object(objname) item = self.gui.get_object(objname)
if objname == "ToggleProcessPoolWindow":
action = "toggled"
else:
action = "activate" action = "activate"
if data is None: if data is None:
item.connect(action, callback) item.connect(action, callback)
...@@ -408,6 +392,12 @@ class ProjectGui(object): ...@@ -408,6 +392,12 @@ class ProjectGui(object):
self.gui.get_object("ExportEMCToolDefinition").set_sensitive(tool_num > 0) self.gui.get_object("ExportEMCToolDefinition").set_sensitive(tool_num > 0)
self.settings.register_event("tool-selection-changed", update_emc_tool_button) self.settings.register_event("tool-selection-changed", update_emc_tool_button)
self.settings.set("load_model", self.load_model) self.settings.set("load_model", self.load_model)
# set the availability of ODE
self.enable_ode_control = self.gui.get_object("SettingEnableODE")
self.settings.add_item("enable_ode", self.enable_ode_control.get_active,
self.enable_ode_control.set_active)
self.settings.register_event("parallel-processing-changed",
self.update_ode_settings)
# configure drag-n-drop for config files and models # configure drag-n-drop for config files and models
self.settings.set("configure-drag-drop-func", self.settings.set("configure-drag-drop-func",
self.configure_drag_and_drop) self.configure_drag_and_drop)
...@@ -433,22 +423,31 @@ class ProjectGui(object): ...@@ -433,22 +423,31 @@ class ProjectGui(object):
# TODO: fix this ugly hack! # TODO: fix this ugly hack!
self.gui.get_object("AboutWindowButtons").get_children()[-1].connect("clicked", self.toggle_about_window, False) self.gui.get_object("AboutWindowButtons").get_children()[-1].connect("clicked", self.toggle_about_window, False)
self.about_window.connect("delete-event", self.toggle_about_window, False) self.about_window.connect("delete-event", self.toggle_about_window, False)
# "process pool" window
self.process_pool_window = self.gui.get_object("ProcessPoolWindow")
self.process_pool_window.set_default_size(500, 400)
self.process_pool_window.connect("delete-event", self.toggle_process_pool_window, False)
self.process_pool_window.connect("destroy", self.toggle_process_pool_window, False)
self.gui.get_object("ProcessPoolWindowClose").connect("clicked", self.toggle_process_pool_window, False)
self.gui.get_object("ProcessPoolRefreshInterval").set_value(3)
self.process_pool_model = self.gui.get_object("ProcessPoolStatisticsModel")
# menu bar # menu bar
uimanager = gtk.UIManager() uimanager = gtk.UIManager()
self.settings.set("gtk-uimanager", uimanager) self.settings.set("gtk-uimanager", uimanager)
self._accel_group = uimanager.get_accel_group() self._accel_group = uimanager.get_accel_group()
self.settings.add_item("gtk-accel-group", lambda: self._accel_group) self.settings.add_item("gtk-accel-group", lambda: self._accel_group)
for window in (self.window, self.about_window, self.preferences_window, for window in (self.window, self.about_window, self.preferences_window):
self.process_pool_window):
window.add_accel_group(self._accel_group) window.add_accel_group(self._accel_group)
preferences_book = self.gui.get_object("PreferencesNotebook")
def clear_preferences():
for index in range(preferences_book.get_n_pages()):
preferences_book.remove_page(0)
def add_preferences_item(item, name):
preferences_book.append_page(item, gtk.Label(name))
self.settings.register_ui_section("preferences",
add_preferences_item, clear_preferences)
for obj_name, label, priority in (
("GeneralSettingsPrefTab", "General", -50),
("GCodePrefTab", "GCode", 10),
("DisplayItemsPrefTab", "Display Items", 20),
("ColorPrefTab", "Colors", 30),
("OpenGLPrefTab", "OpenGL", 40),
("ProgramsPrefTab", "Programs", 50)):
obj = self.gui.get_object(obj_name)
obj.unparent()
self.settings.register_ui("preferences", label, obj, priority)
# set defaults # set defaults
self.cutter = None self.cutter = None
self._last_unit = None self._last_unit = None
...@@ -584,14 +583,8 @@ class ProjectGui(object): ...@@ -584,14 +583,8 @@ class ProjectGui(object):
# repaint the 3d view after a color change # repaint the 3d view after a color change
obj.connect("color-set", lambda widget: \ obj.connect("color-set", lambda widget: \
self.settings.emit_event("visual-item-updated")) self.settings.emit_event("visual-item-updated"))
# set the availability of ODE
self.enable_ode_control = self.gui.get_object("SettingEnableODE")
self.settings.add_item("enable_ode", self.enable_ode_control.get_active,
self.enable_ode_control.set_active)
skip_obj = self.gui.get_object("DrillProgressFrameSkipControl") skip_obj = self.gui.get_object("DrillProgressFrameSkipControl")
self.settings.add_item("drill_progress_max_fps", skip_obj.get_value, skip_obj.set_value) self.settings.add_item("drill_progress_max_fps", skip_obj.get_value, skip_obj.set_value)
sim_detail_obj = self.gui.get_object("SimulationDetailsValue")
self.settings.add_item("simulation_details_level", sim_detail_obj.get_value, sim_detail_obj.set_value)
# gcode settings # gcode settings
gcode_minimum_step_x = self.gui.get_object("GCodeMinimumStep_x") gcode_minimum_step_x = self.gui.get_object("GCodeMinimumStep_x")
self.settings.add_item("gcode_minimum_step_x", self.settings.add_item("gcode_minimum_step_x",
...@@ -687,53 +680,6 @@ class ProjectGui(object): ...@@ -687,53 +680,6 @@ class ProjectGui(object):
location_control.get_text, location_control.set_text) location_control.get_text, location_control.set_text)
self.gui.get_object(browse_button).connect("clicked", self.gui.get_object(browse_button).connect("clicked",
self._browse_external_program_location, key) self._browse_external_program_location, key)
# parallel processing settings
self.enable_parallel_processes = self.gui.get_object(
"EnableParallelProcesses")
if pycam.Utils.threading.is_multiprocessing_available():
self.gui.get_object("ParallelProcessingDisabledLabel").hide()
if pycam.Utils.threading.is_server_mode_available():
self.gui.get_object("ServerModeDisabledLabel").hide()
else:
self.gui.get_object("ServerModeSettingsFrame").hide()
else:
self.gui.get_object("ParallelProcessSettingsBox").hide()
self.gui.get_object("EnableParallelProcesses").hide()
self.enable_parallel_processes.set_active(
pycam.Utils.threading.is_multiprocessing_enabled())
self.enable_parallel_processes.connect("toggled",
self.handle_parallel_processes_settings)
self.number_of_processes = self.gui.get_object(
"NumberOfProcesses")
self.number_of_processes.set_value(
pycam.Utils.threading.get_number_of_processes())
server_port_local_obj = self.gui.get_object("ServerPortLocal")
self.settings.add_item("server_port_local",
server_port_local_obj.get_value,
server_port_local_obj.set_value)
server_port_remote_obj = self.gui.get_object("RemoteServerPort")
self.settings.add_item("server_port_remote",
server_port_remote_obj.get_value,
server_port_remote_obj.set_value)
self.number_of_processes.connect("value-changed",
self.handle_parallel_processes_settings)
self.gui.get_object("EnableServerMode").connect("toggled",
self.initialize_multiprocessing)
self.gui.get_object("ServerPasswordGenerate").connect("clicked",
self.generate_random_server_password)
self.gui.get_object("ServerPasswordShow").connect("toggled",
self.update_parallel_processes_settings)
auth_key_obj = self.gui.get_object("ServerPassword")
self.settings.add_item("server_auth_key", auth_key_obj.get_text,
auth_key_obj.set_text)
server_hostname = self.gui.get_object("RemoteServerHostname")
self.settings.add_item("server_hostname",
server_hostname.get_text,
server_hostname.set_text)
cpu_cores = pycam.Utils.threading.get_number_of_cores()
if cpu_cores is None:
cpu_cores = "unknown"
self.gui.get_object("AvailableCores").set_label(str(cpu_cores))
# set the icons (in different sizes) for all windows # set the icons (in different sizes) for all windows
gtk.window_set_default_icon_list(*get_icons_pixbuffers()) gtk.window_set_default_icon_list(*get_icons_pixbuffers())
# load menu data # load menu data
...@@ -803,7 +749,6 @@ class ProjectGui(object): ...@@ -803,7 +749,6 @@ class ProjectGui(object):
self.update_unit_labels() self.update_unit_labels()
self.update_gcode_controls() self.update_gcode_controls()
self.update_ode_settings() self.update_ode_settings()
self.update_parallel_processes_settings()
def update_gcode_controls(self, widget=None): def update_gcode_controls(self, widget=None):
# path mode # path mode
...@@ -934,105 +879,6 @@ class ProjectGui(object): ...@@ -934,105 +879,6 @@ class ProjectGui(object):
save_possible = False save_possible = False
self.gui.get_object("SaveModel").set_sensitive(save_possible) self.gui.get_object("SaveModel").set_sensitive(save_possible)
@gui_activity_guard
def generate_random_server_password(self, widget=None):
all_characters = string.letters + string.digits
random_pw = "".join([random.choice(all_characters) for i in range(12)])
self.gui.get_object("ServerPassword").set_text(random_pw)
@gui_activity_guard
def update_parallel_processes_settings(self, widget=None):
parallel_settings = self.gui.get_object("ParallelProcessSettingsBox")
server_enabled = self.gui.get_object("EnableServerMode")
server_mode_settings = self.gui.get_object("ServerModeSettingsTable")
# update the show/hide state of the password
hide_password = self.gui.get_object("ServerPasswordShow").get_active()
self.gui.get_object("ServerPassword").set_visibility(hide_password)
if (self.gui.get_object("NumberOfProcesses").get_value() == 0) \
and self.enable_parallel_processes.get_active():
self.gui.get_object("ZeroProcessesWarning").show()
else:
self.gui.get_object("ZeroProcessesWarning").hide()
if self.enable_parallel_processes.get_active():
parallel_settings.set_sensitive(True)
if server_enabled.get_active():
# don't allow changes for an active connection
server_mode_settings.set_sensitive(False)
else:
server_mode_settings.set_sensitive(True)
else:
parallel_settings.set_sensitive(False)
server_enabled.set_active(False)
# check availability of ODE again (conflicts with multiprocessing)
self.update_ode_settings()
def handle_parallel_processes_settings(self, widget=None):
new_num_of_processes = self.number_of_processes.get_value()
new_enable_parallel = self.enable_parallel_processes.get_active()
old_num_of_processes = pycam.Utils.threading.get_number_of_processes()
old_enable_parallel = pycam.Utils.threading.is_multiprocessing_enabled()
if (old_num_of_processes != new_num_of_processes) \
or (old_enable_parallel != new_enable_parallel):
self.initialize_multiprocessing()
@gui_activity_guard
def initialize_multiprocessing(self, widget=None):
complete_area = self.gui.get_object("MultiprocessingFrame")
# prevent any further actions while the connection is established
complete_area.set_sensitive(False)
# wait for the above "set_sensitive" to finish
while gtk.events_pending():
gtk.main_iteration()
enable_parallel = self.enable_parallel_processes.get_active()
enable_server_obj = self.gui.get_object("EnableServerMode")
enable_server = enable_server_obj.get_active()
remote_host = self.gui.get_object("RemoteServerHostname").get_text()
if remote_host:
remote_port = int(self.gui.get_object(
"RemoteServerPort").get_value())
remote = "%s:%s" % (remote_host, remote_port)
else:
remote = None
local_port = int(self.gui.get_object("ServerPortLocal").get_value())
auth_key = self.gui.get_object("ServerPassword").get_text()
if not auth_key and enable_parallel and enable_server:
log.error("You need to provide a password for this connection.")
enable_server_obj.set_active(False)
elif enable_parallel:
if enable_server and \
(pycam.Utils.get_platform() == pycam.Utils.PLATFORM_WINDOWS):
if self.number_of_processes.get_value() > 0:
log.warn("Mixed local and remote processes are " + \
"currently not available on the Windows platform. " + \
"Setting the number of local processes to zero." + \
os.linesep + "See <a href=\"" + \
HELP_WIKI_URL % "Parallel_Processing_on_different_Platforms" + \
"\">platform feature matrix</a> for more details.")
self.number_of_processes.set_value(0)
self.number_of_processes.set_sensitive(False)
else:
self.number_of_processes.set_sensitive(True)
num_of_processes = int(self.number_of_processes.get_value())
error = pycam.Utils.threading.init_threading(
number_of_processes=num_of_processes,
enable_server=enable_server, remote=remote,
server_credentials=auth_key, local_port=local_port)
if error:
log.error("Failed to start server: %s" % error)
pycam.Utils.threading.cleanup()
enable_server_obj.set_active(False)
else:
pycam.Utils.threading.cleanup()
log.info("Multiprocessing disabled")
# set the label of the "connect" button
if enable_server_obj.get_active():
info = gtk.stock_lookup(gtk.STOCK_DISCONNECT)
else:
info = gtk.stock_lookup(gtk.STOCK_CONNECT)
enable_server_obj.set_label(info[0])
complete_area.set_sensitive(True)
self.append_to_queue(self.update_parallel_processes_settings)
def _browse_external_program_location(self, widget=None, key=None): def _browse_external_program_location(self, widget=None, key=None):
location = self.get_filename_via_dialog(title="Select the executable " \ location = self.get_filename_via_dialog(title="Select the executable " \
+ "for '%s'" % key, mode_load=True, + "for '%s'" % key, mode_load=True,
...@@ -1084,63 +930,6 @@ class ProjectGui(object): ...@@ -1084,63 +930,6 @@ class ProjectGui(object):
# don't close the window - just hide it (for "delete-event") # don't close the window - just hide it (for "delete-event")
return True return True
@gui_activity_guard
def toggle_process_pool_window(self, widget=None, value=None, action=None):
toggle_process_pool_checkbox = self.gui.get_object("ToggleProcessPoolWindow")
checkbox_state = toggle_process_pool_checkbox.get_active()
if value is None:
new_state = checkbox_state
else:
if action is None:
new_state = value
else:
new_state = action
if new_state:
is_available = pycam.Utils.threading.is_pool_available()
disabled_box = self.gui.get_object("ProcessPoolDisabledBox")
statistics_box = self.gui.get_object("ProcessPoolStatisticsBox")
if is_available:
disabled_box.hide()
statistics_box.show()
# start the refresh function
interval = int(max(1, self.gui.get_object(
"ProcessPoolRefreshInterval").get_value()))
gobject.timeout_add_seconds(interval,
self.update_process_pool_statistics, interval)
else:
disabled_box.show()
statistics_box.hide()
self.process_pool_window.show()
else:
self.process_pool_window.hide()
toggle_process_pool_checkbox.set_active(new_state)
# don't destroy the window with a "destroy" event
return True
def update_process_pool_statistics(self, original_interval):
stats = pycam.Utils.threading.get_pool_statistics()
model = self.process_pool_model
model.clear()
for item in stats:
model.append(item)
self.gui.get_object("ProcessPoolConnectedWorkersValue").set_text(
str(len(stats)))
details = pycam.Utils.threading.get_task_statistics()
detail_text = os.linesep.join(["%s: %s" % (key, value)
for (key, value) in details.iteritems()])
self.gui.get_object("ProcessPoolDetails").set_text(detail_text)
current_interval = int(max(1, self.gui.get_object(
"ProcessPoolRefreshInterval").get_value()))
if original_interval != current_interval:
# initiate a new repetition
gobject.timeout_add_seconds(current_interval,
self.update_process_pool_statistics, current_interval)
# stop the current repetition
return False
else:
# don't repeat, if the window is hidden
return self.gui.get_object("ToggleProcessPoolWindow").get_active()
def change_unit_init(self, widget=None): def change_unit_init(self, widget=None):
new_unit = self.gui.get_object("unit_control").get_active_text() new_unit = self.gui.get_object("unit_control").get_active_text()
if self._last_unit is None: if self._last_unit is None:
......
# -*- coding: utf-8 -*-
"""
$Id$
Copyright 2011 Lars Kruse <devel@sumpfralle.de>
This file is part of PyCAM.
PyCAM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
PyCAM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with PyCAM. If not, see <http://www.gnu.org/licenses/>.
"""
import string
import random
import gobject
import pycam.Plugins
class Toolpaths(pycam.Plugins.PluginBase):
UI_FILE = "parallel_processing.ui"
def setup(self):
if self.gui:
import gtk
self._gtk = gtk
box = self.gui.get_object("MultiprocessingFrame")
box.unparent()
self.core.register_ui("preferences", "Parallel processing", box, 60)
# "process pool" window
self.process_pool_window = self.gui.get_object("ProcessPoolWindow")
self.process_pool_window.set_default_size(500, 400)
self.process_pool_window.connect("delete-event", self.toggle_process_pool_window, False)
self.process_pool_window.connect("destroy", self.toggle_process_pool_window, False)
self.process_pool_window.add_accel_group(self.core.get("gtk-accel-group"))
self.gui.get_object("ProcessPoolWindowClose").connect("clicked", self.toggle_process_pool_window, False)
self.gui.get_object("ProcessPoolRefreshInterval").set_value(3)
self.process_pool_model = self.gui.get_object("ProcessPoolStatisticsModel")
# show/hide controls
self.enable_parallel_processes = self.gui.get_object(
"EnableParallelProcesses")
if pycam.Utils.threading.is_multiprocessing_available():
self.gui.get_object("ParallelProcessingDisabledLabel").hide()
if pycam.Utils.threading.is_server_mode_available():
self.gui.get_object("ServerModeDisabledLabel").hide()
else:
self.gui.get_object("ServerModeSettingsFrame").hide()
else:
self.gui.get_object("ParallelProcessSettingsBox").hide()
self.gui.get_object("EnableParallelProcesses").hide()
self.enable_parallel_processes.set_active(
pycam.Utils.threading.is_multiprocessing_enabled())
self.enable_parallel_processes.connect("toggled",
self.handle_parallel_processes_settings)
self.number_of_processes = self.gui.get_object(
"NumberOfProcesses")
self.number_of_processes.set_value(
pycam.Utils.threading.get_number_of_processes())
server_port_local_obj = self.gui.get_object("ServerPortLocal")
server_port_remote_obj = self.gui.get_object("RemoteServerPort")
self.number_of_processes.connect("value-changed",
self.handle_parallel_processes_settings)
self.gui.get_object("EnableServerMode").connect("toggled",
self.initialize_multiprocessing)
self.gui.get_object("ServerPasswordGenerate").connect("clicked",
self.generate_random_server_password)
self.gui.get_object("ServerPasswordShow").connect("toggled",
self.update_parallel_processes_settings)
auth_key_obj = self.gui.get_object("ServerPassword")
server_hostname = self.gui.get_object("RemoteServerHostname")
cpu_cores = pycam.Utils.threading.get_number_of_cores()
if cpu_cores is None:
cpu_cores = "unknown"
self.gui.get_object("AvailableCores").set_label(str(cpu_cores))
toggle_button = self.gui.get_object("ToggleProcessPoolWindow")
toggle_button.connect("toggled", self.toggle_process_pool_window)
self.register_gtk_accelerator("processes", toggle_button,
None, "ToggleProcessPoolWindow")
return True
def teardown(self):
self.core.unregister_ui("preferences",
self.gui.get_object("MultiprocessingFrame"))
def toggle_process_pool_window(self, widget=None, value=None, action=None):
toggle_process_pool_checkbox = self.gui.get_object("ToggleProcessPoolWindow")
checkbox_state = toggle_process_pool_checkbox.get_active()
if value is None:
new_state = checkbox_state
else:
if action is None:
new_state = value
else:
new_state = action
if new_state:
is_available = pycam.Utils.threading.is_pool_available()
disabled_box = self.gui.get_object("ProcessPoolDisabledBox")
statistics_box = self.gui.get_object("ProcessPoolStatisticsBox")
if is_available:
disabled_box.hide()
statistics_box.show()
# start the refresh function
interval = int(max(1, self.gui.get_object(
"ProcessPoolRefreshInterval").get_value()))
gobject.timeout_add_seconds(interval,
self.update_process_pool_statistics, interval)
else:
disabled_box.show()
statistics_box.hide()
self.process_pool_window.show()
else:
self.process_pool_window.hide()
toggle_process_pool_checkbox.set_active(new_state)
# don't destroy the window with a "destroy" event
return True
def update_process_pool_statistics(self, original_interval):
stats = pycam.Utils.threading.get_pool_statistics()
model = self.process_pool_model
model.clear()
for item in stats:
model.append(item)
self.gui.get_object("ProcessPoolConnectedWorkersValue").set_text(
str(len(stats)))
details = pycam.Utils.threading.get_task_statistics()
detail_text = os.linesep.join(["%s: %s" % (key, value)
for (key, value) in details.iteritems()])
self.gui.get_object("ProcessPoolDetails").set_text(detail_text)
current_interval = int(max(1, self.gui.get_object(
"ProcessPoolRefreshInterval").get_value()))
if original_interval != current_interval:
# initiate a new repetition
gobject.timeout_add_seconds(current_interval,
self.update_process_pool_statistics, current_interval)
# stop the current repetition
return False
else:
# don't repeat, if the window is hidden
return self.gui.get_object("ToggleProcessPoolWindow").get_active()
def generate_random_server_password(self, widget=None):
all_characters = string.letters + string.digits
random_pw = "".join([random.choice(all_characters) for i in range(12)])
self.gui.get_object("ServerPassword").set_text(random_pw)
def update_parallel_processes_settings(self, widget=None):
parallel_settings = self.gui.get_object("ParallelProcessSettingsBox")
server_enabled = self.gui.get_object("EnableServerMode")
server_mode_settings = self.gui.get_object("ServerModeSettingsTable")
# update the show/hide state of the password
hide_password = self.gui.get_object("ServerPasswordShow").get_active()
self.gui.get_object("ServerPassword").set_visibility(hide_password)
if (self.gui.get_object("NumberOfProcesses").get_value() == 0) \
and self.enable_parallel_processes.get_active():
self.gui.get_object("ZeroProcessesWarning").show()
else:
self.gui.get_object("ZeroProcessesWarning").hide()
if self.enable_parallel_processes.get_active():
parallel_settings.set_sensitive(True)
if server_enabled.get_active():
# don't allow changes for an active connection
server_mode_settings.set_sensitive(False)
else:
server_mode_settings.set_sensitive(True)
else:
parallel_settings.set_sensitive(False)
server_enabled.set_active(False)
# check availability of ODE again (conflicts with multiprocessing)
self.core.emit_event("parallel-processing-changed")
def handle_parallel_processes_settings(self, widget=None):
new_num_of_processes = self.number_of_processes.get_value()
new_enable_parallel = self.enable_parallel_processes.get_active()
old_num_of_processes = pycam.Utils.threading.get_number_of_processes()
old_enable_parallel = pycam.Utils.threading.is_multiprocessing_enabled()
if (old_num_of_processes != new_num_of_processes) \
or (old_enable_parallel != new_enable_parallel):
self.initialize_multiprocessing()
def initialize_multiprocessing(self, widget=None):
complete_area = self.gui.get_object("MultiprocessingFrame")
# prevent any further actions while the connection is established
complete_area.set_sensitive(False)
# wait for the above "set_sensitive" to finish
while self._gtk.events_pending():
self._gtk.main_iteration()
enable_parallel = self.enable_parallel_processes.get_active()
enable_server_obj = self.gui.get_object("EnableServerMode")
enable_server = enable_server_obj.get_active()
remote_host = self.gui.get_object("RemoteServerHostname").get_text()
if remote_host:
remote_port = int(self.gui.get_object(
"RemoteServerPort").get_value())
remote = "%s:%s" % (remote_host, remote_port)
else:
remote = None
local_port = int(self.gui.get_object("ServerPortLocal").get_value())
auth_key = self.gui.get_object("ServerPassword").get_text()
if not auth_key and enable_parallel and enable_server:
self.log.error("You need to provide a password for this connection.")
enable_server_obj.set_active(False)
elif enable_parallel:
if enable_server and \
(pycam.Utils.get_platform() == pycam.Utils.PLATFORM_WINDOWS):
if self.number_of_processes.get_value() > 0:
self.log.warn("Mixed local and remote processes are " + \
"currently not available on the Windows platform. " + \
"Setting the number of local processes to zero." + \
os.linesep + "See <a href=\"" + \
HELP_WIKI_URL % "Parallel_Processing_on_different_Platforms" + \
"\">platform feature matrix</a> for more details.")
self.number_of_processes.set_value(0)
self.number_of_processes.set_sensitive(False)
else:
self.number_of_processes.set_sensitive(True)
num_of_processes = int(self.number_of_processes.get_value())
error = pycam.Utils.threading.init_threading(
number_of_processes=num_of_processes,
enable_server=enable_server, remote=remote,
server_credentials=auth_key, local_port=local_port)
if error:
self.log.error("Failed to start server: %s" % error)
pycam.Utils.threading.cleanup()
enable_server_obj.set_active(False)
else:
pycam.Utils.threading.cleanup()
self.log.info("Multiprocessing disabled")
# set the label of the "connect" button
if enable_server_obj.get_active():
info = self._gtk.stock_lookup(self._gtk.STOCK_DISCONNECT)
else:
info = self._gtk.stock_lookup(self._gtk.STOCK_CONNECT)
enable_server_obj.set_label(info[0])
complete_area.set_sensitive(True)
self.update_parallel_processes_settings()
...@@ -22,6 +22,8 @@ along with PyCAM. If not, see <http://www.gnu.org/licenses/>. ...@@ -22,6 +22,8 @@ along with PyCAM. If not, see <http://www.gnu.org/licenses/>.
import pycam.Plugins import pycam.Plugins
# this requires ODE - we import it later, if necessary
#import pycam.Simulation.ODEBlocks
class ToolpathSimulation(pycam.Plugins.PluginBase): class ToolpathSimulation(pycam.Plugins.PluginBase):
...@@ -29,43 +31,50 @@ class ToolpathSimulation(pycam.Plugins.PluginBase): ...@@ -29,43 +31,50 @@ class ToolpathSimulation(pycam.Plugins.PluginBase):
UI_FILE = "toolpath_simulation.ui" UI_FILE = "toolpath_simulation.ui"
def setup(self): def setup(self):
return False if self.gui:
speed_factor_widget = self.gui.get_object("SimulationSpeedFactor") speed_factor_widget = self.gui.get_object("SimulationSpeedFactor")
self.settings.add_item("simulation_speed_factor", self.core.add_item("simulation_speed_factor",
lambda: pow(10, speed_factor_widget.get_value()), lambda: pow(10, speed_factor_widget.get_value()),
lambda value: speed_factor_widget.set_value(math.log10(max(0.001, value)))) lambda value: speed_factor_widget.set_value(math.log10(
simulation_progress = self.gui.get_object("SimulationProgressTimelineValue") max(0.001, value))))
simulation_progress = self.gui.get_object(
"SimulationProgressTimelineValue")
def update_simulation_progress(widget): def update_simulation_progress(widget):
if widget.get_value() == 100: if widget.get_value() == 100:
# a negative value indicates, that the simulation is finished # a negative value indicates, that the simulation is finished
self.settings.set("simulation_current_distance", -1) self.core.set("simulation_current_distance", -1)
else: else:
complete = self.settings.get("simulation_complete_distance") complete = self.core.get("simulation_complete_distance")
partial = widget.get_value() / 100.0 * complete partial = widget.get_value() / 100.0 * complete
self.settings.set("simulation_current_distance", partial) self.core.set("simulation_current_distance", partial)
simulation_progress.connect("value-changed", update_simulation_progress) simulation_progress.connect("value-changed", update_simulation_progress)
# update the speed factor label # update the speed factor label
speed_factor_widget.connect("value-changed", speed_factor_widget.connect("value-changed", lambda widget: \
lambda widget: self.gui.get_object("SimulationSpeedFactorValueLabel").set_label( self.gui.get_object("SimulationSpeedFactorValueLabel").\
"%.2f" % self.settings.get("simulation_speed_factor"))) set_label("%.2f" % self.core.get("simulation_speed_factor")))
self.simulation_window = self.gui.get_object("SimulationDialog") self.simulation_window = self.gui.get_object("SimulationDialog")
self.simulation_window.connect("delete-event", self.finish_toolpath_simulation) self.simulation_window.connect("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)
return True
def finish_toolpath_simulation(self, widget=None, data=None): def finish_toolpath_simulation(self, widget=None, data=None):
# hide the simulation tab # hide the simulation tab
self.simulation_window.hide() self.simulation_window.hide()
# enable all other tabs again # enable all other tabs again
self.toggle_tabs_for_simulation(True) self.toggle_tabs_for_simulation(True)
self.settings.set("simulation_object", None) self.core.set("simulation_object", None)
self.settings.set("simulation_toolpath_moves", None) self.core.set("simulation_toolpath_moves", None)
self.settings.set("show_simulation", False) self.core.set("show_simulation", False)
self.settings.set("simulation_toolpath", None) self.core.set("simulation_toolpath", None)
self.update_view() self.update_view()
# don't destroy the simulation window (for "destroy" event) # don't destroy the simulation window (for "destroy" event)
return True return True
def update_toolpath_simulation(self, widget=None, toolpath=None): def update_toolpath_simulation(self, widget=None, toolpath=None):
s = self.settings s = self.core
# update the GUI # update the GUI
while gtk.events_pending(): while gtk.events_pending():
gtk.main_iteration() gtk.main_iteration()
...@@ -127,8 +136,8 @@ class ToolpathSimulation(pycam.Plugins.PluginBase): ...@@ -127,8 +136,8 @@ class ToolpathSimulation(pycam.Plugins.PluginBase):
# show the simulation controls # show the simulation controls
self.simulation_window.show() self.simulation_window.show()
# start the simulation # start the simulation
self.settings.set("show_simulation", True) self.core.set("show_simulation", True)
time_step = int(1000 / self.settings.get("drill_progress_max_fps")) time_step = int(1000 / self.core.get("drill_progress_max_fps"))
# update the toolpath simulation repeatedly # update the toolpath simulation repeatedly
gobject.timeout_add(time_step, self.update_toolpath_simulation) gobject.timeout_add(time_step, self.update_toolpath_simulation)
...@@ -156,14 +165,14 @@ class ToolpathSimulation(pycam.Plugins.PluginBase): ...@@ -156,14 +165,14 @@ class ToolpathSimulation(pycam.Plugins.PluginBase):
y_steps = int(sqrt(grid_size) / proportion) y_steps = int(sqrt(grid_size) / proportion)
simulation_backend = ODEBlocks.ODEBlocks(toolpath.get_tool_settings(), simulation_backend = ODEBlocks.ODEBlocks(toolpath.get_tool_settings(),
toolpath.get_bounding_box(), x_steps=x_steps, y_steps=y_steps) toolpath.get_bounding_box(), x_steps=x_steps, y_steps=y_steps)
self.settings.set("simulation_object", simulation_backend) self.core.set("simulation_object", simulation_backend)
# disable the simulation widget (avoids confusion regarding "cancel") # disable the simulation widget (avoids confusion regarding "cancel")
if not widget is None: if not widget is None:
self.gui.get_object("SimulationTab").set_sensitive(False) self.gui.get_object("SimulationTab").set_sensitive(False)
# update the view # update the view
self.update_view() self.update_view()
# calculate the simulation and show it simulteneously # calculate the simulation and show it simultaneously
progress = self.settings.get("progress") progress = self.core.get("progress")
for path_index, path in enumerate(paths): for path_index, path in enumerate(paths):
progress_text = "Simulating path %d/%d" % (path_index, len(paths)) progress_text = "Simulating path %d/%d" % (path_index, len(paths))
progress_value_percent = 100.0 * path_index / len(paths) progress_value_percent = 100.0 * path_index / len(paths)
......
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