From: vsv Date: Tue, 22 May 2018 08:56:21 +0000 (+0300) Subject: Task 2.3: Fix compilation error X-Git-Tag: EDF_2018-1~33^2~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=161b28ca5446f93d75500cf57066f274b943e166;p=modules%2Fshaper.git Task 2.3: Fix compilation error --- diff --git a/src/GeomAPI/GeomAPI_Edge.cpp b/src/GeomAPI/GeomAPI_Edge.cpp index 8c219972d..242b6809e 100644 --- a/src/GeomAPI/GeomAPI_Edge.cpp +++ b/src/GeomAPI/GeomAPI_Edge.cpp @@ -282,10 +282,9 @@ bool GeomAPI_Edge::isInPlane(std::shared_ptr thePlane) const return inPlane; } -std::list> GeomAPI_Edge::intersectWithPlane( - const std::shared_ptr thePlane) const +void GeomAPI_Edge::intersectWithPlane(const std::shared_ptr thePlane, + std::list>& theResult) const { - std::list aResList; double aFirst, aLast; const TopoDS_Shape& aShape = const_cast(this)->impl(); Handle(Geom_Curve) aCurve = BRep_Tool::Curve((const TopoDS_Edge&)aShape, aFirst, aLast); @@ -302,11 +301,10 @@ std::list> GeomAPI_Edge::intersectWithPlane( for (int i = 1; i <= aIntersect.NbPoints(); i++) { aPnt = aIntersect.Point(i); std::shared_ptr aPntPtr(new GeomAPI_Pnt(aPnt.X(), aPnt.Y(), aPnt.Z())); - aResList.push_back(aPntPtr); + theResult.push_back(aPntPtr); } } } - return aResList; } double GeomAPI_Edge::length() const diff --git a/src/GeomAPI/GeomAPI_Edge.h b/src/GeomAPI/GeomAPI_Edge.h index 2827c2f0d..e165279f2 100644 --- a/src/GeomAPI/GeomAPI_Edge.h +++ b/src/GeomAPI/GeomAPI_Edge.h @@ -97,8 +97,7 @@ public: /// Returns list of intersection points if the edge has intersections with the given plane /// \param thePlane a plane for intersection GEOMAPI_EXPORT - std::list> - intersectWithPlane(const std::shared_ptr thePlane) const; + void intersectWithPlane(const std::shared_ptr thePlane, std::list >& theResult) const; /// Returns edge length. GEOMAPI_EXPORT