X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Lin.cpp;h=dba5834abc1b7cb596f0cd088ddb4d954480f437;hb=3d28bcbab2f3ed0e40295e64f4e836caebc19fca;hp=8b64190ba21c78a21df5824d9c4d04d5161122e9;hpb=9bea53a5d0fc5c6aec52f4732ec45a9dcbe7354d;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Lin.cpp b/src/GeomAPI/GeomAPI_Lin.cpp index 8b64190ba..dba5834ab 100644 --- a/src/GeomAPI/GeomAPI_Lin.cpp +++ b/src/GeomAPI/GeomAPI_Lin.cpp @@ -20,7 +20,7 @@ #include #include -#define MY_LIN static_cast(myImpl) +#define MY_LIN implPtr() static gp_Lin* newLine(const double theStartX, const double theStartY, const double theStartZ, const double theEndX, const double theEndY, const double theEndZ) @@ -74,10 +74,10 @@ const std::shared_ptr GeomAPI_Lin::intersect( gp_Lin2d aPrjLine1 = ProjLib::Project(aPlane, *MY_LIN); gp_Lin2d aPrjLine2 = ProjLib::Project(aPlane, theLine->impl()); - IntAna2d_AnaIntersection anInter(aPrjLine1, aPrjLine1); + IntAna2d_AnaIntersection anInter(aPrjLine1, aPrjLine2); if (!anInter.IsDone() || anInter.IsEmpty()) return std::shared_ptr(); - const gp_Pnt2d& anIntPnt2d = anInter.Point(0).Value(); + const gp_Pnt2d& anIntPnt2d = anInter.Point(1).Value(); gp_Pnt aResult = ElSLib::Value(anIntPnt2d.X(), anIntPnt2d.Y(), aPlane); return std::shared_ptr(