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,143 +164,119 @@ ...@@ -180,143 +164,119 @@
</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="visible">True</property>
<property name="orientation">vertical</property> <property name="label_xalign">0</property>
<property name="spacing">3</property> <property name="shadow_type">none</property>
<child> <child>
<object class="GtkFrame" id="GeneralSettingsFrame"> <object class="GtkAlignment" id="alignment6">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label_xalign">0</property> <property name="left_padding">12</property>
<property name="shadow_type">none</property>
<child> <child>
<object class="GtkAlignment" id="alignment6"> <object class="GtkVBox" id="vbox14">
<property name="visible">True</property> <property name="visible">True</property>
<property name="left_padding">12</property> <property name="orientation">vertical</property>
<property name="spacing">2</property>
<child> <child>
<object class="GtkVBox" id="vbox14"> <object class="GtkCheckButton" id="SettingEnableODE">
<property name="label" translatable="yes">Enable experimental ODE calculations</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="orientation">vertical</property> <property name="can_focus">True</property>
<property name="spacing">2</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="GtkTable" id="table8">
<property name="visible">True</property>
<property name="n_columns">2</property>
<property name="column_spacing">5</property>
<property name="row_spacing">3</property>
<child> <child>
<object class="GtkCheckButton" id="SettingEnableODE"> <object class="GtkLabel" id="UnitLabel">
<property name="label" translatable="yes">Enable experimental ODE calculations</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="xalign">0</property>
<property name="receives_default">False</property> <property name="label" translatable="yes">Unit (for all dimensions):</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>
</object> </object>
<packing> <packing>
<property name="expand">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="GtkTable" id="table8"> <object class="GtkComboBox" id="unit_control">
<property name="visible">True</property> <property name="visible">True</property>
<property name="n_columns">2</property> <property name="model">unit_model</property>
<property name="column_spacing">5</property> <property name="active">0</property>
<property name="row_spacing">3</property>
<child>
<object class="GtkLabel" id="UnitLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Unit (for all dimensions):</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child> <child>
<object class="GtkComboBox" id="unit_control"> <object class="GtkCellRendererText" id="unit_name"/>
<property name="visible">True</property> <attributes>
<property name="model">unit_model</property> <attribute name="text">0</attribute>
<property name="active">0</property> </attributes>
<child>
<object class="GtkCellRendererText" id="unit_name"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</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> </object>
<packing> <packing>
<property name="expand">False</property> <property name="left_attach">1</property>
<property name="fill">False</property> <property name="right_attach">2</property>
<property name="position">1</property> <property name="x_options">GTK_FILL</property>
</packing> <property name="y_options">GTK_FILL</property>
</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>
<object class="GtkCheckButton" id="AutoLoadTaskFile">
<property name="label" translatable="yes">Load custom task settings on startup</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">3</property>
</packing> </packing>
</child> </child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="AutoLoadTaskFile">
<property name="label" translatable="yes">Load custom task settings on startup</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">2</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="StartupTaskFileBox">
<property name="visible">True</property>
<property name="left_padding">20</property>
<child> <child>
<object class="GtkAlignment" id="StartupTaskFileBox"> <object class="GtkFileChooserButton" id="StartupTaskFile">
<property name="visible">True</property> <property name="visible">True</property>
<property name="left_padding">20</property> <property name="title" translatable="yes">Choose custom task settings file loading on startup</property>
<child>
<object class="GtkFileChooserButton" id="StartupTaskFile">
<property name="visible">True</property>
<property name="title" translatable="yes">Choose custom task settings file loading on startup</property>
</object>
</child>
</object> </object>
<packing>
<property name="expand">False</property>
<property name="position">4</property>
</packing>
</child> </child>
</object> </object>
<packing>
<property name="expand">False</property>
<property name="position">3</property>
</packing>
</child> </child>
</object> </object>
</child> </child>
<child type="label">
<object class="GtkLabel" id="GeneralSettingsFrameLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;General Settings&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object> </object>
<packing> </child>
<property name="expand">False</property> <child type="label">
<property name="position">0</property> <object class="GtkLabel" id="GeneralSettingsFrameLabel">
</packing> <property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;General Settings&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child> </child>
</object> </object>
</child> </child>
...@@ -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,646 +1879,137 @@ Hotkey: &lt;p&gt;</property> ...@@ -1919,646 +1879,137 @@ Hotkey: &lt;p&gt;</property>
<property name="tab_fill">False</property> <property name="tab_fill">False</property>
</packing> </packing>
</child> </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> <child>
<object class="GtkFrame" id="MultiprocessingFrame"> <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="label_xalign">0</property> <property name="can_focus">True</property>
<property name="shadow_type">none</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="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> <child>
<object class="GtkAlignment" id="alignment15"> <object class="GtkVBox" id="vbox24">
<property name="visible">True</property> <property name="visible">True</property>
<property name="left_padding">12</property> <property name="orientation">vertical</property>
<child> <child>
<object class="GtkVBox" id="vbox34"> <object class="GtkLabel" id="UnitChangeHelpLabel">
<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="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="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="visible">True</property>
<property name="xalign">0</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. <property name="label" translatable="yes">Switching the unit size causes a change of the real world size of the various dimensions within PyCAM.
...@@ -2638,377 +2089,38 @@ Any selected group of dimensions will be scaled accordingly.</property> ...@@ -2638,377 +2089,38 @@ Any selected group of dimensions will be scaled accordingly.</property>
<property name="fill">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="GtkButton" id="UnitChangeSelectNone"> <object class="GtkButton" id="UnitChangeSelectNone">
<property name="label">gtk-clear</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="use_stock">True</property> <property name="use_stock">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">False</property> <property name="fill">False</property>
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </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> </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="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> </child>
</object> </object>
<packing>
<property name="position">0</property>
</packing>
</child> </child>
<child> <child type="label">
<object class="GtkVBox" id="ProcessPoolDisabledBox"> <object class="GtkLabel" id="UnitChangeFrameLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="orientation">vertical</property> <property name="label" translatable="yes">&lt;b&gt;Change of unit size&lt;/b&gt;</property>
<child> <property name="use_markup">True</property>
<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="has_tooltip">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> </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child> </child>
</object> </object>
<packing> <packing>
...@@ -3016,43 +2128,15 @@ Please read the description of the Server Mode (linked below) to understand the ...@@ -3016,43 +2128,15 @@ Please read the description of the Server Mode (linked below) to understand the
</packing> </packing>
</child> </child>
<child internal-child="action_area"> <child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area6"> <object class="GtkHButtonBox" id="dialog-action_area5">
<property name="visible">True</property> <property name="visible">True</property>
<property name="layout_style">end</property> <property name="layout_style">end</property>
<child> <child>
<object class="GtkHBox" id="hbox30"> <placeholder/>
<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>
<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,18 +2158,81 @@ Please read the description of the Server Mode (linked below) to understand the ...@@ -3074,18 +2158,81 @@ 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> </object>
<property name="upper">60</property> <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> <property name="step_increment">1</property>
</object> </object>
<object class="GtkToggleAction" id="ToggleProcessPoolWindow"> <object class="GtkAction" id="OpenRecentModel">
<property name="label">_Process Pool Window</property> <property name="label">Open _Recent</property>
<property name="tooltip">Show the current pool of workers</property>
</object> </object>
<object class="GtkAction" id="DevelopmentBlog"> <object class="GtkAction" id="DevelopmentBlog">
<property name="label">_Development Blog</property> <property name="label">_Development Blog</property>
...@@ -3103,200 +2250,6 @@ Please read the description of the Server Mode (linked below) to understand the ...@@ -3103,200 +2250,6 @@ Please read the description of the Server Mode (linked below) to understand the
<property name="label">Undo latest model change</property> <property name="label">Undo latest model change</property>
<property name="stock_id">gtk-undo</property> <property name="stock_id">gtk-undo</property>
</object> </object>
<object class="GtkAdjustment" id="NumberOfProcessesValue">
<property name="upper">1000</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="RemoteServerPortValue">
<property name="value">1250</property>
<property name="upper">65535</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="ServerPortLocalValue">
<property name="value">1250</property>
<property name="upper">65535</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="SimulationSpeedFactorValueExponential">
<property name="value">1</property>
<property name="lower">-2</property>
<property name="upper">4</property>
<property name="step_increment">1</property>
</object>
<object class="GtkDialog" id="SimulationDialog">
<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="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="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="GCodeMinimumStepValue_x"> <object class="GtkAdjustment" id="GCodeMinimumStepValue_x">
<property name="upper">100</property> <property name="upper">100</property>
<property name="step_increment">5.0000000000000002e-05</property> <property name="step_increment">5.0000000000000002e-05</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="visible">True</property> <property name="title" translatable="yes">PyCAM simulation</property>
<property name="can_focus">True</property> <property name="role">pycam-simulation</property>
<property name="receives_default">True</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="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="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,10 +362,7 @@ class ProjectGui(object): ...@@ -375,10 +362,7 @@ 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 = "activate"
action = "toggled"
else:
action = "activate"
if data is None: if data is None:
item.connect(action, callback) item.connect(action, callback)
else: else:
...@@ -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))))
def update_simulation_progress(widget): simulation_progress = self.gui.get_object(
if widget.get_value() == 100: "SimulationProgressTimelineValue")
# a negative value indicates, that the simulation is finished def update_simulation_progress(widget):
self.settings.set("simulation_current_distance", -1) if widget.get_value() == 100:
else: # a negative value indicates, that the simulation is finished
complete = self.settings.get("simulation_complete_distance") self.core.set("simulation_current_distance", -1)
partial = widget.get_value() / 100.0 * complete else:
self.settings.set("simulation_current_distance", partial) complete = self.core.get("simulation_complete_distance")
simulation_progress.connect("value-changed", update_simulation_progress) partial = widget.get_value() / 100.0 * complete
# update the speed factor label self.core.set("simulation_current_distance", partial)
speed_factor_widget.connect("value-changed", simulation_progress.connect("value-changed", update_simulation_progress)
lambda widget: self.gui.get_object("SimulationSpeedFactorValueLabel").set_label( # update the speed factor label
"%.2f" % self.settings.get("simulation_speed_factor"))) speed_factor_widget.connect("value-changed", lambda widget: \
self.simulation_window = self.gui.get_object("SimulationDialog") self.gui.get_object("SimulationSpeedFactorValueLabel").\
self.simulation_window.connect("delete-event", self.finish_toolpath_simulation) set_label("%.2f" % self.core.get("simulation_speed_factor")))
self.simulation_window = self.gui.get_object("SimulationDialog")
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