+/* TODO GROUPS
+bool BLSURFPlugin_Hypothesis::_setEnfVertexWithGroup(double x, double y, double z, const std::string groupName) throw (std::invalid_argument)
+{
+ bool isModified = false;
+ std::vector<double> enfVertex;
+ enfVertex.push_back(x);
+ enfVertex.push_back(y);
+ enfVertex.push_back(z);
+ if (_enfVertexList.find(enfVertex) != _enfVertexList.end()) {
+ TEnfGroupName oldGroupName = _enfVertexGroupNameMap[enfVertex];
+ _enfVertexGroupNameMap[enfVertex] = groupName;
+ if ((groupName != "") && (groupName != oldGroupName)) {
+ MESSAGE("Group name is not empty");
+ TEnfVertexList& enfVertexList = _groupNameEnfVertexListMap[groupName];
+ enfVertexList.insert(enfVertex);
+ isModified = true;
+ }
+ else {
+ if (oldGroupName != "") {
+ // groupName = "" => remove group name
+ TGroupNameEnfVertexListMap::iterator it = _groupNameEnfVertexListMap.find(oldGroupName);
+ if (it != _groupNameEnfVertexListMap.end()) {
+ _groupNameEnfVertexListMap[oldGroupName].erase(enfVertex);
+ if (_groupNameEnfVertexListMap[oldGroupName].size() == 0)
+ _groupNameEnfVertexListMap.erase(oldGroupName);
+ isModified = true;
+ }
+ }
+ }
+ return isModified;
+ }
+
+ std::ostringstream msg ;
+ msg << "No enforced vertex at (" << x << "," << y << "," << z << ")" ;
+ throw std::invalid_argument(msg.str());
+}
+
+//=======================================================================
+//function : SetEnforcedVertexGroupName
+//=======================================================================
+void BLSURFPlugin_Hypothesis::SetEnforcedVertexGroupName(double x, double y, double z,
+ const TEnfGroupName& groupName)
+ throw (std::invalid_argument)
+{
+ bool toNotify = _setEnfVertexWithGroup(x,y,z,groupName);
+ if (toNotify)
+ NotifySubMeshesHypothesisModification();
+// bool toNotify = false;
+// TEnfVertex enfVertex;
+// enfVertex.push_back(x);
+// enfVertex.push_back(y);
+// enfVertex.push_back(z);
+//
+// if (_enfVertexList.find(enfVertex) != _enfVertexList.end()) {
+// TEnfGroupName oldGroupName = _enfVertexGroupNameMap[enfVertex];
+// _enfVertexGroupNameMap[enfVertex] = groupName;
+// if ((groupName != "") && (groupName != oldGroupName)) {
+// MESSAGE("Group name is not empty");
+// TEnfVertexList& enfVertexList = _groupNameEnfVertexListMap[groupName];
+// enfVertexList.insert(enfVertex);
+// toNotify = true;
+// }
+// else {
+// if (oldGroupName != "") {
+// // groupName = "" => remove group name
+// TGroupNameEnfVertexListMap::iterator it = _groupNameEnfVertexListMap.find(oldGroupName);
+// if (it != _groupNameEnfVertexListMap.end()) {
+// _groupNameEnfVertexListMap[oldGroupName].erase(enfVertex);
+// if (_groupNameEnfVertexListMap[oldGroupName].size() == 0)
+// _groupNameEnfVertexListMap.erase(oldGroupName);
+// toNotify = true;
+// }
+// }
+// }
+// if (toNotify)
+// NotifySubMeshesHypothesisModification();
+// return;
+// }
+
+// // std::ostringstream msg ;
+// // msg << "No enforced vertex at (" << x << "," << y << "," << z << ")" ;
+// // throw std::invalid_argument(msg.str());
+}
+
+
+//=======================================================================
+//function : GetEnforcedVertexGroupName
+//=======================================================================
+BLSURFPlugin_Hypothesis::TEnfGroupName BLSURFPlugin_Hypothesis::GetEnforcedVertexGroupName(double x, double y, double z)
+ throw (std::invalid_argument)
+{
+ TEnfVertex enfVertex;
+ enfVertex.push_back(x);
+ enfVertex.push_back(y);
+ enfVertex.push_back(z);
+
+ if (_enfVertexGroupNameMap.find(enfVertex) != _enfVertexGroupNameMap.end())
+ return _enfVertexGroupNameMap[enfVertex];
+
+ std::ostringstream msg ;
+ msg << "No enforced vertex at (" << x << "," << y << "," << z << ")" ;
+ throw std::invalid_argument(msg.str());
+}
+*/
+