X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMImpl%2FGEOMImpl_IShapesOperations.cxx;fp=src%2FGEOMImpl%2FGEOMImpl_IShapesOperations.cxx;h=db197be5ce5b3afe906ca442f691599adb43bd1f;hb=bc5d3eeb20a6615b103de29fce6dc64eab45785e;hp=6b611088d9491ae5c34a2bd568f032521b518550;hpb=e5d35ef4b2616bfd846c320f801fe06c620000b7;p=modules%2Fgeom.git diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx index 6b611088d..db197be5c 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx @@ -4715,6 +4715,42 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlaceByHistory return aResult; } +//======================================================================= +//function : GetInPlaceMap +//purpose : +//======================================================================= +void GEOMImpl_IShapesOperations::GetInPlaceMap (Handle(GEOM_Object) theShapeWhere, + Handle(GEOM_Object) theShapeWhat, + std::vector< std::vector< int > > & theResVec) +{ + SetErrorCode(KO); + + if (theShapeWhere.IsNull() || theShapeWhat.IsNull()) return; + + TopoDS_Shape aWhere = theShapeWhere->GetValue(); + TopoDS_Shape aWhat = theShapeWhat->GetValue(); + + if (aWhere.IsNull() || aWhat.IsNull()) return; + + Handle(GEOM_Function) aWhereFunction = theShapeWhere->GetLastFunction(); + if (aWhereFunction.IsNull()) return; + + bool isFound = GEOMAlgo_GetInPlaceAPI::GetInPlaceMap( aWhereFunction, aWhat, theResVec ); + + if ( isFound ) + SetErrorCode(OK); + + Handle(GEOM_Function) aFunction = + GEOM::GetCreatedLast(theShapeWhere,theShapeWhat)->GetLastFunction(); + + GEOM::TPythonDump(aFunction, /*append=*/true) + << "resultList = geompy.GetInPlaceMap( " + << theShapeWhere << ", " + << theShapeWhat << ")"; + + return; +} + //======================================================================= //function : isSameEdge //purpose : Returns True if two edges coincide