From: nge Date: Thu, 8 Oct 2009 11:57:10 +0000 (+0000) Subject: Corrections (plural of vertex is not verteces ... thx P.R.) X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FV5_1_sizemap;p=plugins%2Fghs3dplugin.git Corrections (plural of vertex is not verteces ... thx P.R.) --- diff --git a/idl/GHS3DPlugin_Algorithm.idl b/idl/GHS3DPlugin_Algorithm.idl index 341c809..4a8a4ab 100644 --- a/idl/GHS3DPlugin_Algorithm.idl +++ b/idl/GHS3DPlugin_Algorithm.idl @@ -131,8 +131,8 @@ module GHS3DPlugin void SetEnforcedVertex(in double x, in double y, in double z, in double size); double GetEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception); void RemoveEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception); - GHS3DEnforcedVertexList GetEnforcedVerteces(); - void ClearEnforcedVerteces(); + GHS3DEnforcedVertexList GetEnforcedVertices(); + void ClearEnforcedVertices(); }; }; diff --git a/src/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin_GHS3D.cxx index 08265aa..e9455f8 100644 --- a/src/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin_GHS3D.cxx @@ -405,7 +405,7 @@ static bool writePoints (ofstream & theFile, SMESHDS_Mesh * theMesh, map & theSmdsToGhs3dIdMap, map & theGhs3dIdToNodeMap, - map,double> & theEnforcedVerteces) + map,double> & theEnforcedVertices) { // record structure: // @@ -416,7 +416,7 @@ static bool writePoints (ofstream & theFile, int nbNodes = theMesh->NbNodes(); if ( nbNodes == 0 ) return false; - int nbEnforcedVerteces = theEnforcedVerteces.size(); + int nbEnforcedVertices = theEnforcedVertices.size(); const char* space = " "; const int dummyint = 0; @@ -429,8 +429,8 @@ static bool writePoints (ofstream & theFile, std::cout << std::endl; std::cout << "The initial 2D mesh contains :" << std::endl; std::cout << " " << nbNodes << " nodes" << std::endl; - if (nbEnforcedVerteces > 0) { - std::cout << " " << nbEnforcedVerteces << " enforced vertices" << std::endl; + if (nbEnforcedVertices > 0) { + std::cout << " " << nbEnforcedVertices << " enforced vertices" << std::endl; } std::cout << std::endl; std::cout << "Start writing in 'points' file ..." << std::endl; @@ -456,10 +456,10 @@ static bool writePoints (ofstream & theFile, } - // Iterate over the enforced verteces + // Iterate over the enforced vertices GHS3DPlugin_Hypothesis::TEnforcedVertexValues::const_iterator vertexIt; const TopoDS_Shape shapeToMesh = theMesh->ShapeToMesh(); - for(vertexIt = theEnforcedVerteces.begin() ; vertexIt != theEnforcedVerteces.end() ; ++vertexIt) { + for(vertexIt = theEnforcedVertices.begin() ; vertexIt != theEnforcedVertices.end() ; ++vertexIt) { double x = vertexIt->first[0]; double y = vertexIt->first[1]; double z = vertexIt->first[2]; @@ -499,7 +499,7 @@ static bool writePoints (ofstream & theFile, static bool writePoints (ofstream & theFile, SMESHDS_Mesh * theMesh, const vector & theNodeByGhs3dId, - map,double> & theEnforcedVerteces) + map,double> & theEnforcedVertices) { // record structure: // @@ -512,7 +512,7 @@ static bool writePoints (ofstream & theFile, if ( nbNodes == 0 ) return false; - int nbEnforcedVerteces = theEnforcedVerteces.size(); + int nbEnforcedVertices = theEnforcedVertices.size(); const char* space = " "; const int dummyint = 0; @@ -523,7 +523,7 @@ static bool writePoints (ofstream & theFile, std::cout << std::endl; std::cout << "The initial 2D mesh contains :" << std::endl; std::cout << " " << nbNodes << " nodes" << std::endl; - std::cout << " " << nbEnforcedVerteces << " enforced vertices" << std::endl; + std::cout << " " << nbEnforcedVertices << " enforced vertices" << std::endl; std::cout << std::endl; std::cout << "Start writing in 'points' file ..." << std::endl; theFile << space << nbNodes << std::endl; @@ -547,10 +547,10 @@ static bool writePoints (ofstream & theFile, } - // Iterate over the enforced verteces + // Iterate over the enforced vertices GHS3DPlugin_Hypothesis::TEnforcedVertexValues::const_iterator vertexIt; const TopoDS_Shape shapeToMesh = theMesh->ShapeToMesh(); - for(vertexIt = theEnforcedVerteces.begin() ; vertexIt != theEnforcedVerteces.end() ; ++vertexIt) { + for(vertexIt = theEnforcedVertices.begin() ; vertexIt != theEnforcedVertices.end() ; ++vertexIt) { double x = vertexIt->first[0]; double y = vertexIt->first[1]; double z = vertexIt->first[2]; @@ -723,7 +723,7 @@ static bool readResultFile(const int fileOpen, const int nbShape, map & theGhs3dIdToNodeMap, bool toMeshHoles, - int nbEnforcedVerteces) + int nbEnforcedVertices) { MESSAGE("GHS3DPlugin_GHS3D::readResultFile()"); struct stat status; @@ -787,16 +787,16 @@ static bool readResultFile(const int fileOpen, nodeId = strtol(ptr, &ptr, 10); MESSAGE("nbInputNodes: "< (nbInputNodes-nbEnforcedVerteces) ) { + if ( iNode > (nbInputNodes-nbEnforcedVertices) ) { // Creating SMESH nodes - // - for enforced verteces - // - for verteces of forced edges + // - for enforced vertices + // - for vertices of forced edges // - for ghs3d nodes nodeAssigne[ iNode ] = 0; aNewNode = theMeshDS->AddNode( coord[0],coord[1],coord[2] ); @@ -953,7 +953,7 @@ static bool readResultFile(const int fileOpen, SMESHDS_Mesh* theMeshDS, TopoDS_Shape aSolid, vector & theNodeByGhs3dId, - int nbEnforcedVerteces) { + int nbEnforcedVertices) { struct stat status; size_t length; @@ -1006,7 +1006,7 @@ static bool readResultFile(const int fileOpen, for (int iNode=0; iNode < nbNodes; iNode++) { for (int iCoor=0; iCoor < 3; iCoor++) coord[ iCoor ] = strtod(ptr, &ptr); - if ((iNode+1) > (nbInputNodes-nbEnforcedVerteces)) { + if ((iNode+1) > (nbInputNodes-nbEnforcedVertices)) { aNewNode = theMeshDS->AddNode( coord[0],coord[1],coord[2] ); theMeshDS->SetNodeInVolume( aNewNode, shapeID ); theNodeByGhs3dId[ iNode ] = aNewNode; @@ -1118,16 +1118,16 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh& theMesh, } map aSmdsToGhs3dIdMap; map aGhs3dIdToNodeMap; - map,double> enforcedVerteces; - int nbEnforcedVerteces = 0; + map,double> enforcedVertices; + int nbEnforcedVertices = 0; try { - enforcedVerteces = GHS3DPlugin_Hypothesis::GetEnforcedVerteces(_hyp); - nbEnforcedVerteces = enforcedVerteces.size(); + enforcedVertices = GHS3DPlugin_Hypothesis::GetEnforcedVertices(_hyp); + nbEnforcedVertices = enforcedVertices.size(); } catch(...) { } - Ok = writePoints( aPointsFile, meshDS, aSmdsToGhs3dIdMap, aGhs3dIdToNodeMap, enforcedVerteces) && + Ok = writePoints( aPointsFile, meshDS, aSmdsToGhs3dIdMap, aGhs3dIdToNodeMap, enforcedVertices) && writeFaces ( aFacesFile, meshDS, aSmdsToGhs3dIdMap ); aFacesFile.close(); @@ -1177,7 +1177,7 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh& theMesh, bool toMeshHoles = _hyp ? _hyp->GetToMeshHoles(true) : GHS3DPlugin_Hypothesis::DefaultMeshHoles(); Ok = readResultFile( fileOpen, theMesh, tabShape, tabBox, _nbShape, aGhs3dIdToNodeMap, - toMeshHoles, nbEnforcedVerteces ); + toMeshHoles, nbEnforcedVertices ); } // --------------------- @@ -1266,11 +1266,11 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh& theMesh, if (!Ok) return error( SMESH_Comment("Can't write into ") << aPointsFileName); - GHS3DPlugin_Hypothesis::TEnforcedVertexValues enforcedVerteces; - int nbEnforcedVerteces = 0; + GHS3DPlugin_Hypothesis::TEnforcedVertexValues enforcedVertices; + int nbEnforcedVertices = 0; try { - enforcedVerteces = GHS3DPlugin_Hypothesis::GetEnforcedVerteces(_hyp); - nbEnforcedVerteces = enforcedVerteces.size(); + enforcedVertices = GHS3DPlugin_Hypothesis::GetEnforcedVertices(_hyp); + nbEnforcedVertices = enforcedVertices.size(); } catch(...) { } @@ -1278,7 +1278,7 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh& theMesh, vector aNodeByGhs3dId; Ok = (writeFaces ( aFacesFile, meshDS, aNodeByGhs3dId ) && - writePoints( aPointsFile, meshDS, aNodeByGhs3dId,enforcedVerteces)); + writePoints( aPointsFile, meshDS, aNodeByGhs3dId,enforcedVertices)); aFacesFile.close(); aPointsFile.close(); @@ -1316,7 +1316,7 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh& theMesh, Ok = false; } else { - Ok = readResultFile( fileOpen, meshDS, theShape ,aNodeByGhs3dId, nbEnforcedVerteces ); + Ok = readResultFile( fileOpen, meshDS, theShape ,aNodeByGhs3dId, nbEnforcedVertices ); } // --------------------- diff --git a/src/GHS3DPlugin_Hypothesis.cxx b/src/GHS3DPlugin_Hypothesis.cxx index 253b31a..f2c1cbe 100644 --- a/src/GHS3DPlugin_Hypothesis.cxx +++ b/src/GHS3DPlugin_Hypothesis.cxx @@ -43,7 +43,7 @@ GHS3DPlugin_Hypothesis::GHS3DPlugin_Hypothesis(int hypId, int studyId, SMESH_Gen myToUseBoundaryRecoveryVersion(DefaultToUseBoundaryRecoveryVersion()), myToUseFemCorrection(DefaultToUseFEMCorrection()), myToRemoveCentralPoint(DefaultToRemoveCentralPoint()), - myEnforcedVerteces(DefaultEnforcedVerteces()) + myEnforcedVertices(DefaultEnforcedVertices()) { _name = "GHS3D_Parameters"; _param_algo_dim = 3; @@ -318,7 +318,7 @@ void GHS3DPlugin_Hypothesis::SetEnforcedVertex(double x, double y, double z, dou coord[0] = x; coord[1] = y; coord[2] = z; - myEnforcedVerteces[coord] = size; + myEnforcedVertices[coord] = size; NotifySubMeshesHypothesisModification(); } @@ -333,8 +333,8 @@ double GHS3DPlugin_Hypothesis::GetEnforcedVertex(double x, double y, double z) coord[0] = x; coord[1] = y; coord[2] = z; - if (myEnforcedVerteces.count(coord)>0) - return myEnforcedVerteces[coord]; + if (myEnforcedVertices.count(coord)>0) + return myEnforcedVertices[coord]; std::ostringstream msg ; msg << "No enforced vertex at " << x << ", " << y << ", " << z; throw std::invalid_argument(msg.str()); @@ -351,9 +351,9 @@ void GHS3DPlugin_Hypothesis::RemoveEnforcedVertex(double x, double y, double z) coord[0] = x; coord[1] = y; coord[2] = z; - TEnforcedVertexValues::iterator it = myEnforcedVerteces.find(coord); - if (it != myEnforcedVerteces.end()) { - myEnforcedVerteces.erase(it); + TEnforcedVertexValues::iterator it = myEnforcedVertices.find(coord); + if (it != myEnforcedVertices.end()) { + myEnforcedVertices.erase(it); NotifySubMeshesHypothesisModification(); return; } @@ -363,11 +363,11 @@ void GHS3DPlugin_Hypothesis::RemoveEnforcedVertex(double x, double y, double z) } //======================================================================= -//function : ClearEnforcedVerteces +//function : ClearEnforcedVertices //======================================================================= -void GHS3DPlugin_Hypothesis::ClearEnforcedVerteces() +void GHS3DPlugin_Hypothesis::ClearEnforcedVertices() { - myEnforcedVerteces.clear(); + myEnforcedVertices.clear(); NotifySubMeshesHypothesisModification(); } @@ -510,10 +510,10 @@ bool GHS3DPlugin_Hypothesis::DefaultToRemoveCentralPoint() } //======================================================================= -//function : DefaultEnforcedVerteces +//function : DefaultEnforcedVertices //======================================================================= -GHS3DPlugin_Hypothesis::TEnforcedVertexValues GHS3DPlugin_Hypothesis::DefaultEnforcedVerteces() +GHS3DPlugin_Hypothesis::TEnforcedVertexValues GHS3DPlugin_Hypothesis::DefaultEnforcedVertices() { return GHS3DPlugin_Hypothesis::TEnforcedVertexValues(); } @@ -541,16 +541,16 @@ std::ostream & GHS3DPlugin_Hypothesis::SaveTo(std::ostream & save) save << " __OPTIONS_END__ "; - TEnforcedVertexValues::iterator it = myEnforcedVerteces.begin(); - if (it != myEnforcedVerteces.end()) { - save << "__ENFORCED_VERTECES_BEGIN__ "; - for ( ; it != myEnforcedVerteces.end(); ++it ) { + TEnforcedVertexValues::iterator it = myEnforcedVertices.begin(); + if (it != myEnforcedVertices.end()) { + save << "__ENFORCED_VERTICES_BEGIN__ "; + for ( ; it != myEnforcedVertices.end(); ++it ) { save << it->first[0] << " " << it->first[1] << " " << it->first[2] << " " << it->second << " "; } - save << "__ENFORCED_VERTECES_END__ "; + save << "__ENFORCED_VERTICES_END__ "; } return save; @@ -657,14 +657,14 @@ std::istream & GHS3DPlugin_Hypothesis::LoadFrom(std::istream & load) std::string separator; bool hasOptions = false; - bool hasEnforcedVerteces = false; + bool hasEnforcedVertices = false; isOK = (load >> separator); if (isOK) if (separator == "__OPTIONS_BEGIN__") hasOptions = true; - else if (separator == "__ENFORCED_VERTECES_BEGIN__") - hasEnforcedVerteces = true; + else if (separator == "__ENFORCED_VERTICES_BEGIN__") + hasEnforcedVertices = true; if (hasOptions) { std::string txt; @@ -690,17 +690,17 @@ std::istream & GHS3DPlugin_Hypothesis::LoadFrom(std::istream & load) if (hasOptions) { isOK = (load >> separator); if (isOK) - if (separator == "__ENFORCED_VERTECES_BEGIN__") - hasEnforcedVerteces = true; + if (separator == "__ENFORCED_VERTICES_BEGIN__") + hasEnforcedVertices = true; } - if (hasEnforcedVerteces) { + if (hasEnforcedVertices) { std::string txt; double x,y,z,size; while (isOK) { isOK = (load >> txt); if (isOK) { - if (txt == "__ENFORCED_VERTECES_END__") { + if (txt == "__ENFORCED_VERTICES_END__") { isOK = false; break; } @@ -712,7 +712,7 @@ std::istream & GHS3DPlugin_Hypothesis::LoadFrom(std::istream & load) coord.push_back(x); coord.push_back(y); coord.push_back(z); - myEnforcedVerteces[ coord ] = size; + myEnforcedVertices[ coord ] = size; } } } @@ -883,12 +883,12 @@ std::string GHS3DPlugin_Hypothesis::GetFileName(const GHS3DPlugin_Hypothesis* hy //================================================================================ /*! -* \brief Return the enforced verteces +* \brief Return the enforced vertices */ //================================================================================ -GHS3DPlugin_Hypothesis::TEnforcedVertexValues GHS3DPlugin_Hypothesis::GetEnforcedVerteces(const GHS3DPlugin_Hypothesis* hyp) +GHS3DPlugin_Hypothesis::TEnforcedVertexValues GHS3DPlugin_Hypothesis::GetEnforcedVertices(const GHS3DPlugin_Hypothesis* hyp) { - return hyp ? hyp->_GetEnforcedVerteces():DefaultEnforcedVerteces(); + return hyp ? hyp->_GetEnforcedVertices():DefaultEnforcedVertices(); } diff --git a/src/GHS3DPlugin_Hypothesis.hxx b/src/GHS3DPlugin_Hypothesis.hxx index fcdd774..119bcd5 100644 --- a/src/GHS3DPlugin_Hypothesis.hxx +++ b/src/GHS3DPlugin_Hypothesis.hxx @@ -120,8 +120,8 @@ public: void SetEnforcedVertex(double x, double y, double z, double size); double GetEnforcedVertex(double x, double y, double z) throw (std::invalid_argument); void RemoveEnforcedVertex(double x, double y, double z) throw (std::invalid_argument); - const TEnforcedVertexValues _GetEnforcedVerteces() const { return myEnforcedVerteces; } - void ClearEnforcedVerteces(); + const TEnforcedVertexValues _GetEnforcedVertices() const { return myEnforcedVertices; } + void ClearEnforcedVertices(); static bool DefaultMeshHoles(); static short DefaultMaximumMemory(); @@ -134,7 +134,7 @@ public: static bool DefaultToUseBoundaryRecoveryVersion(); static bool DefaultToUseFEMCorrection(); static bool DefaultToRemoveCentralPoint(); - static TEnforcedVertexValues DefaultEnforcedVerteces(); + static TEnforcedVertexValues DefaultEnforcedVertices(); /*! * \brief Return command to run ghs3d mesher excluding file prefix (-f) @@ -146,9 +146,9 @@ public: */ static std::string GetFileName(const GHS3DPlugin_Hypothesis* hyp); /*! - * \brief Return the enforced verteces + * \brief Return the enforced vertices */ - static TEnforcedVertexValues GetEnforcedVerteces(const GHS3DPlugin_Hypothesis* hyp); + static TEnforcedVertexValues GetEnforcedVertices(const GHS3DPlugin_Hypothesis* hyp); // Persistence virtual std::ostream & SaveTo(std::ostream & save); @@ -180,7 +180,7 @@ private: bool myToUseFemCorrection; bool myToRemoveCentralPoint; std::string myTextOption; - TEnforcedVertexValues myEnforcedVerteces; + TEnforcedVertexValues myEnforcedVertices; }; diff --git a/src/GHS3DPlugin_Hypothesis_i.cxx b/src/GHS3DPlugin_Hypothesis_i.cxx index 853a795..570f96b 100644 --- a/src/GHS3DPlugin_Hypothesis_i.cxx +++ b/src/GHS3DPlugin_Hypothesis_i.cxx @@ -373,15 +373,15 @@ CORBA::Double GHS3DPlugin_Hypothesis_i::GetEnforcedVertex(CORBA::Double x, CORBA } //======================================================================= -//function : GetEnforcedVerteces +//function : GetEnforcedVertices //======================================================================= -GHS3DPlugin::GHS3DEnforcedVertexList* GHS3DPlugin_Hypothesis_i::GetEnforcedVerteces() +GHS3DPlugin::GHS3DEnforcedVertexList* GHS3DPlugin_Hypothesis_i::GetEnforcedVertices() { ASSERT(myBaseImpl); GHS3DPlugin::GHS3DEnforcedVertexList_var result = new GHS3DPlugin::GHS3DEnforcedVertexList(); - const ::GHS3DPlugin_Hypothesis::TEnforcedVertexValues sizeMaps = this->GetImpl()->_GetEnforcedVerteces(); + const ::GHS3DPlugin_Hypothesis::TEnforcedVertexValues sizeMaps = this->GetImpl()->_GetEnforcedVertices(); int size = sizeMaps.size(); result->length( size ); @@ -426,13 +426,13 @@ void GHS3DPlugin_Hypothesis_i::RemoveEnforcedVertex(CORBA::Double x, CORBA::Doub } //======================================================================= -//function : ClearEnforcedVerteces +//function : ClearEnforcedVertices //======================================================================= -void GHS3DPlugin_Hypothesis_i::ClearEnforcedVerteces() +void GHS3DPlugin_Hypothesis_i::ClearEnforcedVertices() { ASSERT(myBaseImpl); - this->GetImpl()->ClearEnforcedVerteces(); + this->GetImpl()->ClearEnforcedVertices(); } //============================================================================= diff --git a/src/GHS3DPlugin_Hypothesis_i.hxx b/src/GHS3DPlugin_Hypothesis_i.hxx index f4d8c0c..fa70cb5 100644 --- a/src/GHS3DPlugin_Hypothesis_i.hxx +++ b/src/GHS3DPlugin_Hypothesis_i.hxx @@ -126,8 +126,8 @@ class GHS3DPLUGIN_EXPORT GHS3DPlugin_Hypothesis_i: void SetEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z, CORBA::Double size); CORBA::Double GetEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception); void RemoveEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception); - GHS3DPlugin::GHS3DEnforcedVertexList* GetEnforcedVerteces(); - void ClearEnforcedVerteces(); + GHS3DPlugin::GHS3DEnforcedVertexList* GetEnforcedVertices(); + void ClearEnforcedVertices(); // Get implementation ::GHS3DPlugin_Hypothesis* GetImpl(); diff --git a/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx b/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx index c63252b..0d62aa0 100644 --- a/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx @@ -62,7 +62,7 @@ enum { ENF_VER_TAB }; -// Enforced verteces array columns +// Enforced vertices array columns enum { ENF_VER_X_COLUMN = 0, ENF_VER_Y_COLUMN, @@ -71,7 +71,7 @@ enum { ENF_VER_NB_COLUMNS }; -// Enforced verteces inputs +// Enforced vertices inputs enum { ENF_VER_BTNS = 0, ENF_VER_X_COORD, @@ -287,11 +287,11 @@ QFrame* GHS3DPluginGUI_HypothesisCreator::buildFrame() anAdvLayout->addWidget( myTextOption, 9, 1, 1, 2 ); // Size Maps parameters - mySmpGroup = new QWidget(); - QGridLayout* anSmpLayout = new QGridLayout(mySmpGroup); + myEnfGroup = new QWidget(); + QGridLayout* anSmpLayout = new QGridLayout(myEnfGroup); mySmpModel = new QStandardItemModel(0, ENF_VER_NB_COLUMNS); - myEnforcedTableView = new QTableView(mySmpGroup); + myEnforcedTableView = new QTableView(myEnfGroup); myEnforcedTableView->setModel(mySmpModel); myEnforcedTableView->setSortingEnabled(true); myEnforcedTableView->setItemDelegateForColumn(ENF_VER_SIZE_COLUMN,new DoubleLineEditDelegate(this)); @@ -303,43 +303,43 @@ QFrame* GHS3DPluginGUI_HypothesisCreator::buildFrame() myEnforcedTableView->verticalHeader()->hide(); myEnforcedTableView->horizontalHeader()->setResizeMode(QHeaderView::Stretch); - QLabel* myXCoordLabel = new QLabel( tr( "GHS3D_ENF_VER_X_LABEL" ), mySmpGroup ); + QLabel* myXCoordLabel = new QLabel( tr( "GHS3D_ENF_VER_X_LABEL" ), myEnfGroup ); anSmpLayout->addWidget(myXCoordLabel, ENF_VER_X_COORD, 1, 1, 1); - myXCoord = new QLineEdit(mySmpGroup); - myXCoord->setValidator(new QDoubleValidator(mySmpGroup)); + myXCoord = new QLineEdit(myEnfGroup); + myXCoord->setValidator(new QDoubleValidator(myEnfGroup)); anSmpLayout->addWidget(myXCoord, ENF_VER_X_COORD, 2, 1, 1); - QLabel* myYCoordLabel = new QLabel( tr( "GHS3D_ENF_VER_Y_LABEL" ), mySmpGroup ); + QLabel* myYCoordLabel = new QLabel( tr( "GHS3D_ENF_VER_Y_LABEL" ), myEnfGroup ); anSmpLayout->addWidget(myYCoordLabel, ENF_VER_Y_COORD, 1, 1, 1); - myYCoord = new QLineEdit(mySmpGroup); - myYCoord->setValidator(new QDoubleValidator(mySmpGroup)); + myYCoord = new QLineEdit(myEnfGroup); + myYCoord->setValidator(new QDoubleValidator(myEnfGroup)); anSmpLayout->addWidget(myYCoord, ENF_VER_Y_COORD, 2, 1, 1); - QLabel* myZCoordLabel = new QLabel( tr( "GHS3D_ENF_VER_Z_LABEL" ), mySmpGroup ); + QLabel* myZCoordLabel = new QLabel( tr( "GHS3D_ENF_VER_Z_LABEL" ), myEnfGroup ); anSmpLayout->addWidget(myZCoordLabel, ENF_VER_Z_COORD, 1, 1, 1); - myZCoord = new QLineEdit(mySmpGroup); - myZCoord->setValidator(new QDoubleValidator(mySmpGroup)); + myZCoord = new QLineEdit(myEnfGroup); + myZCoord->setValidator(new QDoubleValidator(myEnfGroup)); anSmpLayout->addWidget(myZCoord, ENF_VER_Z_COORD, 2, 1, 1); - QLabel* mySizeLabel = new QLabel( tr( "GHS3D_ENF_VER_SIZE_LABEL" ), mySmpGroup ); + QLabel* mySizeLabel = new QLabel( tr( "GHS3D_ENF_VER_SIZE_LABEL" ), myEnfGroup ); anSmpLayout->addWidget(mySizeLabel, ENF_VER_SIZE, 1, 1, 1); - mySizeValue = new QLineEdit(mySmpGroup); - mySizeValue->setValidator(new QDoubleValidator(mySmpGroup)); + mySizeValue = new QLineEdit(myEnfGroup); + mySizeValue->setValidator(new QDoubleValidator(myEnfGroup)); anSmpLayout->addWidget(mySizeValue, ENF_VER_SIZE, 2, 1, 1); - addVertexButton = new QPushButton(tr("GHS3D_ENF_VER_VERTEX"),mySmpGroup); + addVertexButton = new QPushButton(tr("GHS3D_ENF_VER_VERTEX"),myEnfGroup); anSmpLayout->addWidget(addVertexButton, ENF_VER_VERTEX_BTN, 1, 1, 2); addVertexButton->setEnabled(false); - QFrame *line = new QFrame(mySmpGroup); + QFrame *line = new QFrame(myEnfGroup); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); anSmpLayout->addWidget(line, ENF_VER_SEPARATOR, 1, 1, 2); - removeVertexButton = new QPushButton(tr("GHS3D_ENF_VER_REMOVE"),mySmpGroup); + removeVertexButton = new QPushButton(tr("GHS3D_ENF_VER_REMOVE"),myEnfGroup); anSmpLayout->addWidget(removeVertexButton, ENF_VER_REMOVE_BTN, 1, 1, 2); // add tabs tab->insertTab( STD_TAB, myStdGroup, tr( "SMESH_ARGUMENTS" ) ); tab->insertTab( ADV_TAB, myAdvGroup, tr( "GHS3D_ADV_ARGS" ) ); - tab->insertTab( ENF_VER_TAB, mySmpGroup, tr( "GHS3D_ENFORCED_VERTECES" ) ); + tab->insertTab( ENF_VER_TAB, myEnfGroup, tr( "GHS3D_ENFORCED_VERTICES" ) ); tab->setCurrentIndex( STD_TAB ); // connections @@ -506,7 +506,7 @@ void GHS3DPluginGUI_HypothesisCreator::retrieveParams() const TEnforcedVertexValues::const_iterator it; int row = 0; - for(it = data.myEnforcedVerteces.begin() ; it != data.myEnforcedVerteces.end(); it++ ) + for(it = data.myEnforcedVertices.begin() ; it != data.myEnforcedVertices.end(); it++ ) { double x = it->at(0); double y = it->at(1); @@ -579,7 +579,7 @@ QString GHS3DPluginGUI_HypothesisCreator::storeParams() const valStr += " "; valStr += data.myTextOption; - valStr += " #BEGIN ENFORCED VERTECES#"; + valStr += " #BEGIN ENFORCED VERTICES#"; // Add size map parameters storage for (int i=0 ; irowCount() ; i++) { valStr += " ("; @@ -597,7 +597,7 @@ QString GHS3DPluginGUI_HypothesisCreator::storeParams() const if (i!=mySmpModel->rowCount()-1) valStr += ";"; } - valStr += " #END ENFORCED VERTECES#"; + valStr += " #END ENFORCED VERTICES#"; MESSAGE(valStr.toStdString()); return valStr; } @@ -625,17 +625,17 @@ bool GHS3DPluginGUI_HypothesisCreator::readParamsFromHypo( GHS3DHypothesisData& h_data.myFEMCorrection = h->GetFEMCorrection(); h_data.myTextOption = h->GetTextOption(); - GHS3DPlugin::GHS3DEnforcedVertexList_var verteces = h->GetEnforcedVerteces(); - MESSAGE("verteces->length(): " << verteces->length()); - h_data.myEnforcedVerteces.clear(); - for (int i=0 ; ilength() ; i++) { + GHS3DPlugin::GHS3DEnforcedVertexList_var vertices = h->GetEnforcedVertices(); + MESSAGE("vertices->length(): " << vertices->length()); + h_data.myEnforcedVertices.clear(); + for (int i=0 ; ilength() ; i++) { GHS3DEnforcedVertex myVertex; - myVertex.push_back(verteces[i].x); - myVertex.push_back(verteces[i].y); - myVertex.push_back(verteces[i].z); - myVertex.push_back(verteces[i].size); + myVertex.push_back(vertices[i].x); + myVertex.push_back(vertices[i].y); + myVertex.push_back(vertices[i].z); + myVertex.push_back(vertices[i].size); MESSAGE("Add enforced vertex ("<< myVertex[0] << ","<< myVertex[1] << ","<< myVertex[2] << ") ="<< myVertex[3]); - h_data.myEnforcedVerteces.push_back(myVertex); + h_data.myEnforcedVertices.push_back(myVertex); } return true; } @@ -679,19 +679,19 @@ bool GHS3DPluginGUI_HypothesisCreator::storeParamsToHypo( const GHS3DHypothesisD if ( h->GetTextOption() != h_data.myTextOption ) h->SetTextOption ( h_data.myTextOption.toLatin1().constData() ); - int nbVertex = (int) h_data.myEnforcedVerteces.size(); - GHS3DPlugin::GHS3DEnforcedVertexList_var vertexHyp = h->GetEnforcedVerteces(); + int nbVertex = (int) h_data.myEnforcedVertices.size(); + GHS3DPlugin::GHS3DEnforcedVertexList_var vertexHyp = h->GetEnforcedVertices(); int nbVertexHyp = vertexHyp->length(); - MESSAGE("Store params for size maps: " << nbVertex << " enforced verteces"); - MESSAGE("h->GetEnforcedVerteces()->length(): " << nbVertexHyp); + MESSAGE("Store params for size maps: " << nbVertex << " enforced vertices"); + MESSAGE("h->GetEnforcedVertices()->length(): " << nbVertexHyp); - // Some verteces were removed + // Some vertices were removed if (nbVertex < nbVertexHyp) { // if (nbVertex == 0) -// h->ClearEnforcedVerteces(); +// h->ClearEnforcedVertices(); // else { - // iterate over verteces of hypo + // iterate over vertices of hypo for(int i = 0 ; i at(0); double y = it->at(1); double z = it->at(2); @@ -752,7 +752,7 @@ bool GHS3DPluginGUI_HypothesisCreator::readParamsFromWidgets( GHS3DHypothesisDat h_data.myBoundaryRecovery = myBoundaryRecoveryCheck->isChecked(); h_data.myFEMCorrection = myFEMCorrectionCheck->isChecked(); h_data.myTextOption = myTextOption->text(); - h_data.myEnforcedVerteces.clear(); + h_data.myEnforcedVertices.clear(); for (int i=0 ; irowCount() ; i++) { GHS3DEnforcedVertex myVertex; @@ -764,7 +764,7 @@ bool GHS3DPluginGUI_HypothesisCreator::readParamsFromWidgets( GHS3DHypothesisDat << myVertex[1] << ", " << myVertex[2] << ") = " << myVertex[3]); - h_data.myEnforcedVerteces.push_back(myVertex); + h_data.myEnforcedVertices.push_back(myVertex); } return true; diff --git a/src/GUI/GHS3DPluginGUI_HypothesisCreator.h b/src/GUI/GHS3DPluginGUI_HypothesisCreator.h index 551a7e8..ad081d1 100644 --- a/src/GUI/GHS3DPluginGUI_HypothesisCreator.h +++ b/src/GUI/GHS3DPluginGUI_HypothesisCreator.h @@ -54,7 +54,7 @@ typedef struct int myMaximumMemory,myInitialMemory,myOptimizationLevel; QString myName,myWorkingDir,myTextOption; short myVerboseLevel; - TEnforcedVertexValues myEnforcedVerteces; + TEnforcedVertexValues myEnforcedVertices; } GHS3DHypothesisData; /*! @@ -116,7 +116,7 @@ private: QCheckBox* myFEMCorrectionCheck; QLineEdit* myTextOption; - QWidget* mySmpGroup; + QWidget* myEnfGroup; QStandardItemModel* mySmpModel; QTableView* myEnforcedTableView; QLineEdit* myXCoord; diff --git a/src/GUI/GHS3DPlugin_msg_en.ts b/src/GUI/GHS3DPlugin_msg_en.ts index 431abdb..5edbd49 100644 --- a/src/GUI/GHS3DPlugin_msg_en.ts +++ b/src/GUI/GHS3DPlugin_msg_en.ts @@ -119,8 +119,8 @@ Working directory - GHS3D_ENFORCED_VERTECES - Enforced verteces + GHS3D_ENFORCED_VERTICES + Enforced vertices GHS3D_ENF_VER_X_COLUMN