0001277: Allow to use RaySegment object in Raytracing projects
This commit is contained in:
parent
5678247628
commit
4d19a79ca3
|
@ -87,8 +87,8 @@ App::DocumentObjectExecReturn *LuxProject::execute(void)
|
|||
<< "# Generated by FreeCAD (http://www.freecadweb.org/)" << endl << endl;
|
||||
const std::vector<App::DocumentObject*> &Grp = Group.getValues();
|
||||
for (std::vector<App::DocumentObject*>::const_iterator It= Grp.begin();It!=Grp.end();++It) {
|
||||
if ((*It)->getTypeId().isDerivedFrom(Raytracing::LuxFeature::getClassTypeId())) {
|
||||
Raytracing::LuxFeature *View = dynamic_cast<Raytracing::LuxFeature *>(*It);
|
||||
if ((*It)->getTypeId().isDerivedFrom(Raytracing::RaySegment::getClassTypeId())) {
|
||||
Raytracing::RaySegment *View = dynamic_cast<Raytracing::RaySegment *>(*It);
|
||||
ofile << View->Result.getValue();
|
||||
ofile << endl;
|
||||
}
|
||||
|
|
|
@ -81,8 +81,8 @@ App::DocumentObjectExecReturn *RayProject::execute(void)
|
|||
// get through the children and collect all the views
|
||||
const std::vector<App::DocumentObject*> &Grp = Group.getValues();
|
||||
for (std::vector<App::DocumentObject*>::const_iterator It= Grp.begin();It!=Grp.end();++It) {
|
||||
if ((*It)->getTypeId().isDerivedFrom(Raytracing::RayFeature::getClassTypeId())) {
|
||||
Raytracing::RayFeature *View = dynamic_cast<Raytracing::RayFeature *>(*It);
|
||||
if ((*It)->getTypeId().isDerivedFrom(Raytracing::RaySegment::getClassTypeId())) {
|
||||
Raytracing::RaySegment *View = dynamic_cast<Raytracing::RaySegment *>(*It);
|
||||
ofile << View->Result.getValue();
|
||||
ofile << endl << endl << endl;
|
||||
}
|
||||
|
|
|
@ -54,6 +54,11 @@ public:
|
|||
//@{
|
||||
/// recalculate the Feature
|
||||
virtual App::DocumentObjectExecReturn *execute(void);
|
||||
|
||||
/// returns the type name of the ViewProvider
|
||||
const char* getViewProviderName(void) const {
|
||||
return "Gui::ViewProviderDocumentObject";
|
||||
}
|
||||
//@}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user