Allow transforming a Pattern feature into a MultiTransform feature

This commit is contained in:
jrheinlaender
2013-08-22 21:08:21 +02:00
committed by Stefan Tröger
parent fbac1f4afb
commit c5ca269980
11 changed files with 638 additions and 284 deletions

View File

@@ -126,6 +126,21 @@ const Part::TopoShape Body::getTipShape()
return static_cast<Part::Feature*>(link)->Shape.getShape();
}
App::DocumentObject* Body::getPrevFeature(App::DocumentObject *start) const
{
std::vector<App::DocumentObject*> features = Model.getValues();
if (features.empty()) return NULL;
App::DocumentObject* st = (start == NULL ? Tip.getValue() : start);
if (st == NULL)
return st; // Tip is NULL
std::vector<App::DocumentObject*>::iterator it = std::find(features.begin(), features.end(), st);
if (it == features.end()) return NULL; // Invalid start object
it--;
return *it;
}
App::DocumentObject* Body::getPrevSolidFeature(App::DocumentObject *start, const bool inclusive)
{
std::vector<App::DocumentObject*> features = Model.getValues();