]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'Dev_0.6.1' of newgeom:newgeom into Dev_0.6.1
authorszy <szy@opencascade.com>
Mon, 22 Dec 2014 14:09:56 +0000 (17:09 +0300)
committerszy <szy@opencascade.com>
Mon, 22 Dec 2014 14:09:56 +0000 (17:09 +0300)
src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp
src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp
src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp
src/FeaturesPlugin/FeaturesPlugin_Placement.cpp
src/Model/Model_ResultBody.cpp

index bd789b083debb7c22e154426d29a32e82b4c705b..74d4aac01e225cc82b28f069ecc5722a6dd28248 100644 (file)
@@ -129,13 +129,13 @@ void ExchangePlugin_ImportFeature::loadNamingDS(
 {  
   //load result
   theResultBody->store(theGeomShape);
-  std::string aPrefix =  data()->name() + "/";
   int aTag(1);
-  std::string aNameMS = aPrefix + "Shape";
+  std::string aNameMS = "Shape";
   theResultBody->loadFirstLevel(theGeomShape, aNameMS, aTag);
-  std::string aNameDE = aPrefix + "DiscEdges";
+  std::string aNameDE = "DiscEdges";
   theResultBody->loadDisconnectedEdges(theGeomShape, aNameDE, aTag);
-  std::string aNameDV = aPrefix + "DiscVertexes";
+  std::string aNameDV = "DiscVertexes";
   theResultBody->loadDisconnectedVertexes(theGeomShape, aNameDV, aTag); 
 }
 
index 580a3163d9e6727205dde5995458d45483c39727..779baa1f10ba51e6adf047583888dd1f10919130 100644 (file)
@@ -103,10 +103,11 @@ void FeaturesPlugin_Boolean::LoadNamingDS(GeomAlgoAPI_Boolean* theFeature,
 
   GeomAPI_DataMapOfShapeShape* aSubShapes = new GeomAPI_DataMapOfShapeShape();
   theFeature->mapOfShapes(*aSubShapes);
-  std::string aPrefix =  data()->name() + "/";
+
   // Put in DF modified faces
-  theResultBody->loadAndOrientModifiedShapes(theFeature->makeShape(), theObject, FACE, _MODIFY_TAG, aPrefix, *aSubShapes);
-  theResultBody->loadAndOrientModifiedShapes(theFeature->makeShape(), theTool,   FACE, _MODIFY_TAG, aPrefix, *aSubShapes);
+  std::string aModName = "Modified";
+  theResultBody->loadAndOrientModifiedShapes(theFeature->makeShape(), theObject, FACE, _MODIFY_TAG, aModName, *aSubShapes);
+  theResultBody->loadAndOrientModifiedShapes(theFeature->makeShape(), theTool,   FACE, _MODIFY_TAG, aModName, *aSubShapes);
 
   //Put in DF deleted faces
   theResultBody->loadDeletedShapes(theFeature->makeShape(), theObject, FACE, _DELETED_TAG);
index b3fd919ee3b4d53512c7dd039aff5c37a91d887b..265ba65761ebb4871d0d9eea4dfe68ca8a2b9cd4 100644 (file)
@@ -103,29 +103,31 @@ void FeaturesPlugin_Extrusion::LoadNamingDS(GeomAlgoAPI_Extrusion& theFeature,
 
   GeomAPI_DataMapOfShapeShape* aSubShapes = new GeomAPI_DataMapOfShapeShape();
   theFeature.mapOfShapes(*aSubShapes);
-  std::string aPrefix =  data()->name() + "/";
-    //Insert lateral face : Face from Edge
-  theResultBody->loadAndOrientGeneratedShapes(theFeature.makeShape(), theBasis, EDGE,_LATERAL_TAG, aPrefix, *aSubShapes);
+
+  //Insert lateral face : Face from Edge
+  std::string aLatName = "LateralFace";
+  theResultBody->loadAndOrientGeneratedShapes(theFeature.makeShape(), theBasis, EDGE,_LATERAL_TAG, aLatName, *aSubShapes);
 
   //Insert bottom face
+  std::string aBotName = "BottomFace";
   std::shared_ptr<GeomAPI_Shape> aBottomFace = theFeature.firstShape();  
   if (!aBottomFace->isNull()) {
        if (aSubShapes->isBound(aBottomFace)) {  
                aBottomFace = aSubShapes->find(aBottomFace);            
     }     
-    theResultBody->generated(aBottomFace, aPrefix, _FIRST_TAG);
+    theResultBody->generated(aBottomFace, aBotName, _FIRST_TAG);
   }
 
 
 
   //Insert top face
+  std::string aTopName = "TopFace";
   std::shared_ptr<GeomAPI_Shape> aTopFace = theFeature.lastShape();
   if (!aTopFace->isNull()) {
     if (aSubShapes->isBound(aTopFace)) {        
       aTopFace = aSubShapes->find(aTopFace);   
     }
-    theResultBody->generated(aTopFace, aPrefix, _LAST_TAG);
+    theResultBody->generated(aTopFace, aTopName, _LAST_TAG);
   }
-
   
 }
index c8ff8278b71c32922295abc3f14bd26737770bfe..44ad7523e4f6330e8853cec73da101699c1def22 100644 (file)
@@ -126,8 +126,9 @@ void FeaturesPlugin_Placement::LoadNamingDS(
 
   GeomAPI_DataMapOfShapeShape* aSubShapes = new GeomAPI_DataMapOfShapeShape();
   theFeature.mapOfShapes(*aSubShapes);
-   std::string aPrefix =  data()->name() + "/";
+  
     // put modifed faces in DF
-  theResultBody->loadAndOrientModifiedShapes(theFeature.makeShape(), theSlaveObject, _FACE, _MODIFIEDF_TAG, aPrefix, *aSubShapes); 
+  std::string aModName = "Modified";
+  theResultBody->loadAndOrientModifiedShapes(theFeature.makeShape(), theSlaveObject, _FACE, _MODIFIEDF_TAG, aModName, *aSubShapes); 
 
 }
index 0bfd48103112c47ee6bbac54c9d4c32068b2e29f..c958e6239fb22b92edfd0dde7cfa5f794301b2c9 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <Model_ResultBody.h>
 #include <Model_Data.h>
+#include <Model_Document.h>
 #include <TNaming_Builder.hxx>
 #include <TNaming_NamedShape.hxx>
 #include <TDataStd_Name.hxx>
@@ -147,7 +148,9 @@ TNaming_Builder* Model_ResultBody::builder(const int theTag)
 
 void Model_ResultBody::buildName(const int theTag, const std::string& theName)
 {
-  std::string aName = data()->name() + "/" + theName;
+  std::string aName = data()->name() + "/" + theName; 
+  std::shared_ptr<Model_Document> aDoc = std::dynamic_pointer_cast<Model_Document>(document());
+  aDoc->addNamingName(builder(theTag)->NamedShape()->Label(), aName);
   TDataStd_Name::Set(builder(theTag)->NamedShape()->Label(),aName.c_str());
 }
 void Model_ResultBody::generated(