-
- int aNbOutOfGroup = 0;
- if (isComplexFeature) {
- std::list<AttributePtr> aPoints =
- myBaseFeature->data()->attributes(GeomDataAPI_Point2D::typeId());
- std::list<AttributePtr>::iterator anIt = aPoints.begin();
- for (; anIt != aPoints.end(); ++anIt) {
- std::map<AttributePtr, Slvs_hEntity>::const_iterator aFound = myAttributeMap.find(*anIt);
- Slvs_hEntity anAttr = aFound != myAttributeMap.end() ?
- aFound->second : myGroup->getAttributeId(*anIt);
- Slvs_Entity anAttrEnt = myStorage->getEntity(anAttr);
-
- // Check the attribute changes coordinates
- std::shared_ptr<GeomDataAPI_Point2D> aPt =
- std::dynamic_pointer_cast<GeomDataAPI_Point2D>(*anIt);
- // Check the entity is not lying in the current group or it is not moved
- if (anAttr == SLVS_E_UNKNOWN || anAttrEnt.group != myGroup->getId() ||
- (anAttr <= anEntMaxID && !isMoved(aPt, anAttrEnt))) {
- if (anAttrEnt.group == SLVS_G_OUTOFGROUP)
- ++aNbOutOfGroup;
- theIsFullyMoved = false;
- }
- else {
- theAttributes.push_back(anAttr);
- // update point coordinates
- Slvs_Entity anAttrEnt = myStorage->getEntity(anAttr);
- double aNewPos[2] = {aPt->x(), aPt->y()};
- for (int i = 0; i < 2; i++) {
- Slvs_Param aParam = myStorage->getParameter(anAttrEnt.param[i]);
- aParam.val = aNewPos[i];
- myStorage->updateParameter(aParam);
- }
- }
- }