From: azv Date: Wed, 29 Mar 2017 10:56:21 +0000 (+0300) Subject: Issue #2058: Fatal error when create split constraint X-Git-Tag: V_2.7.0~151 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aa410adae884fd5448a5ac94d321cf264e489a91;p=modules%2Fshaper.git Issue #2058: Fatal error when create split constraint Fix wrong processing of tangent constraint between line and circle having one coincident point. --- diff --git a/src/SketchSolver/SketchSolver_ConstraintTangent.cpp b/src/SketchSolver/SketchSolver_ConstraintTangent.cpp index 709d09185..1c42ac69a 100644 --- a/src/SketchSolver/SketchSolver_ConstraintTangent.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintTangent.cpp @@ -307,12 +307,13 @@ ConstraintWrapperPtr createArcLineTangency(EntityWrapperPtr theEntity1, std::shared_ptr aCirc = std::dynamic_pointer_cast(anEntCirc->entity()); + std::shared_ptr anArc = std::dynamic_pointer_cast(aCirc); + std::shared_ptr aLine = std::dynamic_pointer_cast(anEntLine->entity()); GCSConstraintPtr aNewConstr; - if (theSharedPoint) { - std::shared_ptr anArc = std::dynamic_pointer_cast(aCirc); + if (theSharedPoint && anArc) { // do not process shared point between circle and line GCSPointPtr aPoint = std::dynamic_pointer_cast(theSharedPoint)->point();