// ENFORCED VERTEXES //
///////////////////////
- TEnforcedVertexMap GetAllEnforcedVerteces();
- void ClearAllEnforcedVerteces();
+ TEnforcedVertexMap GetAllEnforcedVertices();
+ void ClearAllEnforcedVertices();
/*!
* Set/get/unset an enforced vertex on geom object
void SetEnforcedVertex(in GEOM::GEOM_Object GeomObj, in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
// void SetEnforcedVertexList(in GEOM::GEOM_Object GeomObj, in TEnforcedVertexList vertexList) raises (SALOME::SALOME_Exception);
- TEnforcedVertexList GetEnforcedVerteces(in GEOM::GEOM_Object GeomObj) raises (SALOME::SALOME_Exception);
+ TEnforcedVertexList GetEnforcedVertices(in GEOM::GEOM_Object GeomObj) raises (SALOME::SALOME_Exception);
void UnsetEnforcedVertex(in GEOM::GEOM_Object GeomObj, in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
// void UnsetEnforcedVertexList(in GEOM::GEOM_Object GeomObj, in TEnforcedVertexList vertexList) raises (SALOME::SALOME_Exception);
- void UnsetEnforcedVerteces(in GEOM::GEOM_Object GeomObj) raises (SALOME::SALOME_Exception);
+ void UnsetEnforcedVertices(in GEOM::GEOM_Object GeomObj) raises (SALOME::SALOME_Exception);
/*!
* Set/get/unset an enforced vertex on geom object given by entry
void SetEnforcedVertexEntry(in string entry, in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
// void SetEnforcedVertexListEntry(in string entry, in TEnforcedVertexList vertexList) raises (SALOME::SALOME_Exception);
//
- TEnforcedVertexList GetEnforcedVertecesEntry(in string entry) raises (SALOME::SALOME_Exception);
+ TEnforcedVertexList GetEnforcedVerticesEntry(in string entry) raises (SALOME::SALOME_Exception);
//
void UnsetEnforcedVertexEntry(in string entry, in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
// void UnsetEnforcedVertexListEntry(in string entry, in TEnforcedVertexList vertexList) raises (SALOME::SALOME_Exception);
- void UnsetEnforcedVertecesEntry(in string entry) raises (SALOME::SALOME_Exception);
+ void UnsetEnforcedVerticesEntry(in string entry) raises (SALOME::SALOME_Exception);
///////////////////////
std::map<int,string> FaceId2SizeMap;
TopTools_IndexedMapOfShape EdgesWithSizeMap;
std::map<int,string> EdgeId2SizeMap;
-TopTools_IndexedMapOfShape VertecesWithSizeMap;
+TopTools_IndexedMapOfShape VerticesWithSizeMap;
std::map<int,string> VertexId2SizeMap;
std::map<int,PyObject*> FaceId2PythonSmp;
std::map<int,std::vector<double> > FaceId2AttractorCoords;
-TopTools_IndexedMapOfShape FacesWithEnforcedVerteces;
+TopTools_IndexedMapOfShape FacesWithEnforcedVertices;
std::map< int, std::set< std::vector<double> > > FaceId2EnforcedVertexCoords;
bool HasSizeMapOnFace=false;
FaceId2SizeMap.clear();
EdgesWithSizeMap.Clear();
EdgeId2SizeMap.clear();
- VertecesWithSizeMap.Clear();
+ VerticesWithSizeMap.Clear();
VertexId2SizeMap.clear();
FaceId2PythonSmp.clear();
EdgeId2PythonSmp.clear();
VertexId2PythonSmp.clear();
FaceId2AttractorCoords.clear();
- FacesWithEnforcedVerteces.Clear();
+ FacesWithEnforcedVertices.Clear();
FaceId2EnforcedVertexCoords.clear();
}
coords.push_back(z0);
int key = 0;
- if (! FacesWithEnforcedVerteces.Contains(TopoDS::Face(GeomShape))) {
- key = FacesWithEnforcedVerteces.Add(TopoDS::Face(GeomShape));
+ if (! FacesWithEnforcedVertices.Contains(TopoDS::Face(GeomShape))) {
+ key = FacesWithEnforcedVertices.Add(TopoDS::Face(GeomShape));
}
else {
- key = FacesWithEnforcedVerteces.FindIndex(TopoDS::Face(GeomShape));
+ key = FacesWithEnforcedVertices.FindIndex(TopoDS::Face(GeomShape));
}
// If a node is already created by an attractor, do not create enforced vertex
}
EdgeId2SizeMap[key] = smIt->second;
}
- // Group of verteces
+ // Group of vertices
if (it.Value().ShapeType() == TopAbs_VERTEX){
HasSizeMapOnVertex = true;
HasSizeMapOnEdge = true;
HasSizeMapOnFace = true;
- if (! VertecesWithSizeMap.Contains(TopoDS::Vertex(it.Value()))) {
- key = VertecesWithSizeMap.Add(TopoDS::Vertex(it.Value()));
+ if (! VerticesWithSizeMap.Contains(TopoDS::Vertex(it.Value()))) {
+ key = VerticesWithSizeMap.Add(TopoDS::Vertex(it.Value()));
}
else {
- key = VertecesWithSizeMap.FindIndex(TopoDS::Vertex(it.Value()));
+ key = VerticesWithSizeMap.FindIndex(TopoDS::Vertex(it.Value()));
// MESSAGE("Vertex with key " << key << " already in map");
}
VertexId2SizeMap[key] = smIt->second;
HasSizeMapOnVertex = true;
HasSizeMapOnEdge = true;
HasSizeMapOnFace = true;
- if (! VertecesWithSizeMap.Contains(TopoDS::Vertex(GeomShape))) {
- key = VertecesWithSizeMap.Add(TopoDS::Vertex(GeomShape));
+ if (! VerticesWithSizeMap.Contains(TopoDS::Vertex(GeomShape))) {
+ key = VerticesWithSizeMap.Add(TopoDS::Vertex(GeomShape));
}
else {
- key = VertecesWithSizeMap.FindIndex(TopoDS::Vertex(GeomShape));
+ key = VerticesWithSizeMap.FindIndex(TopoDS::Vertex(GeomShape));
// MESSAGE("Vertex with key " << key << " already in map");
}
VertexId2SizeMap[key] = smIt->second;
//
- // Enforced Verteces
+ // Enforced Vertices
//
- MESSAGE("Setting Enforced Verteces");
- const BLSURFPlugin_Hypothesis::TEnforcedVertexMap enforcedVertexMap = BLSURFPlugin_Hypothesis::GetAllEnforcedVerteces(hyp);
+ MESSAGE("Setting Enforced Vertices");
+ const BLSURFPlugin_Hypothesis::TEnforcedVertexMap enforcedVertexMap = BLSURFPlugin_Hypothesis::GetAllEnforcedVertices(hyp);
BLSURFPlugin_Hypothesis::TEnforcedVertexMap::const_iterator enfIt = enforcedVertexMap.begin();
for ( ; enfIt != enforcedVertexMap.end(); ++enfIt ) {
if ( !enfIt->second.empty() ) {
FaceId2SizeMap.clear();
EdgesWithSizeMap.Clear();
EdgeId2SizeMap.clear();
- VertecesWithSizeMap.Clear();
+ VerticesWithSizeMap.Clear();
VertexId2SizeMap.clear();
MESSAGE("BEGIN SetParameters");
}
}
- // Enforced Verteces
- faceKey = FacesWithEnforcedVerteces.FindIndex(f);
+ // Enforced Vertices
+ faceKey = FacesWithEnforcedVertices.FindIndex(f);
std::map<int,std::set<std::vector<double> > >::const_iterator evmIt = FaceId2EnforcedVertexCoords.find(faceKey);
if (evmIt != FaceId2EnforcedVertexCoords.end()) {
- std::cout << "Some enforced verteces are defined" << std::endl;
+ std::cout << "Some enforced vertices are defined" << std::endl;
int ienf = 0;
std::set<std::vector<double> > evl;
// std::vector<double> ev;
MESSAGE("Face indice: " << iface);
- MESSAGE("Adding enforced verteces");
+ MESSAGE("Adding enforced vertices");
evl = evmIt->second;
- MESSAGE("Number of verteces to add: "<< evl.size())
+ MESSAGE("Number of vertices to add: "<< evl.size())
std::set< std::vector<double> >::const_iterator evlIt = evl.begin();
for (; evlIt != evl.end(); ++evlIt) {
// ev = *evlIt;
/****************************************************************************************
- VERTECES
+ VERTICES
*****************************************************************************************/
int vertexKey = -1;
for (TopExp_Explorer ex_edge(e ,TopAbs_VERTEX); ex_edge.More(); ex_edge.Next()) {
if(*ip <= 0)
*ip = pmap.Add(v);
- vertexKey = VertecesWithSizeMap.FindIndex(v);
+ vertexKey = VerticesWithSizeMap.FindIndex(v);
if (HasSizeMapOnVertex){
- vertexKey = VertecesWithSizeMap.FindIndex(v);
+ vertexKey = VerticesWithSizeMap.FindIndex(v);
if (VertexId2SizeMap.find(vertexKey)!=VertexId2SizeMap.end()){
theSizeMapStr = VertexId2SizeMap[faceKey];
if (theSizeMapStr.find(bad_end) == (theSizeMapStr.size()-bad_end.size()-1))
FacesWithSizeMap.Statistics(std::cout);
std::cout << "EdgesWithSizeMap" << std::endl;
EdgesWithSizeMap.Statistics(std::cout);
- std::cout << "VertecesWithSizeMap" << std::endl;
- VertecesWithSizeMap.Statistics(std::cout);
- std::cout << "FacesWithEnforcedVerteces" << std::endl;
- FacesWithEnforcedVerteces.Statistics(std::cout);
+ std::cout << "VerticesWithSizeMap" << std::endl;
+ VerticesWithSizeMap.Statistics(std::cout);
+ std::cout << "FacesWithEnforcedVertices" << std::endl;
+ FacesWithEnforcedVertices.Statistics(std::cout);
return true;
}
_verb( GetDefaultVerbosity() ),
_sizeMap(GetDefaultSizeMap()),
_attractors(GetDefaultSizeMap()),
- _enforcedVerteces(GetDefaultEnforcedVertexMap())
+ _enforcedVertices(GetDefaultEnforcedVertexMap())
{
_name = "BLSURF_Parameters";
_param_algo_dim = 2;
coord.push_back(y);
coord.push_back(z);
bool toNotify = false;
- if (_enforcedVerteces.count(entry)>0)
- if (_enforcedVerteces[entry].count(coord)==0)
+ if (_enforcedVertices.count(entry)>0)
+ if (_enforcedVertices[entry].count(coord)==0)
toNotify = true;
else
toNotify = true;
- _enforcedVerteces[entry].insert(coord);
+ _enforcedVertices[entry].insert(coord);
if (toNotify)
NotifySubMeshesHypothesisModification();
}
BLSURFPlugin_Hypothesis::TEnforcedVertexList::const_iterator it;
bool toNotify = false;
for(it = vertexList.begin();it!=vertexList.end();++it) {
- if (_enforcedVerteces.count(entry)>0)
- if (_enforcedVerteces[entry].count(*it)==0)
+ if (_enforcedVertices.count(entry)>0)
+ if (_enforcedVertices[entry].count(*it)==0)
toNotify = true;
else
toNotify = true;
- _enforcedVerteces[entry].insert(*it);
+ _enforcedVertices[entry].insert(*it);
}
if (toNotify)
NotifySubMeshesHypothesisModification();
*/
//=======================================================================
-//function : GetEnforcedVerteces
+//function : GetEnforcedVertices
//=======================================================================
-BLSURFPlugin_Hypothesis::TEnforcedVertexList BLSURFPlugin_Hypothesis::GetEnforcedVerteces(const std::string& entry)
+BLSURFPlugin_Hypothesis::TEnforcedVertexList BLSURFPlugin_Hypothesis::GetEnforcedVertices(const std::string& entry)
throw (std::invalid_argument)
{
- if (_enforcedVerteces.count(entry)>0)
- return _enforcedVerteces[entry];
+ if (_enforcedVertices.count(entry)>0)
+ return _enforcedVertices[entry];
std::ostringstream msg ;
msg << "No enforced vertex for entry " << entry ;
throw std::invalid_argument(msg.str());
BLSURFPlugin_Hypothesis::TEnforcedVertexList::iterator it;
bool toNotify = false;
- BLSURFPlugin_Hypothesis::TEnforcedVertexMap::iterator it_enf = _enforcedVerteces.find(entry);
- if (it_enf != _enforcedVerteces.end()) {
- it = _enforcedVerteces[entry].find(coord);
- if (it != _enforcedVerteces[entry].end()) {
+ BLSURFPlugin_Hypothesis::TEnforcedVertexMap::iterator it_enf = _enforcedVertices.find(entry);
+ if (it_enf != _enforcedVertices.end()) {
+ it = _enforcedVertices[entry].find(coord);
+ if (it != _enforcedVertices[entry].end()) {
toNotify = true;
- _enforcedVerteces[entry].erase(it);
- if (_enforcedVerteces[entry].size() == 0)
- _enforcedVerteces.erase(it_enf);
+ _enforcedVertices[entry].erase(it);
+ if (_enforcedVertices[entry].size() == 0)
+ _enforcedVertices.erase(it_enf);
}
if (toNotify)
NotifySubMeshesHypothesisModification();
BLSURFPlugin_Hypothesis::TEnforcedVertexList::iterator it;
bool toNotify = false;
- BLSURFPlugin_Hypothesis::TEnforcedVertexMap::iterator it_enf = _enforcedVerteces.find(entry);
- if (it_enf != _enforcedVerteces.end()) {
+ BLSURFPlugin_Hypothesis::TEnforcedVertexMap::iterator it_enf = _enforcedVertices.find(entry);
+ if (it_enf != _enforcedVertices.end()) {
for (it_toRemove = vertexList.begin() ; it_toRemove != vertexList.end() ; ++it_toRemove) {
coord = *it_toRemove;
- it = _enforcedVerteces[entry].find(coord);
- if (it != _enforcedVerteces[entry].end()) {
+ it = _enforcedVertices[entry].find(coord);
+ if (it != _enforcedVertices[entry].end()) {
toNotify = true;
- _enforcedVerteces[entry].erase(it);
+ _enforcedVertices[entry].erase(it);
}
}
- if (_enforcedVerteces[entry].size() == 0) {
+ if (_enforcedVertices[entry].size() == 0) {
toNotify = true;
- _enforcedVerteces.erase(it_enf);
+ _enforcedVertices.erase(it_enf);
}
if (toNotify)
NotifySubMeshesHypothesisModification();
}
*/
//=======================================================================
-//function : ClearEnforcedVerteces
+//function : ClearEnforcedVertices
//=======================================================================
-void BLSURFPlugin_Hypothesis::ClearEnforcedVerteces(const std::string& entry)
+void BLSURFPlugin_Hypothesis::ClearEnforcedVertices(const std::string& entry)
throw (std::invalid_argument)
{
- BLSURFPlugin_Hypothesis::TEnforcedVertexMap::iterator it_enf = _enforcedVerteces.find(entry);
- if (it_enf != _enforcedVerteces.end()) {
- _enforcedVerteces.erase(it_enf);
+ BLSURFPlugin_Hypothesis::TEnforcedVertexMap::iterator it_enf = _enforcedVertices.find(entry);
+ if (it_enf != _enforcedVertices.end()) {
+ _enforcedVertices.erase(it_enf);
NotifySubMeshesHypothesisModification();
return;
}
}
//=======================================================================
-//function : ClearAllEnforcedVerteces
+//function : ClearAllEnforcedVertices
//=======================================================================
-void BLSURFPlugin_Hypothesis::ClearAllEnforcedVerteces()
+void BLSURFPlugin_Hypothesis::ClearAllEnforcedVertices()
{
- _enforcedVerteces.clear();
+ _enforcedVertices.clear();
NotifySubMeshesHypothesisModification();
}
//================================================================================
/*!
-* \brief Return the enforced verteces
+* \brief Return the enforced vertices
*/
//================================================================================
-BLSURFPlugin_Hypothesis::TEnforcedVertexMap BLSURFPlugin_Hypothesis::GetAllEnforcedVerteces(const BLSURFPlugin_Hypothesis* hyp)
+BLSURFPlugin_Hypothesis::TEnforcedVertexMap BLSURFPlugin_Hypothesis::GetAllEnforcedVertices(const BLSURFPlugin_Hypothesis* hyp)
{
- return hyp ? hyp->_GetAllEnforcedVerteces():GetDefaultEnforcedVertexMap();
+ return hyp ? hyp->_GetAllEnforcedVertices():GetDefaultEnforcedVertexMap();
}
save << " " << "__ATTRACTORS_END__";
}
- TEnforcedVertexMap::const_iterator it_enf = _enforcedVerteces.begin();
- if (it_enf != _enforcedVerteces.end()) {
- save << " " << "__ENFORCED_VERTECES_BEGIN__";
- for ( ; it_enf != _enforcedVerteces.end(); ++it_enf ) {
+ TEnforcedVertexMap::const_iterator it_enf = _enforcedVertices.begin();
+ if (it_enf != _enforcedVertices.end()) {
+ save << " " << "__ENFORCED_VERTICES_BEGIN__";
+ for ( ; it_enf != _enforcedVertices.end(); ++it_enf ) {
save << " " << it_enf->first;
TEnforcedVertexList evl = it_enf->second;
TEnforcedVertexList::const_iterator it_evl = evl.begin();
}
save << "#"; // "#" is a mark of enforced shape end
}
- save << " " << "__ENFORCED_VERTECES_END__";
+ save << " " << "__ENFORCED_VERTICES_END__";
}
return save;
hasSizeMap = true;
else if (option_or_sm == "__ATTRACTORS_BEGIN__")
hasAttractor = true;
- else if (option_or_sm == "__ENFORCED_VERTECES_BEGIN__")
+ else if (option_or_sm == "__ENFORCED_VERTICES_BEGIN__")
hasEnforcedVertex = true;
std::string optName, optValue;
hasSizeMap = true;
else if (option_or_sm == "__ATTRACTORS_BEGIN__")
hasAttractor = true;
- else if (option_or_sm == "__ENFORCED_VERTECES_BEGIN__")
+ else if (option_or_sm == "__ENFORCED_VERTICES_BEGIN__")
hasEnforcedVertex = true;
}
if (isOK)
if (option_or_sm == "__ATTRACTORS_BEGIN__")
hasAttractor = true;
- else if (option_or_sm == "__ENFORCED_VERTECES_BEGIN__")
+ else if (option_or_sm == "__ENFORCED_VERTICES_BEGIN__")
hasEnforcedVertex = true;
}
if (hasAttractor) {
isOK = (load >> option_or_sm);
if (isOK)
- if (option_or_sm == "__ENFORCED_VERTECES_BEGIN__")
+ if (option_or_sm == "__ENFORCED_VERTICES_BEGIN__")
hasEnforcedVertex = true;
}
while (isOK && hasEnforcedVertex) {
isOK = (load >> enfEntry);
if (isOK) {
- if (enfEntry == "__ENFORCED_VERTECES_END__")
+ if (enfEntry == "__ENFORCED_VERTICES_END__")
break;
enfValue = "begin";
int len4 = enfValue.size();
- TEnforcedVertexList & evl = _enforcedVerteces[enfEntry];
+ TEnforcedVertexList & evl = _enforcedVertices[enfEntry];
evl.clear();
TEnforcedVertex enfVertex;
void SetEnforcedVertex(const std::string& entry, double x, double y, double z);
// void SetEnforcedVertexList(const std::string& entry, const TEnforcedVertexList vertexList);
- TEnforcedVertexList GetEnforcedVerteces(const std::string& entry) throw (std::invalid_argument);
+ TEnforcedVertexList GetEnforcedVertices(const std::string& entry) throw (std::invalid_argument);
void ClearEnforcedVertex(const std::string& entry, double x, double y, double z) throw (std::invalid_argument);
// void ClearEnforcedVertexList(const std::string& entry, TEnforcedVertexList vertexList) throw (std::invalid_argument);
- void ClearEnforcedVerteces(const std::string& entry) throw (std::invalid_argument);
+ void ClearEnforcedVertices(const std::string& entry) throw (std::invalid_argument);
- void ClearAllEnforcedVerteces();
- const TEnforcedVertexMap _GetAllEnforcedVerteces() const { return _enforcedVerteces; }
+ void ClearAllEnforcedVertices();
+ const TEnforcedVertexMap _GetAllEnforcedVertices() const { return _enforcedVertices; }
/*!
- * \brief Return the enforced verteces
+ * \brief Return the enforced vertices
*/
- static TEnforcedVertexMap GetAllEnforcedVerteces(const BLSURFPlugin_Hypothesis* hyp);
+ static TEnforcedVertexMap GetAllEnforcedVertices(const BLSURFPlugin_Hypothesis* hyp);
static Topology GetDefaultTopology();
TOptionNames _doubleOptions, _charOptions;
TSizeMap _sizeMap;
TSizeMap _attractors;
- TEnforcedVertexMap _enforcedVerteces;
+ TEnforcedVertexMap _enforcedVertices;
/*
TSizeMap _customSizeMap;
*/
// ENFORCED VERTEXES //
///////////////////////
-BLSURFPlugin::TEnforcedVertexMap* BLSURFPlugin_Hypothesis_i::GetAllEnforcedVerteces()
+BLSURFPlugin::TEnforcedVertexMap* BLSURFPlugin_Hypothesis_i::GetAllEnforcedVertices()
{
- MESSAGE("IDL: GetAllEnforcedVerteces()");
+ MESSAGE("IDL: GetAllEnforcedVertices()");
ASSERT(myBaseImpl);
BLSURFPlugin::TEnforcedVertexMap_var resultMap = new BLSURFPlugin::TEnforcedVertexMap();
- const ::BLSURFPlugin_Hypothesis::TEnforcedVertexMap enforcedVertexMap = this->GetImpl()->_GetAllEnforcedVerteces();
+ const ::BLSURFPlugin_Hypothesis::TEnforcedVertexMap enforcedVertexMap = this->GetImpl()->_GetAllEnforcedVertices();
resultMap->length(enforcedVertexMap.size());
MESSAGE("Enforced Vertex map size is " << enforcedVertexMap.size());
BLSURFPlugin::TEnforcedVertexList_var vertexList = new BLSURFPlugin::TEnforcedVertexList();
vertexList->length(enforcedVertexList.size());
- MESSAGE("Number of enforced verteces: " << enforcedVertexList.size());
+ MESSAGE("Number of enforced vertices: " << enforcedVertexList.size());
::BLSURFPlugin_Hypothesis::TEnforcedVertexList::const_iterator evlIt = enforcedVertexList.begin();
for ( int j = 0 ; evlIt != enforcedVertexList.end(); ++evlIt, ++j ) {
return resultMap._retn();
}
-void BLSURFPlugin_Hypothesis_i::ClearAllEnforcedVerteces()
+void BLSURFPlugin_Hypothesis_i::ClearAllEnforcedVertices()
{
ASSERT(myBaseImpl);
- this->GetImpl()->ClearAllEnforcedVerteces();
- SMESH::TPythonDump() << _this() << ".ClearAllEnforcedVerteces()";
+ this->GetImpl()->ClearAllEnforcedVertices();
+ SMESH::TPythonDump() << _this() << ".ClearAllEnforcedVertices()";
}
/*!
}
-BLSURFPlugin::TEnforcedVertexList* BLSURFPlugin_Hypothesis_i::GetEnforcedVerteces(GEOM::GEOM_Object_ptr GeomObj)
+BLSURFPlugin::TEnforcedVertexList* BLSURFPlugin_Hypothesis_i::GetEnforcedVertices(GEOM::GEOM_Object_ptr GeomObj)
throw (SALOME::SALOME_Exception)
{
ASSERT(myBaseImpl);
MESSAGE("IDL : GetName : " << GeomObj->GetName());
MESSAGE("IDL : GetEnforcedVertexList ( "<< entry << ")");
try {
- return GetEnforcedVertecesEntry(entry.c_str());
+ return GetEnforcedVerticesEntry(entry.c_str());
}
catch (SALOME_Exception& ex) {
THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM );
}
-void BLSURFPlugin_Hypothesis_i::UnsetEnforcedVerteces(GEOM::GEOM_Object_ptr GeomObj)
+void BLSURFPlugin_Hypothesis_i::UnsetEnforcedVertices(GEOM::GEOM_Object_ptr GeomObj)
throw (SALOME::SALOME_Exception)
{
ASSERT(myBaseImpl);;
string entry = GeomObj->GetStudyEntry();
MESSAGE("IDL : GetName : " << GeomObj->GetName());
- MESSAGE("IDL : UnsetEnforcedVerteces ( "<< entry << ")");
+ MESSAGE("IDL : UnsetEnforcedVertices ( "<< entry << ")");
try {
- UnsetEnforcedVertecesEntry(entry.c_str());
+ UnsetEnforcedVerticesEntry(entry.c_str());
}
catch (SALOME_Exception& ex) {
THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM );
bool newValue = false;
try {
- ::BLSURFPlugin_Hypothesis::TEnforcedVertexList vertexList = this->GetImpl()->GetEnforcedVerteces(entry);
+ ::BLSURFPlugin_Hypothesis::TEnforcedVertexList vertexList = this->GetImpl()->GetEnforcedVertices(entry);
::BLSURFPlugin_Hypothesis::TEnforcedVertex vertex;
vertex.push_back(x);
vertex.push_back(y);
}
*/
-BLSURFPlugin::TEnforcedVertexList* BLSURFPlugin_Hypothesis_i::GetEnforcedVertecesEntry(const char* entry)
+BLSURFPlugin::TEnforcedVertexList* BLSURFPlugin_Hypothesis_i::GetEnforcedVerticesEntry(const char* entry)
throw (SALOME::SALOME_Exception)
{
ASSERT(myBaseImpl);
- MESSAGE("ENGINE : GETENFORCEDVERTECES START ENTRY : " << entry);
+ MESSAGE("ENGINE : GETENFORCEDVERTICES START ENTRY : " << entry);
try {
BLSURFPlugin::TEnforcedVertexList_var vertexList = new BLSURFPlugin::TEnforcedVertexList();
- ::BLSURFPlugin_Hypothesis::TEnforcedVertexList _vList = this->GetImpl()->GetEnforcedVerteces(entry);
+ ::BLSURFPlugin_Hypothesis::TEnforcedVertexList _vList = this->GetImpl()->GetEnforcedVertices(entry);
vertexList->length(_vList.size());
- MESSAGE("Number of enforced verteces: " << _vList.size());
+ MESSAGE("Number of enforced vertices: " << _vList.size());
::BLSURFPlugin_Hypothesis::TEnforcedVertexList::const_iterator evlIt = _vList.begin();
for ( int i = 0; evlIt != _vList.end() ; ++evlIt, ++i ) {
BLSURFPlugin::TEnforcedVertex_var enforcedVertex = new BLSURFPlugin::TEnforcedVertex();
SALOME::ExceptionStruct ExDescription;
ExDescription.text = ex.what();
ExDescription.type = SALOME::BAD_PARAM;
- ExDescription.sourceFile = "BLSURFPlugin_Hypothesis_i::GetEnforcedVertecesEntry(entry)";
+ ExDescription.sourceFile = "BLSURFPlugin_Hypothesis_i::GetEnforcedVerticesEntry(entry)";
ExDescription.lineNumber = 945;
throw SALOME::SALOME_Exception(ExDescription);
}
THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM );
}
- MESSAGE("ENGINE : GETENFORCEDVERTECES END ENTRY : " << entry);
+ MESSAGE("ENGINE : GETENFORCEDVERTICES END ENTRY : " << entry);
}
ASSERT(myBaseImpl);
}
*/
-void BLSURFPlugin_Hypothesis_i::UnsetEnforcedVertecesEntry(const char* entry)
+void BLSURFPlugin_Hypothesis_i::UnsetEnforcedVerticesEntry(const char* entry)
throw (SALOME::SALOME_Exception)
{
ASSERT(myBaseImpl);
- MESSAGE("ENGINE : UNSETENFORCEDVERTECES START ENTRY : " << entry);
+ MESSAGE("ENGINE : UNSETENFORCEDVERTICES START ENTRY : " << entry);
try {
- this->GetImpl()->ClearEnforcedVerteces(entry);
- SMESH::TPythonDump() << _this() << ".UnsetEnforcedVerteces(" << entry << ")";
+ this->GetImpl()->ClearEnforcedVertices(entry);
+ SMESH::TPythonDump() << _this() << ".UnsetEnforcedVertices(" << entry << ")";
}
catch (const std::invalid_argument& ex) {
SALOME::ExceptionStruct ExDescription;
ExDescription.text = ex.what();
ExDescription.type = SALOME::BAD_PARAM;
- ExDescription.sourceFile = "BLSURFPlugin_Hypothesis_i::UnsetEnforcedVertecesEntry(entry)";
+ ExDescription.sourceFile = "BLSURFPlugin_Hypothesis_i::UnsetEnforcedVerticesEntry(entry)";
ExDescription.lineNumber = 1051;
throw SALOME::SALOME_Exception(ExDescription);
}
THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM );
}
- MESSAGE("ENGINE : UNSETENFORCEDVERTECES END ENTRY : " << entry);
+ MESSAGE("ENGINE : UNSETENFORCEDVERTICES END ENTRY : " << entry);
}
// ENFORCED VERTEXES //
///////////////////////
- BLSURFPlugin::TEnforcedVertexMap* GetAllEnforcedVerteces();
- void ClearAllEnforcedVerteces();
+ BLSURFPlugin::TEnforcedVertexMap* GetAllEnforcedVertices();
+ void ClearAllEnforcedVertices();
/*!
* Set/get/unset an enforced vertex on geom object
*/
void SetEnforcedVertex(GEOM::GEOM_Object_ptr GeomObj, CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception);
// void SetEnforcedVertexList(GEOM::GEOM_Object_ptr GeomObj, const BLSURFPlugin::TEnforcedVertexList& vertexList) throw (SALOME::SALOME_Exception);
- BLSURFPlugin::TEnforcedVertexList* GetEnforcedVerteces(GEOM::GEOM_Object_ptr GeomObj) throw (SALOME::SALOME_Exception);
+ BLSURFPlugin::TEnforcedVertexList* GetEnforcedVertices(GEOM::GEOM_Object_ptr GeomObj) throw (SALOME::SALOME_Exception);
void UnsetEnforcedVertex(GEOM::GEOM_Object_ptr GeomObj, CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception);
// void UnsetEnforcedVertexList(GEOM::GEOM_Object_ptr GeomObj, BLSURFPlugin::TEnforcedVertexList& vertexList) throw (SALOME::SALOME_Exception);
- void UnsetEnforcedVerteces(GEOM::GEOM_Object_ptr GeomObj) throw (SALOME::SALOME_Exception);
+ void UnsetEnforcedVertices(GEOM::GEOM_Object_ptr GeomObj) throw (SALOME::SALOME_Exception);
/*!
* Set/get/unset an enforced vertex on geom object given by entry
*/
void SetEnforcedVertexEntry(const char* entry, double x, double y, double z) throw (SALOME::SALOME_Exception);
// void SetEnforcedVertexListEntry(const char* entry, BLSURFPlugin::TEnforcedVertexList& vertexList) throw (SALOME::SALOME_Exception);
- BLSURFPlugin::TEnforcedVertexList* GetEnforcedVertecesEntry(const char* entry) throw (SALOME::SALOME_Exception);
+ BLSURFPlugin::TEnforcedVertexList* GetEnforcedVerticesEntry(const char* entry) throw (SALOME::SALOME_Exception);
void UnsetEnforcedVertexEntry(const char* entry, CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception);
// void UnsetEnforcedVertexListEntry(const char* entry, BLSURFPlugin::TEnforcedVertexList& vertexList) throw (SALOME::SALOME_Exception);
- void UnsetEnforcedVertecesEntry(const char* entry) throw (SALOME::SALOME_Exception);
+ void UnsetEnforcedVerticesEntry(const char* entry) throw (SALOME::SALOME_Exception);
///////////////////////
// Get implementation
SMP_REMOVE_BTN,
};
-// Enforced verteces inputs
+// Enforced vertices inputs
enum {
ENF_VER_BTNS = 0,
ENF_VER_X_COORD = 0,
ENF_VER_REMOVE_BTN,
};
-// Enforced verteces array columns
+// Enforced vertices array columns
enum {
ENF_VER_NAME_COLUMN = 0,
ENF_VER_ENTRY_COLUMN,
}
}
- // Enforced verteces
+ // Enforced vertices
// TODO
return ok;
removeButton = new QPushButton(tr("BLSURF_SM_REMOVE"),mySmpGroup);
anSmpLayout->addWidget(removeButton, SMP_REMOVE_BTN, 1, 1, 1);
- // Enforced verteces parameters
+ // Enforced vertices parameters
myEnfGroup = new QWidget();
QGridLayout* anEnfLayout = new QGridLayout(myEnfGroup);
connect( myEnforcedTreeWidget,SIGNAL( itemClicked(QTreeWidgetItem *, int)), this, SLOT( synchronizeCoords() ) );
connect( myEnforcedTreeWidget,SIGNAL( itemChanged(QTreeWidgetItem *, int)), this, SLOT( update(QTreeWidgetItem *, int) ) );
connect( myEnforcedTreeWidget,SIGNAL( itemSelectionChanged() ), this, SLOT( synchronizeCoords() ) );
- connect( addVertexButton, SIGNAL( clicked()), this, SLOT( onAddEnforcedVerteces() ) );
+ connect( addVertexButton, SIGNAL( clicked()), this, SLOT( onAddEnforcedVertices() ) );
connect( removeVertexButton, SIGNAL( clicked()), this, SLOT( onRemoveEnforcedVertex() ) );
return fr;
MESSAGE("In " << shapeName << " vertex with coords " << x << ", " << y << ", " << z<< " already exist: dont create again");
}
-/** BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVerteces()
-This method is called when a item is added into the enforced verteces tree widget
+/** BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices()
+This method is called when a item is added into the enforced vertices tree widget
*/
-void BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVerteces() {
-// MESSAGE("BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVerteces");
+void BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices() {
+// MESSAGE("BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices");
for (int column = 0; column < myEnforcedTreeWidget->columnCount(); ++column)
myEnforcedTreeWidget->resizeColumnToContents(column);
}
/** BLSURFPluginGUI_HypothesisCreator::onRemoveEnforcedVertex()
-This method is called when a item is removed from the enforced verteces tree widget
+This method is called when a item is removed from the enforced vertices tree widget
*/
void BLSURFPluginGUI_HypothesisCreator::onRemoveEnforcedVertex() {
// MESSAGE("BLSURFPluginGUI_HypothesisCreator::onRemoveEnforcedVertex");
QList<QTreeWidgetItem *> selectedItems = myEnforcedTreeWidget->selectedItems();
- QList<QTreeWidgetItem *> selectedVerteces;
+ QList<QTreeWidgetItem *> selectedVertices;
QSet<QTreeWidgetItem *> selectedEntries;
QTreeWidgetItem* item;
foreach( item, selectedItems ) {
QVariant value = item->data(ENF_VER_X_COLUMN, Qt::EditRole);
if (not value.isNull())
- selectedVerteces.append(item);
+ selectedVertices.append(item);
else
selectedEntries.insert(item);
}
- foreach(item,selectedVerteces) {
+ foreach(item,selectedVertices) {
QTreeWidgetItem* parent = item->parent();
// MESSAGE("From geometry "<< parent->text(ENF_VER_NAME_COLUMN).toStdString()<<" remove " << item->text(ENF_VER_NAME_COLUMN).toStdString());
parent->removeChild(item);
mySizeMapTable->resizeColumnToContents( SMP_NAME_COLUMN );
mySizeMapTable->resizeColumnToContents(SMP_SIZEMAP_COLUMN);
- // Enforced verteces
+ // Enforced vertices
// MESSAGE("retrieveParams(): data.enfVertMap.size() = " << data.enfVertMap.size());
std::map<std::string, std::set<std::vector<double> > >::const_iterator evmIt = data.enfVertMap.begin();
for ( ; evmIt != data.enfVertMap.end() ; ++evmIt) {
}
}
- // Enforced verteces
- BLSURFPlugin::TEnforcedVertexMap_var enforcedVertexMap = h->GetAllEnforcedVerteces();
+ // Enforced vertices
+ BLSURFPlugin::TEnforcedVertexMap_var enforcedVertexMap = h->GetAllEnforcedVertices();
// MESSAGE("enforcedVertexMap->length() = " << enforcedVertexMap->length());
for ( int i = 0;i<enforcedVertexMap->length(); ++i ) {
}
}
- // Enforced verteces
+ // Enforced vertices
std::map<std::string, std::set<std::vector<double> > >::const_iterator evmIt = h_data.enfVertMap.begin();
for ( ; evmIt != h_data.enfVertMap.end() ; ++evmIt) {
std::string entry = evmIt->first;
BLSURFPlugin::TEnforcedVertexList_var hypVertexList;
int hypNbVertex = 0;
try {
- hypVertexList = h->GetEnforcedVertecesEntry(entry.c_str());
+ hypVertexList = h->GetEnforcedVerticesEntry(entry.c_str());
hypNbVertex = hypVertexList->length();
}
catch(...) {
// MESSAGE("SetEnforcedVertexEntry("<<entry<<", "<<x<<", "<<y<<", "<<z<<")");
h->SetEnforcedVertexEntry( entry.c_str(), x, y, z );
}
- // Remove old verteces
+ // Remove old vertices
if (hypNbVertex >0) {
for (int i =0 ; i<hypNbVertex ; i++) {
x = hypVertexList[i][0];
guiHyp += "SetSizeMapEntry(" + entry + ", " + that->mySMPMap[entry] + "); ";
}
- // Enforced verteces
+ // Enforced vertices
// h_data.enfVertMap
int nbEnforcedShapes = myEnforcedTreeWidget->topLevelItemCount();
- int nbEnforcedVerteces = 0;
+ int nbEnforcedVertices = 0;
// MESSAGE("Nb of enforced shapes: " << nbEnforcedShapes);
for (int i=0 ; i<nbEnforcedShapes ; i++) {
QTreeWidgetItem* shapeItem = myEnforcedTreeWidget->topLevelItem(i);
if (shapeItem) {
std::string entry = shapeItem->data(ENF_VER_ENTRY_COLUMN,Qt::EditRole).toString().toStdString();
- nbEnforcedVerteces = shapeItem->childCount();
- if (nbEnforcedVerteces >0) {
+ nbEnforcedVertices = shapeItem->childCount();
+ if (nbEnforcedVertices >0) {
double childValueX,childValueY,childValueZ;
QTreeWidgetItem* child;
std::set<std::vector<double> > evs;
- for (row = 0;row<nbEnforcedVerteces;row++) {
+ for (row = 0;row<nbEnforcedVertices;row++) {
child = shapeItem->child(row);
childValueX = child->data(ENF_VER_X_COLUMN,Qt::EditRole).toDouble();
childValueY = child->data(ENF_VER_Y_COLUMN,Qt::EditRole).toDouble();
void onSetSizeMap(int,int);
void addEnforcedVertex(std::string, std::string, double, double, double);
- void onAddEnforcedVerteces();
+ void onAddEnforcedVertices();
void onRemoveEnforcedVertex();
void synchronizeCoords();
void update(QTreeWidgetItem* , int );
</message>
<message>
<source>BLSURF_ENF_VER</source>
- <translation>Enforced verteces</translation>
+ <translation>Enforced vertices</translation>
</message>
<message>
<source>BLSURF_ENF_VER_ENTRY_COLUMN</source>