From aa410adae884fd5448a5ac94d321cf264e489a91 Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 29 Mar 2017 13:56:21 +0300 Subject: [PATCH] Issue #2058: Fatal error when create split constraint Fix wrong processing of tangent constraint between line and circle having one coincident point. --- src/SketchSolver/SketchSolver_ConstraintTangent.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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(); -- 2.39.2