Files
create/src/Mod/Draft/draftfunctions
Roy-043 af96e50eea Draft: improve upgrade and downgrade
Fixes #16333.
Follow-up of #19487.

* The functions have been made nesting-aware. New objects are put in the same container (Group, Part) as the original objects. As a consequence for some operations the original objects must be in the same container as well.
* New objects receive the visual properties of the original objects. This is not always perfect. For example when upgrading to multiple wires there is currently no check to see which edge came from which orginal object. The fact that the `format_object` function is called from the Draft `make*` functions is problematic here. If construction mode is active `make_wire` puts new objects in the construction group and we don't always want that. This has been solved with a workaround (see 'cludge' in the code).
* The 'de-parametrize' downgrade option has also been enabled for features of PartDesign Bodies that have the `Profile` property.
* Before deleting objects there is a check to see if they are in use elsewhere (`InList` check). Base objects of arrays are not deleted if they are visible. If a PartDesign Body, or an object inside a Body is selected, the whole Body is deleted.
* The force options did not work for functions that take a single object.
* The `getShapeFromMesh` function in ArchCommands.py could return a solid that was not closed. A check for that has been added.
2025-02-19 18:06:12 +01:00
..
2021-12-07 22:53:54 -06:00
2023-01-22 20:26:40 +01:00
2021-12-07 22:53:54 -06:00
2023-01-22 20:26:40 +01:00
2023-01-22 20:26:40 +01:00
2023-01-22 20:26:40 +01:00

2020 May

These modules provide supporting functions for dealing with the custom "scripted objects" defined within the workbench.

The functions are meant to be used in the creation step of the objects, by the "make functions" in draftmake/, but also by the graphical "Gui Commands" modules in draftguitools/ and drafttaskpanels/.

These functions should deal with the internal shapes of the objects, or other special properties. They should not be very generic; if they are very generic then they are more appropriate to be included in the modules in draftutils/.

For more information see the thread: [Discussion] Splitting Draft tools into their own modules