From 021afd7f7f69143c014d060924dd987849768b1e Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 17 May 2017 10:23:05 +0300 Subject: [PATCH] Revert setting coincidence to attribute(not object) of touched feature by the Trim feature. --- src/SketchPlugin/SketchPlugin_Trim.cpp | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/SketchPlugin/SketchPlugin_Trim.cpp b/src/SketchPlugin/SketchPlugin_Trim.cpp index 065444786..53a4ad23c 100644 --- a/src/SketchPlugin/SketchPlugin_Trim.cpp +++ b/src/SketchPlugin/SketchPlugin_Trim.cpp @@ -345,29 +345,10 @@ void SketchPlugin_Trim::execute() } } const std::list& anObjects = anInfo.second; - std::shared_ptr aPoint2D = sketch()->to2D(aPoint); for (std::list::const_iterator anObjectIt = anObjects.begin(); anObjectIt != anObjects.end(); anObjectIt++) { - ObjectPtr anObject = *anObjectIt; - // find an attribute on the point feature and if it is, append it into attribute list - // the case when the feature just touch the source feature, not intersect - FeaturePtr aRefFeature = ModelAPI_Feature::feature(anObject); - std::list > anAttributes = - aRefFeature->data()->attributes(GeomDataAPI_Point2D::typeId()); - bool aFoundAttribute = false; - for (std::list >::const_iterator - aPntAttrIt = anAttributes.begin(); aPntAttrIt != anAttributes.end(); aPntAttrIt++) { - std::shared_ptr anAttrPoint = - std::dynamic_pointer_cast(*aPntAttrIt); - if (anAttrPoint->pnt()->isEqual(aPoint2D)) { - createConstraint(SketchPlugin_ConstraintCoincidence::ID(), aPointAttribute, anAttrPoint); - aFoundAttribute = true; - break; - } - } - if (!aFoundAttribute) - createConstraintToObject(SketchPlugin_ConstraintCoincidence::ID(), aPointAttribute, - anObject); + createConstraintToObject(SketchPlugin_ConstraintCoincidence::ID(), aPointAttribute, + *anObjectIt); } } -- 2.39.2