From: dmv Date: Mon, 31 Aug 2009 08:52:25 +0000 (+0000) Subject: IPAL21294 Change Orientation for Vector with "Create a Copy" creates an Edge. X-Git-Tag: V4_1_0_maintainance_FINAL~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=222cbfdf9135c255fcd43d32e7da29d1190f5898;p=modules%2Fgeom.git IPAL21294 Change Orientation for Vector with "Create a Copy" creates an Edge. --- diff --git a/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx b/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx index 9caef8a39..8e6a72c8e 100644 --- a/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx @@ -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); diff --git a/src/OBJECT/GEOM_AISVector.cxx b/src/OBJECT/GEOM_AISVector.cxx index 44262f149..d63f23365 100644 --- a/src/OBJECT/GEOM_AISVector.cxx +++ b/src/OBJECT/GEOM_AISVector.cxx @@ -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... diff --git a/src/ShHealOper/ShHealOper_ChangeOrientation.cxx b/src/ShHealOper/ShHealOper_ChangeOrientation.cxx index 8be204945..6df93ee2b 100644 --- a/src/ShHealOper/ShHealOper_ChangeOrientation.cxx +++ b/src/ShHealOper/ShHealOper_ChangeOrientation.cxx @@ -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;