UI update + add help tooltip
This commit is contained in:
parent
f847a7c91b
commit
6ce6b6b0cd
|
|
@ -51,7 +51,7 @@ class WindowDialog():
|
||||||
FreeCADGui.Selection.clearSelection()
|
FreeCADGui.Selection.clearSelection()
|
||||||
|
|
||||||
for obj in FreeCAD.ActiveDocument.Objects:
|
for obj in FreeCAD.ActiveDocument.Objects:
|
||||||
if obj.Label.startswith("SVG-") or obj.Label.startswith("STL-"):
|
if obj.Label.endswith("-SVG") or obj.Label.endswith("-STL"):
|
||||||
item = QListWidgetItem()
|
item = QListWidgetItem()
|
||||||
widget = ObjectListItem(obj)
|
widget = ObjectListItem(obj)
|
||||||
|
|
||||||
|
|
@ -209,7 +209,7 @@ class WindowDialog():
|
||||||
sketchList = []
|
sketchList = []
|
||||||
|
|
||||||
for obj in FreeCADGui.Selection.getSelection():
|
for obj in FreeCADGui.Selection.getSelection():
|
||||||
if not obj.Label.startswith("SVG-"):
|
if not obj.Label.endswith("-SVG"):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
count = 1 # default if not using spinboxes (or fetch from list if desired)
|
count = 1 # default if not using spinboxes (or fetch from list if desired)
|
||||||
|
|
@ -252,7 +252,7 @@ class WindowDialog():
|
||||||
objects_to_export = []
|
objects_to_export = []
|
||||||
|
|
||||||
for obj in FreeCADGui.Selection.getSelection():
|
for obj in FreeCADGui.Selection.getSelection():
|
||||||
if not obj.Label.startswith("STL-"):
|
if not obj.Label.endswith("-STL"):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
count = 1
|
count = 1
|
||||||
|
|
@ -301,4 +301,4 @@ if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
mainWindow = WindowDialog()
|
mainWindow = WindowDialog()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
|
|
||||||
|
|
@ -10,21 +10,49 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>500</width>
|
<width>500</width>
|
||||||
<height>400</height>
|
<height>500</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string notr="true">Multi Export</string>
|
<string notr="true">Multi Export</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0" colspan="3">
|
<item row="0">
|
||||||
|
<widget class="QLabel" name="labelHelp">
|
||||||
|
<property name="text">
|
||||||
|
<string>❓</string>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>15</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>
|
||||||
|
AIDE :
|
||||||
|
|
||||||
|
Tout d'abord, vous devez renommer les éléments que vous souhaitez exporter en faisant finir soit par "-STL" soit par "-SVG".
|
||||||
|
Vous verrez alors ces éléments dans la liste présente dans la fenêtre de la macro. Vous pouvez désélectionner ou resélectionner des éléments grâce à cette liste.
|
||||||
|
Ensuite, vous pouvez spécifier le nombre de fois que vous souhaitez exporter un élément.
|
||||||
|
|
||||||
|
Les dimensions du plateau de découpe à spécifier correspondent aux dimensions pour la découpeuse laser (les valeurs par défaut sont celles de la Trotec).
|
||||||
|
Vous avez ensuite 2 options optionnelles, une pour chaque exportation :
|
||||||
|
- pour l'exportation SVG, vous pouvez utiliser un algorithme de calepinage qui limitera au maximum le nombre de fichiers créés lors de l'exportation (par défaut, crée un fichier par élément).
|
||||||
|
- pour l'exportation STL, vous pouvez choisir de convertir chaque élément en un seul et unique fichier STL, les éléments ne seront plus considérés comme des éléments indépendants (par défaut, crée un fichier par élément).
|
||||||
|
|
||||||
|
Enfin, il ne vous reste plus qu'à cliquer sur le bouton Exporter et la macro se chargera de tout exporter d'un coup dans un dossier créé à l'emplacement du document.
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="3">
|
||||||
<widget class="QListWidget" name="listWidgetSelector">
|
<widget class="QListWidget" name="listWidgetSelector">
|
||||||
<property name="selectionMode">
|
<property name="selectionMode">
|
||||||
<enum>QAbstractItemView::MultiSelection</enum>
|
<enum>QAbstractItemView::MultiSelection</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="2" column="0">
|
||||||
<spacer name="verticalSpacer1">
|
<spacer name="verticalSpacer1">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
|
@ -37,7 +65,7 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" colspan="2">
|
<item row="3" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="labelDecoupe">
|
<widget class="QLabel" name="labelDecoupe">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">Dimensions du plateau de découpe</string>
|
<string notr="true">Dimensions du plateau de découpe</string>
|
||||||
|
|
@ -49,7 +77,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="2">
|
<item row="4" column="0" colspan="2">
|
||||||
<widget class="QWidget" name="containerWidget">
|
<widget class="QWidget" name="containerWidget">
|
||||||
<layout class="QGridLayout" name="gridLayout2">
|
<layout class="QGridLayout" name="gridLayout2">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
|
|
@ -139,7 +167,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="6" column="0">
|
||||||
<spacer name="verticalSpacer3">
|
<spacer name="verticalSpacer3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
|
@ -152,7 +180,7 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1" colspan="2">
|
<item row="7" column="1" colspan="2">
|
||||||
<widget class="QPushButton" name="pushButtonExport">
|
<widget class="QPushButton" name="pushButtonExport">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">Exporter</string>
|
<string notr="true">Exporter</string>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue