From: dbv Date: Fri, 13 May 2016 15:59:30 +0000 (+0300) Subject: Fixed fillet on point with arc center. X-Git-Tag: V_2.3.1~90 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1ac0449ef966c932d04d85f2c0f30e50f6849dd7;p=modules%2Fshaper.git Fixed fillet on point with arc center. --- diff --git a/src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp b/src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp index 40c4a83b3..530895f30 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp @@ -554,6 +554,13 @@ void SketchPlugin_ConstraintFillet::attributeChanged(const std::string& theID) } aNewSetOfCoincides.insert(*anIt); } else if(aFeatureKind == SketchPlugin_Arc::ID() ) { + AttributePtr anAttrCenter = (*anIt)->attribute(SketchPlugin_Arc::CENTER_ID()); + std::shared_ptr aPointCenter2D = + std::dynamic_pointer_cast(anAttrCenter); + if(aPointCenter2D.get() && aFilletPnt2d->isEqual(aPointCenter2D->pnt())) { + aPointsToSkeep.insert(anAttrCenter); + continue; + } AttributePtr anAttrStart = (*anIt)->attribute(SketchPlugin_Arc::START_ID()); std::shared_ptr aPointStart2D = std::dynamic_pointer_cast(anAttrStart); @@ -1032,6 +1039,8 @@ std::set getCoincides(const FeaturePtr& theConstraintCoincidence) { std::set aCoincides; + std::shared_ptr aFilletPnt = SketchPlugin_Tools::getCoincidencePoint(theConstraintCoincidence); + SketchPlugin_Tools::findCoincidences(theConstraintCoincidence, SketchPlugin_ConstraintCoincidence::ENTITY_A(), aCoincides); @@ -1042,8 +1051,15 @@ std::set getCoincides(const FeaturePtr& theConstraintCoincidence) // Remove points from set of coincides. std::set aNewSetOfCoincides; for(std::set::iterator anIt = aCoincides.begin(); anIt != aCoincides.end(); ++anIt) { - if((*anIt)->getKind() == SketchPlugin_Line::ID() || - (*anIt)->getKind() == SketchPlugin_Arc::ID() ) { + if((*anIt)->getKind() == SketchPlugin_Line::ID()) { + aNewSetOfCoincides.insert(*anIt); + } else if((*anIt)->getKind() == SketchPlugin_Arc::ID()) { + AttributePtr anAttrCenter = (*anIt)->attribute(SketchPlugin_Arc::CENTER_ID()); + std::shared_ptr aPointCenter2D = + std::dynamic_pointer_cast(anAttrCenter); + if(aPointCenter2D.get() && aFilletPnt->isEqual(aPointCenter2D->pnt())) { + continue; + } aNewSetOfCoincides.insert(*anIt); } }