]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #19187: B-Splines - Crash with specific scenario
authorArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Fri, 5 Jun 2020 10:45:09 +0000 (13:45 +0300)
committerArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Fri, 5 Jun 2020 10:55:46 +0000 (13:55 +0300)
Prohibit tangency constraint between B-spline curve and its control polygon.

src/SketchPlugin/SketchPlugin_Validators.cpp

index fbc98f205b3266038eabf96d205ce2e108f7ea67..f3543bc29affe407f01d8454b775617d56d4ed96 100644 (file)
@@ -231,6 +231,9 @@ bool SketchPlugin_TangentAttrValidator::isValid(const AttributePtr& theAttribute
     std::set<FeaturePtr> aCoincidences = SketchPlugin_Tools::findCoincidentConstraints(aRefFea);
     for (std::set<FeaturePtr>::iterator anIt = aCoincidences.begin();
          anIt != aCoincidences.end() && !isValid; ++anIt) {
+      if ((*anIt)->getKind() == SketchPlugin_ConstraintCoincidenceInternal::ID())
+        continue; // skip internal constraints
+
       std::set<FeaturePtr> aCoinc;
       if (isApplicableCoincidence(*anIt, SketchPlugin_Constraint::ENTITY_A()))
         SketchPlugin_Tools::findCoincidences(*anIt, SketchPlugin_Constraint::ENTITY_B(),