-Rename Sketchbased to ProfileBased to show new behavior
-Adopt ProfileBased to make the relevant helper functions work with faces too
-Adopt features for unified use of helper functions
-Adopt commands to allow face selection
When for example the spreadsheet is open and an recompute is issued, the active view is not the 3d viewer which leads to crash if used for scene graph calculations.
hasObject does search recursive only in groups, but a body is not a group. Hence for sketches within a body this will always return false. Annother logic must be used to detect sketches in bodies.
validateSketch was faulty: as every sketch is valid (non is removed) it could happen that the returned number was >0 but the iterator firstValidSketch was NULL nontheless. The routine needed to be udated to make snese and the usage in prepareSketchbased together with it.
With the new setup object signals it may happen that a document object claims children but has no property changed after the viewprodivers creation. This scenario is not supportet up to now as the scene graph children are only set when the object changes.
It is possible that a newly reated document object already claims other existing objects. The tree needs to be recomputed in this case.
This happens for example for the origin, which creates its planes and axis first and claims them before its own viewprovider is created.
DocumentObject::testIfLinkDAGCompatible: return true if link can be
created (no cycles will be made). False if the link will cause a
circular dependency and break recomputes.
On datum creation it is better to ask the user on OK than on tool activation, as he might hit cancel (and then the created references are till there) or even more important, he could add additional external references within the dialog. The disadvantae is that if the user sets "cross reference" ge gets asked again every time he opens and leaves the dialog.
- Make Datums colorable and transparent
- Change default datums color to yellow and transparency to 60%
- Rework Lines and Points datum view provider
- Add ViewProviderDatum::defaultBoundBox()
The new selection model is not usable for the OriginFeature's view
provider due to from one side it doesn't really have any subfeatures, so
it won't be really needed, and on the other side we will have to use
SoFCSelection because in that case it isn't possible to implement
highlighting in any sane way (unless we will reimplement drawing ourselfs).
- Share the code of Gui::ViewProviderPlanes and Gui::ViewProviderLine
in Gui::ViewProviderOriginFeature
- Add support for coloring and transparencing the OriginFeatures by
ViewProviderGeometryObject means.
- Rebase App::Origin on App::DocumentObject
- Keep all control over the Origin structure inside the Origin and it's
ViewProvider
- Add OriginFeature class as common base for App::Plane and App::Line
- Rebase App::Plane and App::Line on top of newly created class and
move to the file.
- Change Origin's ViewProvider API associated with temporary display
- Lots of associated changes to files
- Several minor fixes
- Lots of new bugs
Added two callbacks to App::DocumentObject
- setupObject()
- unsetupObject()
All associated code was added to App::Document
Also was added a specific flag ObjectFlag::Deleted wich is set when performing the deletion.
This one prevents thurther object structure damage if
DocumentObjectGroup::Group connains multiple links to the same feature.
Also minorr changes:
- Fix some spacing
- Ask the user if he wants to delete group content
The segfault was caused by premature delete of object
TaskMultiTransformParameter::subFeature refered to.
Steps to reproduce:
1. Create a multitransform
2. Add a sub transfurmation to it
3. Press cancel
subj;
Make PasrtDesign::Transformed provide common for all features
classes interface getBaseObject() instead of specific getSupportObject ();
Refactor some TransformedParameters methods.
Also remove unused headers and fix spacing.
A final fixup for issues addressed in:
cb05b01 PartDesign/TaskDressUpParameters: fix a crash when editing a broken object
In most cases getBaseObject() is used with an exception handler which
only detects if it failed but not the reason. This modification allows
to use it without excess exception handlers.
Also add the same parameter to SketchBased::getVerifiedSketch().
- Moved all common code for part design features view providers to a base
class.
- Move shared code for Sketch based features to newly created
ViewProviderSketchBased class
- Add ViewProviderSketchBased to initialization
- Make Pad and Pocket ViewProviders to use the shared code
- Minor fixes to TaskFeatureParameters and some derived classes
The function getBaseShape() is removed and replaced with getBaseObject()
because it doesn't make a lot of scense: getBaseShape() masked the
base's class implementation (rather than redefine a virtual) which was
better in words of code reuse.
Also BaseFeature and Base properties relations are defined now in a
little another way.
Give a massive refactoring to Task dialogs for pocket and pad.
This commit features:
* Make Task dialogs for pocket and pad look nice in side-by side diff and
cross import features missing in each other.
* As a result it fixes several minor bugs.
* Gives a rework to the UpdateUI function.
* This one also fixes offset option support and migrates it to use unit
framework.
Added a new class: TaskDlgFeatureBased which currently contains common
code for TaskDlgSketcherBasedParameters::reject() as well as the same
methode for TaskDlgDressUpParameters.
It's likely that other Feature task dialogs will inherit this class too.
* remove an error message if adding a sketchbased feature without a body
* add champfer or fillet old workflow support
Also rework finishFeature() so at least champfer and fillet may be
inserted into any place of any apropriate body(not only the active one) of the body.
PartDesign: make datum features work outside of body/part
PartDesign old workflow: remove a few messageboxes about no part
PartDesign: old workflow: multitransform without body
Still has visibility issues, but generally works.
PartDesign Revolution used to fail, when an edge of a sketch was
selected as an axis of revolution. This is fixed by this commit.
Also, made it support selecting an edge from the sketch the revolution
itself is made from.
Rework combobox filling and link hadling for revolution and transformed features, in order to get rid of hard-coded item indexes and make the lists more dynamic.
They worked and are nice feature, but the handling with properties must be worked out better. To avoid any incompatibility due to property changes the functionality is removed now.