X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesAPI%2FFeaturesAPI_Pipe.cpp;h=f99cccef2a3d2630b9e76c3b89649855420a33c8;hb=792ff3795180cb50ef97dfc173c772b8897b8862;hp=3ca9a4e54e78263ea85fd030522843c8feeee35e;hpb=e27b6a5068103b531008ff9cb324ae19c7d892d5;p=modules%2Fshaper.git diff --git a/src/FeaturesAPI/FeaturesAPI_Pipe.cpp b/src/FeaturesAPI/FeaturesAPI_Pipe.cpp index 3ca9a4e54..f99cccef2 100644 --- a/src/FeaturesAPI/FeaturesAPI_Pipe.cpp +++ b/src/FeaturesAPI/FeaturesAPI_Pipe.cpp @@ -6,6 +6,7 @@ #include "FeaturesAPI_Pipe.h" +#include #include //================================================================================================== @@ -110,6 +111,35 @@ void FeaturesAPI_Pipe::setByBasePathLocations(const std::listdocument()); + + AttributeSelectionListPtr anAttrObjects = aBase->selectionList(FeaturesPlugin_Pipe::BASE_OBJECTS_ID()); + AttributeSelectionPtr anAttrPath = aBase->selection(FeaturesPlugin_Pipe::PATH_OBJECT_ID()); + + theDumper << aBase << " = model.addPipe(" << aDocName << ", " + << anAttrObjects << ", " << anAttrPath; + + std::string aCreationMethod = aBase->string(FeaturesPlugin_Pipe::CREATION_METHOD())->value(); + + if(aCreationMethod == FeaturesPlugin_Pipe::CREATION_METHOD_SIMPLE()) { + // Do nothing; + } else if(aCreationMethod == FeaturesPlugin_Pipe::CREATION_METHOD_BINORMAL()) { + AttributeSelectionPtr anAttrBiNormal = aBase->selection(FeaturesPlugin_Pipe::BINORMAL_ID()); + + theDumper << ", " << anAttrBiNormal; + } else if(aCreationMethod == FeaturesPlugin_Pipe::CREATION_METHOD_LOCATIONS()) { + AttributeSelectionListPtr anAttrLocations = aBase->selectionList(FeaturesPlugin_Pipe::LOCATIONS_ID()); + + theDumper << ", " << anAttrLocations; + } + + theDumper << ")" << std::endl; +} + //================================================================================================== PipePtr addPipe(const std::shared_ptr& thePart, const std::list& theBaseObjects,