Skip to content

Commit

Permalink
Raytracing: Using names instead of labels in exported files - fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Aug 8, 2014
1 parent 7778988 commit 6b5b1a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Mod/Raytracing/App/LuxFeature.cpp
Expand Up @@ -52,15 +52,15 @@ LuxFeature::LuxFeature(void)
App::DocumentObjectExecReturn *LuxFeature::execute(void)
{
std::stringstream result;
std::string ViewName = Label.getValue();
std::string ViewName = getNameInDocument();

App::DocumentObject* link = Source.getValue();
if (!link)
return new App::DocumentObjectExecReturn("No object linked");
if (!link->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId()))
return new App::DocumentObjectExecReturn("Linked object is not a Part object");
TopoDS_Shape shape = static_cast<Part::Feature*>(link)->Shape.getShape()._Shape;
std::string Name(std::string("Lux_")+static_cast<Part::Feature*>(link)->Label.getValue());
std::string Name(std::string("Lux_")+static_cast<Part::Feature*>(link)->getNameInDocument());
if (shape.IsNull())
return new App::DocumentObjectExecReturn("Linked shape object is empty");

Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Raytracing/App/RayFeature.cpp
Expand Up @@ -53,15 +53,15 @@ RayFeature::RayFeature(void)
App::DocumentObjectExecReturn *RayFeature::execute(void)
{
std::stringstream result;
std::string ViewName = Label.getValue();
std::string ViewName = getNameInDocument();

App::DocumentObject* link = Source.getValue();
if (!link)
return new App::DocumentObjectExecReturn("No object linked");
if (!link->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId()))
return new App::DocumentObjectExecReturn("Linked object is not a Part object");
TopoDS_Shape shape = static_cast<Part::Feature*>(link)->Shape.getShape()._Shape;
std::string Name(std::string("Pov_")+static_cast<Part::Feature*>(link)->Label.getValue());
std::string Name(std::string("Pov_")+static_cast<Part::Feature*>(link)->getNameInDocument());
if (shape.IsNull())
return new App::DocumentObjectExecReturn("Linked shape object is empty");

Expand Down

0 comments on commit 6b5b1a7

Please sign in to comment.