Raytracing: Using names instead of labels in exported files - fixes #1663

This commit is contained in:
Yorik van Havre 2014-08-07 22:24:57 -03:00
parent 7778988faa
commit 6b5b1a7443
2 changed files with 4 additions and 4 deletions

View File

@ -52,7 +52,7 @@ 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)
@ -60,7 +60,7 @@ App::DocumentObjectExecReturn *LuxFeature::execute(void)
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");

View File

@ -53,7 +53,7 @@ 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)
@ -61,7 +61,7 @@ App::DocumentObjectExecReturn *RayFeature::execute(void)
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");