3D subgrouping for Body
This commit is contained in:
parent
2403af2e6c
commit
50652895d4
|
@ -45,9 +45,8 @@ Body::Body()
|
|||
|
||||
short Body::mustExecute() const
|
||||
{
|
||||
//if (Sketch.isTouched() ||
|
||||
// Length.isTouched())
|
||||
// return 1;
|
||||
if (Tip.isTouched() )
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <Inventor/nodes/SoGroup.h>
|
||||
#endif
|
||||
|
||||
#include "ViewProviderBody.h"
|
||||
|
@ -38,10 +39,15 @@ PROPERTY_SOURCE(PartDesignGui::ViewProviderBody,PartGui::ViewProviderPart)
|
|||
|
||||
ViewProviderBody::ViewProviderBody()
|
||||
{
|
||||
pcBodyChildren = new SoGroup();
|
||||
pcBodyChildren->ref();
|
||||
|
||||
}
|
||||
|
||||
ViewProviderBody::~ViewProviderBody()
|
||||
{
|
||||
pcBodyChildren->unref();
|
||||
pcBodyChildren = 0;
|
||||
}
|
||||
|
||||
bool ViewProviderBody::doubleClicked(void)
|
||||
|
@ -75,3 +81,10 @@ std::vector<App::DocumentObject*> ViewProviderBody::claimChildren(void)const
|
|||
return std::vector<App::DocumentObject*>(Result.begin(),it);
|
||||
}
|
||||
|
||||
|
||||
std::vector<App::DocumentObject*> ViewProviderBody::claimChildren3D(void)const
|
||||
{
|
||||
|
||||
return static_cast<PartDesign::Body*>(getObject())->Model.getValues();
|
||||
|
||||
}
|
||||
|
|
|
@ -42,6 +42,12 @@ public:
|
|||
virtual bool doubleClicked(void);
|
||||
std::vector<App::DocumentObject*> claimChildren(void)const;
|
||||
|
||||
// returns the root node where the children gets collected(3D)
|
||||
virtual SoGroup* getChildRoot(void) const {return pcBodyChildren;}
|
||||
std::vector<App::DocumentObject*> claimChildren3D(void)const;
|
||||
|
||||
private:
|
||||
SoGroup *pcBodyChildren;
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user