+ add class ViewProviderPrimitive to avoid to re-implement setEdit/unsetEdit methods for each sub-class separately
+ avoid using global variables
+ when editing a feature directly pass it to the dialogs
+ when editing a feature then do not use active document as this could point to the wrong object
+ fix undo/redo message
+ re-add '3D View' button to location dialog
fixes https://tracker.freecadweb.org/view.php?id=3857
Currently primitives of the Part WB can only be created suing a dialog. Editing is not possible that way.
This PR makes the first step in achieving this:
- Helices can now be edited using the same dialog ans when created
- New location dialog. The Gui::LocationWidget used there is not aware of the rotation angle and it treats the rotation axis as direction. To fix this, I set changed the dialog so that one can define every parameter as in the PartDesign attacher dialog (Placement, rotation axis and rotation angle separately). Another reason for this change was that one could not use the location dialog, fill it with the placement properties of the object, and close the dialog without any change. Because of the missing angle info the objects was then always rotated despite nothing was changed.
If this PR goes in, I will extend it for the other primitives.
Todo for the future: allow a preview of the changes made in the dialog. (I could not find out how this is done.)
The `Part::Spline` object is the parent of the parametric
Surface Workbench objects.
For example, the `Part::Spline` object is created by the
`Surface_CurveOnMesh` tool, which in reality just calls
the `MeshPart_CurveOnMesh` tool.
According to the source this command was deactivated until issue #0477
and hence #1954 could be solved. However, since those issues
haven't been addressed the command has remained hidden for a long time.
This command does not work with objects that reimplement
their edit modes, meaning that it may work with Part and PartDesign
created objects but not with Draft and Arch objects.
The command is added to the standard `View` menu,
and to one `Part tools` toolbar so that it is no longer hidden.
The limitations of the command can be described in the documentation,
and then somebody else can help solve the problem
with the edit modes.
A new icon for the command is also provided.
Also update the text of the buttons in the `TaskDimension` task panel.
Remove tabs in the source code, as there was a mix of tabs
and spaces. Further cleaning is necessary as the indentation
is inconsistent and mostly 2 spaces instead of 4 spaces.
This includes `BooleanFragments`, `Slice to compound`,
`Slice apart`, and `Boolean XOR`.
Clean up the tooltips of properties and commands.
Clean up the spacing of the code so that lines aren't very long.
The previous icon did not follow the general style and colors
of other icons in the workbench.
If there is no `Stencil` in the `CompoundFilter` object, raise
a `ValueError` exception when the `FilterType` is `'collision-pass'`
or `'window-distance'`.
Raise an exception when `items` is empty, or has a malformed string,
when `Filtertype` is `'specific items'`.
Fix the `getNullShapeShape` function to return a simple
`Part.Shape`, so that there is no error raised if `_nullShapeShape`
doesn't exist. This function doesn't work at all. It was probably
a prototype which was never fully developed; it may be removed
completely in the future.
The docstrings for the commands `CompoundFilter` and `ExplodeCompound`
were revised.
Clean up the spacing of the code so that lines aren't very long.
The previous icon was improperly trimmed. The new icon
shows the projection more clearly as one object imprinting itself
over another.
Also update the tooltip, fix the indentation of the code,
and the title of the taskpanel `DlgProjectionOnSurface.ui`.
The path to the icons is added to `AppPartGui.cpp`
using `Gui::BitmapFactory().addPath()`, so the icons are found
automatically in their new directories.
The path to the icons is added to `AppPartGui.cpp`
using `Gui::BitmapFactory().addPath()`, so the icons are found
automatically in their new directories.
The path to the icons is added to `AppPartGui.cpp`
using `Gui::BitmapFactory().addPath()`, so the icons are found
automatically in their new directories.
The path to the icons is added to `AppPartGui.cpp`
using `Gui::BitmapFactory().addPath()`, so the icons are found
automatically in their new directories.
The path to the icons is added to `AppPartGui.cpp`
using `Gui::BitmapFactory().addPath()`, so the icons are found
automatically in their new directories.
Rename icon `Part_CreatePrimitives.svg` to `Part_Primitives.svg`.