From: nds Date: Mon, 11 Apr 2016 12:35:37 +0000 (+0300) Subject: Issue #1393. An attempt to make infinite lines and use the edges' direction vectors. X-Git-Tag: V_2.3.0~249 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a2297469b8bd178028abcfad9572f9f007cf82b6;p=modules%2Fshaper.git Issue #1393. An attempt to make infinite lines and use the edges' direction vectors. --- diff --git a/src/SketcherPrs/SketcherPrs_Angle.cpp b/src/SketcherPrs/SketcherPrs_Angle.cpp index 49f73b223..d4264233e 100644 --- a/src/SketcherPrs/SketcherPrs_Angle.cpp +++ b/src/SketcherPrs/SketcherPrs_Angle.cpp @@ -121,7 +121,26 @@ void SketcherPrs_Angle::Compute(const Handle(PrsMgr_PresentationManager3d)& theP switch (anAngleType) { case SketcherPrs_Tools::ANGLE_DIRECT: { SetArrowVisible(Standard_False/*first*/, Standard_True/*second*/); + /* + std::shared_ptr anEdge1 = std::shared_ptr(new GeomAPI_Edge(aShape1)); + std::shared_ptr anEdge2 = std::shared_ptr(new GeomAPI_Edge(aShape2)); + std::shared_ptr aLin1 = anEdge1->line(); + std::shared_ptr aLin2 = anEdge2->line(); + + std::shared_ptr aCenterPnt = aLin1->intersect(aLin2); + std::shared_ptr aDir1 = aLin1->direction(); + std::shared_ptr aDir2 = aLin2->direction(); + + const gp_Pnt& aCenterPoint = aCenterPnt->impl(); + + const gp_Dir& aDirection1 = aDir1->impl(); + const gp_Dir& aDirection2 = aDir2->impl(); + + gp_Pnt aFirstPoint = aCenterPoint.Translated (gp_Vec (aDirection1)); + gp_Pnt aSecondPoint = aCenterPoint.Translated (gp_Vec (aDirection2)); + + SetMeasuredGeometry(aFirstPoint, aCenterPoint, aSecondPoint);*/ SetMeasuredGeometry(aEdge1, aEdge2, Standard_False); bool isReversedPlanes = isAnglePlaneReversedToSketchPlane(); SetAngleReversed(!isReversedPlanes);