Commit Graph

7749 Commits

Author SHA1 Message Date
Alexander Golubev
9753f27064 Gui: refactor Plane's and Line's ViewProviders and add yet another one for OriginFeature
- Share the code of Gui::ViewProviderPlanes and Gui::ViewProviderLine
   in Gui::ViewProviderOriginFeature
 - Add support for coloring and transparencing the OriginFeatures by
   ViewProviderGeometryObject means.
2016-04-12 18:12:18 +02:00
Alexander Golubev
e8e4f31b14 Gui/SoFCSelection: added a methode for applying defaults from settings 2016-04-12 18:12:18 +02:00
Stefan Tröger
2a5d800940 fix origin plane and line viewprovider
master changed the highlight code for viewproviders, needed an adjustement after rebase
2016-04-12 18:12:18 +02:00
Alexander Golubev
cebc5860c1 Gui/ViewProviderGeoFeatureGroup: suppress DocumentObjectGroup's hide/show behavior 2016-04-12 18:12:18 +02:00
Alexander Golubev
2c2d155ee9 OriginGroup: add new abstraction layer between the Part and the GeoFeatureGroup 2016-04-12 18:12:18 +02:00
Alexander Golubev
59ca9212d6 Gui/ViewProviderDocumentObjectGroup: minor enhancements 2016-04-12 18:12:18 +02:00
Alexander Golubev
4e6298d539 Gui/ViewProviderOrigin: fix a segfault when accessed uninitialized plane's view providers when setted up lines sizes 2016-04-12 18:12:18 +02:00
Alexander Golubev
8bca27463e Part/Attacher: remove a couple of no more valid asserts 2016-04-12 18:12:18 +02:00
Alexander Golubev
797d6d3a11 App/Origin: big refactoring
- 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
2016-04-12 18:12:18 +02:00
Alexander Golubev
ecbb576330 App: minor fix of spacing 2016-04-12 18:12:17 +02:00
Alexander Golubev
26bb702ff6 App: add two callback to DocumentObject to perform initialization/uninitialization inside an object
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.
2016-04-12 18:12:17 +02:00
Alexander Golubev
c6797b6c29 Revert "part deletion handling"
This reverts commit 6ab2002021ac1df26ebe77f488f5cd94e1df0b26.
2016-04-12 18:12:17 +02:00
Alexander Golubev
dbb5786ffd App/GeoFeatureGroup: derive from DocumentObjectGroup
Refactor GeoFeatureGroup and derive it from DocumentObjectGroup rather
than GeoFeatureObject to unify code of those two classes.
2016-04-12 18:12:17 +02:00
Alexander Golubev
76b4685b5f Commented out a portion of code cosed a segfault 2016-04-12 18:12:17 +02:00
Alexander Golubev
5016054a8b PartDesign/Body: move deletion of subobjects to view provider 2016-04-12 18:12:17 +02:00
Alexander Golubev
aa32522115 DocumentObjectGroup: fix deleting of groups in case of malformed links
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
2016-04-12 18:12:17 +02:00
Alexander Golubev
abc925b62e PartDesign/Gui: Make partDesign's add sketch command Workflow-aware 2016-04-12 18:12:17 +02:00
Alexander Golubev
492f1d24a4 PartDesign/Gui: initial migration command implementation 2016-04-12 18:12:17 +02:00
Alexander Golubev
c4f094bba4 PartDesign/Gui: rename some fonctions in ReferenceSelection.cpp
e.g. getPythonStr -> buildLinkListPythonStr etc
2016-04-12 18:12:17 +02:00
Alexander Golubev
06139ee8f3 Gui/ViewProciderPart: fix XZ plane orientation
Also fix spacing and a Workbench.getValue() condition
2016-04-12 18:12:17 +02:00
Alexander Golubev
ca8be01a4b Fix a crash then sketch calls recalculation 2016-04-12 18:12:17 +02:00
Alexander Golubev
f9e67626ec PartDesign/Body: remowe Part::Feature from isAllowed() 2016-04-12 18:12:17 +02:00
Alexander Golubev
c388a84424 PartDisign/WorkflowManager: initial implementation 2016-04-12 18:12:17 +02:00
Alexander Golubev
8a2d4289f6 PartDesign/FeaturePrimitive: suppress a -Woverloaded-virtual warning 2016-04-12 18:12:17 +02:00
Alexander Golubev
c782a11aab PartDesign/Gui: Move various utility stuff from Workbench to a separate file
Also do some header cleanup.
2016-04-12 18:12:17 +02:00
Alexander Golubev
a5fcd5775e PartDesign: update body management commands according to the changes in body paradigms 2016-04-12 18:12:16 +02:00
Alexander Golubev
8b62680fe7 Sketcher: minor enhance in sketch interaction with body 2016-04-12 18:12:16 +02:00
Alexander Golubev
bf94c3ebf7 PartDesign: fix negative Offset property in pad and pocket 2016-04-12 18:12:16 +02:00
Alexander Golubev
444986e88a PartDesign/Gui: move body commands to a separate file 2016-04-12 18:12:16 +02:00
Alexander Golubev
8c5d514b18 PartDesign: Body rework - add BaseFeature property and make Tip always point to solid 2016-04-12 18:12:16 +02:00
Alexander Golubev
37320a0bfa Gui: prevent DAGView crash freecad when a document gets a circular dependency 2016-04-12 18:12:16 +02:00
Alexander Golubev
2fc5d6c818 Gui/Tree: make tree view correctly handle child order than moving them 2016-04-12 18:12:16 +02:00
Alexander Golubev
e3c00ce650 PartDesign/ViewProviderPad: removed a TODO 2016-04-12 18:12:16 +02:00
Alexander Golubev
1b1bd5f17e PartDesign/Gui: make Transformed ViewProviders use common code with other 2016-04-12 18:12:16 +02:00
Alexander Golubev
9cba6c48ea PartDesign/TaskMultiTransformParameters: fix a segfault
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
2016-04-12 18:12:16 +02:00
Alexander Golubev
113c10a2b7 PartDesign: make transform parameter dialogs use common base code with other dialogs
subj;
Make PasrtDesign::Transformed provide common for all features
classes interface getBaseObject() instead of specific getSupportObject ();
Refactor some TransformedParameters methods.
2016-04-12 18:12:16 +02:00
Alexander Golubev
e6a99ce96f PartDesign/Workbench: fix a crash 2016-04-12 18:12:16 +02:00
Alexander Golubev
147aff0395 PartDesign/Feature: minor gramma fix 2016-04-12 18:12:16 +02:00
Alexander Golubev
da1fb99dc5 PartDesign/ViewProvider: minor enhancements 2016-04-12 18:12:16 +02:00
Alexander Golubev
e28aaf4592 PartDesign/TaskDressUpParameters: disable edit of dressup features with broken supports
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
2016-04-12 18:12:15 +02:00
Alexander Golubev
1876c76f3c PartDesign/Gui: make DressUp view providers use the common code. 2016-04-12 18:12:15 +02:00
Alexander Golubev
55f3f52f54 PartDesign/Feature: add an optional parameter to getBaseObject() to prevent it from throwing exceptions
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().
2016-04-12 18:12:15 +02:00
Alexander Golubev
013381ccb6 PartDesign/Gui: share code for revolution and groove view providers 2016-04-12 18:12:15 +02:00
Alexander Golubev
5ee0cea467 PartDesign/Gui: start to unify view providers code
- 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
2016-04-12 18:12:15 +02:00
Alexander Golubev
6266d514d3 PartDesign/ViewProviderDatum: minor fix in a comment 2016-04-12 18:12:15 +02:00
Alexander Golubev
5f6f16e757 PartDesign/FeatureDressUp: implement a proper getBaseObject()
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.
2016-04-12 18:12:15 +02:00
Alexander Golubev
9feff04aad PartDesign/TaskDressUpParameters: fix a crash when editing a broken object 2016-04-12 18:12:15 +02:00
Alexander Golubev
0ca40ed48b PartDesign/Task{Pad,Pocket}Parameters: massive refactoring
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.
2016-04-12 18:12:15 +02:00
Alexander Golubev
143760c8d3 PartDesign/ViewProviderPad: removed unfinished reimplementation of doubleClick()
This one resulted in non proper reject of pad dialog. Because the
command transaction haven't started.
2016-04-12 18:12:15 +02:00
Alexander Golubev
11a71d46e3 PartDesignGui: move signal connections in several parameter dialogs after ui initialization 2016-04-12 18:12:15 +02:00