Draft Upgrade/sv: Difference between revisions
(Created page with "==Skript==") |
(Updating to match new version of source page) |
||
Line 1: | Line 1: | ||
{{GuiCommand |
{{GuiCommand|Name=Draft Upgrade|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=Draft -> Upgrade|Shortcut=U P|SeeAlso=[[Draft Downgrade|Draft Downgrade]]}} |
||
==Beskrivning== |
==Beskrivning== |
||
Line 26: | Line 26: | ||
The upgrade tool can be used from python scripts and [[macros]] like this: |
The upgrade tool can be used from python scripts and [[macros]] like this: |
||
{{Code|code= |
|||
<syntaxhighlight> |
|||
Draft.upgrade(objects, delete=False, force=None) |
|||
}} |
|||
</syntaxhighlight> |
|||
* Upgrades the given object(s) (can be an object or a list of objects). |
* Upgrades the given object(s) (can be an object or a list of objects). |
||
Line 39: | Line 39: | ||
Example: |
Example: |
||
{{Code|code= |
|||
<syntaxhighlight> |
|||
import Draft |
import Draft |
||
mycircle = Draft.makeCircle(2) |
mycircle = Draft.makeCircle(2) |
||
face1 = Draft.upgrade([mycircle],True) |
face1 = Draft.upgrade([mycircle],True) |
||
}} |
|||
</syntaxhighlight> |
|||
<languages/> |
<languages/> |
Revision as of 21:49, 1 January 2015
Draft Upgrade |
Menu location |
---|
Draft -> Upgrade |
Workbenches |
Draft, Arch |
Default shortcut |
U P |
Introduced in version |
- |
See also |
Draft Downgrade |
Beskrivning
Detta verktyg uppgraderar valda objekt på olika sätt. Om inget objekt är markerat, så ombes du att välja ett.
Bruk
- Select one or more objects you wish to upgrade
- Press the Draft Upgrade button or press U then P keys
Options
De valda objekten förändras/uppgraderas enligt följande lista (i ordning):
- Om det finns mer än en yta, så förenas de (förening)
- On det endast finns en yta, så görs ingenting
- Om det finns stängda trådar, så omvandlas de till en yta
- om det endast finns en öppen tråd, så stängs den
- om det endast finns kanter, så förenas alla kanter till en tråd (stängd, om möjligt)
- om inget av ovanstående är möjligt, så skapas ett sammansättningsobjekt
Skript
The upgrade tool can be used from python scripts and macros like this:
Draft.upgrade(objects, delete=False, force=None)
- Upgrades the given object(s) (can be an object or a list of objects).
- If delete is True, old objects are deleted.
- The force attribute can be used to force a certain way of upgrading. It can be: makeCompound, closeGroupWires, makeSolid, closeWire, turnToParts, makeFusion, makeShell, makeFaces, draftify, joinFaces, makeSketchFace, makeWires
- Returns a dictionnary containing two lists, a list of new objects and a list of objects to be deleted
Some of the operations of the Upgrade tool can also be made with the Part Fuse or Draft Wire tools.
Example:
import Draft
mycircle = Draft.makeCircle(2)
face1 = Draft.upgrade([mycircle],True)