Macro CloneConvert/de: Difference between revisions

From FreeCAD Documentation
(Created page with "* '''Number copy ''' * '''Number copy :''' Anzahl der Kopien")
(Created page with "* '''Scale free''' * '''{{KEY | ...}}:''' Diese Schaltfläche bringt die Skalenwerte auf den Wert von Skalierung X an, um dieselben Werte XYZ (oder manuell) zu haben. <br /> M...")
Line 70: Line 70:


* '''Scale free'''
* '''Scale free'''
* '''{{KEY|...}} :''' This button align the Scales values on the value of Scale X to have the same values ​​XYZ (or manually)<br />Two click reset the scales values to 1.0
* '''{{KEY | ...}}:''' Diese Schaltfläche bringt die Skalenwerte auf den Wert von Skalierung X an, um dieselben Werte XYZ (oder manuell) zu haben. <br /> Mit einem Klick können Sie die Skalen zurücksetzen Werte bis 1,0
* '''Scale X :''' free scale , if the value is negative '''( -10)''' , the object is scaled '''x 10''' and will be reversed in the X axis, to reduce the shape give a decimal value '''(0,5)'''
* '''Scale X:''' freier Maßstab, wenn der Wert negativ '''(-10)''' ist, wird das Objekt '''x 10' '' skaliert und in der X-Achse umgekehrt. Um die Form zu reduzieren, geben Sie einen Dezimalwert ein (0,5).
* '''Scale Y :''' free scale , if the value is negative '''( -10)''' , the object is scaled '''x 10''' and will be reversed in the Y axis, to reduce the shape give a decimal value '''(0,5)'''
* '''Scale Y:''' freier Maßstab, wenn der Wert negativ '''(-10)''' ist, wird das Objekt '''x 10''' skaliert und in der Y-Achse umgekehrt. Um die Form zu reduzieren, geben Sie einen Dezimalwert ein (0,5).
* '''Scale Z :''' free scale , if the value is negative '''( -10)''' , the object is scaled '''x 10''' and will be reversed in the Z axis, to reduce the shape give a decimal value '''(0,5)'''
* '''Scale Z:''' freier Maßstab, wenn der Wert negativ '''(-10)''' ist, wird das Objekt '''x 10''' skaliert und in der Z-Achse umgekehrt. Um die Form zu reduzieren, geben Sie einen Dezimalwert ein (0,5).


* '''{{KEY|ValueAt()}} :''' Give the valueAt() the subObject selected Face, Wire, Line ...<br />This option is useful in case a compound Placement information [0,0,0] and its real location is away from the base coordinates 0,0,0 (gives no provide information about the rotation of the object)
* '''{{KEY|ValueAt()}} :''' Give the valueAt() the subObject selected Face, Wire, Line ...<br />This option is useful in case a compound Placement information [0,0,0] and its real location is away from the base coordinates 0,0,0 (gives no provide information about the rotation of the object)

Revision as of 14:42, 18 December 2018

Other languages:

Macro CloneConvert

Beschreibung
Erzeugt einen Klon des Objekts und konvertiert es an der gewählten Position und Größe (Zoll, mm, m, µm ...).

Versionsmakro : 0.11
Datum der letzten Änderung : 2018-03-30
Autor: mario52
Autor
mario52
Herunterladen
None
Links
Macro-Version
0.11
Datum der letzten Änderung
2018-03-30
FreeCAD-Version(s)
None
Standardverknüpfung
None
Siehe auch
None

Beschreibung

Erzeugt einen Klon oder eine Kopie des Objekts und konvertiert es an der gewählten Position und Größe (Zoll, mm, m, µm ...) oder frei. Das Basisobjekt wird in mm (FreeCAd-Basis) erkannt.

Temporary code for external macro link. Do not use this code. This code is used exclusively by Addon Manager. Link for optional manual installation: Macro


# This code is copied instead of the original macro code
# to guide the user to the online download page.
# Use it if the code of the macro is larger than 64 KB and cannot be included in the wiki
# or if the RAW code URL is somewhere else in the wiki.

from PySide import QtGui, QtCore

diag = QtGui.QMessageBox(QtGui.QMessageBox.Information,
    "Information",
    "This macro must be downloaded from this link\n"
    "\n"
    "https://gist.githubusercontent.com/mario52a/9f2f2f6144e1307a048f1840ef99300c/raw/bab6b455f134abb88f10899c1f0da7bc95186f78/Macro_CloneConvert.FCMacro" + "\n"
    "\n"
    "Quit this window to access the download page")

diag.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
diag.setWindowModality(QtCore.Qt.ApplicationModal)
diag.exec_()

import webbrowser 
webbrowser.open("https://gist.githubusercontent.com/mario52a/9f2f2f6144e1307a048f1840ef99300c/raw/bab6b455f134abb88f10899c1f0da7bc95186f78/Macro_CloneConvert.FCMacro")


Verwendet

Führen Sie das Makro und die XYZ-Einstellungen aus, wählen Sie "Klonen" oder "Kopieren" eine Einheit oder einen Wert Ihrer Wahl. Wählen Sie Ihr Objekt aus und klicken Sie auf die Schaltfläche Ok.

Wenn kein Wert eingegeben wird, wird eine Kopie oder ein Klon ohne Änderung erstellt. Wenn kein Objekt ausgewählt ist, wird die Schaltfläche Ok rot angezeigt.

Der Wert von Bounding Box, Volume und Surface wird in der Berichtansicht angezeigt, im Falle von 'Copy mehreren Objekten das Anzeige zeigt BoundingBox 0.0.


Die Basis ist das mm-Beispiel mit einem Würfel 1 mm der Seite:

Wählen Sie in der ComboBox inch, 1 inch = 25,4 mm die Felder Scale free automatisch auf 25,4 (die Werte in Scale-free kann separat geändert werden). Klicken Sie auf die Schaltfläche Ok. Der erstellte Klon enthält 25, 4 mm x 25,4 mm x 25,4 mm .

150% = 1,50 in the "Scale free" fields
104% = 1,04 in the "Scale free" fields

Inverse Operation:

Wenn Sie ein Objekt verkleinern möchten, z. B. einen Würfel von 25,4 mm (1 Zoll) in den Würfeln von 1 mm, verwenden Sie die Formel 1 / 25.4 = 0.0393700 und geben Sie den Wert 0,0393700' ein. (mit Komma) im Skalierungsfeld XY und Z.

In einem Würfel von 5 mm, 5 / 25.4 = 0.1968503 eingeben und den Wert 0,1968503 (mit Komma) in das Skalierungsfeld XY und Z eingeben.

50% = 0,50 in dem "Scale free" Felder
4% = 0,04 in dem "Scale free" Felder

Vordefinierte Einheiten sind : km, hm, dam, m, dm, cm, mm, µm, nm, inch, link, foot, yard, perch, chain, furlong, mile, league, nautique.

CloneConvert
CloneConvert
  • Mode
  • Clone  : Die Klone der Objekte werden erstellt
  • Copy  : Es wird eine Kopie des Objekts erstellt
  • Comp  : Eine Kombination des Objekts ist create
  • Increm. : Inkrementieren der Koordinatendaten auf die ursprünglichen Koordinaten des Objekts (Platzierung, Drehung ...)
    Wenn diese Option nicht aktiviert ist, beginnt die Platzierung in den Koordinaten 0,0,0 von FreeCAD.
    In diesem Fall Eine zusammengesetzte Platzierungsinformation ist [0,0,0]. Die Platzierung beginnt an der Position des Objekts.
    Wenn der tatsächliche Standort von den Basiskoordinaten abweicht, verwenden Sie 0,0 ValueAt (). Schaltfläche für die tatsächliche Platzierung des ausgewählten Unterobjekts Fläche, Draht, Linie ....
  • Unique: Wenn dieses Kontrollkästchen markiert ist und mehrere Objekte ausgewählt sind, ist der erstellte Klon ein eindeutiges Objekt
  • Coordinates
  • ...: Diese Schaltfläche bringt die YZ-Werte auf den Wert von X an, um dieselben Werte wie XYZ (oder manuell) zu erhalten. Mit zwei Klicks setzen Sie die Koordinaten auf 0,0 zurück
  • Coordinate X: Verschiebt die Kopie auf die ausgewählte Koordinate X (Basis 0,0,0, wenn Increm nicht aktiviert ist)
  • Coordinate Y: Verschiebt die Kopie in die ausgewählte Koordinate Y (Basis 0,0,0, wenn Increm nicht aktiviert ist)
  • Coordinate Z: Verschiebt die Kopie in die ausgewählte Koordinate Z (Basis 0,0,0, wenn Increm nicht aktiviert ist)
  • Rotation
  • ...: Diese Schaltfläche passt die Pitch- und Roll-Werte an dem Wert von Yaw an, um dieselben Werte zu erhalten. Rotation (oder manuell)
    Mit einem zwei Klick setzen Sie das zurück Drehzahlwerte auf 0,0
  • Yaw (Z): Die Kopie auf die Achse Z (Yaw) drehen (0 beginnen, wenn Increm nicht aktiviert ist)
  • Pitch (Y): Die Kopie auf die Achse Y (Pitch) drehen (Start 0, wenn Increm nicht aktiviert ist)
  • Roll (X): Die Kopie auf die Achse X (Roll) drehen (Start 0, wenn Increm nicht aktiviert ist)
  • Scale predefined
  • Scale predefined : vordefinierte Skalen in Einheiten, km, hm, dam, m, dm, cm, mm, µm, nm, inch, link, foot, yard, perch, chain, furlong, mile, league, nautique or choose a free value in the Scale free field.
  • Number copy
  • Number copy : Anzahl der Kopien
  • Scale free
  • ...: Diese Schaltfläche bringt die Skalenwerte auf den Wert von Skalierung X an, um dieselben Werte XYZ (oder manuell) zu haben.
    Mit einem Klick können Sie die Skalen zurücksetzen Werte bis 1,0
  • Scale X:' freier Maßstab, wenn der Wert negativ (-10) ist, wird das Objekt x 10' skaliert und in der X-Achse umgekehrt. Um die Form zu reduzieren, geben Sie einen Dezimalwert ein (0,5).
  • Scale Y: freier Maßstab, wenn der Wert negativ (-10) ist, wird das Objekt x 10 skaliert und in der Y-Achse umgekehrt. Um die Form zu reduzieren, geben Sie einen Dezimalwert ein (0,5).
  • Scale Z: freier Maßstab, wenn der Wert negativ (-10) ist, wird das Objekt x 10 skaliert und in der Z-Achse umgekehrt. Um die Form zu reduzieren, geben Sie einen Dezimalwert ein (0,5).
  • ValueAt() : Give the valueAt() the subObject selected Face, Wire, Line ...
    This option is useful in case a compound Placement information [0,0,0] and its real location is away from the base coordinates 0,0,0 (gives no provide information about the rotation of the object)
  • Ok : the OK button validates and launches the command, if no object is selected the Ok button will be coloured in red
  • Reset : the Reset button puts all the values to zero
  • Quit : the Quit button exit the macro

Script

The icon

Macro_CloneConvert.FCMacro

Download the macro to Gist Macro_CloneConvert.FCMacro

Revision

30/03/2018 ver 0.11 = odd checkBox, if multi selection the clone are object unique or object separate

07/06/2017 ver 0.10 = replace Draft...Copy to Part..Shape cause section Copy : not draw copy scaled of object but copy not scaled ??

14/06/2016 ver 0.9 = adding the choice of number of copies and labels optimization

31/01/2016 ver 0.8 = modify the buttons reset section for two click for reset (in case modification the value)

30/01/2016 ver 0.7 = rewriting code with Placement and Increment and adding buttons Compound, Increment, ValueAt(),

26/01/2016 ver 0.6 = correction placement with many objets Copy

26/07/2015 ver 0.5 = correction rotate many objects Function Copy

25/07/2015 ver 0.4 = adding rotation

11/08/2014 replace "AttributeError" to "Exception"

02/07/2014 ver. 0.3 = modified to operate PyQt4 and PySide

09/05/2014 ver. 0.2 = adding function "Copy"