Draft Downgrade: Difference between revisions

From FreeCAD Documentation
(Moved to "how to use")
(Information moved here from options)
Line 28: Line 28:
# Select one or more objects that you want to downgrade.
# Select one or more objects that you want to downgrade.
# Press the {{Button|[[Image:Draft Downgrade.png|16px]] [[Draft Downgrade]]}} button or press {{KEY|D}} then {{KEY|N}} keys.
# Press the {{Button|[[Image:Draft Downgrade.png|16px]] [[Draft Downgrade]]}} button or press {{KEY|D}} then {{KEY|N}} keys.

The selected objects are modified or downgraded, according to the following conditions, in order:
# If only one object is selected and it contains more than one face, each face becomes a separate object.
# 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.


==Options== <!--T:6-->
==Options== <!--T:6-->

Revision as of 15:52, 13 November 2018

Draft Downgrade

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

Description

The Downgrade tool downgrades the selected objects in different ways. If no object is selected, you will be invited to select one.

The Downgrade tool performs things such as breaking faces, and deconstructing wires into their individual edges. It can cut a shape with another shape in similar way to Part Cut.

The counterpart to this tool is the Draft Upgrade operation.

How to use

  1. Select one or more objects that you want to downgrade.
  2. Press the Draft Downgrade button or press D then N keys.

The selected objects are modified or downgraded, according to the following conditions, in order:

  1. If only one object is selected and it contains more than one face, each face becomes a separate object.
  2. If there are more than one face in the selection, the subsequent objects are subtracted from the first one.
  3. If there is only one face in the selection, it gets converted into a wire.
  4. Otherwise all wires found in the selection are exploded into single edges.

Options

There are no options for this tool. Either it works with the selected objects or not.

Example

Scripting

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

downgrade (objects, [delete], [force])
  • 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 dictionary containing two lists, a list of new objects and a list of objects to be deleted

Example:

import FreeCADGui,Draft
selection = FreeCADGui.Selection.getSelection()
Draft.downgrade(selection)