Allow transforming a Pattern feature into a MultiTransform feature
This commit is contained in:
committed by
Stefan Tröger
parent
fbac1f4afb
commit
c5ca269980
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user