]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Make the copies fixed in multi-rotation, multi-translation (issue #1471)
authorazv <azv@opencascade.com>
Wed, 4 May 2016 14:03:26 +0000 (17:03 +0300)
committerazv <azv@opencascade.com>
Wed, 4 May 2016 14:03:43 +0000 (17:03 +0300)
src/SketchSolver/SketchSolver_Storage.cpp

index c63d28e437a662c61818cf2c85b400e6f0f3516d..d77c0d702b25848494b5df51ed100e1d8b14f688 100644 (file)
@@ -175,9 +175,9 @@ bool SketchSolver_Storage::update(FeaturePtr theFeature, const GroupID& theGroup
     BuilderPtr aBuilder = SketchSolver_Manager::instance()->builder();
     GroupID aGroup = theGroup != GID_UNKNOWN ? theGroup : myGroupID;
     // Check external feature
-    std::shared_ptr<SketchPlugin_Feature> aSketchFeature = 
-        std::dynamic_pointer_cast<SketchPlugin_Feature>(theFeature);
-    if (aSketchFeature && aSketchFeature->isExternal())
+    std::shared_ptr<SketchPlugin_SketchEntity> aSketchFeature = 
+        std::dynamic_pointer_cast<SketchPlugin_SketchEntity>(theFeature);
+    if (aSketchFeature && (aSketchFeature->isExternal() || aSketchFeature->isCopy()))
       aGroup = GID_OUTOFGROUP;
     aRelated = aBuilder->createFeature(theFeature, aSubs, aGroup);
     if (!aRelated)
@@ -221,9 +221,9 @@ bool SketchSolver_Storage::update(AttributePtr theAttribute, const GroupID& theG
     BuilderPtr aBuilder = SketchSolver_Manager::instance()->builder();
     GroupID aGroup = theGroup != GID_UNKNOWN ? theGroup : myGroupID;
     // Check attribute of external features
-    std::shared_ptr<SketchPlugin_Feature> aSketchFeature = 
-        std::dynamic_pointer_cast<SketchPlugin_Feature>(theAttribute->owner());
-    if (aSketchFeature && aSketchFeature->isExternal())
+    std::shared_ptr<SketchPlugin_SketchEntity> aSketchFeature = 
+        std::dynamic_pointer_cast<SketchPlugin_SketchEntity>(theAttribute->owner());
+    if (aSketchFeature && (aSketchFeature->isExternal() || aSketchFeature->isCopy()))
       aGroup = GID_OUTOFGROUP;
     aRelated = aBuilder->createAttribute(anAttribute, aGroup);
     if (!aRelated)