Specialized viewproviders for datum features, create points from intersection of edges and faces

This commit is contained in:
jrheinlaender
2013-04-27 20:40:52 +04:30
committed by Stefan Tröger
parent 9ca63b603a
commit 696bdf9a2a
10 changed files with 457 additions and 174 deletions

View File

@@ -180,8 +180,20 @@ const bool Body::isAfterTip(const App::DocumentObject *f) {
const bool Body::isSolidFeature(const App::DocumentObject* f)
{
return (f->getTypeId().isDerivedFrom(PartDesign::Feature::getClassTypeId()) &&
!f->getTypeId().isDerivedFrom(PartDesign::Datum::getClassTypeId()));
if (f == NULL)
return false;
return (f->getTypeId().isDerivedFrom(PartDesign::Feature::getClassTypeId()));
}
const bool Body::isAllowed(const App::DocumentObject* f)
{
if (f == NULL)
return false;
return (f->getTypeId().isDerivedFrom(PartDesign::Feature::getClassTypeId()) ||
f->getTypeId().isDerivedFrom(PartDesign::Datum::getClassTypeId()) ||
f->getTypeId().isDerivedFrom(Part::Part2DObject::getClassTypeId()));
}
Body* Body::findBodyOf(const App::DocumentObject* f)