update filenames when exported + fix buttons name
This commit is contained in:
parent
a5e4966b82
commit
31c1885d23
|
|
@ -58,11 +58,8 @@ class WindowDialog():
|
|||
|
||||
print('Export SVG de : ' + __obj__[0].Label)
|
||||
|
||||
oldPlace = __obj__[0].Placement
|
||||
__obj__[0].Placement=FreeCAD.Placement(FreeCAD.Vector(0,0,0), FreeCAD.Rotation(FreeCAD.Vector(1,0,0),0), FreeCAD.Vector(0,0,0))
|
||||
fichierSVG = u"" + self.outputRacine + '--' + __obj__[0].Label + '.svg'
|
||||
fichierSVG = u"" + self.outputRacine + __obj__[0].Label + '.svg'
|
||||
importSVG.export(__obj__, fichierSVG)
|
||||
__obj__[0].Placement = oldPlace
|
||||
FreeCAD.ActiveDocument.removeObject(__O__.Label)
|
||||
|
||||
FreeCAD.activeDocument().recompute()
|
||||
|
|
@ -131,8 +128,8 @@ class WindowDialog():
|
|||
FreeCAD.activeDocument().recompute()
|
||||
|
||||
if listSize <= 0 or isSVGFull:
|
||||
fichierSVG = u"" + self.outputRacine + '--CALEPINAGE-' + str(SVGNameCounter) + '.svg'
|
||||
print('Export SVG de : ' + u"" + str(os.path.basename(self.outputRacine)) + '--CALEPINAGE-' + str(SVGNameCounter) + '.svg')
|
||||
fichierSVG = u"" + self.outputRacine + 'CALEPINAGE-' + str(SVGNameCounter) + '.svg'
|
||||
print('Export SVG de : ' + u"" + str(os.path.basename(self.outputRacine)) + 'CALEPINAGE-' + str(SVGNameCounter) + '.svg')
|
||||
importSVG.export(__obj__, fichierSVG)
|
||||
for __i__ in __obj__:
|
||||
FreeCAD.ActiveDocument.removeObject(__i__.Label)
|
||||
|
|
@ -192,7 +189,7 @@ class WindowDialog():
|
|||
for selectedObject in FreeCADGui.Selection.getSelectionEx():
|
||||
__obj__.append(selectedObject.Object)
|
||||
if not singleMode:
|
||||
filename = u"" + self.outputRacine + '--' + __obj__[0].Label + '.stl'
|
||||
filename = u"" + self.outputRacine + __obj__[0].Label + '.stl'
|
||||
if hasattr(Mesh, "exportOptions"):
|
||||
options = Mesh.exportOptions(self.outputRacine)
|
||||
Mesh.export(__obj__, filename, options)
|
||||
|
|
@ -201,7 +198,7 @@ class WindowDialog():
|
|||
print(f'Export STL de : {__obj__[0].Label}.stl')
|
||||
__obj__.clear()
|
||||
if singleMode:
|
||||
filename = u"" + self.outputRacine + '--' + __obj__[0].Label + '.stl' if len(__obj__) == 1 else u"" + self.outputRacine + '.stl'
|
||||
filename = u"" + self.outputRacine + __obj__[0].Label + '.stl' if len(__obj__) == 1 else u"" + self.outputRacine + f"{FreeCAD.activeDocument().Name}.stl"
|
||||
if hasattr(Mesh, "exportOptions"):
|
||||
options = Mesh.exportOptions(self.outputRacine)
|
||||
Mesh.export(__obj__, filename, options)
|
||||
|
|
@ -210,7 +207,7 @@ class WindowDialog():
|
|||
if len(__obj__) == 1:
|
||||
print(f'Export STL de : {__obj__[0].Label}.stl')
|
||||
else:
|
||||
print(f'Export STL de {os.path.basename(self.outputRacine)}.stl')
|
||||
print(f'Export STL de : {FreeCAD.activeDocument().Name}.stl')
|
||||
del __obj__
|
||||
|
||||
FreeCADGui.Selection.clearSelection()
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@
|
|||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pushButtonSTLSingle">
|
||||
<property name="text">
|
||||
<string>Export en .stl (single)</string>
|
||||
<string>Export en .stl (combiné)</string>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
|
|
@ -150,7 +150,7 @@
|
|||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="pushButtonSTLMulti">
|
||||
<property name="text">
|
||||
<string>Export en .stl (multi)</string>
|
||||
<string>Export en .stl (séparé)</string>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ Le second algorithme se contentera juste de faire un fichier d'exportation par
|
|||
|
||||
### Exportation en .stl (Impression 3D)
|
||||
|
||||
Pour l'exportation en .stl, c'est beaucoup plus simple. Il y a seulement deux boutons : *single* et *multi*
|
||||
Pour l'exportation en .stl, c'est beaucoup plus simple. Il y a seulement deux boutons : *combiné* et *séparé*
|
||||
|
||||
Le bouton *multi* exportera un seul élément par fichier, tandis que le bouton *single* exportera tous les élements dans un seul fichier.
|
||||
Le bouton *séparé* exportera un seul élément par fichier, tandis que le bouton *combiné* exportera tous les élements dans un seul fichier.
|
||||
|
||||
**ATTENTION** : lorsque plusieurs éléments sont exportés avec le bouton *single*, ils deviendront **un seul et unique** élément dans ce fichier, ce ne seront plus des éléments indépendants.
|
||||
**ATTENTION** : lorsque plusieurs éléments sont exportés avec le bouton *combiné*, ils deviendront **un seul et unique** élément dans ce fichier, ce ne seront plus des éléments indépendants.
|
||||
|
|
|
|||
Loading…
Reference in a new issue