From: vsv Date: Wed, 18 Mar 2015 16:09:28 +0000 (+0300) Subject: Tangent presentation correction X-Git-Tag: V_1.1.0~109^2^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f7a976b98d8cadadcb54a61e42ddb66e00759689;p=modules%2Fshaper.git Tangent presentation correction --- diff --git a/src/SketcherPrs/SketcherPrs_Tangent.cpp b/src/SketcherPrs/SketcherPrs_Tangent.cpp index d41d5dc1b..88dcd35c3 100644 --- a/src/SketcherPrs/SketcherPrs_Tangent.cpp +++ b/src/SketcherPrs/SketcherPrs_Tangent.cpp @@ -78,14 +78,20 @@ void SketcherPrs_Tangent::drawLines(const Handle(Prs3d_Presentation)& thePrs, Qu std::shared_ptr aCurve1 = std::shared_ptr(new GeomAPI_Curve(aShape1)); std::shared_ptr aCurve2 = std::shared_ptr(new GeomAPI_Curve(aShape2)); - if (aCurve1->isLine()) { + if (aCurve1->isCircle() && aCurve2->isLine()) { + addLine(aGroup, SketchPlugin_Constraint::ENTITY_B()); + GeomAdaptor_Curve aAdaptor(aCurve1->impl(), aCurve1->startParam(), aCurve1->endParam()); + StdPrs_DeflectionCurve::Add(thePrs,aAdaptor,myDrawer); + } else if (aCurve1->isLine() && aCurve2->isCircle()) { addLine(aGroup, SketchPlugin_Constraint::ENTITY_A()); GeomAdaptor_Curve aAdaptor(aCurve2->impl(), aCurve2->startParam(), aCurve2->endParam()); StdPrs_DeflectionCurve::Add(thePrs,aAdaptor,myDrawer); } else { - addLine(aGroup, SketchPlugin_Constraint::ENTITY_B()); - GeomAdaptor_Curve aAdaptor(aCurve1->impl(), aCurve1->startParam(), aCurve1->endParam()); - StdPrs_DeflectionCurve::Add(thePrs,aAdaptor,myDrawer); + // Both curves are arcs + GeomAdaptor_Curve aAdaptor1(aCurve1->impl(), aCurve1->startParam(), aCurve1->endParam()); + StdPrs_DeflectionCurve::Add(thePrs, aAdaptor1, myDrawer); + GeomAdaptor_Curve aAdaptor2(aCurve2->impl(), aCurve2->startParam(), aCurve2->endParam()); + StdPrs_DeflectionCurve::Add(thePrs, aAdaptor2, myDrawer); } }