X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_BodyBuilder.cpp;h=bacee75ebf41ae62d1dca4d11fa31add5e425b7c;hb=cdfb03d58ed695e291aa3b7cd3c342051e18e444;hp=0efc177974662432e046e31a3bcbb562d2f2456c;hpb=f328eabbb64e9fe347f36728710ebe1ebb00de6e;p=modules%2Fshaper.git diff --git a/src/Model/Model_BodyBuilder.cpp b/src/Model/Model_BodyBuilder.cpp index 0efc17797..bacee75eb 100755 --- a/src/Model/Model_BodyBuilder.cpp +++ b/src/Model/Model_BodyBuilder.cpp @@ -86,6 +86,8 @@ static void evolutionToSelectionRec(TDF_Label theLab, const bool theFlag) { aBuilder.Delete(aPairsIter->first); } else if (anEvol == TNaming_PRIMITIVE) { aBuilder.Generated(aPairsIter->second); + } else if (anEvol == TNaming_SELECTED) { + aBuilder.Select(aPairsIter->first, aPairsIter->second); } } // recursive call for all sub-labels @@ -213,6 +215,22 @@ void Model_BodyBuilder::storeModified(const std::shared_ptr& theO } } } + +void Model_BodyBuilder::storeWithoutNaming(const std::shared_ptr& theShape) +{ + std::shared_ptr aData = std::dynamic_pointer_cast(data()); + if (aData) { + clean(); + if (!theShape.get()) + return; // bad shape + TopoDS_Shape aShape = theShape->impl(); + if (aShape.IsNull()) + return; // null shape inside + TNaming_Builder aBuilder(aData->shapeLab()); + aBuilder.Select(aShape, aShape); + } +} + void Model_BodyBuilder::clean() { std::vector::iterator aBuilder = myBuilders.begin();