Share code for finding a body containing a feature

This commit is contained in:
Alexander Golubev
2015-07-20 11:17:15 +03:00
committed by Stefan Tröger
parent 16e4ce20f0
commit ffc6cc2f23
6 changed files with 32 additions and 22 deletions

View File

@@ -232,6 +232,12 @@ const bool Body::isAllowed(const App::DocumentObject* f)
}
Body* Body::findBodyOf(const App::DocumentObject* feature)
{
return static_cast<Body*>(BodyBase::findBodyOf(feature));
}
void Body::addFeature(App::DocumentObject *feature)
{
insertFeature (feature, Tip.getValue(), /*after = */ true);