Holding tag bugs
Removed OCC from profile Add option to suppress profile of perim.
This commit is contained in:
parent
a38006b5d5
commit
7c2c541d7a
|
@ -23,7 +23,7 @@
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QToolBox" name="toolBox">
|
<widget class="QToolBox" name="toolBox">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>3</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="Depths">
|
<widget class="QWidget" name="Depths">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
|
@ -42,13 +42,9 @@
|
||||||
<string>Depths</string>
|
<string>Depths</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QFormLayout" name="formLayout_3">
|
<layout class="QFormLayout" name="formLayout_3">
|
||||||
<item row="0" column="0">
|
<property name="fieldGrowthPolicy">
|
||||||
<widget class="Gui::InputField" name="startDepth">
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
<property name="unit" stdset="0">
|
</property>
|
||||||
<string notr="true">mm</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -90,6 +86,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="Gui::InputField" name="startDepth">
|
||||||
|
<property name="unit" stdset="0">
|
||||||
|
<string notr="true">mm</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="Heights">
|
<widget class="QWidget" name="Heights">
|
||||||
|
@ -97,8 +100,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>165</width>
|
<width>334</width>
|
||||||
<height>70</height>
|
<height>318</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -169,7 +172,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" rowspan="2" colspan="2">
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="QTreeWidget" name="tagTree">
|
<widget class="QTreeWidget" name="tagTree">
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>351</width>
|
<width>374</width>
|
||||||
<height>520</height>
|
<height>453</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
|
@ -33,8 +33,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>333</width>
|
<width>340</width>
|
||||||
<height>353</height>
|
<height>277</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -111,8 +111,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>333</width>
|
<width>356</width>
|
||||||
<height>324</height>
|
<height>124</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -192,8 +192,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>333</width>
|
<width>356</width>
|
||||||
<height>324</height>
|
<height>95</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -237,87 +237,13 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="Pattern">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>333</width>
|
|
||||||
<height>353</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<attribute name="label">
|
|
||||||
<string>Pattern</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QFormLayout" name="formLayout_5">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QSpinBox" name="stepOverPercent">
|
|
||||||
<property name="minimum">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>100</number>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>100</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="label_11">
|
|
||||||
<property name="text">
|
|
||||||
<string>Step Over Percent</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QFrame" name="frame">
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout_4">
|
|
||||||
<item row="0" column="0" colspan="2">
|
|
||||||
<widget class="QCheckBox" name="useZigZag">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use ZigZag</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QCheckBox" name="zigZagUnidirectional">
|
|
||||||
<property name="text">
|
|
||||||
<string>ZigZag Unidirectional</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QSpinBox" name="zigZagAngle"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLabel" name="label_10">
|
|
||||||
<property name="text">
|
|
||||||
<string>ZigZag Angle</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="page_3">
|
<widget class="QWidget" name="page_3">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>333</width>
|
<width>356</width>
|
||||||
<height>353</height>
|
<height>296</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -327,50 +253,10 @@
|
||||||
<attribute name="label">
|
<attribute name="label">
|
||||||
<string>Operation</string>
|
<string>Operation</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<item>
|
<item row="1" column="0">
|
||||||
<widget class="QWidget" name="widget_3" native="true">
|
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_9">
|
|
||||||
<property name="text">
|
|
||||||
<string>Cut Mode</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QComboBox" name="cutMode">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Climb</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Conventional</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="widget_2" native="true">
|
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QCheckBox" name="useStartPoint">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use Start Point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="widget_4" native="true">
|
<widget class="QWidget" name="widget_4" native="true">
|
||||||
<layout class="QGridLayout" name="gridLayout_6">
|
<layout class="QGridLayout" name="gridLayout_5">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_8">
|
<widget class="QLabel" name="label_8">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -388,29 +274,109 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_11">
|
||||||
|
<property name="text">
|
||||||
|
<string>Step Over Percent</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QSpinBox" name="stepOverPercent">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="2" column="0">
|
||||||
<widget class="QWidget" name="widget_5" native="true">
|
<widget class="QFrame" name="frame">
|
||||||
<layout class="QGridLayout" name="gridLayout_7">
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_6">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
|
<widget class="QCheckBox" name="useZigZag">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use ZigZag</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLabel" name="label_10">
|
||||||
|
<property name="text">
|
||||||
|
<string>ZigZag Angle</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QSpinBox" name="zigZagAngle"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="2">
|
||||||
|
<widget class="QCheckBox" name="zigZagUnidirectional">
|
||||||
|
<property name="text">
|
||||||
|
<string>ZigZag Unidirectional</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QWidget" name="widget_3" native="true">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_9">
|
||||||
|
<property name="text">
|
||||||
|
<string>Cut Mode</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label_12">
|
<widget class="QLabel" name="label_12">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Boundary Shape</string>
|
<string>Boundary Shape</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="1" column="2">
|
||||||
<widget class="QComboBox" name="boundaryShape">
|
<widget class="QComboBox" name="boundaryShape">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Model Perimeter</string>
|
<string>Perimeter</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Model Boundbox</string>
|
<string>Boundbox</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QComboBox" name="cutMode">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Climb</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Conventional</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -418,23 +384,23 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>116</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
|
|
@ -111,8 +111,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>334</width>
|
<width>168</width>
|
||||||
<height>319</height>
|
<height>99</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -178,8 +178,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>334</width>
|
<width>165</width>
|
||||||
<height>319</height>
|
<height>70</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -250,7 +250,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" rowspan="2" colspan="2">
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="QTreeWidget" name="tagTree">
|
<widget class="QTreeWidget" name="tagTree">
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -286,8 +286,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>334</width>
|
<width>322</width>
|
||||||
<height>319</height>
|
<height>306</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>352</width>
|
<width>399</width>
|
||||||
<height>525</height>
|
<height>519</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
|
@ -33,8 +33,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>334</width>
|
<width>381</width>
|
||||||
<height>358</height>
|
<height>353</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -45,22 +45,6 @@
|
||||||
<string>Base Geometry</string>
|
<string>Base Geometry</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="0" colspan="3">
|
|
||||||
<widget class="QListWidget" name="baseList">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Drag to reorder, then update.</string>
|
|
||||||
</property>
|
|
||||||
<property name="dragDropMode">
|
|
||||||
<enum>QAbstractItemView::DragDrop</enum>
|
|
||||||
</property>
|
|
||||||
<property name="defaultDropAction">
|
|
||||||
<enum>Qt::MoveAction</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sortingEnabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QPushButton" name="addBase">
|
<widget class="QPushButton" name="addBase">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
@ -104,6 +88,22 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0" colspan="3">
|
||||||
|
<widget class="QListWidget" name="baseList">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Drag to reorder, then update.</string>
|
||||||
|
</property>
|
||||||
|
<property name="dragDropMode">
|
||||||
|
<enum>QAbstractItemView::DragDrop</enum>
|
||||||
|
</property>
|
||||||
|
<property name="defaultDropAction">
|
||||||
|
<enum>Qt::MoveAction</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sortingEnabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="Depths">
|
<widget class="QWidget" name="Depths">
|
||||||
|
@ -111,8 +111,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>334</width>
|
<width>381</width>
|
||||||
<height>358</height>
|
<height>353</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -178,8 +178,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>334</width>
|
<width>381</width>
|
||||||
<height>358</height>
|
<height>353</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -228,14 +228,28 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>334</width>
|
<width>381</width>
|
||||||
<height>358</height>
|
<height>353</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="label">
|
<attribute name="label">
|
||||||
<string>Holding</string>
|
<string>Holding</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QPushButton" name="addTag">
|
||||||
|
<property name="text">
|
||||||
|
<string>Add New</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QPushButton" name="deleteTag">
|
||||||
|
<property name="text">
|
||||||
|
<string>Delete</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="0" colspan="2">
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="QTreeWidget" name="tagTree">
|
<widget class="QTreeWidget" name="tagTree">
|
||||||
<column>
|
<column>
|
||||||
|
@ -265,20 +279,6 @@
|
||||||
</column>
|
</column>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QPushButton" name="addTag">
|
|
||||||
<property name="text">
|
|
||||||
<string>Add New</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QPushButton" name="deleteTag">
|
|
||||||
<property name="text">
|
|
||||||
<string>Delete</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="page_3">
|
<widget class="QWidget" name="page_3">
|
||||||
|
@ -286,8 +286,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>334</width>
|
<width>381</width>
|
||||||
<height>358</height>
|
<height>353</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -301,28 +301,107 @@
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="4" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="label_7">
|
<widget class="QWidget" name="widget_2" native="true">
|
||||||
<property name="text">
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
<string>Algorithm</string>
|
<item row="2" column="0">
|
||||||
</property>
|
<widget class="QCheckBox" name="useEndPoint">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use End Point</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QCheckBox" name="useStartPoint">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use Start Point</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QCheckBox" name="useCompensation">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use Compensation</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QCheckBox" name="processHoles">
|
||||||
|
<property name="text">
|
||||||
|
<string>Process Holes</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="2">
|
||||||
|
<widget class="QCheckBox" name="processPerimeter">
|
||||||
|
<property name="text">
|
||||||
|
<string>Process Perimeter</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="5" column="0" colspan="2">
|
||||||
|
<widget class="QWidget" name="widget_4" native="true">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_6">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="text">
|
||||||
|
<string>Extra Offset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="extraOffset"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_10">
|
||||||
|
<property name="text">
|
||||||
|
<string>Segment Length</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="segLen"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="rollRadius"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_11">
|
||||||
|
<property name="text">
|
||||||
|
<string>Roll Radius</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_13">
|
||||||
|
<property name="text">
|
||||||
|
<string>Plunge Angle</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="plungeAngle"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QComboBox" name="algorithmSelect">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>OCC Native</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>libarea</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0" colspan="2">
|
|
||||||
<widget class="QWidget" name="widget_3" native="true">
|
<widget class="QWidget" name="widget_3" native="true">
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
<layout class="QGridLayout" name="gridLayout_5">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
|
@ -375,86 +454,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0" colspan="2">
|
|
||||||
<widget class="QWidget" name="widget_2" native="true">
|
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QCheckBox" name="useStartPoint">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use Start Point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QCheckBox" name="useCompensation">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use Compensation</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="useEndPoint">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use End Point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QCheckBox" name="processHoles">
|
|
||||||
<property name="text">
|
|
||||||
<string>Process Holes</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0" colspan="2">
|
|
||||||
<widget class="QWidget" name="widget_4" native="true">
|
|
||||||
<layout class="QGridLayout" name="gridLayout_6">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_8">
|
|
||||||
<property name="text">
|
|
||||||
<string>Extra Offset</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="extraOffset"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_10">
|
|
||||||
<property name="text">
|
|
||||||
<string>Segment Length</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="segLen"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_11">
|
|
||||||
<property name="text">
|
|
||||||
<string>Roll Radius</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="rollRadius"/>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label_13">
|
|
||||||
<property name="text">
|
|
||||||
<string>Plunge Angle</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="plungeAngle"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -136,7 +136,7 @@ class PathWorkbench (Workbench):
|
||||||
if len(FreeCADGui.Selection.getSelection()) == 1:
|
if len(FreeCADGui.Selection.getSelection()) == 1:
|
||||||
if FreeCADGui.Selection.getSelection()[0].isDerivedFrom("Path::Feature"):
|
if FreeCADGui.Selection.getSelection()[0].isDerivedFrom("Path::Feature"):
|
||||||
self.appendContextMenu("", ["Path_Inspect"])
|
self.appendContextMenu("", ["Path_Inspect"])
|
||||||
if "Profile" in FreeCADGui.Selection.getSelection()[0].Name:
|
if "Profile" or "Contour" in FreeCADGui.Selection.getSelection()[0].Name:
|
||||||
self.appendContextMenu("", ["Add_Tag"])
|
self.appendContextMenu("", ["Add_Tag"])
|
||||||
self.appendContextMenu("", ["Set_StartPoint"])
|
self.appendContextMenu("", ["Set_StartPoint"])
|
||||||
self.appendContextMenu("", ["Set_EndPoint"])
|
self.appendContextMenu("", ["Set_EndPoint"])
|
||||||
|
|
|
@ -419,7 +419,6 @@ class TaskPanel:
|
||||||
self.updating = False
|
self.updating = False
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
print "removed"
|
|
||||||
self.getFields()
|
self.getFields()
|
||||||
|
|
||||||
FreeCADGui.ActiveDocument.resetEdit()
|
FreeCADGui.ActiveDocument.resetEdit()
|
||||||
|
@ -428,7 +427,6 @@ class TaskPanel:
|
||||||
FreeCAD.ActiveDocument.recompute()
|
FreeCAD.ActiveDocument.recompute()
|
||||||
|
|
||||||
def reject(self):
|
def reject(self):
|
||||||
print "removed1"
|
|
||||||
FreeCADGui.Control.closeDialog()
|
FreeCADGui.Control.closeDialog()
|
||||||
FreeCADGui.Selection.removeObserver(self.s)
|
FreeCADGui.Selection.removeObserver(self.s)
|
||||||
FreeCAD.ActiveDocument.recompute()
|
FreeCAD.ActiveDocument.recompute()
|
||||||
|
@ -482,6 +480,7 @@ class TaskPanel:
|
||||||
if index >= 0:
|
if index >= 0:
|
||||||
self.form.direction.setCurrentIndex(index)
|
self.form.direction.setCurrentIndex(index)
|
||||||
|
|
||||||
|
self.form.tagTree.blockSignals(True)
|
||||||
for i in range(len(self.obj.locs)):
|
for i in range(len(self.obj.locs)):
|
||||||
item = QtGui.QTreeWidgetItem(self.form.tagTree)
|
item = QtGui.QTreeWidgetItem(self.form.tagTree)
|
||||||
item.setText(0, str(i+1))
|
item.setText(0, str(i+1))
|
||||||
|
@ -492,6 +491,7 @@ class TaskPanel:
|
||||||
item.setText(4, str(self.obj.angles[i]))
|
item.setText(4, str(self.obj.angles[i]))
|
||||||
item.setFlags(item.flags() | QtCore.Qt.ItemIsEditable)
|
item.setFlags(item.flags() | QtCore.Qt.ItemIsEditable)
|
||||||
item.setTextAlignment(0, QtCore.Qt.AlignLeft)
|
item.setTextAlignment(0, QtCore.Qt.AlignLeft)
|
||||||
|
self.form.tagTree.blockSignals(False)
|
||||||
|
|
||||||
def open(self):
|
def open(self):
|
||||||
self.s = SelObserver()
|
self.s = SelObserver()
|
||||||
|
|
|
@ -302,26 +302,26 @@ def profile2(curve, direction="on", radius=1.0, vertfeed=0.0,
|
||||||
extend_at_start=0.0, extend_at_end=0.0, lead_in_line_len=0.0,
|
extend_at_start=0.0, extend_at_end=0.0, lead_in_line_len=0.0,
|
||||||
lead_out_line_len=0.0):
|
lead_out_line_len=0.0):
|
||||||
|
|
||||||
print "direction: " + str(direction)
|
# print "direction: " + str(direction)
|
||||||
print "radius: " + str(radius)
|
# print "radius: " + str(radius)
|
||||||
print "vertfeed: " + str(vertfeed)
|
# print "vertfeed: " + str(vertfeed)
|
||||||
print "horizfeed: " + str(horizfeed)
|
# print "horizfeed: " + str(horizfeed)
|
||||||
print "offset_extra: " + str(offset_extra)
|
# print "offset_extra: " + str(offset_extra)
|
||||||
print "roll_radius: " + str(roll_radius)
|
# print "roll_radius: " + str(roll_radius)
|
||||||
print "roll_on: " + str(roll_on)
|
# print "roll_on: " + str(roll_on)
|
||||||
print "roll_off: " + str(roll_off)
|
# print "roll_off: " + str(roll_off)
|
||||||
print "depthparams: " + str(depthparams)
|
# print "depthparams: " + str(depthparams)
|
||||||
print "extend_at_start: " + str(extend_at_start)
|
# print "extend_at_start: " + str(extend_at_start)
|
||||||
print "extend_at_end: " + str(extend_at_end)
|
# print "extend_at_end: " + str(extend_at_end)
|
||||||
print "lead_in_line_len: " + str(lead_in_line_len)
|
# print "lead_in_line_len: " + str(lead_in_line_len)
|
||||||
print "lead_out_line_len: " + str(lead_out_line_len)
|
# print "lead_out_line_len: " + str(lead_out_line_len)
|
||||||
print "in profile2: 318"
|
# print "in profile2: 318"
|
||||||
|
|
||||||
global tags
|
global tags
|
||||||
direction = direction.lower()
|
direction = direction.lower()
|
||||||
offset_curve = area.Curve(curve)
|
offset_curve = area.Curve(curve)
|
||||||
print "curve: " , str(curve)
|
# print "curve: " , str(curve)
|
||||||
print "result curve: ", offset_curve.__dict__
|
# print "result curve: ", offset_curve.__dict__
|
||||||
|
|
||||||
if direction == "on":
|
if direction == "on":
|
||||||
use_CRC() == False
|
use_CRC() == False
|
||||||
|
|
|
@ -30,10 +30,7 @@ import Part
|
||||||
import PathScripts.PathKurveUtils
|
import PathScripts.PathKurveUtils
|
||||||
import area
|
import area
|
||||||
import TechDraw
|
import TechDraw
|
||||||
import Drawing
|
|
||||||
import DraftGeomUtils
|
|
||||||
from FreeCAD import Vector
|
from FreeCAD import Vector
|
||||||
import Arch
|
|
||||||
|
|
||||||
FreeCADGui = None
|
FreeCADGui = None
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
|
@ -83,13 +80,13 @@ class ObjectFace:
|
||||||
obj.addProperty("App::PropertyEnumeration", "StartAt", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property","Start Faceing at center or boundary"))
|
obj.addProperty("App::PropertyEnumeration", "StartAt", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property","Start Faceing at center or boundary"))
|
||||||
obj.StartAt = ['Center', 'Edge']
|
obj.StartAt = ['Center', 'Edge']
|
||||||
obj.addProperty("App::PropertyPercent", "StepOver", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property","Percent of cutter diameter to step over on each pass"))
|
obj.addProperty("App::PropertyPercent", "StepOver", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property","Percent of cutter diameter to step over on each pass"))
|
||||||
# obj.StepOver = (0.0, 0.01, 100.0, 0.5)
|
#obj.StepOver = (1, 1, 100, 1)
|
||||||
obj.addProperty("App::PropertyBool", "KeepToolDown", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property","Attempts to avoid unnecessary retractions."))
|
obj.addProperty("App::PropertyBool", "KeepToolDown", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property","Attempts to avoid unnecessary retractions."))
|
||||||
obj.addProperty("App::PropertyBool", "ZigUnidirectional", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property","Lifts tool at the end of each pass to respect cut mode."))
|
obj.addProperty("App::PropertyBool", "ZigUnidirectional", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property","Lifts tool at the end of each pass to respect cut mode."))
|
||||||
obj.addProperty("App::PropertyBool", "UseZigZag", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property","Use Zig Zag pattern to clear area."))
|
obj.addProperty("App::PropertyBool", "UseZigZag", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property","Use Zig Zag pattern to clear area."))
|
||||||
obj.addProperty("App::PropertyFloat", "ZigZagAngle", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property","Angle of the zigzag pattern"))
|
obj.addProperty("App::PropertyFloat", "ZigZagAngle", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property","Angle of the zigzag pattern"))
|
||||||
obj.addProperty("App::PropertyEnumeration", "BoundaryShape", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property","Shape to use for calculating Boundary"))
|
obj.addProperty("App::PropertyEnumeration", "BoundaryShape", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property","Shape to use for calculating Boundary"))
|
||||||
obj.BoundaryShape = ['Perimeter', 'BoundBox']
|
obj.BoundaryShape = ['Perimeter', 'Boundbox']
|
||||||
|
|
||||||
|
|
||||||
# Start Point Properties
|
# Start Point Properties
|
||||||
|
@ -102,6 +99,9 @@ class ObjectFace:
|
||||||
|
|
||||||
if prop == "UserLabel":
|
if prop == "UserLabel":
|
||||||
obj.Label = obj.UserLabel + " :" + obj.ToolDescription
|
obj.Label = obj.UserLabel + " :" + obj.ToolDescription
|
||||||
|
if prop == "StepOver":
|
||||||
|
if obj.StepOver == 0:
|
||||||
|
obj.StepOver = 1
|
||||||
|
|
||||||
def __getstate__(self):
|
def __getstate__(self):
|
||||||
return None
|
return None
|
||||||
|
@ -144,10 +144,11 @@ class ObjectFace:
|
||||||
item = (ss, sub)
|
item = (ss, sub)
|
||||||
if item in baselist:
|
if item in baselist:
|
||||||
FreeCAD.Console.PrintWarning(translate("Path", "this object already in the list" + "\n"))
|
FreeCAD.Console.PrintWarning(translate("Path", "this object already in the list" + "\n"))
|
||||||
|
elif PathUtils.findParentJob(obj).Base.Name != ss.Name:
|
||||||
|
FreeCAD.Console.PrintWarning(translate("Path", "Please select features from the Job model object" +"\n"))
|
||||||
else:
|
else:
|
||||||
baselist.append(item)
|
baselist.append(item)
|
||||||
obj.Base = baselist
|
obj.Base = baselist
|
||||||
print "this base is: " + str(baselist)
|
|
||||||
self.execute(obj)
|
self.execute(obj)
|
||||||
|
|
||||||
def getStock(self, obj):
|
def getStock(self, obj):
|
||||||
|
@ -193,8 +194,6 @@ class ObjectFace:
|
||||||
if obj.UseStartPoint:
|
if obj.UseStartPoint:
|
||||||
start_point = (obj.StartPoint.x, obj.StartPoint.y)
|
start_point = (obj.StartPoint.x, obj.StartPoint.y)
|
||||||
|
|
||||||
# print "a," + str(self.radius) + "," + str(extraoffset) + "," + str(stepover) + ",depthparams, " + str(from_center) + "," + str(keep_tool_down) + "," + str(use_zig_zag) + "," + str(zig_angle) + "," + str(zig_unidirectional) + "," + str(start_point) + "," + str(cut_mode)
|
|
||||||
|
|
||||||
PathAreaUtils.pocket(
|
PathAreaUtils.pocket(
|
||||||
a,
|
a,
|
||||||
self.radius,
|
self.radius,
|
||||||
|
@ -251,24 +250,18 @@ class ObjectFace:
|
||||||
else:
|
else:
|
||||||
obj.Label = obj.UserLabel + " :" + obj.ToolDescription
|
obj.Label = obj.UserLabel + " :" + obj.ToolDescription
|
||||||
|
|
||||||
#Facing is done either against base object
|
#Facing is done either against base objects
|
||||||
if obj.Base:
|
if obj.Base:
|
||||||
faces = []
|
faces = []
|
||||||
for b in obj.Base:
|
for b in obj.Base:
|
||||||
for sub in b[1]:
|
for sub in b[1]:
|
||||||
shape = getattr(b[0].Shape, sub)
|
shape = getattr(b[0].Shape, sub)
|
||||||
if isinstance (shape, Part.Face):
|
if isinstance (shape, Part.Face):
|
||||||
groups = Drawing.project(shape, Vector(0,0,1))
|
faces.append(shape)
|
||||||
if len(groups[0].Edges) > 0:
|
|
||||||
p = DraftGeomUtils.superWire(groups[0].Edges, closed=True)
|
|
||||||
w = []
|
|
||||||
w.append(p)
|
|
||||||
faces.append(Arch.makeFace(w))
|
|
||||||
else:
|
else:
|
||||||
print ('falling out')
|
print ('falling out')
|
||||||
return
|
return
|
||||||
contourwire = TechDraw.findShapeOutline(faces[0].multiFuse(faces[1:]).removeSplitter(), 1, Vector(0,0,1))
|
planeshape = Part.makeCompound(faces)
|
||||||
print ('269: contourwire', contourwire)
|
|
||||||
|
|
||||||
#If no base object, do planing of top surface of entire model
|
#If no base object, do planing of top surface of entire model
|
||||||
else:
|
else:
|
||||||
|
@ -278,18 +271,16 @@ class ObjectFace:
|
||||||
baseobject = parentJob.Base
|
baseobject = parentJob.Base
|
||||||
if baseobject is None:
|
if baseobject is None:
|
||||||
return
|
return
|
||||||
# print "Plane base object: " + baseobject.Name
|
planeshape = baseobject.Shape
|
||||||
contourwire = TechDraw.findShapeOutline(baseobject.Shape, 1, Vector(0,0,1))
|
|
||||||
print ('281: contourwire', contourwire)
|
|
||||||
|
|
||||||
if obj.BoundaryShape == 'BoundBox':
|
#if user wants the boundbox, calculate that
|
||||||
print 'boundbox'
|
if obj.BoundaryShape == 'Boundbox':
|
||||||
bb = contourwire.BoundBox
|
bb = planeshape.BoundBox
|
||||||
bbperim = Part.makeBox(bb.XLength, bb.YLength, 1, Vector(bb.XMin, bb.YMin, bb.ZMin), Vector(0,0,1))
|
bbperim = Part.makeBox(bb.XLength, bb.YLength, 1, Vector(bb.XMin, bb.YMin, bb.ZMin), Vector(0,0,1))
|
||||||
contourwire = TechDraw.findShapeOutline(bbperim, 1, Vector(0,0,1))
|
contourwire = TechDraw.findShapeOutline(bbperim, 1, Vector(0,0,1))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print 'perimeter'
|
contourwire = TechDraw.findShapeOutline(planeshape, 1, Vector(0,0,1))
|
||||||
|
|
||||||
edgelist = contourwire.Edges
|
edgelist = contourwire.Edges
|
||||||
edgelist = Part.__sortEdges__(edgelist)
|
edgelist = Part.__sortEdges__(edgelist)
|
||||||
|
|
||||||
|
@ -378,7 +369,6 @@ class CommandPathMillFace:
|
||||||
FreeCADGui.doCommand('obj.Active = True')
|
FreeCADGui.doCommand('obj.Active = True')
|
||||||
FreeCADGui.doCommand('PathScripts.PathMillFace.ViewProviderFace(obj.ViewObject)')
|
FreeCADGui.doCommand('PathScripts.PathMillFace.ViewProviderFace(obj.ViewObject)')
|
||||||
FreeCADGui.doCommand('from PathScripts import PathUtils')
|
FreeCADGui.doCommand('from PathScripts import PathUtils')
|
||||||
#FreeCADGui.doCommand('obj.Algorithm = "libarea"')
|
|
||||||
FreeCADGui.doCommand('obj.StepOver = 50')
|
FreeCADGui.doCommand('obj.StepOver = 50')
|
||||||
FreeCADGui.doCommand('obj.ClearanceHeight = 10') # + str(bb.ZMax + 2.0))
|
FreeCADGui.doCommand('obj.ClearanceHeight = 10') # + str(bb.ZMax + 2.0))
|
||||||
FreeCADGui.doCommand('obj.StepDown = 1.0')
|
FreeCADGui.doCommand('obj.StepDown = 1.0')
|
||||||
|
@ -440,10 +430,10 @@ class TaskPanel:
|
||||||
self.obj.ClearanceHeight = self.form.clearanceHeight.text()
|
self.obj.ClearanceHeight = self.form.clearanceHeight.text()
|
||||||
if hasattr(self.obj, "StepDown"):
|
if hasattr(self.obj, "StepDown"):
|
||||||
self.obj.StepDown = self.form.stepDown.value()
|
self.obj.StepDown = self.form.stepDown.value()
|
||||||
if hasattr(self.obj, "PassExtensioon"):
|
if hasattr(self.obj, "PassExtension"):
|
||||||
self.obj.PassExtension = self.form.extraOffset.value()
|
self.obj.PassExtension = self.form.extraOffset.value()
|
||||||
if hasattr(self.obj, "UseStartPoint"):
|
# if hasattr(self.obj, "UseStartPoint"):
|
||||||
self.obj.UseStartPoint = self.form.useStartPoint.isChecked()
|
# self.obj.UseStartPoint = self.form.useStartPoint.isChecked()
|
||||||
if hasattr(self.obj, "CutMode"):
|
if hasattr(self.obj, "CutMode"):
|
||||||
self.obj.CutMode = str(self.form.cutMode.currentText())
|
self.obj.CutMode = str(self.form.cutMode.currentText())
|
||||||
if hasattr(self.obj, "UseZigZag"):
|
if hasattr(self.obj, "UseZigZag"):
|
||||||
|
@ -454,6 +444,8 @@ class TaskPanel:
|
||||||
self.obj.ZigZagAngle = self.form.zigZagAngle.value()
|
self.obj.ZigZagAngle = self.form.zigZagAngle.value()
|
||||||
if hasattr(self.obj, "StepOver"):
|
if hasattr(self.obj, "StepOver"):
|
||||||
self.obj.StepOver = self.form.stepOverPercent.value()
|
self.obj.StepOver = self.form.stepOverPercent.value()
|
||||||
|
if hasattr(self.obj, "BoundaryShape"):
|
||||||
|
self.obj.BoundaryShape = str(self.form.boundaryShape.currentText())
|
||||||
|
|
||||||
self.obj.Proxy.execute(self.obj)
|
self.obj.Proxy.execute(self.obj)
|
||||||
|
|
||||||
|
@ -461,15 +453,31 @@ class TaskPanel:
|
||||||
self.form.startDepth.setText(str(self.obj.StartDepth.Value))
|
self.form.startDepth.setText(str(self.obj.StartDepth.Value))
|
||||||
self.form.finalDepth.setText(str(self.obj.FinalDepth.Value))
|
self.form.finalDepth.setText(str(self.obj.FinalDepth.Value))
|
||||||
self.form.finishDepth.setText(str(self.obj.FinishDepth.Value))
|
self.form.finishDepth.setText(str(self.obj.FinishDepth.Value))
|
||||||
|
self.form.stepDown.setValue(self.obj.StepDown)
|
||||||
self.form.safeHeight.setText(str(self.obj.SafeHeight.Value))
|
self.form.safeHeight.setText(str(self.obj.SafeHeight.Value))
|
||||||
self.form.clearanceHeight.setText(str(self.obj.ClearanceHeight.Value))
|
self.form.clearanceHeight.setText(str(self.obj.ClearanceHeight.Value))
|
||||||
self.form.stepDown.setValue(self.obj.StepDown)
|
self.form.stepOverPercent.setValue(self.obj.StepOver)
|
||||||
self.form.extraOffset.setValue(self.obj.PassExtension.Value)
|
|
||||||
self.form.useStartPoint.setChecked(self.obj.UseStartPoint)
|
|
||||||
self.form.useZigZag.setChecked(self.obj.UseZigZag)
|
self.form.useZigZag.setChecked(self.obj.UseZigZag)
|
||||||
self.form.zigZagUnidirectional.setChecked(self.obj.ZigUnidirectional)
|
self.form.zigZagUnidirectional.setChecked(self.obj.ZigUnidirectional)
|
||||||
self.form.zigZagAngle.setValue(self.obj.ZigZagAngle)
|
self.form.zigZagAngle.setValue(self.obj.ZigZagAngle)
|
||||||
self.form.stepOverPercent.setValue(self.obj.StepOver)
|
#self.form.useStartPoint.setChecked(self.obj.UseStartPoint)
|
||||||
|
self.form.extraOffset.setValue(self.obj.PassExtension.Value)
|
||||||
|
|
||||||
|
index = self.form.cutMode.findText(
|
||||||
|
self.obj.CutMode, QtCore.Qt.MatchFixedString)
|
||||||
|
if index >=0:
|
||||||
|
|
||||||
|
self.form.cutMode.blockSignals(True)
|
||||||
|
self.form.cutMode.setCurrentIndex(index)
|
||||||
|
self.form.cutMode.blockSignals(False)
|
||||||
|
|
||||||
|
index = self.form.boundaryShape.findText(
|
||||||
|
self.obj.BoundaryShape, QtCore.Qt.MatchFixedString)
|
||||||
|
if index >=0:
|
||||||
|
self.form.boundaryShape.blockSignals(True)
|
||||||
|
self.form.boundaryShape.setCurrentIndex(index)
|
||||||
|
self.form.boundaryShape.blockSignals(False)
|
||||||
|
|
||||||
|
|
||||||
for i in self.obj.Base:
|
for i in self.obj.Base:
|
||||||
for sub in i[1]:
|
for sub in i[1]:
|
||||||
|
@ -508,8 +516,20 @@ class TaskPanel:
|
||||||
dlist = self.form.baseList.selectedItems()
|
dlist = self.form.baseList.selectedItems()
|
||||||
newlist = []
|
newlist = []
|
||||||
for d in dlist:
|
for d in dlist:
|
||||||
|
deletebase = d.text().partition(".")[0]
|
||||||
|
deletesub = d.text().partition(".")[2]
|
||||||
|
|
||||||
for i in self.obj.Base:
|
for i in self.obj.Base:
|
||||||
if i[0].Name != d.text().partition(".")[0] or i[1] != d.text().partition(".")[2]:
|
sublist = []
|
||||||
|
#baseobj = i[0]
|
||||||
|
basesubs = i[1]
|
||||||
|
for sub in basesubs:
|
||||||
|
if sub != deletesub:
|
||||||
|
sublist.append(sub)
|
||||||
|
if len(sublist) >= 1:
|
||||||
|
newlist.append ((deletebase, tuple(sublist)))
|
||||||
|
|
||||||
|
if i[0].Name != d.text().partition(".")[0] and d.text().partition(".")[2] not in i[1]:
|
||||||
newlist.append(i)
|
newlist.append(i)
|
||||||
self.form.baseList.takeItem(self.form.baseList.row(d))
|
self.form.baseList.takeItem(self.form.baseList.row(d))
|
||||||
self.obj.Base = newlist
|
self.obj.Base = newlist
|
||||||
|
@ -517,6 +537,7 @@ class TaskPanel:
|
||||||
FreeCAD.ActiveDocument.recompute()
|
FreeCAD.ActiveDocument.recompute()
|
||||||
|
|
||||||
def itemActivated(self):
|
def itemActivated(self):
|
||||||
|
print self.form.baseList.selectedItems()[0].text()
|
||||||
FreeCADGui.Selection.clearSelection()
|
FreeCADGui.Selection.clearSelection()
|
||||||
slist = self.form.baseList.selectedItems()
|
slist = self.form.baseList.selectedItems()
|
||||||
for i in slist:
|
for i in slist:
|
||||||
|
@ -577,11 +598,9 @@ class TaskPanel:
|
||||||
|
|
||||||
# operation
|
# operation
|
||||||
self.form.cutMode.currentIndexChanged.connect(self.getFields)
|
self.form.cutMode.currentIndexChanged.connect(self.getFields)
|
||||||
self.form.useStartPoint.clicked.connect(self.getFields)
|
#self.form.useStartPoint.clicked.connect(self.getFields)
|
||||||
self.form.extraOffset.editingFinished.connect(self.getFields)
|
self.form.extraOffset.editingFinished.connect(self.getFields)
|
||||||
self.form.boundaryShape.currentIndexChanged.connect(self.getFields)
|
self.form.boundaryShape.currentIndexChanged.connect(self.getFields)
|
||||||
|
|
||||||
# Pattern
|
|
||||||
self.form.stepOverPercent.editingFinished.connect(self.getFields)
|
self.form.stepOverPercent.editingFinished.connect(self.getFields)
|
||||||
self.form.useZigZag.clicked.connect(self.getFields)
|
self.form.useZigZag.clicked.connect(self.getFields)
|
||||||
self.form.zigZagUnidirectional.clicked.connect(self.getFields)
|
self.form.zigZagUnidirectional.clicked.connect(self.getFields)
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
import FreeCAD
|
import FreeCAD
|
||||||
import Path
|
import Path
|
||||||
import numpy
|
import numpy
|
||||||
|
import TechDraw
|
||||||
from FreeCAD import Vector
|
from FreeCAD import Vector
|
||||||
from PathScripts import PathUtils
|
from PathScripts import PathUtils
|
||||||
from PathScripts.PathUtils import depth_params
|
from PathScripts.PathUtils import depth_params
|
||||||
|
@ -58,14 +59,11 @@ class ObjectProfile:
|
||||||
obj.addProperty("App::PropertyString", "Comment", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","An optional comment for this profile"))
|
obj.addProperty("App::PropertyString", "Comment", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","An optional comment for this profile"))
|
||||||
obj.addProperty("App::PropertyString", "UserLabel", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","User Assigned Label"))
|
obj.addProperty("App::PropertyString", "UserLabel", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","User Assigned Label"))
|
||||||
|
|
||||||
obj.addProperty("App::PropertyEnumeration", "Algorithm", "Algorithm", QtCore.QT_TRANSLATE_NOOP("App::Property","The library or algorithm used to generate the path"))
|
|
||||||
obj.Algorithm = ['OCC Native', 'libarea']
|
|
||||||
|
|
||||||
obj.addProperty("App::PropertyIntegerConstraint", "ToolNumber", "Tool", "The tool number in use")
|
obj.addProperty("App::PropertyIntegerConstraint", "ToolNumber", "Tool", "The tool number in use")
|
||||||
obj.ToolNumber = (0, 0, 1000, 1)
|
obj.ToolNumber = (0, 0, 1000, 1)
|
||||||
obj.setEditorMode('ToolNumber', 1) # make this read only
|
obj.setEditorMode('ToolNumber', 1) # make this read only
|
||||||
obj.addProperty("App::PropertyString", "ToolDescription", "Tool", "The description of the tool ")
|
obj.addProperty("App::PropertyString", "ToolDescription", "Tool", "The description of the tool ")
|
||||||
obj.setEditorMode('ToolDescription', 1) # make this read onlyt
|
obj.setEditorMode('ToolDescription', 1) # make this read only
|
||||||
|
|
||||||
# Depth Properties
|
# Depth Properties
|
||||||
obj.addProperty("App::PropertyDistance", "ClearanceHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","The height needed to clear clamps and obstructions"))
|
obj.addProperty("App::PropertyDistance", "ClearanceHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","The height needed to clear clamps and obstructions"))
|
||||||
|
@ -98,7 +96,8 @@ class ObjectProfile:
|
||||||
obj.addProperty("App::PropertyDistance", "OffsetExtra", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Extra value to stay away from final profile- good for roughing toolpath"))
|
obj.addProperty("App::PropertyDistance", "OffsetExtra", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Extra value to stay away from final profile- good for roughing toolpath"))
|
||||||
obj.addProperty("App::PropertyLength", "SegLen", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Tesselation value for tool paths made from beziers, bsplines, and ellipses"))
|
obj.addProperty("App::PropertyLength", "SegLen", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Tesselation value for tool paths made from beziers, bsplines, and ellipses"))
|
||||||
obj.addProperty("App::PropertyAngle", "PlungeAngle", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Plunge angle with which the tool enters the work piece. Straight down is 90 degrees, if set small enough or zero the tool will descent exactly one layer depth down per turn"))
|
obj.addProperty("App::PropertyAngle", "PlungeAngle", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Plunge angle with which the tool enters the work piece. Straight down is 90 degrees, if set small enough or zero the tool will descent exactly one layer depth down per turn"))
|
||||||
obj.addProperty("App::PropertyBool", "processHoles", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Handl holes as well as the outline"))
|
obj.addProperty("App::PropertyBool", "processHoles", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Profile holes as well as the outline"))
|
||||||
|
obj.addProperty("App::PropertyBool", "processPerimeter", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Profile the outline"))
|
||||||
|
|
||||||
obj.addProperty("App::PropertyVectorList", "locs", "Tags", QtCore.QT_TRANSLATE_NOOP("App::Property","List of holding tag locations"))
|
obj.addProperty("App::PropertyVectorList", "locs", "Tags", QtCore.QT_TRANSLATE_NOOP("App::Property","List of holding tag locations"))
|
||||||
|
|
||||||
|
@ -114,7 +113,6 @@ class ObjectProfile:
|
||||||
obj.angles = angles
|
obj.angles = angles
|
||||||
obj.lengths = lengths
|
obj.lengths = lengths
|
||||||
obj.heights = heights
|
obj.heights = heights
|
||||||
#obj.ToolDescription = "UNDEFINED"
|
|
||||||
|
|
||||||
obj.Proxy = self
|
obj.Proxy = self
|
||||||
|
|
||||||
|
@ -167,29 +165,6 @@ class ObjectProfile:
|
||||||
obj.Base = baselist
|
obj.Base = baselist
|
||||||
self.execute(obj)
|
self.execute(obj)
|
||||||
|
|
||||||
def _buildPathOCC(self, obj, wire):
|
|
||||||
import DraftGeomUtils
|
|
||||||
output = ""
|
|
||||||
if obj.Comment != "":
|
|
||||||
output += '(' + str(obj.Comment)+')\n'
|
|
||||||
|
|
||||||
if obj.Direction == 'CCW':
|
|
||||||
clockwise = False
|
|
||||||
else:
|
|
||||||
clockwise = True
|
|
||||||
|
|
||||||
FirstEdge = None
|
|
||||||
PathClosed = DraftGeomUtils.isReallyClosed(wire)
|
|
||||||
|
|
||||||
output += PathUtils.MakePath(
|
|
||||||
wire, obj.Side, self.radius, clockwise,
|
|
||||||
obj.ClearanceHeight.Value, obj.StepDown, obj.StartDepth.Value,
|
|
||||||
obj.FinalDepth.Value, FirstEdge, PathClosed, obj.SegLen.Value,
|
|
||||||
self.vertFeed, self.horizFeed, self.vertRapid, self.horizRapid,
|
|
||||||
PlungeAngle=obj.PlungeAngle.Value)
|
|
||||||
|
|
||||||
return output
|
|
||||||
|
|
||||||
def _buildPathLibarea(self, obj, edgelist, isHole):
|
def _buildPathLibarea(self, obj, edgelist, isHole):
|
||||||
import PathScripts.PathKurveUtils as PathKurveUtils
|
import PathScripts.PathKurveUtils as PathKurveUtils
|
||||||
import math
|
import math
|
||||||
|
@ -228,7 +203,6 @@ print "y - " + str(point.y)
|
||||||
start location
|
start location
|
||||||
CRC
|
CRC
|
||||||
or probably other features in heekscnc'''
|
or probably other features in heekscnc'''
|
||||||
# output += PathKurveUtils.profile(curve, side, radius, vf, hf, offset_extra, rapid_safety_space, clearance, start_depth, step_down, final_depth, use_CRC)
|
|
||||||
|
|
||||||
'''The following calls the original procedure from h
|
'''The following calls the original procedure from h
|
||||||
toolLoad = obj.activeTCeekscnc profile function. This, in turn, calls many other procedures to modify the profile.
|
toolLoad = obj.activeTCeekscnc profile function. This, in turn, calls many other procedures to modify the profile.
|
||||||
|
@ -273,8 +247,6 @@ print "y - " + str(point.y)
|
||||||
output = ""
|
output = ""
|
||||||
|
|
||||||
toolLoad = PathUtils.getLastToolLoad(obj)
|
toolLoad = PathUtils.getLastToolLoad(obj)
|
||||||
# obj.ToolController = PathUtils.getToolControllers(obj)
|
|
||||||
# toolLoad = PathUtils.getToolLoad(obj, obj.ToolController)
|
|
||||||
|
|
||||||
if toolLoad is None or toolLoad.ToolNumber == 0:
|
if toolLoad is None or toolLoad.ToolNumber == 0:
|
||||||
self.vertFeed = 100
|
self.vertFeed = 100
|
||||||
|
@ -309,62 +281,32 @@ print "y - " + str(point.y)
|
||||||
output += "(Uncompensated Tool Path)"
|
output += "(Uncompensated Tool Path)"
|
||||||
|
|
||||||
if obj.Base:
|
if obj.Base:
|
||||||
hfaces = []
|
|
||||||
vfaces = []
|
|
||||||
wires = []
|
|
||||||
holes = []
|
holes = []
|
||||||
|
faces = []
|
||||||
for b in obj.Base:
|
for b in obj.Base:
|
||||||
for sub in b[1]:
|
for sub in b[1]:
|
||||||
# we only consider the outer wire if this is a Face
|
|
||||||
# Horizontal and vertical faces are handled differently
|
|
||||||
shape = getattr(b[0].Shape, sub)
|
shape = getattr(b[0].Shape, sub)
|
||||||
if numpy.isclose(abs(shape.normalAt(0, 0).z), 1): # horizontal face
|
if isinstance (shape, Part.Face):
|
||||||
hfaces.append(shape)
|
faces.append(shape)
|
||||||
|
if numpy.isclose(abs(shape.normalAt(0, 0).z), 1): # horizontal face
|
||||||
|
holes += shape.Wires[1:]
|
||||||
|
|
||||||
elif numpy.isclose(shape.normalAt(0, 0).z, 0): # vertical face
|
|
||||||
vfaces.append(shape)
|
|
||||||
else:
|
else:
|
||||||
FreeCAD.Console.PrintError(translate("Path", "Face doesn't appear to be parallel or perpendicular to the XY plane. No path will be generated for: \n"))
|
print ("found a base object which is not a face. Can't continue.")
|
||||||
FreeCAD.Console.PrintError(b[0].Name + "." + sub + "\n")
|
return
|
||||||
|
profileshape = Part.makeCompound(faces)
|
||||||
|
profilewire = TechDraw.findShapeOutline(profileshape, 1, Vector(0,0,1))
|
||||||
|
|
||||||
if obj.processHoles:
|
if obj.processHoles:
|
||||||
for h in hfaces:
|
for wire in holes:
|
||||||
holes += h.Wires[1:]
|
|
||||||
|
|
||||||
for h in hfaces:
|
|
||||||
wires.append(h.OuterWire)
|
|
||||||
|
|
||||||
tempshell = Part.makeShell(vfaces)
|
|
||||||
slices = tempshell.slice(FreeCAD.Base.Vector(0, 0, 1), tempshell.CenterOfMass.z )
|
|
||||||
|
|
||||||
wires = wires + slices
|
|
||||||
|
|
||||||
for wire in holes:
|
|
||||||
if obj.Algorithm == "OCC Native":
|
|
||||||
output += self._buildPathOCC(obj, wire)
|
|
||||||
else:
|
|
||||||
try:
|
|
||||||
import area
|
|
||||||
except:
|
|
||||||
FreeCAD.Console.PrintError(translate("Path", "libarea needs to be installed for this command to work.\n"))
|
|
||||||
return
|
|
||||||
edgelist = wire.Edges
|
edgelist = wire.Edges
|
||||||
edgelist = Part.__sortEdges__(edgelist)
|
edgelist = Part.__sortEdges__(edgelist)
|
||||||
output += self._buildPathLibarea(obj, edgelist, True)
|
output += self._buildPathLibarea(obj, edgelist, True)
|
||||||
|
|
||||||
for wire in wires:
|
if obj.processPerimeter:
|
||||||
if obj.Algorithm == "OCC Native":
|
edgelist = profilewire.Edges
|
||||||
output += self._buildPathOCC(obj, wire)
|
edgelist = Part.__sortEdges__(edgelist)
|
||||||
else:
|
output += self._buildPathLibarea(obj, edgelist, False)
|
||||||
try:
|
|
||||||
import area
|
|
||||||
except:
|
|
||||||
FreeCAD.Console.PrintError(translate("Path", "libarea needs to be installed for this command to work.\n"))
|
|
||||||
return
|
|
||||||
edgelist = wire.Edges
|
|
||||||
edgelist = Part.__sortEdges__(edgelist)
|
|
||||||
output += self._buildPathLibarea(obj, edgelist, False)
|
|
||||||
|
|
||||||
if obj.Active:
|
if obj.Active:
|
||||||
path = Path.Path(output)
|
path = Path.Path(output)
|
||||||
|
@ -500,12 +442,9 @@ class CommandPathProfile:
|
||||||
FreeCADGui.addModule("PathScripts.PathProfile")
|
FreeCADGui.addModule("PathScripts.PathProfile")
|
||||||
FreeCADGui.doCommand('obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython", "Profile")')
|
FreeCADGui.doCommand('obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython", "Profile")')
|
||||||
FreeCADGui.doCommand('PathScripts.PathProfile.ObjectProfile(obj)')
|
FreeCADGui.doCommand('PathScripts.PathProfile.ObjectProfile(obj)')
|
||||||
FreeCADGui.doCommand('PathScripts.PathProfile._ViewProviderProfile(obj.ViewObject)')
|
|
||||||
|
|
||||||
FreeCADGui.doCommand('obj.Active = True')
|
FreeCADGui.doCommand('obj.Active = True')
|
||||||
|
|
||||||
FreeCADGui.doCommand('obj.Algorithm = "libarea"')
|
|
||||||
|
|
||||||
FreeCADGui.doCommand('obj.ClearanceHeight = ' + str(ztop + 10.0))
|
FreeCADGui.doCommand('obj.ClearanceHeight = ' + str(ztop + 10.0))
|
||||||
FreeCADGui.doCommand('obj.StepDown = 1.0')
|
FreeCADGui.doCommand('obj.StepDown = 1.0')
|
||||||
FreeCADGui.doCommand('obj.StartDepth= ' + str(ztop))
|
FreeCADGui.doCommand('obj.StartDepth= ' + str(ztop))
|
||||||
|
@ -514,11 +453,12 @@ class CommandPathProfile:
|
||||||
FreeCADGui.doCommand('obj.SafeHeight = ' + str(ztop + 2.0))
|
FreeCADGui.doCommand('obj.SafeHeight = ' + str(ztop + 2.0))
|
||||||
FreeCADGui.doCommand('obj.Side = "Left"')
|
FreeCADGui.doCommand('obj.Side = "Left"')
|
||||||
FreeCADGui.doCommand('obj.OffsetExtra = 0.0')
|
FreeCADGui.doCommand('obj.OffsetExtra = 0.0')
|
||||||
FreeCADGui.doCommand('obj.Direction = "CW"')
|
FreeCADGui.doCommand('obj.Direction = "CCW"')
|
||||||
FreeCADGui.doCommand('obj.UseComp = False')
|
FreeCADGui.doCommand('obj.UseComp = False')
|
||||||
FreeCADGui.doCommand('obj.processHoles = False')
|
FreeCADGui.doCommand('obj.processHoles = False')
|
||||||
|
FreeCADGui.doCommand('obj.processPerimeter = True')
|
||||||
FreeCADGui.doCommand('obj.PlungeAngle = 90.0')
|
FreeCADGui.doCommand('obj.PlungeAngle = 90.0')
|
||||||
#FreeCADGui.doCommand('obj.ActiveTC = None')
|
FreeCADGui.doCommand('PathScripts.PathProfile._ViewProviderProfile(obj.ViewObject)')
|
||||||
FreeCADGui.doCommand('PathScripts.PathUtils.addToJob(obj)')
|
FreeCADGui.doCommand('PathScripts.PathUtils.addToJob(obj)')
|
||||||
|
|
||||||
FreeCAD.ActiveDocument.commitTransaction()
|
FreeCAD.ActiveDocument.commitTransaction()
|
||||||
|
@ -570,14 +510,14 @@ class TaskPanel:
|
||||||
self.obj.UseStartPoint = self.form.useStartPoint.isChecked()
|
self.obj.UseStartPoint = self.form.useStartPoint.isChecked()
|
||||||
if hasattr(self.obj, "UseEndPoint"):
|
if hasattr(self.obj, "UseEndPoint"):
|
||||||
self.obj.UseEndPoint = self.form.useEndPoint.isChecked()
|
self.obj.UseEndPoint = self.form.useEndPoint.isChecked()
|
||||||
if hasattr(self.obj, "Algorithm"):
|
|
||||||
self.obj.Algorithm = str(self.form.algorithmSelect.currentText())
|
|
||||||
if hasattr(self.obj, "Side"):
|
if hasattr(self.obj, "Side"):
|
||||||
self.obj.Side = str(self.form.cutSide.currentText())
|
self.obj.Side = str(self.form.cutSide.currentText())
|
||||||
if hasattr(self.obj, "Direction"):
|
if hasattr(self.obj, "Direction"):
|
||||||
self.obj.Direction = str(self.form.direction.currentText())
|
self.obj.Direction = str(self.form.direction.currentText())
|
||||||
if hasattr(self.obj, "processHoles"):
|
if hasattr(self.obj, "processHoles"):
|
||||||
self.obj.processHoles = self.form.processHoles.isChecked()
|
self.obj.processHoles = self.form.processHoles.isChecked()
|
||||||
|
if hasattr(self.obj, "processPerimeter"):
|
||||||
|
self.obj.processPerimeter = self.form.processPerimeter.isChecked()
|
||||||
self.obj.Proxy.execute(self.obj)
|
self.obj.Proxy.execute(self.obj)
|
||||||
|
|
||||||
def setFields(self):
|
def setFields(self):
|
||||||
|
@ -594,13 +534,7 @@ class TaskPanel:
|
||||||
self.form.useStartPoint.setChecked(self.obj.UseStartPoint)
|
self.form.useStartPoint.setChecked(self.obj.UseStartPoint)
|
||||||
self.form.useEndPoint.setChecked(self.obj.UseEndPoint)
|
self.form.useEndPoint.setChecked(self.obj.UseEndPoint)
|
||||||
self.form.processHoles.setChecked(self.obj.processHoles)
|
self.form.processHoles.setChecked(self.obj.processHoles)
|
||||||
|
self.form.processPerimeter.setChecked(self.obj.processPerimeter)
|
||||||
index = self.form.algorithmSelect.findText(
|
|
||||||
self.obj.Algorithm, QtCore.Qt.MatchFixedString)
|
|
||||||
if index >= 0:
|
|
||||||
self.form.algorithmSelect.blockSignals(True)
|
|
||||||
self.form.algorithmSelect.setCurrentIndex(index)
|
|
||||||
self.form.algorithmSelect.blockSignals(False)
|
|
||||||
|
|
||||||
index = self.form.cutSide.findText(
|
index = self.form.cutSide.findText(
|
||||||
self.obj.Side, QtCore.Qt.MatchFixedString)
|
self.obj.Side, QtCore.Qt.MatchFixedString)
|
||||||
|
@ -616,10 +550,13 @@ class TaskPanel:
|
||||||
self.form.direction.setCurrentIndex(index)
|
self.form.direction.setCurrentIndex(index)
|
||||||
self.form.direction.blockSignals(False)
|
self.form.direction.blockSignals(False)
|
||||||
|
|
||||||
|
self.form.baseList.blockSignals(True)
|
||||||
for i in self.obj.Base:
|
for i in self.obj.Base:
|
||||||
for sub in i[1]:
|
for sub in i[1]:
|
||||||
self.form.baseList.addItem(i[0].Name + "." + sub)
|
self.form.baseList.addItem(i[0].Name + "." + sub)
|
||||||
|
self.form.baseList.blockSignals(False)
|
||||||
|
|
||||||
|
self.form.tagTree.blockSignals(True)
|
||||||
for i in range(len(self.obj.locs)):
|
for i in range(len(self.obj.locs)):
|
||||||
item = QtGui.QTreeWidgetItem(self.form.tagTree)
|
item = QtGui.QTreeWidgetItem(self.form.tagTree)
|
||||||
item.setText(0, str(i+1))
|
item.setText(0, str(i+1))
|
||||||
|
@ -630,6 +567,9 @@ class TaskPanel:
|
||||||
item.setText(4, str(self.obj.angles[i]))
|
item.setText(4, str(self.obj.angles[i]))
|
||||||
item.setFlags(item.flags() | QtCore.Qt.ItemIsEditable)
|
item.setFlags(item.flags() | QtCore.Qt.ItemIsEditable)
|
||||||
item.setTextAlignment(0, QtCore.Qt.AlignLeft)
|
item.setTextAlignment(0, QtCore.Qt.AlignLeft)
|
||||||
|
self.form.tagTree.blockSignals(False)
|
||||||
|
self.form.update()
|
||||||
|
|
||||||
|
|
||||||
def open(self):
|
def open(self):
|
||||||
self.s = SelObserver()
|
self.s = SelObserver()
|
||||||
|
@ -807,7 +747,6 @@ class TaskPanel:
|
||||||
self.form.clearanceHeight.editingFinished.connect(self.getFields)
|
self.form.clearanceHeight.editingFinished.connect(self.getFields)
|
||||||
|
|
||||||
# operation
|
# operation
|
||||||
self.form.algorithmSelect.currentIndexChanged.connect(self.getFields)
|
|
||||||
self.form.cutSide.currentIndexChanged.connect(self.getFields)
|
self.form.cutSide.currentIndexChanged.connect(self.getFields)
|
||||||
self.form.direction.currentIndexChanged.connect(self.getFields)
|
self.form.direction.currentIndexChanged.connect(self.getFields)
|
||||||
self.form.useCompensation.clicked.connect(self.getFields)
|
self.form.useCompensation.clicked.connect(self.getFields)
|
||||||
|
@ -817,6 +756,7 @@ class TaskPanel:
|
||||||
self.form.segLen.editingFinished.connect(self.getFields)
|
self.form.segLen.editingFinished.connect(self.getFields)
|
||||||
self.form.rollRadius.editingFinished.connect(self.getFields)
|
self.form.rollRadius.editingFinished.connect(self.getFields)
|
||||||
self.form.processHoles.clicked.connect(self.getFields)
|
self.form.processHoles.clicked.connect(self.getFields)
|
||||||
|
self.form.processPerimeter.clicked.connect(self.getFields)
|
||||||
|
|
||||||
# Tag Form
|
# Tag Form
|
||||||
QtCore.QObject.connect(
|
QtCore.QObject.connect(
|
||||||
|
|
|
@ -528,11 +528,13 @@ class TaskPanel:
|
||||||
self.obj.Direction, QtCore.Qt.MatchFixedString)
|
self.obj.Direction, QtCore.Qt.MatchFixedString)
|
||||||
if index >= 0:
|
if index >= 0:
|
||||||
self.form.direction.setCurrentIndex(index)
|
self.form.direction.setCurrentIndex(index)
|
||||||
|
self.form.baseList.blockSignals(True)
|
||||||
for i in self.obj.Base:
|
for i in self.obj.Base:
|
||||||
for sub in i[1]:
|
for sub in i[1]:
|
||||||
self.form.baseList.addItem(i[0].Name + "." + sub)
|
self.form.baseList.addItem(i[0].Name + "." + sub)
|
||||||
|
self.form.baseList.blockSignals(False)
|
||||||
|
|
||||||
|
self.form.tagTree.blockSignals(True)
|
||||||
for i in range(len(self.obj.locs)):
|
for i in range(len(self.obj.locs)):
|
||||||
item = QtGui.QTreeWidgetItem(self.form.tagTree)
|
item = QtGui.QTreeWidgetItem(self.form.tagTree)
|
||||||
item.setText(0, str(i+1))
|
item.setText(0, str(i+1))
|
||||||
|
@ -543,6 +545,8 @@ class TaskPanel:
|
||||||
item.setText(4, str(self.obj.angles[i]))
|
item.setText(4, str(self.obj.angles[i]))
|
||||||
item.setFlags(item.flags() | QtCore.Qt.ItemIsEditable)
|
item.setFlags(item.flags() | QtCore.Qt.ItemIsEditable)
|
||||||
item.setTextAlignment(0, QtCore.Qt.AlignLeft)
|
item.setTextAlignment(0, QtCore.Qt.AlignLeft)
|
||||||
|
self.form.tagTree.blockSignals(False)
|
||||||
|
|
||||||
|
|
||||||
def open(self):
|
def open(self):
|
||||||
self.s = SelObserver()
|
self.s = SelObserver()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user