Commit f482d64d authored by sumpfralle's avatar sumpfralle

moved support grid code to separate plugin (not finished)


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@1063 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent dfa527fa
<?xml version="1.0"?>
<interface>
<!-- interface-requires gtk+ 2.12 -->
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="window1">
<child>
<object class="GtkFrame" id="ModelExtensionsFrame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment30">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<object class="GtkVBox" id="vbox17">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkHBox" id="hbox26">
<property name="visible">True</property>
<child>
<object class="GtkComboBox" id="SupportGridTypesControl">
<property name="visible">True</property>
<property name="model">SupportGridTypesList</property>
<property name="active">0</property>
<child>
<object class="GtkCellRendererText" id="SupportGridTypesCell"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="SupportGridDetailsBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkExpander" id="GridProfileExpander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="spacing">3</property>
<child>
<object class="GtkAlignment" id="alignment20">
<property name="width_request">40</property>
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="SupportGridThicknessLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">thickness:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="SupportGridThicknessControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridThickness</property>
<property name="digits">2</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkVSeparator" id="vseparator10">
<property name="visible">True</property>
<property name="orientation">vertical</property>
</object>
<packing>
<property name="expand">False</property>
<property name="padding">3</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="SupportGridHeightLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">height:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="SupportGridHeightControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridHeight</property>
<property name="digits">2</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">5</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="GridProfileExpanderLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Profile</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="GridPatternExpander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="expanded">True</property>
<child>
<object class="GtkTable" id="table10">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">4</property>
<property name="column_spacing">4</property>
<property name="row_spacing">1</property>
<child>
<object class="GtkLabel" id="SupportGridDistanceXLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">distance x:</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="SupportGridDistanceYLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">distance y:</property>
</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="GtkSpinButton" id="SupportGridDistanceXControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridDistanceX</property>
<property name="digits">2</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="GtkSpinButton" id="SupportGridDistanceYControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridDistanceY</property>
<property name="digits">2</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="GtkCheckButton" id="SupportGridDistanceSquare">
<property name="label" translatable="yes">square grid</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">3</property>
<property name="right_attach">4</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment23">
<property name="width_request">40</property>
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment33">
<property name="width_request">40</property>
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</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>
<placeholder/>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="GridPatternExpanderLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Pattern</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="GridPositionExpander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkHBox" id="hbox17">
<property name="visible">True</property>
<property name="spacing">4</property>
<child>
<object class="GtkAlignment" id="alignment37">
<property name="width_request">40</property>
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="GridOffsetXLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">offset x:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="SupportGridOffsetXControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridOffsetX</property>
<property name="digits">2</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkVSeparator" id="vseparator2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="GridOffsetYLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">offset y:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="SupportGridOffsetYControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridOffsetY</property>
<property name="digits">2</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">5</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="GridPositionExpanderLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Position offset</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="GridManualShiftExpander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkVBox" id="vbox12">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkHBox" id="hbox24">
<property name="visible">True</property>
<property name="spacing">3</property>
<child>
<object class="GtkRadioButton" id="SupportGridPositionManualAxisX">
<property name="label" translatable="yes">x</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="padding">10</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="SupportGridPositionManualAxisY">
<property name="label" translatable="yes">y</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="group">SupportGridPositionManualAxisX</property>
</object>
<packing>
<property name="expand">False</property>
<property name="padding">10</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkVSeparator" id="vseparator7">
<property name="visible">True</property>
<property name="orientation">vertical</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="GridPositionManualSelectionLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Grid item:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="SupportGridPositionManualSelector">
<property name="visible">True</property>
<property name="model">SupportGridPositionManualList</property>
<child>
<object class="GtkCellRendererText" id="SupportGridManualSelectorBase"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
<child>
<object class="GtkCellRendererText" id="SupportGridManualSelectorChange"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox28">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkHBox" id="SupportGridPositionManualShiftBox">
<property name="visible">True</property>
<child>
<object class="GtkHScale" id="SupportGridPositionManualShiftControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">SupportGridPositionManualAdjustment</property>
<property name="digits">2</property>
<property name="draw_value">False</property>
<property name="value_pos">right</property>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="SupportGridPositionManualShiftControl2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridPositionManualAdjustment</property>
<property name="digits">1</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox25">
<property name="visible">True</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkButton" id="SupportGridPositionManualResetAll">
<property name="label" translatable="yes">Reset all items</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="SupportGridPositionManualResetOne">
<property name="label" translatable="yes">Reset this item</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="GridManualShiftExpanderLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Manual position adjustment</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="GridAverageDistanceExpander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkTable" id="table12">
<property name="visible">True</property>
<property name="n_rows">3</property>
<property name="n_columns">3</property>
<property name="column_spacing">3</property>
<property name="row_spacing">2</property>
<child>
<object class="GtkSpinButton" id="GridMinBridgesPerPolygon">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridMinBridgesPerPolygon</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="GtkLabel" id="GridMinBridgesPerPolygonLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Minimum bridges per polygon:</property>
</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="GtkSpinButton" id="GridAverageDistance">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridAverageDistance</property>
<property name="digits">2</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="GtkLabel" id="GridAverageDistanceLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Average distance between bridges:</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="GtkAlignment" id="alignment39">
<property name="width_request">40</property>
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</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="GtkAlignment" id="alignment40">
<property name="width_request">40</property>
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment41">
<property name="width_request">40</property>
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</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="GridLengthLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Length of each bridge:</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="GtkSpinButton" id="GridLengthControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridLength</property>
<property name="digits">2</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>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="GridAverageDistanceExpanderLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Distribution</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="ModelExtensionsFrameLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Support bridges&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
</child>
</object>
<object class="GtkAdjustment" id="SupportGridLength">
<property name="lower">-100</property>
<property name="upper">100</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="SupportGridMinBridgesPerPolygon">
<property name="lower">1</property>
<property name="upper">20</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="SupportGridAverageDistance">
<property name="lower">0.01</property>
<property name="upper">500</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="SupportGridPositionManualAdjustment">
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="SupportGridOffsetY">
<property name="lower">-1000</property>
<property name="upper">1000</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="SupportGridOffsetX">
<property name="lower">-1000</property>
<property name="upper">1000</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="SupportGridDistanceY">
<property name="upper">1000</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="SupportGridHeight">
<property name="lower">0.01</property>
<property name="upper">100</property>
<property name="step_increment">0.10000000000000001</property>
</object>
<object class="GtkAdjustment" id="SupportGridThickness">
<property name="lower">0.01</property>
<property name="upper">100</property>
<property name="step_increment">0.10000000000000001</property>
</object>
<object class="GtkAdjustment" id="SupportGridDistanceX">
<property name="upper">1000</property>
<property name="step_increment">1</property>
</object>
<object class="GtkListStore" id="SupportGridTypesList">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">none</col>
</row>
<row>
<col id="0" translatable="yes">grid pattern</col>
</row>
<row>
<col id="0" translatable="yes">automatic distribution (edges)</col>
</row>
<row>
<col id="0" translatable="yes">automatic distribution (corners)</col>
</row>
</data>
</object>
<object class="GtkListStore" id="SupportGridPositionManualList">
<columns>
<!-- column-name base -->
<column type="gchararray"/>
<!-- column-name change -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">17.3mm (-2.0)</col>
<col id="1" translatable="yes">-2.0</col>
</row>
</data>
</object>
</interface>
......@@ -189,896 +189,123 @@
<column type="gchararray"/>
</columns>
</object>
<object class="GtkListStore" id="SupportGridPositionManualList">
<columns>
<!-- column-name base -->
<column type="gchararray"/>
<!-- column-name change -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">17.3mm (-2.0)</col>
<col id="1" translatable="yes">-2.0</col>
</row>
</data>
</object>
<object class="GtkListStore" id="SupportGridTypesList">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">none</col>
</row>
<row>
<col id="0" translatable="yes">grid pattern</col>
</row>
<row>
<col id="0" translatable="yes">automatic distribution (edges)</col>
</row>
<row>
<col id="0" translatable="yes">automatic distribution (corners)</col>
</row>
</data>
</object>
<object class="GtkListStore" id="GCodeCornerStyleList">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Exact path mode (G61)</col>
</row>
<row>
<col id="0" translatable="yes">Exact stop mode (G61.1)</col>
</row>
<row>
<col id="0" translatable="yes">Continuous with maximum speed (G64)</col>
</row>
<row>
<col id="0" translatable="yes">Continuous with tolerance (G64 P/Q)</col>
</row>
</data>
</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="PocketingOptions">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">none</col>
</row>
<row>
<col id="0" translatable="yes">holes</col>
</row>
<row>
<col id="0" translatable="yes">enclosed</col>
</row>
</data>
</object>
<object class="GtkListStore" id="TouchOffLocationModel">
<columns>
<!-- column-name key -->
<column type="gchararray"/>
<!-- column-name name -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">startup</col>
<col id="1" translatable="yes">Initial location (at startup)</col>
</row>
<row>
<col id="0" translatable="yes">absolute</col>
<col id="1" translatable="yes">Fixed location (absolute)</col>
</row>
</data>
</object>
<object class="GtkWindow" id="ProjectWindow">
<property name="title" translatable="yes">PyCAM</property>
<property name="role">pycam-main</property>
<property name="destroy_with_parent">True</property>
<child>
<object class="GtkVBox" id="WindowBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkNotebook" id="MainTabs">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkAlignment" id="alignment50">
<property name="visible">True</property>
<property name="top_padding">5</property>
<child>
<object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkHButtonBox" id="hbuttonbox6">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
<object class="GtkLinkButton" id="ModelTransformationsHelp">
<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="tooltip_text" translatable="yes">Read more about model transformations in PyCAM's wiki documentation.</property>
<property name="relief">none</property>
<property name="use_stock">True</property>
<property name="uri">http://sourceforge.net/apps/mediawiki/pycam/index.php?title=ModelTransformations</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="notebook2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tab_pos">left</property>
<child>
<object class="GtkFrame" id="ModelExtensionsFrame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment30">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<object class="GtkVBox" id="vbox17">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkHBox" id="hbox26">
<property name="visible">True</property>
<child>
<object class="GtkComboBox" id="SupportGridTypesControl">
<property name="visible">True</property>
<property name="model">SupportGridTypesList</property>
<property name="active">0</property>
<child>
<object class="GtkCellRendererText" id="SupportGridTypesCell"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="SupportGridDetailsBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkExpander" id="GridProfileExpander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="spacing">3</property>
<child>
<object class="GtkAlignment" id="alignment20">
<property name="width_request">40</property>
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="SupportGridThicknessLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">thickness:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="SupportGridThicknessControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridThickness</property>
<property name="digits">2</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkVSeparator" id="vseparator10">
<property name="visible">True</property>
<property name="orientation">vertical</property>
</object>
<packing>
<property name="expand">False</property>
<property name="padding">3</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="SupportGridHeightLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">height:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="SupportGridHeightControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridHeight</property>
<property name="digits">2</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">5</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="GridProfileExpanderLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Profile</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="GridPatternExpander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="expanded">True</property>
<child>
<object class="GtkTable" id="table10">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">4</property>
<property name="column_spacing">4</property>
<property name="row_spacing">1</property>
<child>
<object class="GtkLabel" id="SupportGridDistanceXLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">distance x:</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="SupportGridDistanceYLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">distance y:</property>
</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="GtkSpinButton" id="SupportGridDistanceXControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridDistanceX</property>
<property name="digits">2</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="GtkSpinButton" id="SupportGridDistanceYControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridDistanceY</property>
<property name="digits">2</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="GtkCheckButton" id="SupportGridDistanceSquare">
<property name="label" translatable="yes">square grid</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">3</property>
<property name="right_attach">4</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment23">
<property name="width_request">40</property>
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment33">
<property name="width_request">40</property>
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</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>
<placeholder/>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="GridPatternExpanderLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Pattern</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="GridPositionExpander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkHBox" id="hbox17">
<property name="visible">True</property>
<property name="spacing">4</property>
<child>
<object class="GtkAlignment" id="alignment37">
<property name="width_request">40</property>
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="GridOffsetXLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">offset x:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="SupportGridOffsetXControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridOffsetX</property>
<property name="digits">2</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkVSeparator" id="vseparator2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="GridOffsetYLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">offset y:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="SupportGridOffsetYControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridOffsetY</property>
<property name="digits">2</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">5</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="GridPositionExpanderLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Position offset</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="GridManualShiftExpander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkVBox" id="vbox12">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkHBox" id="hbox24">
<property name="visible">True</property>
<property name="spacing">3</property>
<child>
<object class="GtkRadioButton" id="SupportGridPositionManualAxisX">
<property name="label" translatable="yes">x</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="padding">10</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="SupportGridPositionManualAxisY">
<property name="label" translatable="yes">y</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="group">SupportGridPositionManualAxisX</property>
</object>
<packing>
<property name="expand">False</property>
<property name="padding">10</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkVSeparator" id="vseparator7">
<property name="visible">True</property>
<property name="orientation">vertical</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="GridPositionManualSelectionLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Grid item:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="SupportGridPositionManualSelector">
<property name="visible">True</property>
<property name="model">SupportGridPositionManualList</property>
<child>
<object class="GtkCellRendererText" id="SupportGridManualSelectorBase"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
<child>
<object class="GtkCellRendererText" id="SupportGridManualSelectorChange"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox28">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkHBox" id="SupportGridPositionManualShiftBox">
<property name="visible">True</property>
<child>
<object class="GtkHScale" id="SupportGridPositionManualShiftControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">SupportGridPositionManualAdjustment</property>
<property name="digits">2</property>
<property name="draw_value">False</property>
<property name="value_pos">right</property>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="SupportGridPositionManualShiftControl2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridPositionManualAdjustment</property>
<property name="digits">1</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox25">
<property name="visible">True</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkButton" id="SupportGridPositionManualResetAll">
<property name="label" translatable="yes">Reset all items</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="SupportGridPositionManualResetOne">
<property name="label" translatable="yes">Reset this item</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="GridManualShiftExpanderLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Manual position adjustment</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="GridAverageDistanceExpander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkTable" id="table12">
<property name="visible">True</property>
<property name="n_rows">3</property>
<property name="n_columns">3</property>
<property name="column_spacing">3</property>
<property name="row_spacing">2</property>
<child>
<object class="GtkSpinButton" id="GridMinBridgesPerPolygon">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridMinBridgesPerPolygon</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="GtkLabel" id="GridMinBridgesPerPolygonLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Minimum bridges per polygon:</property>
</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="GtkSpinButton" id="GridAverageDistance">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridAverageDistance</property>
<property name="digits">2</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="GtkLabel" id="GridAverageDistanceLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Average distance between bridges:</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="GtkAlignment" id="alignment39">
<property name="width_request">40</property>
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</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="GtkAlignment" id="alignment40">
<property name="width_request">40</property>
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment41">
<property name="width_request">40</property>
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</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="GridLengthLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Length of each bridge:</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="GtkSpinButton" id="GridLengthControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">SupportGridLength</property>
<property name="digits">2</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>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="GridAverageDistanceExpanderLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Distribution</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="ModelExtensionsFrameLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Support bridges&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="label29">
<object class="GtkListStore" id="GCodeCornerStyleList">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Exact path mode (G61)</col>
</row>
<row>
<col id="0" translatable="yes">Exact stop mode (G61.1)</col>
</row>
<row>
<col id="0" translatable="yes">Continuous with maximum speed (G64)</col>
</row>
<row>
<col id="0" translatable="yes">Continuous with tolerance (G64 P/Q)</col>
</row>
</data>
</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="PocketingOptions">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">none</col>
</row>
<row>
<col id="0" translatable="yes">holes</col>
</row>
<row>
<col id="0" translatable="yes">enclosed</col>
</row>
</data>
</object>
<object class="GtkListStore" id="TouchOffLocationModel">
<columns>
<!-- column-name key -->
<column type="gchararray"/>
<!-- column-name name -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">startup</col>
<col id="1" translatable="yes">Initial location (at startup)</col>
</row>
<row>
<col id="0" translatable="yes">absolute</col>
<col id="1" translatable="yes">Fixed location (absolute)</col>
</row>
</data>
</object>
<object class="GtkWindow" id="ProjectWindow">
<property name="title" translatable="yes">PyCAM</property>
<property name="role">pycam-main</property>
<property name="destroy_with_parent">True</property>
<child>
<object class="GtkVBox" id="WindowBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkNotebook" id="MainTabs">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkAlignment" id="alignment50">
<property name="visible">True</property>
<property name="top_padding">5</property>
<child>
<object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkHButtonBox" id="hbuttonbox6">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
<object class="GtkLinkButton" id="ModelTransformationsHelp">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="label" translatable="yes">Support</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Read more about model transformations in PyCAM's wiki documentation.</property>
<property name="relief">none</property>
<property name="use_stock">True</property>
<property name="uri">http://sourceforge.net/apps/mediawiki/pycam/index.php?title=ModelTransformations</property>
</object>
<packing>
<property name="tab_fill">False</property>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="position">1</property>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
......@@ -1088,7 +315,7 @@
<property name="tab_pos">left</property>
</object>
<packing>
<property name="position">2</property>
<property name="position">1</property>
</packing>
</child>
</object>
......@@ -7143,23 +6370,6 @@ Any selected group of dimensions will be scaled accordingly.</property>
<action-widget response="0">UnitChangeApply</action-widget>
</action-widgets>
</object>
<object class="GtkAdjustment" id="SupportGridDistanceX">
<property name="value">5</property>
<property name="upper">1000</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="SupportGridThickness">
<property name="value">0.10000000000000001</property>
<property name="lower">0.01</property>
<property name="upper">100</property>
<property name="step_increment">0.10000000000000001</property>
</object>
<object class="GtkAdjustment" id="SupportGridHeight">
<property name="value">0.10000000000000001</property>
<property name="lower">0.01</property>
<property name="upper">100</property>
<property name="step_increment">0.10000000000000001</property>
</object>
<object class="GtkAdjustment" id="EngraveOffsetValue">
<property name="lower">-1000</property>
<property name="upper">1000</property>
......@@ -7224,20 +6434,6 @@ Any selected group of dimensions will be scaled accordingly.</property>
<object class="GtkAction" id="FeatureRequest">
<property name="label">Re_quest a Feature</property>
</object>
<object class="GtkAdjustment" id="SupportGridDistanceY">
<property name="upper">1000</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="SupportGridOffsetX">
<property name="lower">-1000</property>
<property name="upper">1000</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="SupportGridOffsetY">
<property name="lower">-1000</property>
<property name="upper">1000</property>
<property name="step_increment">1</property>
</object>
<object class="GtkToggleAction" id="ToggleLogWindow">
<property name="label">_Log Window</property>
<property name="tooltip">Show the event protocol of PyCAM.</property>
......@@ -7371,29 +6567,9 @@ Any selected group of dimensions will be scaled accordingly.</property>
<action-widget response="0">LogWindowClose</action-widget>
</action-widgets>
</object>
<object class="GtkAdjustment" id="SupportGridPositionManualAdjustment">
<property name="step_increment">1</property>
</object>
<object class="GtkAction" id="HelpHotkeys">
<property name="label">_Keyboard Shortcuts</property>
</object>
<object class="GtkAdjustment" id="SupportGridAverageDistance">
<property name="value">30</property>
<property name="lower">0.01</property>
<property name="upper">500</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="SupportGridMinBridgesPerPolygon">
<property name="value">2</property>
<property name="lower">1</property>
<property name="upper">20</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="SupportGridLength">
<property name="lower">-100</property>
<property name="upper">100</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="GCodeCornerStyleMotionToleranceValue">
<property name="upper">100</property>
<property name="step_increment">1</property>
......
......@@ -151,7 +151,6 @@ PREFERENCES_DEFAULTS = {
""" the listed items will be loaded/saved via the preferences file in the
user's home directory on startup/shutdown"""
GRID_TYPES = {"none": 0, "grid": 1, "automatic_edge": 2, "automatic_corner": 3}
POCKETING_TYPES = ["none", "holes", "enclosed"]
MAX_UNDO_STATES = 10
......@@ -423,14 +422,13 @@ class ProjectGui(object):
self.gui.get_object("UndoButton").set_sensitive(False)
self.settings.register_event("model-change-before", self._store_undo_state)
self.settings.register_event("model-change-after", self.update_model_dimensions)
self.settings.register_event("model-change-after", self.update_support_model)
self.settings.register_event("model-change-after", self.update_save_actions)
self.settings.register_event("model-change-after", self.update_model_type_related_controls)
self.settings.register_event("model-change-after", self.update_support_controls)
self.settings.register_event("model-change-after", self.update_view)
self.settings.set("update_progress", self.update_progress_bar)
self.settings.set("disable_progress_cancel_button", self.disable_progress_cancel_button)
self.settings.set("load_model", self.load_model)
self.settings.register_event("boundary-updated", self.update_view)
# configure drag-n-drop for config files and models
self.configure_drag_and_drop(self.window)
self.clipboard = gtk.clipboard_get()
......@@ -518,8 +516,6 @@ class ProjectGui(object):
self.process_list = []
self.bounds_list = []
self.task_list = []
self.grid_adjustments_x = []
self.grid_adjustments_y = []
self.font_selector = None
self._last_unit = None
self._toolpath_for_grid_data = {}
......@@ -609,110 +605,6 @@ class ProjectGui(object):
# create a new variable "key" to avoid re-using the same object "key"
# (due to the lambda name scope)
self.settings.add_item(key, lambda key=key: get_absolute_limit(key))
# support grid
support_grid_type_control = self.gui.get_object(
"SupportGridTypesControl")
support_grid_type_control.connect("changed",
self.update_support_controls)
self.settings.add_item("support_grid_type",
support_grid_type_control.get_active,
support_grid_type_control.set_active)
self.settings.set("support_grid_type", GRID_TYPES["none"])
grid_distance_x = self.gui.get_object("SupportGridDistanceX")
grid_distance_x.connect("value-changed", self.update_support_controls)
self.settings.add_item("support_grid_distance_x",
grid_distance_x.get_value, grid_distance_x.set_value)
grid_distance_square = self.gui.get_object("SupportGridDistanceSquare")
grid_distance_square.connect("clicked", self.update_support_controls)
grid_distance_y = self.gui.get_object("SupportGridDistanceY")
grid_distance_y.connect("value-changed", self.update_support_controls)
def get_support_grid_distance_y():
if grid_distance_square.get_active():
return self.settings.get("support_grid_distance_x")
else:
return grid_distance_y.get_value()
self.settings.add_item("support_grid_distance_y",
get_support_grid_distance_y, grid_distance_y.set_value)
grid_thickness = self.gui.get_object("SupportGridThickness")
grid_thickness.connect("value-changed", self.update_support_model)
self.settings.add_item("support_grid_thickness",
grid_thickness.get_value, grid_thickness.set_value)
grid_height = self.gui.get_object("SupportGridHeight")
grid_height.connect("value-changed", self.update_support_model)
self.settings.add_item("support_grid_height",
grid_height.get_value, grid_height.set_value)
grid_length = self.gui.get_object("SupportGridLength")
grid_length.connect("value-changed", self.update_support_model)
self.settings.add_item("support_grid_length",
grid_length.get_value, grid_length.set_value)
grid_offset_x = self.gui.get_object("SupportGridOffsetX")
grid_offset_x.connect("value-changed", self.update_support_model)
self.settings.add_item("support_grid_offset_x",
grid_offset_x.get_value, grid_offset_x.set_value)
grid_offset_y = self.gui.get_object("SupportGridOffsetY")
grid_offset_y.connect("value-changed", self.update_support_model)
self.settings.add_item("support_grid_offset_y",
grid_offset_y.get_value, grid_offset_y.set_value)
grid_average_distance = self.gui.get_object("GridAverageDistance")
grid_average_distance.connect("value-changed",
self.update_support_model)
self.settings.add_item("support_grid_average_distance",
grid_average_distance.get_value,
grid_average_distance.set_value)
grid_minimum_bridges = self.gui.get_object("GridMinBridgesPerPolygon")
grid_minimum_bridges.connect("value-changed", self.update_support_model)
self.settings.add_item("support_grid_minimum_bridges",
grid_minimum_bridges.get_value, grid_minimum_bridges.set_value)
# manual grid adjustments
self.grid_adjustment_axis_x = self.gui.get_object("SupportGridPositionManualAxisX")
self.grid_adjustment_axis_x.connect("toggled",
self.switch_support_grid_manual_selector)
self.gui.get_object("SupportGridPositionManualResetOne").connect(
"clicked", self.reset_support_grid_manual, False)
self.gui.get_object("SupportGridPositionManualResetAll").connect(
"clicked", self.reset_support_grid_manual, True)
self.grid_adjustment_model = self.gui.get_object(
"SupportGridPositionManualList")
self.grid_adjustment_selector = self.gui.get_object(
"SupportGridPositionManualSelector")
self.grid_adjustment_selector.connect("changed",
self.switch_support_grid_manual_selector)
self.grid_adjustment_value = self.gui.get_object(
"SupportGridPositionManualAdjustment")
self.grid_adjustment_value_control = self.gui.get_object(
"SupportGridPositionManualShiftControl")
self.grid_adjustment_value_control.connect("move-slider",
self.update_support_grid_manual_adjust)
self.grid_adjustment_value_control.connect("value-changed",
self.update_support_grid_manual_adjust)
self.gui.get_object("SupportGridPositionManualShiftControl2").connect(
"value-changed", self.update_support_grid_manual_adjust)
def get_set_grid_adjustment_value(value=None):
if self.grid_adjustment_axis_x.get_active():
adjustments = self.grid_adjustments_x
else:
adjustments = self.grid_adjustments_y
index = self.grid_adjustment_selector.get_active()
if value is None:
if 0 <= index < len(adjustments):
return adjustments[index]
else:
return 0
else:
while len(adjustments) <= index:
adjustments.append(0)
adjustments[index] = value
self.settings.add_item("support_grid_adjustment_value",
get_set_grid_adjustment_value, get_set_grid_adjustment_value)
# support grid defaults
grid_distance_square.set_active(True)
self.settings.set("support_grid_distance_x", 10.0)
self.settings.set("support_grid_thickness", 0.5)
self.settings.set("support_grid_height", 0.5)
self.settings.set("support_grid_average_distance", 30)
self.settings.set("support_grid_minimum_bridges", 2)
self.settings.set("support_grid_length", 5)
self.grid_adjustment_axis_x_last = True
# toolpath grid pattern
for objname in ("GridYCount", "GridXCount", "GridYDistance",
"GridXDistance"):
......@@ -720,8 +612,8 @@ class ProjectGui(object):
self.update_toolpath_grid_window)
# visual and general settings
for name, objname in (("show_model", "ShowModelCheckBox"),
("show_support_grid", "ShowSupportGridCheckBox"),
("show_axes", "ShowAxesCheckBox"),
("show_support_grid", "ShowSupportGridCheckBox"),
("show_dimensions", "ShowDimensionsCheckBox"),
("show_bounding_box", "ShowBoundingCheckBox"),
("show_toolpath", "ShowToolPathCheckBox"),
......@@ -730,7 +622,8 @@ class ProjectGui(object):
obj = self.gui.get_object(objname)
self.settings.add_item(name, obj.get_active, obj.set_active)
# all of the objects above should trigger redraw
obj.connect("toggled", self.update_view)
obj.connect("toggled", lambda widget: \
self.settings.emit_event("model-change-after"))
self.show_progress_button = self.gui.get_object("ShowToolpathProgressButton")
self.settings.add_item("show_drill_progress",
self.show_progress_button.get_active,
......@@ -840,7 +733,7 @@ class ProjectGui(object):
self.append_to_queue(self.switch_tasklist_table_selection)
# the boundary manager
self.settings.add_item("current_bounds",
lambda: get_current_item(self.bounds_editor_table, self.bounds_list),
lambda: get_current_item(self.bounds_editor_table, self.bounds_list) or (self.bounds_list and self.bounds_list[0]),
lambda bounds: set_current_item(self.bounds_editor_table, self.bounds_list, bounds))
self.bounds_editor_table = self.gui.get_object("BoundsEditorTable")
self.bounds_editor_table.get_selection().connect("changed", self.switch_bounds_table_selection)
......@@ -1172,7 +1065,6 @@ class ProjectGui(object):
self.update_tasklist_table()
self.update_save_actions()
self.update_unit_labels()
self.update_support_controls()
self.update_model_dimensions()
self.update_gcode_controls()
self.update_ode_settings()
......@@ -1334,181 +1226,6 @@ class ProjectGui(object):
save_possible = False
self.gui.get_object("SaveModel").set_sensitive(save_possible)
@gui_activity_guard
def update_support_controls(self, widget=None):
controls = {"GridProfileExpander": ("grid", "automatic_edge",
"automatic_corner"),
"GridPatternExpander": ("grid", ),
"GridPositionExpander": ("grid", ),
"GridManualShiftExpander": ("grid", ),
"GridAverageDistanceExpander": ("automatic_edge",
"automatic_corner"),
}
grid_type = self.settings.get("support_grid_type")
if grid_type == GRID_TYPES["grid"]:
grid_square = self.gui.get_object("SupportGridDistanceSquare")
distance_y = self.gui.get_object("SupportGridDistanceYControl")
distance_y.set_sensitive(not grid_square.get_active())
if grid_square.get_active():
# We let "distance_y" track the value of "distance_x".
self.settings.set("support_grid_distance_y",
self.settings.get("support_grid_distance_x"))
self.update_support_grid_manual_model()
self.switch_support_grid_manual_selector()
elif grid_type in (GRID_TYPES["automatic_edge"],
GRID_TYPES["automatic_corner"], GRID_TYPES["none"]):
pass
elif grid_type < 0:
# not initialized
pass
else:
log.error("Invalid grid type: %d" % grid_type)
# show and hide all controls according to the current type
for key, grid_types in controls.iteritems():
obj = self.gui.get_object(key)
if grid_type in [GRID_TYPES[allowed] for allowed in grid_types]:
obj.show()
else:
obj.hide()
self.settings.emit_event("model-change-after")
def update_support_model(self, widget=None):
grid_type = self.settings.get("support_grid_type")
s = self.settings
support_grid = None
if grid_type == GRID_TYPES["grid"]:
if (s.get("support_grid_thickness") > 0) \
and ((s.get("support_grid_distance_x") > 0) \
or (s.get("support_grid_distance_y") > 0)) \
and ((s.get("support_grid_distance_x") == 0) \
or (s.get("support_grid_distance_x") \
> s.get("support_grid_thickness"))) \
and ((s.get("support_grid_distance_y") == 0) \
or (s.get("support_grid_distance_y") \
> s.get("support_grid_thickness"))) \
and (s.get("support_grid_height") > 0):
support_grid = pycam.Toolpath.SupportGrid.get_support_grid(
s.get("minx"), s.get("maxx"), s.get("miny"), s.get("maxy"),
s.get("minz"), s.get("support_grid_distance_x"),
s.get("support_grid_distance_y"),
s.get("support_grid_thickness"),
s.get("support_grid_height"),
offset_x=s.get("support_grid_offset_x"),
offset_y=s.get("support_grid_offset_y"),
adjustments_x=self.grid_adjustments_x,
adjustments_y=self.grid_adjustments_y)
elif grid_type in (GRID_TYPES["automatic_edge"],
GRID_TYPES["automatic_corner"]):
if (s.get("support_grid_thickness") > 0) \
and (s.get("support_grid_height") > 0) \
and (s.get("support_grid_average_distance") > 0) \
and (s.get("support_grid_minimum_bridges") > 0):
# get the minimum z value of the bounding box
bounds = self.settings.get("current_bounds")
if (bounds is None) and (len(self.bounds_list) > 0):
bounds = self.bounds_list[0]
if not bounds is None:
minz = bounds.get_absolute_limits(
reference=self.model.get_bounds())[0][2]
corner_start = (grid_type == GRID_TYPES["automatic_corner"])
support_grid = pycam.Toolpath.SupportGrid.get_support_distributed(
s.get("model"), minz,
s.get("support_grid_average_distance"),
s.get("support_grid_minimum_bridges"),
s.get("support_grid_thickness"),
s.get("support_grid_height"),
s.get("support_grid_length"),
bounds.get_referenced_bounds(s.get("model").get_bounds()),
start_at_corners=corner_start)
elif grid_type == GRID_TYPES["none"]:
pass
s.set("support_grid", support_grid)
self.settings.emit_event("model-change-after")
def switch_support_grid_manual_selector(self, widget=None):
old_axis_was_x = self.grid_adjustment_axis_x_last
self.grid_adjustment_axis_x_last = \
self.grid_adjustment_axis_x.get_active()
if self.grid_adjustment_axis_x.get_active():
# x axis is selected
if not old_axis_was_x:
self.update_support_grid_manual_model()
max_distance = self.settings.get("support_grid_distance_x")
else:
# y axis
if old_axis_was_x:
self.update_support_grid_manual_model()
max_distance = self.settings.get("support_grid_distance_y")
# we allow an individual adjustment of 66% of the distance
max_distance /= 1.5
if hasattr(self.grid_adjustment_value, "set_lower"):
# gtk 2.14 is required for "set_lower" and "set_upper"
self.grid_adjustment_value.set_lower(-max_distance)
self.grid_adjustment_value.set_upper(max_distance)
if self.grid_adjustment_value.get_value() \
!= self.settings.get("support_grid_adjustment_value"):
self.grid_adjustment_value.set_value(self.settings.get(
"support_grid_adjustment_value"))
self.gui.get_object("SupportGridPositionManualShiftBox").set_sensitive(
self.grid_adjustment_selector.get_active() >= 0)
def update_support_grid_manual_adjust(self, widget=None, data1=None,
data2=None):
new_value = self.grid_adjustment_value.get_value()
self.settings.set("support_grid_adjustment_value", new_value)
tree_iter = self.grid_adjustment_selector.get_active_iter()
if not tree_iter is None:
value_string = "(%+.1f)" % new_value
self.grid_adjustment_model.set(tree_iter, 1, value_string)
self.settings.emit_event("model-change-after")
def reset_support_grid_manual(self, widget=None, reset_all=False):
if reset_all:
self.grid_adjustments_x = []
self.grid_adjustments_y = []
else:
self.settings.set("support_grid_adjustment_value", 0)
self.update_support_grid_manual_model()
self.switch_support_grid_manual_selector()
self.settings.emit_event("model-change-after")
def update_support_grid_manual_model(self):
old_index = self.grid_adjustment_selector.get_active()
model = self.grid_adjustment_model
model.clear()
s = self.settings
# get the toolpath without adjustments
base_x, base_y = pycam.Toolpath.SupportGrid.get_support_grid_locations(
s.get("minx"), s.get("maxx"), s.get("miny"), s.get("maxy"),
s.get("support_grid_distance_x"),
s.get("support_grid_distance_y"),
offset_x=s.get("support_grid_offset_x"),
offset_y=s.get("support_grid_offset_y"))
# fill the adjustment lists
while len(self.grid_adjustments_x) < len(base_x):
self.grid_adjustments_x.append(0)
while len(self.grid_adjustments_y) < len(base_y):
self.grid_adjustments_y.append(0)
# select the currently active list
if self.grid_adjustment_axis_x.get_active():
base = base_x
adjustments = self.grid_adjustments_x
else:
base = base_y
adjustments = self.grid_adjustments_y
# generate the model content
for index, base_value in enumerate(base):
position = "%.2f%s" % (base_value, s.get("unit"))
if (0 <= index < len(adjustments)) and (adjustments[index] != 0):
diff = "(%+.1f)" % adjustments[index]
else:
diff = ""
model.append((position, diff))
if old_index < len(base):
self.grid_adjustment_selector.set_active(old_index)
else:
self.grid_adjustment_selector.set_active(-1)
@gui_activity_guard
def generate_random_server_password(self, widget=None):
all_characters = string.letters + string.digits
......@@ -1665,7 +1382,7 @@ class ProjectGui(object):
# update the controls
self._put_bounds_settings_to_gui(bounds)
# update the visualization
self.append_to_queue(self.update_boundary_limits)
self.settings.emit_event("boundary-updated")
@gui_activity_guard
def switch_bounds_type(self, widget=None):
......@@ -1683,14 +1400,7 @@ class ProjectGui(object):
self._put_bounds_settings_to_gui(bounds)
# update the descriptive label for each margin type
self.update_bounds_controls()
self.append_to_queue(self.update_boundary_limits)
@gui_activity_guard
def update_boundary_limits(self, widget=None):
# update the values in the manual support grid adjustment list
self.update_support_grid_manual_model()
# the support grid depends on the boundary
self.settings.emit_event("model-change-after")
self.settings.emit_event("boundary-updated")
def update_tasklist_controls(self):
# en/disable some buttons
......@@ -1809,7 +1519,7 @@ class ProjectGui(object):
task["bounds"] = self.bounds_list[bounds_id]
# update the current boundary limit, if it was changed
if bounds_id != old_bounds_id:
self.append_to_queue(self.update_boundary_limits)
self.settings.emit_event("boundary-updated")
# update the tasklist table (especially for name changes)
self.update_tasklist_table()
# the task_name input control seems to loose focus somehow
......@@ -2475,7 +2185,7 @@ class ProjectGui(object):
# any new item can influence the "New task" button
self.append_to_queue(self.update_tasklist_controls)
# removing or adding "bounds" may change the visualization
self.append_to_queue(self.update_boundary_limits)
self.settings.emit_event("boundary-updated")
update_func(new_index=future_selection_index,
skip_model_update=skip_model_update)
......@@ -3080,7 +2790,7 @@ class ProjectGui(object):
if not current_index is None:
self._load_bounds_settings_from_gui(self.bounds_list[current_index])
self.update_bounds_table()
self.append_to_queue(self.update_boundary_limits)
self.settings.emit_event("boundary-updated")
def update_bounds_controls(self):
current_index = self._treeview_get_active_index(
......@@ -3172,7 +2882,7 @@ class ProjectGui(object):
self.update_bounds_table()
else:
self.gui.get_object("BoundsSettingsControlsBox").hide()
self.append_to_queue(self.update_boundary_limits)
self.settings.emit_event("boundary-updated")
@gui_activity_guard
def handle_bounds_table_event(self, widget, data, action=None):
......@@ -3861,33 +3571,11 @@ class ProjectGui(object):
tool_settings["tool_radius"], tool_settings["torus_radius"],
tool_settings["speed"], tool_settings["feedrate"])
# get the support grid options
grid_type = self.settings.get("support_grid_type")
if grid_type == GRID_TYPES["grid"]:
toolpath_settings.set_support_grid(
self.settings.get("support_grid_distance_x"),
self.settings.get("support_grid_distance_y"),
self.settings.get("support_grid_thickness"),
self.settings.get("support_grid_height"),
offset_x=self.settings.get("support_grid_offset_x"),
offset_y=self.settings.get("support_grid_offset_y"),
adjustments_x=self.grid_adjustments_x,
adjustments_y=self.grid_adjustments_y)
elif grid_type in (GRID_TYPES["automatic_edge"],
GRID_TYPES["automatic_corner"]):
corner_start = (grid_type == GRID_TYPES["automatic_corner"])
toolpath_settings.set_support_distributed(
self.settings.get("support_grid_average_distance"),
self.settings.get("support_grid_minimum_bridges"),
self.settings.get("support_grid_thickness"),
self.settings.get("support_grid_height"),
self.settings.get("support_grid_length"),
start_at_corners=corner_start)
elif grid_type == GRID_TYPES["none"]:
pass
else:
log.error("Invalid support grid type: %d" % grid_type)
support_factory = self.settings.get("get_support_model")
if support_factory:
# TODO: this is not a good approach - "toolpath_settings" should just have a "set_support" method
support_factory(toolpath_settings)
# calculation backend: ODE / None
if self.settings.get("enable_ode"):
toolpath_settings.set_calculation_backend("ODE")
......
# -*- 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 pycam.Plugins
GRID_TYPES = {"none": 0, "grid": 1, "automatic_edge": 2, "automatic_corner": 3}
# TODO: manual_adjust_slider is stuck; automatic distribution does now show up
class ModelSupport(pycam.Plugins.PluginBase):
UI_FILE = "model_support.ui"
def setup(self):
if self.gui:
support_frame = self.gui.get_object("ModelExtensionsFrame")
support_frame.unparent()
self.core.register_ui("model_handling", "Support", support_frame, 0)
self.core.set("get_support_model", self.support_model_factory)
self.core.register_event("model-change-after", self.update_support_model)
self.core.register_event("model-change-after", self.update_support_controls)
self.core.register_event("boundary-updated",
self.update_support_grid_manual_adjust)
# support grid
self.grid_adjustments_x = []
self.grid_adjustments_y = []
support_grid_type_control = self.gui.get_object(
"SupportGridTypesControl")
support_grid_type_control.connect("changed",
self.update_support_controls)
self.core.add_item("support_grid_type",
support_grid_type_control.get_active,
support_grid_type_control.set_active)
self.core.set("support_grid_type", GRID_TYPES["none"])
grid_distance_x = self.gui.get_object("SupportGridDistanceX")
grid_distance_x.connect("value-changed", self.update_support_controls)
self.core.add_item("support_grid_distance_x",
grid_distance_x.get_value, grid_distance_x.set_value)
grid_distance_square = self.gui.get_object("SupportGridDistanceSquare")
grid_distance_square.connect("clicked", self.update_support_controls)
grid_distance_y = self.gui.get_object("SupportGridDistanceY")
grid_distance_y.connect("value-changed", self.update_support_controls)
def get_support_grid_distance_y():
if grid_distance_square.get_active():
return self.core.get("support_grid_distance_x")
else:
return grid_distance_y.get_value()
self.core.add_item("support_grid_distance_y",
get_support_grid_distance_y, grid_distance_y.set_value)
grid_thickness = self.gui.get_object("SupportGridThickness")
grid_thickness.connect("value-changed", self.update_support_model)
self.core.add_item("support_grid_thickness",
grid_thickness.get_value, grid_thickness.set_value)
grid_height = self.gui.get_object("SupportGridHeight")
grid_height.connect("value-changed", self.update_support_model)
self.core.add_item("support_grid_height",
grid_height.get_value, grid_height.set_value)
grid_length = self.gui.get_object("SupportGridLength")
grid_length.connect("value-changed", self.update_support_model)
self.core.add_item("support_grid_length",
grid_length.get_value, grid_length.set_value)
grid_offset_x = self.gui.get_object("SupportGridOffsetX")
grid_offset_x.connect("value-changed", self.update_support_model)
self.core.add_item("support_grid_offset_x",
grid_offset_x.get_value, grid_offset_x.set_value)
grid_offset_y = self.gui.get_object("SupportGridOffsetY")
grid_offset_y.connect("value-changed", self.update_support_model)
self.core.add_item("support_grid_offset_y",
grid_offset_y.get_value, grid_offset_y.set_value)
grid_average_distance = self.gui.get_object("GridAverageDistance")
grid_average_distance.connect("value-changed",
self.update_support_model)
self.core.add_item("support_grid_average_distance",
grid_average_distance.get_value,
grid_average_distance.set_value)
grid_minimum_bridges = self.gui.get_object("GridMinBridgesPerPolygon")
grid_minimum_bridges.connect("value-changed", self.update_support_model)
self.core.add_item("support_grid_minimum_bridges",
grid_minimum_bridges.get_value, grid_minimum_bridges.set_value)
# manual grid adjustments
self.grid_adjustment_axis_x = self.gui.get_object("SupportGridPositionManualAxisX")
self.grid_adjustment_axis_x.connect("toggled",
self.switch_support_grid_manual_selector)
self.gui.get_object("SupportGridPositionManualResetOne").connect(
"clicked", self.reset_support_grid_manual, False)
self.gui.get_object("SupportGridPositionManualResetAll").connect(
"clicked", self.reset_support_grid_manual, True)
self.grid_adjustment_model = self.gui.get_object(
"SupportGridPositionManualList")
self.grid_adjustment_selector = self.gui.get_object(
"SupportGridPositionManualSelector")
self.grid_adjustment_selector.connect("changed",
self.switch_support_grid_manual_selector)
self.grid_adjustment_value = self.gui.get_object(
"SupportGridPositionManualAdjustment")
self.grid_adjustment_value_control = self.gui.get_object(
"SupportGridPositionManualShiftControl")
self.grid_adjustment_value_control.connect("move-slider",
self.update_support_grid_manual_adjust)
self.grid_adjustment_value_control.connect("value-changed",
self.update_support_grid_manual_adjust)
self.gui.get_object("SupportGridPositionManualShiftControl2").connect(
"value-changed", self.update_support_grid_manual_adjust)
def get_set_grid_adjustment_value(value=None):
if self.grid_adjustment_axis_x.get_active():
adjustments = self.grid_adjustments_x
else:
adjustments = self.grid_adjustments_y
index = self.grid_adjustment_selector.get_active()
if value is None:
if 0 <= index < len(adjustments):
return adjustments[index]
else:
return 0
else:
while len(adjustments) <= index:
adjustments.append(0)
adjustments[index] = value
self.core.add_item("support_grid_adjustment_value",
get_set_grid_adjustment_value, get_set_grid_adjustment_value)
# support grid defaults
grid_distance_square.set_active(True)
self.core.set("support_grid_distance_x", 10.0)
self.core.set("support_grid_thickness", 0.5)
self.core.set("support_grid_height", 0.5)
self.core.set("support_grid_average_distance", 30)
self.core.set("support_grid_minimum_bridges", 2)
self.core.set("support_grid_length", 5)
self.grid_adjustment_axis_x_last = True
# refresh everything
self.update_support_controls()
return True
def teardown(self):
if self.gui:
self.core.unregister_ui("model_handling",
self.gui.get_object("ModelExtensionsFrame"))
def update_support_controls(self, widget=None):
controls = {"GridProfileExpander": ("grid", "automatic_edge",
"automatic_corner"),
"GridPatternExpander": ("grid", ),
"GridPositionExpander": ("grid", ),
"GridManualShiftExpander": ("grid", ),
"GridAverageDistanceExpander": ("automatic_edge",
"automatic_corner"),
}
grid_type = self.core.get("support_grid_type")
if grid_type == GRID_TYPES["grid"]:
grid_square = self.gui.get_object("SupportGridDistanceSquare")
distance_y = self.gui.get_object("SupportGridDistanceYControl")
distance_y.set_sensitive(not grid_square.get_active())
if grid_square.get_active():
# We let "distance_y" track the value of "distance_x".
self.core.set("support_grid_distance_y",
self.core.get("support_grid_distance_x"))
self.update_support_grid_manual_model()
self.switch_support_grid_manual_selector()
elif grid_type in (GRID_TYPES["automatic_edge"],
GRID_TYPES["automatic_corner"], GRID_TYPES["none"]):
pass
elif grid_type < 0:
# not initialized
pass
else:
log.error("Invalid grid type: %d" % grid_type)
# show and hide all controls according to the current type
for key, grid_types in controls.iteritems():
obj = self.gui.get_object(key)
if grid_type in [GRID_TYPES[allowed] for allowed in grid_types]:
obj.show()
else:
obj.hide()
self.core.emit_event("model-change-after")
def update_support_model(self, widget=None):
model = self.core.get("model")
if not model:
return
grid_type = self.core.get("support_grid_type")
s = self.core
support_grid = None
if grid_type == GRID_TYPES["grid"]:
if (s.get("support_grid_thickness") > 0) \
and ((s.get("support_grid_distance_x") > 0) \
or (s.get("support_grid_distance_y") > 0)) \
and ((s.get("support_grid_distance_x") == 0) \
or (s.get("support_grid_distance_x") \
> s.get("support_grid_thickness"))) \
and ((s.get("support_grid_distance_y") == 0) \
or (s.get("support_grid_distance_y") \
> s.get("support_grid_thickness"))) \
and (s.get("support_grid_height") > 0):
support_grid = pycam.Toolpath.SupportGrid.get_support_grid(
s.get("minx"), s.get("maxx"), s.get("miny"), s.get("maxy"),
s.get("minz"), s.get("support_grid_distance_x"),
s.get("support_grid_distance_y"),
s.get("support_grid_thickness"),
s.get("support_grid_height"),
offset_x=s.get("support_grid_offset_x"),
offset_y=s.get("support_grid_offset_y"),
adjustments_x=self.grid_adjustments_x,
adjustments_y=self.grid_adjustments_y)
elif grid_type in (GRID_TYPES["automatic_edge"],
GRID_TYPES["automatic_corner"]):
if (s.get("support_grid_thickness") > 0) \
and (s.get("support_grid_height") > 0) \
and (s.get("support_grid_average_distance") > 0) \
and (s.get("support_grid_minimum_bridges") > 0):
# get the minimum z value of the bounding box
bounds = self.core.get("current_bounds")
if not bounds is None:
minz = bounds.get_absolute_limits(
reference=model.get_bounds())[0][2]
corner_start = (grid_type == GRID_TYPES["automatic_corner"])
support_grid = pycam.Toolpath.SupportGrid.get_support_distributed(
s.get("model"), minz,
s.get("support_grid_average_distance"),
s.get("support_grid_minimum_bridges"),
s.get("support_grid_thickness"),
s.get("support_grid_height"),
s.get("support_grid_length"),
bounds.get_referenced_bounds(s.get("model").get_bounds()),
start_at_corners=corner_start)
elif grid_type == GRID_TYPES["none"]:
pass
s.set("support_grid", support_grid)
self.core.emit_event("model-change-after")
def switch_support_grid_manual_selector(self, widget=None):
old_axis_was_x = self.grid_adjustment_axis_x_last
self.grid_adjustment_axis_x_last = \
self.grid_adjustment_axis_x.get_active()
if self.grid_adjustment_axis_x.get_active():
# x axis is selected
if not old_axis_was_x:
self.update_support_grid_manual_model()
max_distance = self.core.get("support_grid_distance_x")
else:
# y axis
if old_axis_was_x:
self.update_support_grid_manual_model()
max_distance = self.core.get("support_grid_distance_y")
# we allow an individual adjustment of 66% of the distance
max_distance /= 1.5
if hasattr(self.grid_adjustment_value, "set_lower"):
# gtk 2.14 is required for "set_lower" and "set_upper"
self.grid_adjustment_value.set_lower(-max_distance)
self.grid_adjustment_value.set_upper(max_distance)
if self.grid_adjustment_value.get_value() \
!= self.core.get("support_grid_adjustment_value"):
self.grid_adjustment_value.set_value(self.core.get(
"support_grid_adjustment_value"))
self.gui.get_object("SupportGridPositionManualShiftBox").set_sensitive(
self.grid_adjustment_selector.get_active() >= 0)
def update_support_grid_manual_adjust(self, widget=None, data1=None,
data2=None):
new_value = self.grid_adjustment_value.get_value()
self.core.set("support_grid_adjustment_value", new_value)
tree_iter = self.grid_adjustment_selector.get_active_iter()
if not tree_iter is None:
value_string = "(%+.1f)" % new_value
self.grid_adjustment_model.set(tree_iter, 1, value_string)
self.core.emit_event("model-change-after")
def reset_support_grid_manual(self, widget=None, reset_all=False):
if reset_all:
self.grid_adjustments_x = []
self.grid_adjustments_y = []
else:
self.core.set("support_grid_adjustment_value", 0)
self.update_support_grid_manual_model()
self.switch_support_grid_manual_selector()
self.core.emit_event("model-change-after")
def update_support_grid_manual_model(self):
old_index = self.grid_adjustment_selector.get_active()
model = self.grid_adjustment_model
model.clear()
s = self.core
# get the toolpath without adjustments
base_x, base_y = pycam.Toolpath.SupportGrid.get_support_grid_locations(
s.get("minx"), s.get("maxx"), s.get("miny"), s.get("maxy"),
s.get("support_grid_distance_x"),
s.get("support_grid_distance_y"),
offset_x=s.get("support_grid_offset_x"),
offset_y=s.get("support_grid_offset_y"))
# fill the adjustment lists
while len(self.grid_adjustments_x) < len(base_x):
self.grid_adjustments_x.append(0)
while len(self.grid_adjustments_y) < len(base_y):
self.grid_adjustments_y.append(0)
# select the currently active list
if self.grid_adjustment_axis_x.get_active():
base = base_x
adjustments = self.grid_adjustments_x
else:
base = base_y
adjustments = self.grid_adjustments_y
# generate the model content
for index, base_value in enumerate(base):
position = "%.2f%s" % (base_value, s.get("unit"))
if (0 <= index < len(adjustments)) and (adjustments[index] != 0):
diff = "(%+.1f)" % adjustments[index]
else:
diff = ""
model.append((position, diff))
if old_index < len(base):
self.grid_adjustment_selector.set_active(old_index)
else:
self.grid_adjustment_selector.set_active(-1)
def support_model_factory(self, tp_settings):
# get the support grid options
grid_type = self.core.get("support_grid_type")
if grid_type == GRID_TYPES["grid"]:
tp_settings.set_support_grid(
self.core.get("support_grid_distance_x"),
self.core.get("support_grid_distance_y"),
self.core.get("support_grid_thickness"),
self.core.get("support_grid_height"),
offset_x=self.core.get("support_grid_offset_x"),
offset_y=self.core.get("support_grid_offset_y"),
adjustments_x=self.grid_adjustments_x,
adjustments_y=self.grid_adjustments_y)
elif grid_type in (GRID_TYPES["automatic_edge"],
GRID_TYPES["automatic_corner"]):
corner_start = (grid_type == GRID_TYPES["automatic_corner"])
tp_settings.set_support_distributed(
self.core.get("support_grid_average_distance"),
self.core.get("support_grid_minimum_bridges"),
self.core.get("support_grid_thickness"),
self.core.get("support_grid_height"),
self.core.get("support_grid_length"),
start_at_corners=corner_start)
elif grid_type == GRID_TYPES["none"]:
pass
else:
log.error("Invalid support grid type: %d" % grid_type)
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