Do not add feature (ConstraintCoincidence) into a list to remove, if the coincident point is not found. Because, there may be a coincidence between any attribute of split feature and another feature.
if (anAttribute.get())
aCoincidentPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(anAttribute);
}
- if (aCoincidentPoint.get()) {
- if (isToFeature)
- theCoincidenceToFeature[aRefFeature] = std::make_pair(anAttributeToBeModified,
- aCoincidentPoint);
- }
- else
- theFeaturesToDelete.insert(aRefFeature); /// this case should not happen
+ if (aCoincidentPoint.get() && isToFeature)
+ theCoincidenceToFeature[aRefFeature] = std::make_pair(anAttributeToBeModified,
+ aCoincidentPoint);
}
}
}