Draft Downgrade/ro: Difference between revisions

From FreeCAD Documentation
(Created page with "Draft Downgrade")
 
(Updating to match new version of source page)
 
(32 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand|Name=Draft Downgrade|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=Draft -> Downgrade|Shortcut=D N|SeeAlso=[[Draft Upgrade|Draft Upgrade]]}}


{{Docnav
==Description==
|[[Draft_Upgrade|Upgrade]]
|[[Draft_WireToBSpline|WireToBSpline]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Upgrade.svg
|IconR=Draft_WireToBSpline.svg
|IconC=Workbench_Draft.svg
}}


<div class="mw-translate-fuzzy">
This tool downgrades selected objects in different ways. If no object is selected, you will be invited to select one.
{{GuiCommand
|Name=Draft Downgrade
|Workbenches=[[Draft_Workbench/ro|Draft]], [[Arch_Workbench/ro|Arch]]
|MenuLocation=Draft → Downgrade
|Shortcut=D N
|SeeAlso=[[Draft Upgrade|Draft Upgrade]]
}}
</div>

<span id="Description"></span>
==Descriere==

<div class="mw-translate-fuzzy">
Acest instrument downgradează/ retrogradează/ descompune/ explodează obiectele selectate în moduri diferite. Dacă nu este selectat niciun obiect, veți putea selecta unul.
</div>


[[Image:Draft_Downgrade_example.jpg|400px]]
[[Image:Draft_Downgrade_example.jpg|400px]]
{{Caption|Two overlapping faces are downgraded to a Part Cut object, which is downgraded to a face. That face is then downgraded to a closed wire, which is finally downgraded to separate edges.}}


<span id="Usage"></span>
==How to use==
<div class="mw-translate-fuzzy">
== Cum se folosește ==
</div>


<div class="mw-translate-fuzzy">
# Select one or more objects you widh to downgrade
# Selectați unul sau mi multe obiecte pe caer vreți să le downgradați
# Press the {{KEY|[[Image:Draft Downgrade.png|16px]] [[Draft Downgrade]]}} button or press {{KEY|D}} then {{KEY|N}} keys
# apăsați pe butonul {{KEY|[[Image:Draft Downgrade.png|16px]] [[Draft Downgrade]]}} sau apăsați pe tasta {{KEY|D}} și apoi pe {{KEY|N}}
</div>


==Options==
==Scripting==


<div class="mw-translate-fuzzy">
The selected objects are modified/downgraded, according to the following conditions (in order):
==Script==
* if only one object is selected and it contains more than one face, each face becomes a separate object
</div>
* if there are more than one face in the selection, the subsequent objects are subtracted from the first one
* if there is only one face in the selection, it gets converted into a wire
* otherwise all wires found in the selection are exploded into single edges


<div class="mw-translate-fuzzy">
==Example==
Instrumentul Downgrade poate fi folosit în scripturile python și [[macros]] utilizând următoarea funcție:
</div>


{{Code|code=
<gallery widths="300" heights="200">
downgrade_list = downgrade(objects, delete=False, force=None)
File:Draft Downgrade 01.png|Complete shape
}}
File:Draft Downgrade 02.png|Downgraded shape, with disconnected and split faces
</gallery>


<div class="mw-translate-fuzzy">
==Scripting==
* Downgradează obiectul/e dat/e (poate fi un obiect sau o listă de obiecte).
* Dacă ștergerea este True, obiectele vechi sunt șterse.
* Atributul de forță poate fi folosit pentru a forța un anumit mod de dezasambalre. Acesta poate fi: explode, shapify, subtr, splitFaces, cut2, getWire, splitWires.
* Returnează un dicționar care conține două liste, o listă de obiecte noi și o listă de obiecte care trebuie șterse
</div>


Exempluː
The Downgrade tool can be used in python scripts and [[macros]] by using the following function:


{{Code|code=
<syntaxhighlight>
import FreeCAD as App
downgrade (objects [delete], [force])
import Draft
</syntaxhighlight>


doc = App.newDocument()
* Downgrades 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 downgrading. It can be: explode, shapify, subtr, splitFaces, cut2, getWire, splitWires.
* Returns a dictionnary containing two lists, a list of new objects and a list of objects to be deleted


circle = Draft.make_circle(1000)
Example:
rectangle = Draft.make_rectangle(2000, 800)
doc.recompute()


add_list1, delete_list1 = Draft.upgrade([circle, rectangle], delete=True)
<syntaxhighlight>
import FreeCADGui,Draft
selection = FreeCADGui.Selection.getSelection()
Draft.downgrade(selection)
</syntaxhighlight>


compound = add_list1[0]
<languages/>
add_list2, delete_list2 = Draft.downgrade(compound, delete=False)
face = add_list2[0]
add_list3, delete_list3 = Draft.downgrade(face, delete=False)

box = doc.addObject("Part::Box", "Box")
box.Length = 2300
box.Width = 800
box.Height = 1000

add_list4, delete_list4 = Draft.downgrade(box, delete=True)

doc.recompute()
}}


{{Docnav
|[[Draft_Upgrade|Upgrade]]
|[[Draft_WireToBSpline|WireToBSpline]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Upgrade.svg
|IconR=Draft_WireToBSpline.svg
|IconC=Workbench_Draft.svg
}}

{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 20:06, 7 December 2023

Draft Downgrade

Menu location
Draft → Downgrade
Workbenches
Draft, Arch
Default shortcut
D N
Introduced in version
-
See also
Draft Upgrade

Descriere

Acest instrument downgradează/ retrogradează/ descompune/ explodează obiectele selectate în moduri diferite. Dacă nu este selectat niciun obiect, veți putea selecta unul.

Two overlapping faces are downgraded to a Part Cut object, which is downgraded to a face. That face is then downgraded to a closed wire, which is finally downgraded to separate edges.

Cum se folosește

  1. Selectați unul sau mi multe obiecte pe caer vreți să le downgradați
  2. apăsați pe butonul Draft Downgrade sau apăsați pe tasta D și apoi pe N

Scripting

Script

Instrumentul Downgrade poate fi folosit în scripturile python și macros utilizând următoarea funcție:

downgrade_list = downgrade(objects, delete=False, force=None)
  • Downgradează obiectul/e dat/e (poate fi un obiect sau o listă de obiecte).
  • Dacă ștergerea este True, obiectele vechi sunt șterse.
  • Atributul de forță poate fi folosit pentru a forța un anumit mod de dezasambalre. Acesta poate fi: explode, shapify, subtr, splitFaces, cut2, getWire, splitWires.
  • Returnează un dicționar care conține două liste, o listă de obiecte noi și o listă de obiecte care trebuie șterse

Exempluː

import FreeCAD as App
import Draft

doc = App.newDocument()

circle = Draft.make_circle(1000)
rectangle = Draft.make_rectangle(2000, 800)
doc.recompute()

add_list1, delete_list1 = Draft.upgrade([circle, rectangle], delete=True)

compound = add_list1[0]
add_list2, delete_list2 = Draft.downgrade(compound, delete=False)
face = add_list2[0]
add_list3, delete_list3 = Draft.downgrade(face, delete=False)

box = doc.addObject("Part::Box", "Box")
box.Length = 2300
box.Width = 800
box.Height = 1000

add_list4, delete_list4 = Draft.downgrade(box, delete=True)

doc.recompute()