update README + UI
This commit is contained in:
parent
eee63985d7
commit
a5e4966b82
|
|
@ -67,7 +67,7 @@ class WindowDialog():
|
|||
|
||||
FreeCAD.activeDocument().recompute()
|
||||
|
||||
def _exportSketchCalepinage(self, sketchList, plateLength, plateWidth, spacing, laserSize):
|
||||
def _exportSketchCalepinage(self, sketchList, plateLength, plateWidth, spacing):
|
||||
copy_sketchList = sketchList[:]
|
||||
__obj__ = []
|
||||
currentX = 0.0
|
||||
|
|
@ -159,8 +159,9 @@ class WindowDialog():
|
|||
plateLength = self.form.doubleSpinBoxLength.value()
|
||||
plateWidth = self.form.doubleSpinBoxWidth.value()
|
||||
spacing = self.form.doubleSpinBoxSpacing.value()
|
||||
laserSize = self.form.doubleSpinBoxLaserSize.value()
|
||||
# laserSize = self.form.doubleSpinBoxLaserSize.value()
|
||||
sketchList = []
|
||||
|
||||
for selectedObject in FreeCADGui.Selection.getSelectionEx():
|
||||
if hasattr(selectedObject.Object, 'Dir'):
|
||||
sv0 = Draft.make_shape2dview(selectedObject.Object, FreeCAD.Vector(selectedObject.Object.Dir))
|
||||
|
|
@ -179,10 +180,13 @@ class WindowDialog():
|
|||
FreeCAD.ActiveDocument.removeObject(sv0.Name)
|
||||
|
||||
if isCalepinage:
|
||||
self._exportSketchCalepinage(sketchList, plateLength, plateWidth, spacing, laserSize)
|
||||
self._exportSketchCalepinage(sketchList, plateLength, plateWidth, spacing)
|
||||
else:
|
||||
self._exportSketchBasic(sketchList)
|
||||
|
||||
FreeCADGui.Selection.clearSelection()
|
||||
self._populate_selector_list()
|
||||
|
||||
def exportSTL(self, singleMode):
|
||||
__obj__ = []
|
||||
for selectedObject in FreeCADGui.Selection.getSelectionEx():
|
||||
|
|
@ -209,9 +213,12 @@ class WindowDialog():
|
|||
print(f'Export STL de {os.path.basename(self.outputRacine)}.stl')
|
||||
del __obj__
|
||||
|
||||
FreeCADGui.Selection.clearSelection()
|
||||
self._populate_selector_list()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
d = WindowDialog()
|
||||
WindowDialog()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
|
@ -17,13 +17,13 @@
|
|||
<string notr="true">Multi Exporting</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="10" column="0" colspan="3">
|
||||
<widget class="QListWidget" name="listWidgetSelector">
|
||||
<item row="10" column="0" colspan="3">
|
||||
<widget class="QListWidget" name="listWidgetSelector">
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::MultiSelection</enum>
|
||||
<enum>QAbstractItemView::MultiSelection</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="0" colspan="3">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
|
|
@ -31,13 +31,13 @@
|
|||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string notr="true">Export SVG</string>
|
||||
<string notr="true">Exportation SVG</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="locale">
|
||||
<locale language="French" country="France" />
|
||||
<locale language="French" country="France"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">Longueur du plateau (mm) :</string>
|
||||
|
|
@ -47,10 +47,10 @@
|
|||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBoxLength">
|
||||
<property name="maximum">
|
||||
<double>999999.000000000000000</double>
|
||||
<double>999999.0</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>50.000000000000000</double>
|
||||
<double>729.0</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
@ -64,10 +64,10 @@
|
|||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBoxWidth">
|
||||
<property name="maximum">
|
||||
<double>999999.000000000000000</double>
|
||||
<double>999999.0</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>50.000000000000000</double>
|
||||
<double>430.0</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
@ -81,27 +81,10 @@
|
|||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBoxSpacing">
|
||||
<property name="maximum">
|
||||
<double>999999.000000000000000</double>
|
||||
<double>999999.0</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>5.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label4">
|
||||
<property name="text">
|
||||
<string notr="true">Epaisseur du laser (mm) :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBoxLaserSize">
|
||||
<property name="maximum">
|
||||
<double>999999.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>5.000000000000000</double>
|
||||
<double>5.0</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
@ -123,9 +106,6 @@
|
|||
<property name="text">
|
||||
<string>Export en .svg (calepinage)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
|
@ -139,9 +119,6 @@
|
|||
<property name="text">
|
||||
<string>Export en .svg (sans calepinage)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
|
@ -154,7 +131,7 @@
|
|||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
<string notr="true">Export STL</string>
|
||||
<string notr="true">Exportation STL</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="0">
|
||||
|
|
@ -162,9 +139,6 @@
|
|||
<property name="text">
|
||||
<string>Export en .stl (single)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
|
@ -178,9 +152,6 @@
|
|||
<property name="text">
|
||||
<string>Export en .stl (multi)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
|
@ -208,6 +179,6 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources />
|
||||
<connections />
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
@ -19,8 +19,6 @@ Vous trouverez dans cet onglet 4 champs à remplir :
|
|||
- la longueur du plateau de découpe (en millimètre)
|
||||
- la largeur du plateau de découpe (en millimètre)
|
||||
- l'espacement entre chaque schéma de découpe lors de l'exportation (en millimètre)
|
||||
- (*l'épaisseur du laser (en millimètre)*)
|
||||
**-- NON FONCTIONNEL --**
|
||||
|
||||
Ensuite, vous avez le choix entre 2 algorithmes d'exportation : avec ou sans calepinage.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue