PartDesign/Gui: add origin sizing and rework datums sizing
This commit is contained in:
committed by
Stefan Tröger
parent
a3e3c78388
commit
68c78de00d
@@ -59,6 +59,16 @@ public:
|
||||
*/
|
||||
App::PropertyLink BaseFeature;
|
||||
|
||||
/// Returns all Model objects prepanded by BaseFeature (if any)
|
||||
std::vector<App::DocumentObject *> getFullModel () {
|
||||
std::vector<App::DocumentObject *> rv;
|
||||
if ( BaseFeature.getValue () ) {
|
||||
rv.push_back ( BaseFeature.getValue () );
|
||||
}
|
||||
std::copy ( Model.getValues ().begin (), Model.getValues ().end (), std::back_inserter (rv) );
|
||||
return rv;
|
||||
}
|
||||
|
||||
// These methods are located here to avoid a dependency of ViewProviderSketchObject on PartDesign
|
||||
/// Remove the feature from the body
|
||||
virtual void removeFeature(App::DocumentObject* feature){}
|
||||
|
||||
@@ -102,3 +102,7 @@ TopoDS_Shape Datum::getShape() const
|
||||
sh.setPlacement(Placement.getValue());
|
||||
return sh._Shape;
|
||||
}
|
||||
|
||||
Base::Vector3d Datum::getBasePoint () const {
|
||||
return Placement.getValue().getPosition();
|
||||
}
|
||||
|
||||
@@ -54,6 +54,8 @@ public:
|
||||
/// Return a shape including Placement representing the datum feature
|
||||
TopoDS_Shape getShape() const;
|
||||
|
||||
/// Returns a point of the feature it counts as it's base
|
||||
virtual Base::Vector3d getBasePoint () const;
|
||||
protected:
|
||||
void onChanged (const App::Property* prop);
|
||||
void onDocumentRestored();
|
||||
|
||||
Reference in New Issue
Block a user