// --------------
// read a result
// --------------
- std::set<std::string> groupsToRemove = _hyp->GetGroupsToRemove();
+ GHS3DPlugin_Hypothesis::TSetStrings groupsToRemove = GHS3DPlugin_Hypothesis::GetGroupsToRemove(_hyp);
Ok = readGMFFile(aResultFileName.ToCString(),
#ifdef WITH_SMESH_CANCEL_COMPUTE
if ( Ok ) {
GHS3DPlugin_Hypothesis* that = (GHS3DPlugin_Hypothesis*)this->_hyp;
- that->ClearGroupsToRemove();
+ if (that)
+ that->ClearGroupsToRemove();
}
// ---------------------
// remove working files
_enfVertexEntrySizeList(DefaultGHS3DEnforcedVertexEntryValues()),
_coordsEnfVertexMap(DefaultCoordsGHS3DEnforcedVertexMap()),
_geomEntryEnfVertexMap(DefaultGeomEntryGHS3DEnforcedVertexMap()),
-
_enfMeshList(DefaultGHS3DEnforcedMeshList()),
_entryEnfMeshMap(DefaultEntryGHS3DEnforcedMeshListMap()),
_enfNodes(TIDSortedNodeGroupMap()),
_enfEdges(TIDSortedElemGroupMap()),
_enfTriangles(TIDSortedElemGroupMap()),
_nodeIDToSizeMap(DefaultID2SizeMap()),
- _elementIDToSizeMap(DefaultID2SizeMap())
+ _elementIDToSizeMap(DefaultID2SizeMap()),
+ _groupsToRemove(DefaultGroupsToRemove())
{
_name = "GHS3D_Parameters";
_param_algo_dim = 3;
- _groupsToRemove.clear();
}
//=======================================================================
{
return hyp ? hyp->_GetElementIDToSizeMap(): DefaultID2SizeMap();
}
+
+GHS3DPlugin_Hypothesis::TSetStrings GHS3DPlugin_Hypothesis::GetGroupsToRemove(const GHS3DPlugin_Hypothesis* hyp)
+{
+ return hyp ? hyp->_GetGroupsToRemove(): DefaultGroupsToRemove();
+}
typedef std::map<const SMDS_MeshElement*, std::string, TIDCompare > TIDSortedElemGroupMap;
typedef std::map<const SMDS_MeshNode*, std::string, TIDCompare > TIDSortedNodeGroupMap;
+ typedef std::set<std::string> TSetStrings;
/*!
* To mesh "holes" in a solid or not. Default is to mesh.
const TIDSortedElemGroupMap _GetEnforcedTriangles() const { return _enfTriangles; }
const TID2SizeMap _GetNodeIDToSizeMap() const {return _nodeIDToSizeMap; }
const TID2SizeMap _GetElementIDToSizeMap() const {return _elementIDToSizeMap; }
+ const TSetStrings _GetGroupsToRemove() const {return _groupsToRemove; }
/*!
* \brief Return the enforced vertices
*/
static TIDSortedElemGroupMap GetEnforcedTriangles(const GHS3DPlugin_Hypothesis* hyp);
static TID2SizeMap GetNodeIDToSizeMap(const GHS3DPlugin_Hypothesis* hyp);
static TID2SizeMap GetElementIDToSizeMap(const GHS3DPlugin_Hypothesis* hyp);
-
- std::set<std::string> GetGroupsToRemove() const {return _groupsToRemove;}
+ static TSetStrings GetGroupsToRemove(const GHS3DPlugin_Hypothesis* hyp);
void ClearGroupsToRemove();
static bool DefaultMeshHoles();
static TIDSortedNodeGroupMap DefaultIDSortedNodeGroupMap() {return TIDSortedNodeGroupMap();}
static TIDSortedElemGroupMap DefaultIDSortedElemGroupMap() {return TIDSortedElemGroupMap();}
static TID2SizeMap DefaultID2SizeMap() {return TID2SizeMap();}
+ static TSetStrings DefaultGroupsToRemove() {return TSetStrings();}
// Persistence
virtual std::ostream & SaveTo(std::ostream & save);
TID2SizeMap _elementIDToSizeMap;
std::map<std::string, TIDSortedElemSet > _entryToElemsMap;
- std::set<std::string> _groupsToRemove;
+ TSetStrings _groupsToRemove;
};