]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
IPAL21294 Change Orientation for Vector with "Create a Copy" creates an Edge.
authordmv <dmv@opencascade.com>
Mon, 31 Aug 2009 08:52:25 +0000 (08:52 +0000)
committerdmv <dmv@opencascade.com>
Mon, 31 Aug 2009 08:52:25 +0000 (08:52 +0000)
src/GEOMImpl/GEOMImpl_IHealingOperations.cxx
src/OBJECT/GEOM_AISVector.cxx
src/ShHealOper/ShHealOper_ChangeOrientation.cxx

index 9caef8a39d725ebfd7d98ca59e9fd2a5c73446ff..8e6a72c8ea02909642a51e3f6b49f491d18398f8 100644 (file)
@@ -872,7 +872,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::ChangeOrientationCopy (Handle(G
     return NULL; //There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), theObject->GetType() );
 
   //Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), CHANGE_ORIENTATION);
index 44262f14945a2876295b83cdf45787b52fde0622..d63f233657adca5b811186061269d7d7a7e5ec4f 100644 (file)
@@ -79,10 +79,10 @@ void GEOM_AISVector::Compute (const Handle(PrsMgr_PresentationManager3d)& thePre
 
       Handle(Graphic3d_Group) aG = Prs3d_Root::CurrentGroup(thePrs);
 
-      //thePrs->Color(myShadingColor.Name());
-      //aG->BeginPrimitives();
-      Prs3d_Arrow::Draw(thePrs, aP2, aDir, PI/180.*5., aDist/10.);
-      //aG->EndPrimitives();
+      if ( anEdgeE.Orientation() == TopAbs_FORWARD )
+        Prs3d_Arrow::Draw(thePrs, aP2, aDir, PI/180.*5., aDist/10.);
+      else
+        Prs3d_Arrow::Draw(thePrs, aP1, -aDir, PI/180.*5., aDist/10.);
     }
   }
   //thePrs->ReCompute(); // for hidden line recomputation if necessary...
index 8be204945f5d98bc617269ac0b0653f5a56e6771..6df93ee2b7ef32015555efbf49530adb5ea92760 100644 (file)
@@ -73,11 +73,14 @@ Standard_Boolean ShHealOper_ChangeOrientation::Perform()
     }
     myResultShape.Reverse();
   }
-  else if (myInitShape.ShapeType() == TopAbs_WIRE) {
-    myResultShape = myInitShape.Reversed();
-  }
-  else if (myInitShape.ShapeType() == TopAbs_EDGE) {
-    myResultShape = myInitShape.Reversed();
+  else if ( myInitShape.ShapeType() == TopAbs_WIRE || myInitShape.ShapeType() == TopAbs_EDGE) {
+    myResultShape = myInitShape.EmptyCopied();
+    TopoDS_Iterator itr(myInitShape);
+    while (itr.More()) {
+      B.Add(myResultShape,itr.Value());
+      itr.Next();
+    }
+    myResultShape.Reverse();
   }
   else {
     return false;