It is possible to add and remove an enforced vertex in the volume with the following commands:
SetEnforcedVertex( x, y, z, size )
RemoveEnforcedVertex( x, y, z )
where (x,y,z) are the coordinates of vertex and "size" the physical size associated to this vertex.
ATTENTION: A node is created on this vertex.
== New features with ghs3d version 4.1 ==
Add following options:
** -no_initial_central_point : to remove initial central point.
** -FEM : Applies ï¬\81nite-element correction by replacing overconstrained elements where it is possible.
* Add "standard+" optimisation level.
*/
module GHS3DPlugin
{
- struct GHS3DSizeMapVertex {
+ struct GHS3DEnforcedVertex {
double x;
double y;
double z;
double size;
};
- typedef sequence<GHS3DSizeMapVertex> GHS3DSizeMapVertexList;
+ typedef sequence<GHS3DEnforcedVertex> GHS3DEnforcedVertexList;
/*!
* GHS3DPlugin_GHS3D: interface of "Tetrahedron (GHS3D)" algorithm
*/
*/
void SetToUseBoundaryRecoveryVersion(in boolean toUse);
boolean GetToUseBoundaryRecoveryVersion();
+ /*!
+ * Applies finite-element correction by replacing overconstrained elements where
+ * it is possible. The process is cutting first the overconstrained edges and
+ * second the overconstrained facets. This insure that no edges have two boundary
+ * vertices and that no facets have three boundary vertices.
+ */
+ void SetFEMCorrection(in boolean toUseFem);
+ boolean GetFEMCorrection();
+ /*!
+ * To removes initial central point.
+ */
+ void SetToRemoveCentralPoint(in boolean toRemove);
+ boolean GetToRemoveCentralPoint();
/*!
* To set hiden/undocumented/advanced options
*/
/*!
* To set an enforced vertex
*/
- void SetSizeMapVertex(in double x, in double y, in double z, in double size);
- double GetSizeMapVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
- void RemoveSizeMapVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
- GHS3DSizeMapVertexList GetSizeMapVerteces();
- void ClearSizeMapVerteces();
+ 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();
};
};
}
}
}
-
+
+
delete [] tabID;
delete [] tabShape;
SMESHDS_Mesh * theMesh,
map <int,int> & theSmdsToGhs3dIdMap,
map <int,const SMDS_MeshNode*> & theGhs3dIdToNodeMap,
- GHS3DPlugin_Hypothesis::TSizeMapVertexValues & theEnforcedVerteces)
+ map<vector<double>,double> & theEnforcedVerteces)
{
// record structure:
//
}
// Iterate over the enforced verteces
- GHS3DPlugin_Hypothesis::TSizeMapVertexValues::const_iterator vertexIt;
+ GHS3DPlugin_Hypothesis::TEnforcedVertexValues::const_iterator vertexIt;
const TopoDS_Shape shapeToMesh = theMesh->ShapeToMesh();
for(vertexIt = theEnforcedVerteces.begin() ; vertexIt != theEnforcedVerteces.end() ; ++vertexIt) {
double x = vertexIt->first[0];
scl.Perform(myPoint, 1e-7);
TopAbs_State result = scl.State();
if ( result == TopAbs_IN ) {
- std::cout << "Adding enforced vertex (" << x << "," << y <<"," << z << ") = " << vertexIt->second << std::endl;
+ MESSAGE("Adding enforced vertex (" << x << "," << y <<"," << z << ") = " << vertexIt->second);
// X Y Z PHY_SIZE DUMMY_INT
theFile
<< space << x
theFile << std::endl;
}
else
- std::cout << "Enforced vertex (" << x << "," << y <<"," << z << ") is not inside the geometry: it was not added " << std::endl;
+ MESSAGE("Enforced vertex (" << x << "," << y <<"," << z << ") is not inside the geometry: it was not added ");
}
+
+
std::cout << std::endl;
std::cout << "End writing in 'points' file." << std::endl;
static bool writePoints (ofstream & theFile,
SMESHDS_Mesh * theMesh,
const vector <const SMDS_MeshNode*> & theNodeByGhs3dId,
- GHS3DPlugin_Hypothesis::TSizeMapVertexValues & theEnforcedVerteces)
+ map<vector<double>,double> & theEnforcedVerteces)
{
// record structure:
//
}
// Iterate over the enforced verteces
- GHS3DPlugin_Hypothesis::TSizeMapVertexValues::const_iterator vertexIt;
+ GHS3DPlugin_Hypothesis::TEnforcedVertexValues::const_iterator vertexIt;
const TopoDS_Shape shapeToMesh = theMesh->ShapeToMesh();
for(vertexIt = theEnforcedVerteces.begin() ; vertexIt != theEnforcedVerteces.end() ; ++vertexIt) {
double x = vertexIt->first[0];
bool toMeshHoles,
int nbEnforcedVerteces)
{
+ MESSAGE("GHS3DPlugin_GHS3D::readResultFile()");
struct stat status;
size_t length;
for (int i=0; i < 4*nbElems; i++)
nodeId = strtol(ptr, &ptr, 10);
+ MESSAGE("nbInputNodes: "<<nbInputNodes);
+ MESSAGE("nbEnforcedVerteces: "<<nbEnforcedVerteces);
// Reading the nodeCoor and update the nodeMap
for (int iNode=1; iNode <= nbNodes; iNode++) {
for (int iCoor=0; iCoor < 3; iCoor++)
coord[ iCoor ] = strtod(ptr, &ptr);
nodeAssigne[ iNode ] = 1;
if ( iNode > (nbInputNodes-nbEnforcedVerteces) ) {
+ // Creating SMESH nodes
+ // - for enforced verteces
+ // - for verteces of forced edges
+ // - for ghs3d nodes
nodeAssigne[ iNode ] = 0;
aNewNode = theMeshDS->AddNode( coord[0],coord[1],coord[2] );
theGhs3dIdToNodeMap.insert(theGhs3dIdToNodeMap.end(), make_pair( iNode, aNewNode ));
}
// END -- 0020330: Pb with ghs3d as a submesh
#ifdef _DEBUG_
- cout << i+1 << " subdomain: findShapeID() returns " << tabID[i] << endl;
+ std::cout << i+1 << " subdomain: findShapeID() returns " << tabID[i] << std::endl;
#endif
} catch ( Standard_Failure ) {
} catch (...) {}
}
map <int,int> aSmdsToGhs3dIdMap;
map <int,const SMDS_MeshNode*> aGhs3dIdToNodeMap;
- GHS3DPlugin_Hypothesis::TSizeMapVertexValues enforcedVerteces;
- int nbEnforcedVerteces;
+ map<vector<double>,double> enforcedVerteces;
+ int nbEnforcedVerteces = 0;
try {
enforcedVerteces = GHS3DPlugin_Hypothesis::GetEnforcedVerteces(_hyp);
nbEnforcedVerteces = enforcedVerteces.size();
}
catch(...) {
- nbEnforcedVerteces = 0;
}
Ok = writePoints( aPointsFile, meshDS, aSmdsToGhs3dIdMap, aGhs3dIdToNodeMap, enforcedVerteces) &&
if (!Ok)
return error( SMESH_Comment("Can't write into ") << aPointsFileName);
- GHS3DPlugin_Hypothesis::TSizeMapVertexValues enforcedVerteces;
- int nbEnforcedVerteces;
+ GHS3DPlugin_Hypothesis::TEnforcedVertexValues enforcedVerteces;
+ int nbEnforcedVerteces = 0;
try {
enforcedVerteces = GHS3DPlugin_Hypothesis::GetEnforcedVerteces(_hyp);
nbEnforcedVerteces = enforcedVerteces.size();
}
catch(...) {
- nbEnforcedVerteces = 0;
}
vector <const SMDS_MeshNode*> aNodeByGhs3dId;
myVerboseLevel(DefaultVerboseLevel()),
myToCreateNewNodes(DefaultToCreateNewNodes()),
myToUseBoundaryRecoveryVersion(DefaultToUseBoundaryRecoveryVersion()),
- mySizeMapVerteces(DefaultSizeMapVerteces())
+ myToUseFemCorrection(DefaultToUseFEMCorrection()),
+ myToRemoveCentralPoint(DefaultToRemoveCentralPoint()),
+ myEnforcedVerteces(DefaultEnforcedVerteces())
{
_name = "GHS3D_Parameters";
_param_algo_dim = 3;
return myToUseBoundaryRecoveryVersion;
}
+//=======================================================================
+//function : SetFEMCorrection
+//=======================================================================
+
+void GHS3DPlugin_Hypothesis::SetFEMCorrection(bool toUseFem)
+{
+ if ( myToUseFemCorrection != toUseFem ) {
+ myToUseFemCorrection = toUseFem;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : GetFEMCorrection
+//=======================================================================
+
+bool GHS3DPlugin_Hypothesis::GetFEMCorrection() const
+{
+ return myToUseFemCorrection;
+}
+
+//=======================================================================
+//function : SetToRemoveCentralPoint
+//=======================================================================
+
+void GHS3DPlugin_Hypothesis::SetToRemoveCentralPoint(bool toRemove)
+{
+ if ( myToRemoveCentralPoint != toRemove ) {
+ myToRemoveCentralPoint = toRemove;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : GetToRemoveCentralPoint
+//=======================================================================
+
+bool GHS3DPlugin_Hypothesis::GetToRemoveCentralPoint() const
+{
+ return myToRemoveCentralPoint;
+}
+
//=======================================================================
//function : SetTextOption
//=======================================================================
}
//=======================================================================
-//function : SetSizeMapVertex
+//function : SetEnforcedVertex
//=======================================================================
-void GHS3DPlugin_Hypothesis::SetSizeMapVertex(double x, double y, double z, double size)
+void GHS3DPlugin_Hypothesis::SetEnforcedVertex(double x, double y, double z, double size)
{
std::vector<double> coord(3);
coord[0] = x;
coord[1] = y;
coord[2] = z;
- mySizeMapVerteces[coord] = size;
+ myEnforcedVerteces[coord] = size;
NotifySubMeshesHypothesisModification();
}
//=======================================================================
-//function : GetSizeMapVertex
+//function : GetEnforcedVertex
//=======================================================================
-double GHS3DPlugin_Hypothesis::GetSizeMapVertex(double x, double y, double z)
+double GHS3DPlugin_Hypothesis::GetEnforcedVertex(double x, double y, double z)
throw (std::invalid_argument)
{
std::vector<double> coord(3);
coord[0] = x;
coord[1] = y;
coord[2] = z;
- if (mySizeMapVerteces.count(coord)>0)
- return mySizeMapVerteces[coord];
+ if (myEnforcedVerteces.count(coord)>0)
+ return myEnforcedVerteces[coord];
std::ostringstream msg ;
msg << "No enforced vertex at " << x << ", " << y << ", " << z;
throw std::invalid_argument(msg.str());
}
//=======================================================================
-//function : RemoveSizeMapVertex
+//function : RemoveEnforcedVertex
//=======================================================================
-void GHS3DPlugin_Hypothesis::RemoveSizeMapVertex(double x, double y, double z)
+void GHS3DPlugin_Hypothesis::RemoveEnforcedVertex(double x, double y, double z)
throw (std::invalid_argument)
{
std::vector<double> coord(3);
coord[0] = x;
coord[1] = y;
coord[2] = z;
- TSizeMapVertexValues::iterator it = mySizeMapVerteces.find(coord);
- if (it != mySizeMapVerteces.end()) {
- mySizeMapVerteces.erase(it);
+ TEnforcedVertexValues::iterator it = myEnforcedVerteces.find(coord);
+ if (it != myEnforcedVerteces.end()) {
+ myEnforcedVerteces.erase(it);
NotifySubMeshesHypothesisModification();
return;
}
}
//=======================================================================
-//function : ClearSizeMapVerteces
+//function : ClearEnforcedVerteces
//=======================================================================
-void GHS3DPlugin_Hypothesis::ClearSizeMapVerteces()
+void GHS3DPlugin_Hypothesis::ClearEnforcedVerteces()
{
- mySizeMapVerteces.clear();
+ myEnforcedVerteces.clear();
NotifySubMeshesHypothesisModification();
}
}
//=======================================================================
-//function : DefaultSizeMapVerteces
+//function : DefaultToUseFEMCorrection
//=======================================================================
-GHS3DPlugin_Hypothesis::TSizeMapVertexValues GHS3DPlugin_Hypothesis::DefaultSizeMapVerteces()
+bool GHS3DPlugin_Hypothesis::DefaultToUseFEMCorrection()
{
- return GHS3DPlugin_Hypothesis::TSizeMapVertexValues();
+ return false;
+}
+
+//=======================================================================
+//function : DefaultToRemoveCentralPoint
+//=======================================================================
+
+bool GHS3DPlugin_Hypothesis::DefaultToRemoveCentralPoint()
+{
+ return false;
+}
+
+//=======================================================================
+//function : DefaultEnforcedVerteces
+//=======================================================================
+
+GHS3DPlugin_Hypothesis::TEnforcedVertexValues GHS3DPlugin_Hypothesis::DefaultEnforcedVerteces()
+{
+ return GHS3DPlugin_Hypothesis::TEnforcedVertexValues();
}
save << myVerboseLevel << " ";
save << (int)myToCreateNewNodes << " ";
save << (int)myToUseBoundaryRecoveryVersion << " ";
+ save << (int)myToUseFemCorrection << " ";
+ save << (int)myToRemoveCentralPoint << " ";
save << "__OPTIONS_BEGIN__ ";
save << myTextOption << " ";
save << " __OPTIONS_END__ ";
- TSizeMapVertexValues::iterator it = mySizeMapVerteces.begin();
- if (it != mySizeMapVerteces.end()) {
+ TEnforcedVertexValues::iterator it = myEnforcedVerteces.begin();
+ if (it != myEnforcedVerteces.end()) {
save << "__ENFORCED_VERTECES_BEGIN__ ";
- for ( ; it != mySizeMapVerteces.end(); ++it ) {
+ for ( ; it != myEnforcedVerteces.end(); ++it ) {
save << it->first[0] << " "
<< it->first[1] << " "
<< it->first[2] << " "
else
load.clear(ios::badbit | load.rdstate());
+ isOK = (load >> i);
+ if (isOK)
+ myToUseFemCorrection = (bool) i;
+ else
+ load.clear(ios::badbit | load.rdstate());
+
+ isOK = (load >> i);
+ if (isOK)
+ myToRemoveCentralPoint = (bool) i;
+ else
+ load.clear(ios::badbit | load.rdstate());
+
// isOK = (load >> myTextOption);
// while (isOK) {
// std::string txt;
coord.push_back(x);
coord.push_back(y);
coord.push_back(z);
- mySizeMapVerteces[ coord ] = size;
+ myEnforcedVerteces[ coord ] = size;
}
}
}
TCollection_AsciiString cmd( "ghs3d.exe" );
#endif
// check if any option is overridden by hyp->myTextOption
- bool m = hyp ? ( hyp->myTextOption.find("-m") == std::string::npos ) : true;
- bool M = hyp ? ( hyp->myTextOption.find("-M") == std::string::npos ) : true;
- bool c = hyp ? ( hyp->myTextOption.find("-c") == std::string::npos ) : true;
- bool o = hyp ? ( hyp->myTextOption.find("-o") == std::string::npos ) : true;
- bool p0= hyp ? ( hyp->myTextOption.find("-p0")== std::string::npos ) : true;
- bool C = hyp ? ( hyp->myTextOption.find("-C") == std::string::npos ) : true;
- bool v = hyp ? ( hyp->myTextOption.find("-v") == std::string::npos ) : true;
+ bool m = hyp ? ( hyp->myTextOption.find("-m") == std::string::npos ) : true;
+ bool M = hyp ? ( hyp->myTextOption.find("-M") == std::string::npos ) : true;
+ bool c = hyp ? ( hyp->myTextOption.find("-c") == std::string::npos ) : true;
+ bool o = hyp ? ( hyp->myTextOption.find("-o") == std::string::npos ) : true;
+ bool p0 = hyp ? ( hyp->myTextOption.find("-p0") == std::string::npos ) : true;
+ bool C = hyp ? ( hyp->myTextOption.find("-C") == std::string::npos ) : true;
+ bool v = hyp ? ( hyp->myTextOption.find("-v") == std::string::npos ) : true;
+ bool fem = hyp ? ( hyp->myTextOption.find("-FEM")== std::string::npos ) : true;
+ bool rem = hyp ? ( hyp->myTextOption.find("-no_initial_central_point")== std::string::npos ) : true;
// if use boundary recovery version, few options are allowed
bool useBndRecovery = !C;
// optimization level
if ( o && hyp && !useBndRecovery ) {
- if ( hyp->myOptimizationLevel >= 0 && hyp->myOptimizationLevel < 4 ) {
- char* level[] = { "none" , "light" , "standard" , "strong" };
+ if ( hyp->myOptimizationLevel >= 0 && hyp->myOptimizationLevel < 5 ) {
+ char* level[] = { "none" , "light" , "standard" , "standard+" , "strong" };
cmd += " -o ";
cmd += level[ hyp->myOptimizationLevel ];
}
cmd += " -C";
}
+ // to use FEM correction
+ if ( fem && hyp && hyp->myToUseFemCorrection) {
+ cmd += " -FEM";
+ }
+
+ // to remove initial central point.
+ if ( rem && hyp && hyp->myToRemoveCentralPoint) {
+ cmd += " -no_initial_central_point";
+ }
+
// options as text
if ( hyp && !hyp->myTextOption.empty() ) {
cmd += " ";
*/
//================================================================================
-GHS3DPlugin_Hypothesis::TSizeMapVertexValues GHS3DPlugin_Hypothesis::GetEnforcedVerteces(const GHS3DPlugin_Hypothesis* hyp)
+GHS3DPlugin_Hypothesis::TEnforcedVertexValues GHS3DPlugin_Hypothesis::GetEnforcedVerteces(const GHS3DPlugin_Hypothesis* hyp)
{
- return hyp ? hyp->GetSizeMapVerteces():DefaultSizeMapVerteces();
+ return hyp ? hyp->_GetEnforcedVerteces():DefaultEnforcedVerteces();
}
void SetInitialMemory(short MB);
short GetInitialMemory() const;
/*!
- * Optimization level: 0-none, 1-light, 2-medium, 3-strong. Default is medium
+ * Optimization level: 0-none, 1-light, 2-medium, 3-standard+, 4-strong. Default is medium
*/
- enum OptimizationLevel { None = 0, Light, Medium, Strong };
+ enum OptimizationLevel { None = 0, Light, Medium, StandardPlus, Strong };
void SetOptimizationLevel(OptimizationLevel level);
OptimizationLevel GetOptimizationLevel() const;
/*!
*/
void SetToUseBoundaryRecoveryVersion(bool toUse);
bool GetToUseBoundaryRecoveryVersion() const;
+ /*!
+ * Applies finite-element correction by replacing overconstrained elements where
+ * it is possible. The process is cutting first the overconstrained edges and
+ * second the overconstrained facets. This insure that no edges have two boundary
+ * vertices and that no facets have three boundary vertices.
+ */
+ void SetFEMCorrection(bool toUseFem);
+ bool GetFEMCorrection() const;
+ /*!
+ * To removes initial central point.
+ */
+ void SetToRemoveCentralPoint(bool toRemove);
+ bool GetToRemoveCentralPoint() const;
/*!
* To set hiden/undocumented/advanced options
*/
/*!
* To set an enforced vertex
*/
- typedef std::map<std::vector<double>,double> TSizeMapVertexValues;
- void SetSizeMapVertex(double x, double y, double z, double size);
- double GetSizeMapVertex(double x, double y, double z) throw (std::invalid_argument);
- void RemoveSizeMapVertex(double x, double y, double z) throw (std::invalid_argument);
- const TSizeMapVertexValues GetSizeMapVerteces() const { return mySizeMapVerteces; }
- void ClearSizeMapVerteces();
+ typedef std::map<std::vector<double>,double> TEnforcedVertexValues;
+ 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();
static bool DefaultMeshHoles();
static short DefaultMaximumMemory();
static short DefaultVerboseLevel();
static bool DefaultToCreateNewNodes();
static bool DefaultToUseBoundaryRecoveryVersion();
- static TSizeMapVertexValues DefaultSizeMapVerteces();
+ static bool DefaultToUseFEMCorrection();
+ static bool DefaultToRemoveCentralPoint();
+ static TEnforcedVertexValues DefaultEnforcedVerteces();
/*!
* \brief Return command to run ghs3d mesher excluding file prefix (-f)
/*!
* \brief Return the enforced verteces
*/
- static TSizeMapVertexValues GetEnforcedVerteces(const GHS3DPlugin_Hypothesis* hyp);
+ static TEnforcedVertexValues GetEnforcedVerteces(const GHS3DPlugin_Hypothesis* hyp);
// Persistence
virtual std::ostream & SaveTo(std::ostream & save);
short myVerboseLevel;
bool myToCreateNewNodes;
bool myToUseBoundaryRecoveryVersion;
+ bool myToUseFemCorrection;
+ bool myToRemoveCentralPoint;
std::string myTextOption;
- TSizeMapVertexValues mySizeMapVerteces;
+ TEnforcedVertexValues myEnforcedVerteces;
};
return this->GetImpl()->GetToUseBoundaryRecoveryVersion();
}
+//=======================================================================
+//function : SetFEMCorrection
+//=======================================================================
+
+void GHS3DPlugin_Hypothesis_i::SetFEMCorrection(CORBA::Boolean toUseFem)
+{
+ ASSERT(myBaseImpl);
+ this->GetImpl()->SetFEMCorrection(toUseFem);
+ SMESH::TPythonDump() << _this() << ".SetFEMCorrection( " << toUseFem << " )";
+}
+
+//=======================================================================
+//function : GetFEMCorrection
+//=======================================================================
+
+CORBA::Boolean GHS3DPlugin_Hypothesis_i::GetFEMCorrection()
+{
+ ASSERT(myBaseImpl);
+ return this->GetImpl()->GetFEMCorrection();
+}
+
+//=======================================================================
+//function : SetToRemoveCentralPoint
+//=======================================================================
+
+void GHS3DPlugin_Hypothesis_i::SetToRemoveCentralPoint(CORBA::Boolean toRemove)
+{
+ ASSERT(myBaseImpl);
+ this->GetImpl()->SetToRemoveCentralPoint(toRemove);
+ SMESH::TPythonDump() << _this() << ".SetToRemoveCentralPoint( " << toRemove << " )";
+}
+
+//=======================================================================
+//function : GetToRemoveCentralPoint
+//=======================================================================
+
+CORBA::Boolean GHS3DPlugin_Hypothesis_i::GetToRemoveCentralPoint()
+{
+ ASSERT(myBaseImpl);
+ return this->GetImpl()->GetToRemoveCentralPoint();
+}
+
//=======================================================================
//function : SetTextOption
//=======================================================================
}
//=======================================================================
-//function : SetSizeMapVertex
+//function : SetEnforcedVertex
//=======================================================================
-void GHS3DPlugin_Hypothesis_i::SetSizeMapVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z, CORBA::Double size)
+void GHS3DPlugin_Hypothesis_i::SetEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z, CORBA::Double size)
{
ASSERT(myBaseImpl);
- this->GetImpl()->SetSizeMapVertex(x,y,z,size);
- SMESH::TPythonDump() << _this() << ".SetSizeMapVertex( " << x << ", " << y << ", " << z << ", " << size << " )";
+ this->GetImpl()->SetEnforcedVertex(x,y,z,size);
+ SMESH::TPythonDump() << _this() << ".SetEnforcedVertex( " << x << ", " << y << ", " << z << ", " << size << " )";
}
//=======================================================================
-//function : SetSizeMapVertex
+//function : GetEnforcedVertex
//=======================================================================
-CORBA::Double GHS3DPlugin_Hypothesis_i::GetSizeMapVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z)
+CORBA::Double GHS3DPlugin_Hypothesis_i::GetEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z)
throw (SALOME::SALOME_Exception)
{
ASSERT(myBaseImpl);
try {
- return this->GetImpl()->GetSizeMapVertex(x,y,z);
+ return this->GetImpl()->GetEnforcedVertex(x,y,z);
}
catch (const std::invalid_argument& ex) {
SALOME::ExceptionStruct ExDescription;
ExDescription.text = ex.what();
ExDescription.type = SALOME::BAD_PARAM;
- ExDescription.sourceFile = "GHS3DPlugin_Hypothesis::GetSizeMapVertex(x,y,z)";
+ ExDescription.sourceFile = "GHS3DPlugin_Hypothesis::GetEnforcedVertex(x,y,z)";
ExDescription.lineNumber = 0;
throw SALOME::SALOME_Exception(ExDescription);
}
}
//=======================================================================
-//function : GetSizeMapVerteces
+//function : GetEnforcedVerteces
//=======================================================================
-GHS3DPlugin::GHS3DSizeMapVertexList* GHS3DPlugin_Hypothesis_i::GetSizeMapVerteces()
+GHS3DPlugin::GHS3DEnforcedVertexList* GHS3DPlugin_Hypothesis_i::GetEnforcedVerteces()
{
ASSERT(myBaseImpl);
- GHS3DPlugin::GHS3DSizeMapVertexList_var result = new GHS3DPlugin::GHS3DSizeMapVertexList();
+ GHS3DPlugin::GHS3DEnforcedVertexList_var result = new GHS3DPlugin::GHS3DEnforcedVertexList();
- const ::GHS3DPlugin_Hypothesis::TSizeMapVertexValues sizeMaps = this->GetImpl()->GetSizeMapVerteces();
+ const ::GHS3DPlugin_Hypothesis::TEnforcedVertexValues sizeMaps = this->GetImpl()->_GetEnforcedVerteces();
int size = sizeMaps.size();
result->length( size );
- ::GHS3DPlugin_Hypothesis::TSizeMapVertexValues::const_iterator it;
+ ::GHS3DPlugin_Hypothesis::TEnforcedVertexValues::const_iterator it;
int i = 0;
for (it = sizeMaps.begin() ; it != sizeMaps.end(); it++ ) {
- GHS3DPlugin::GHS3DSizeMapVertex_var myVertex = new GHS3DPlugin::GHS3DSizeMapVertex();
+ GHS3DPlugin::GHS3DEnforcedVertex_var myVertex = new GHS3DPlugin::GHS3DEnforcedVertex();
myVertex->x = it->first[0];
myVertex->y = it->first[1];
myVertex->z = it->first[2];
}
//=======================================================================
-//function : RemoveSizeMapVertex
+//function : RemoveEnforcedVertex
//=======================================================================
-void GHS3DPlugin_Hypothesis_i::RemoveSizeMapVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z)
+void GHS3DPlugin_Hypothesis_i::RemoveEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z)
throw (SALOME::SALOME_Exception)
{
ASSERT(myBaseImpl);
try {
- this->GetImpl()->RemoveSizeMapVertex(x,y,z);
- SMESH::TPythonDump() << _this() << ".RemoveSizeMapVertex( " << x << ", " << y << ", " << z << " )";
+ this->GetImpl()->RemoveEnforcedVertex(x,y,z);
+ SMESH::TPythonDump() << _this() << ".RemoveEnforcedVertex( " << x << ", " << y << ", " << z << " )";
}
catch (const std::invalid_argument& ex) {
SALOME::ExceptionStruct ExDescription;
ExDescription.text = ex.what();
ExDescription.type = SALOME::BAD_PARAM;
- ExDescription.sourceFile = "GHS3DPlugin_Hypothesis::RemoveSizeMapVertex(x,y,z)";
+ ExDescription.sourceFile = "GHS3DPlugin_Hypothesis::RemoveEnforcedVertex(x,y,z)";
ExDescription.lineNumber = 0;
throw SALOME::SALOME_Exception(ExDescription);
}
}
//=======================================================================
-//function : ClearSizeMapVerteces
+//function : ClearEnforcedVerteces
//=======================================================================
-void GHS3DPlugin_Hypothesis_i::ClearSizeMapVerteces()
+void GHS3DPlugin_Hypothesis_i::ClearEnforcedVerteces()
{
ASSERT(myBaseImpl);
- this->GetImpl()->ClearSizeMapVerteces();
+ this->GetImpl()->ClearEnforcedVerteces();
}
//=============================================================================
*/
void SetToUseBoundaryRecoveryVersion(CORBA::Boolean toUse);
CORBA::Boolean GetToUseBoundaryRecoveryVersion();
+ /*!
+ * Applies finite-element correction by replacing overconstrained elements where
+ * it is possible. The process is cutting first the overconstrained edges and
+ * second the overconstrained facets. This insure that no edges have two boundary
+ * vertices and that no facets have three boundary vertices.
+ */
+ void SetFEMCorrection(CORBA::Boolean toUseFem);
+ CORBA::Boolean GetFEMCorrection();
+ /*!
+ * To removes initial central point.
+ */
+ void SetToRemoveCentralPoint(CORBA::Boolean toRemove);
+ CORBA::Boolean GetToRemoveCentralPoint();
/*!
* To set hiden/undocumented/advanced options
*/
/*!
* To set an enforced vertex
*/
- void SetSizeMapVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z, CORBA::Double size);
- CORBA::Double GetSizeMapVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception);
- void RemoveSizeMapVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception);
- GHS3DPlugin::GHS3DSizeMapVertexList* GetSizeMapVerteces();
- void ClearSizeMapVerteces();
+ 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();
// Get implementation
::GHS3DPlugin_Hypothesis* GetImpl();
#include <SUIT_ResourceMgr.h>
#include <SUIT_FileDlg.h>
#include <SalomeApp_Tools.h>
+#include <SalomeApp_TypeFilter.h>
#include <QComboBox>
#include <QLabel>
#include <stdexcept>
#include <utilities.h>
+// tabs
enum {
STD_TAB = 0,
ADV_TAB,
- SMP_TAB,
- SMP_X_COLUMN = 0,
- SMP_Y_COLUMN,
- SMP_Z_COLUMN,
- SMP_SIZE_COLUMN,
- SMP_NB_COLUMNS
+ ENF_VER_TAB
};
+// Enforced verteces array columns
enum {
- SMP_COORDS = 0,
- SMP_BTNS = 0,
- SMP_X_COORD,
- SMP_Y_COORD,
- SMP_Z_COORD,
- SMP_VERTEX_BTN,
- SMP_SEPARATOR,
- SMP_REMOVE_BTN,
+ ENF_VER_X_COLUMN = 0,
+ ENF_VER_Y_COLUMN,
+ ENF_VER_Z_COLUMN,
+ ENF_VER_SIZE_COLUMN,
+ ENF_VER_NB_COLUMNS
+};
+
+// Enforced verteces inputs
+enum {
+ ENF_VER_BTNS = 0,
+ ENF_VER_X_COORD,
+ ENF_VER_Y_COORD,
+ ENF_VER_Z_COORD,
+ ENF_VER_SIZE,
+ ENF_VER_VERTEX_BTN,
+ ENF_VER_SEPARATOR,
+ ENF_VER_REMOVE_BTN,
};
namespace {
}
}
+class QDoubleValidator;
+
//
// BEGIN DoubleLineEditDelegate
//
aStdLayout->addWidget( myOptimizationLevelCombo, row++, 1, 1, 1 );
QStringList types;
- types << tr( "LEVEL_NONE" ) << tr( "LEVEL_LIGHT" ) << tr( "LEVEL_MEDIUM" ) << tr( "LEVEL_STRONG" );
+ types << tr( "LEVEL_NONE" ) << tr( "LEVEL_LIGHT" ) << tr( "LEVEL_MEDIUM" ) << tr( "LEVEL_STANDARDPLUS" ) << tr( "LEVEL_STRONG" );
myOptimizationLevelCombo->addItems( types );
aStdLayout->setRowStretch( row, 5 );
myToCreateNewNodesCheck = new QCheckBox( tr( "TO_ADD_NODES" ), myAdvGroup );
+ myRemoveInitialCentralPointCheck = new QCheckBox( tr( "NO_INITIAL_CENTRAL_POINT" ), myAdvGroup );
+
myBoundaryRecoveryCheck = new QCheckBox( tr( "RECOVERY_VERSION" ), myAdvGroup );
+
+ myFEMCorrectionCheck = new QCheckBox( tr( "FEM_CORRECTION" ), myAdvGroup );
QLabel* aTextOptionLabel = new QLabel( tr( "TEXT_OPTION" ), myAdvGroup );
myTextOption = new QLineEdit( myAdvGroup );
- anAdvLayout->addWidget( myMaximumMemoryCheck, 0, 0, 1, 1 );
- anAdvLayout->addWidget( myMaximumMemorySpin, 0, 1, 1, 1 );
- anAdvLayout->addWidget( aMegabyteLabel, 0, 2, 1, 1 );
- anAdvLayout->addWidget( myInitialMemoryCheck, 1, 0, 1, 1 );
- anAdvLayout->addWidget( myInitialMemorySpin, 1, 1, 1, 1 );
- anAdvLayout->addWidget( aMegabyteLabel2, 1, 2, 1, 1 );
- anAdvLayout->addWidget( aWorkinDirLabel, 2, 0, 1, 1 );
- anAdvLayout->addWidget( myWorkingDir, 2, 1, 1, 2 );
- anAdvLayout->addWidget( dirBtn, 2, 3, 1, 1 );
- anAdvLayout->addWidget( myKeepFiles, 3, 0, 1, 4 );
- anAdvLayout->addWidget( aVerboseLevelLabel, 4, 0, 1, 1 );
- anAdvLayout->addWidget( myVerboseLevelSpin, 4, 1, 1, 1 );
- anAdvLayout->addWidget( myToCreateNewNodesCheck, 5, 0, 1, 4 );
- anAdvLayout->addWidget( myBoundaryRecoveryCheck, 6, 0, 1, 4 );
- anAdvLayout->addWidget( aTextOptionLabel, 7, 0, 1, 1 );
- anAdvLayout->addWidget( myTextOption, 7, 1, 1, 2 );
+ anAdvLayout->addWidget( myMaximumMemoryCheck, 0, 0, 1, 1 );
+ anAdvLayout->addWidget( myMaximumMemorySpin, 0, 1, 1, 1 );
+ anAdvLayout->addWidget( aMegabyteLabel, 0, 2, 1, 1 );
+ anAdvLayout->addWidget( myInitialMemoryCheck, 1, 0, 1, 1 );
+ anAdvLayout->addWidget( myInitialMemorySpin, 1, 1, 1, 1 );
+ anAdvLayout->addWidget( aMegabyteLabel2, 1, 2, 1, 1 );
+ anAdvLayout->addWidget( aWorkinDirLabel, 2, 0, 1, 1 );
+ anAdvLayout->addWidget( myWorkingDir, 2, 1, 1, 2 );
+ anAdvLayout->addWidget( dirBtn, 2, 3, 1, 1 );
+ anAdvLayout->addWidget( myKeepFiles, 3, 0, 1, 4 );
+ anAdvLayout->addWidget( aVerboseLevelLabel, 4, 0, 1, 1 );
+ anAdvLayout->addWidget( myVerboseLevelSpin, 4, 1, 1, 1 );
+ anAdvLayout->addWidget( myToCreateNewNodesCheck, 5, 0, 1, 4 );
+ anAdvLayout->addWidget( myRemoveInitialCentralPointCheck, 6, 0, 1, 4 );
+ anAdvLayout->addWidget( myBoundaryRecoveryCheck, 7, 0, 1, 4 );
+ anAdvLayout->addWidget( myFEMCorrectionCheck, 8, 0, 1, 4 );
+ anAdvLayout->addWidget( aTextOptionLabel, 9, 0, 1, 1 );
+ anAdvLayout->addWidget( myTextOption, 9, 1, 1, 2 );
// Size Maps parameters
mySmpGroup = new QWidget();
QGridLayout* anSmpLayout = new QGridLayout(mySmpGroup);
- mySmpModel = new QStandardItemModel(0, SMP_NB_COLUMNS);
- mySizeMapTableView = new QTableView(mySmpGroup);
- mySizeMapTableView->setModel(mySmpModel);
- mySizeMapTableView->setSortingEnabled(true);
- mySizeMapTableView->setItemDelegateForColumn(SMP_SIZE_COLUMN,new DoubleLineEditDelegate(this));
- anSmpLayout->addWidget(mySizeMapTableView, 1, 0, 9, 1);
- QStringList sizeMapHeaders;
- sizeMapHeaders << tr( "GHS3D_SMP_X_COLUMN" )<< tr( "GHS3D_SMP_Y_COLUMN" ) << tr( "GHS3D_SMP_Z_COLUMN" ) << tr( "GHS3D_SMP_SIZEMAP_COLUMN" );
- mySmpModel->setHorizontalHeaderLabels(sizeMapHeaders);
- mySizeMapTableView->setAlternatingRowColors(true);
- mySizeMapTableView->verticalHeader()->hide();
- mySizeMapTableView->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
+ mySmpModel = new QStandardItemModel(0, ENF_VER_NB_COLUMNS);
+ myEnforcedTableView = new QTableView(mySmpGroup);
+ myEnforcedTableView->setModel(mySmpModel);
+ myEnforcedTableView->setSortingEnabled(true);
+ myEnforcedTableView->setItemDelegateForColumn(ENF_VER_SIZE_COLUMN,new DoubleLineEditDelegate(this));
+ anSmpLayout->addWidget(myEnforcedTableView, 1, 0, 9, 1);
+ QStringList enforcedHeaders;
+ enforcedHeaders << tr( "GHS3D_ENF_VER_X_COLUMN" )<< tr( "GHS3D_ENF_VER_Y_COLUMN" ) << tr( "GHS3D_ENF_VER_Z_COLUMN" ) << tr( "GHS3D_ENF_VER_SIZE_COLUMN" );
+ mySmpModel->setHorizontalHeaderLabels(enforcedHeaders);
+ myEnforcedTableView->setAlternatingRowColors(true);
+ myEnforcedTableView->verticalHeader()->hide();
+ myEnforcedTableView->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
- QLabel* myXCoordLabel = new QLabel( tr( "GHS3D_SMP_X_LABEL" ), mySmpGroup );
- anSmpLayout->addWidget(myXCoordLabel, SMP_X_COORD, 1, 1, 1);
+ QLabel* myXCoordLabel = new QLabel( tr( "GHS3D_ENF_VER_X_LABEL" ), mySmpGroup );
+ anSmpLayout->addWidget(myXCoordLabel, ENF_VER_X_COORD, 1, 1, 1);
myXCoord = new QLineEdit(mySmpGroup);
myXCoord->setValidator(new QDoubleValidator(mySmpGroup));
- anSmpLayout->addWidget(myXCoord, SMP_X_COORD, 2, 1, 1);
- QLabel* myYCoordLabel = new QLabel( tr( "GHS3D_SMP_Y_LABEL" ), mySmpGroup );
- anSmpLayout->addWidget(myYCoordLabel, SMP_Y_COORD, 1, 1, 1);
+ anSmpLayout->addWidget(myXCoord, ENF_VER_X_COORD, 2, 1, 1);
+ QLabel* myYCoordLabel = new QLabel( tr( "GHS3D_ENF_VER_Y_LABEL" ), mySmpGroup );
+ anSmpLayout->addWidget(myYCoordLabel, ENF_VER_Y_COORD, 1, 1, 1);
myYCoord = new QLineEdit(mySmpGroup);
myYCoord->setValidator(new QDoubleValidator(mySmpGroup));
- anSmpLayout->addWidget(myYCoord, SMP_Y_COORD, 2, 1, 1);
- QLabel* myZCoordLabel = new QLabel( tr( "GHS3D_SMP_Z_LABEL" ), mySmpGroup );
- anSmpLayout->addWidget(myZCoordLabel, SMP_Z_COORD, 1, 1, 1);
+ anSmpLayout->addWidget(myYCoord, ENF_VER_Y_COORD, 2, 1, 1);
+ QLabel* myZCoordLabel = new QLabel( tr( "GHS3D_ENF_VER_Z_LABEL" ), mySmpGroup );
+ anSmpLayout->addWidget(myZCoordLabel, ENF_VER_Z_COORD, 1, 1, 1);
myZCoord = new QLineEdit(mySmpGroup);
myZCoord->setValidator(new QDoubleValidator(mySmpGroup));
- anSmpLayout->addWidget(myZCoord, SMP_Z_COORD, 2, 1, 1);
+ anSmpLayout->addWidget(myZCoord, ENF_VER_Z_COORD, 2, 1, 1);
+ QLabel* mySizeLabel = new QLabel( tr( "GHS3D_ENF_VER_SIZE_LABEL" ), mySmpGroup );
+ anSmpLayout->addWidget(mySizeLabel, ENF_VER_SIZE, 1, 1, 1);
+ mySizeValue = new QLineEdit(mySmpGroup);
+ mySizeValue->setValidator(new QDoubleValidator(mySmpGroup));
+ anSmpLayout->addWidget(mySizeValue, ENF_VER_SIZE, 2, 1, 1);
- addVertexButton = new QPushButton(tr("GHS3D_SMP_VERTEX"),mySmpGroup);
- anSmpLayout->addWidget(addVertexButton, SMP_VERTEX_BTN, 1, 1, 2);
+ addVertexButton = new QPushButton(tr("GHS3D_ENF_VER_VERTEX"),mySmpGroup);
+ anSmpLayout->addWidget(addVertexButton, ENF_VER_VERTEX_BTN, 1, 1, 2);
+ addVertexButton->setEnabled(false);
QFrame *line = new QFrame(mySmpGroup);
line->setFrameShape(QFrame::HLine);
line->setFrameShadow(QFrame::Sunken);
- anSmpLayout->addWidget(line, SMP_SEPARATOR, 1, 1, 2);
+ anSmpLayout->addWidget(line, ENF_VER_SEPARATOR, 1, 1, 2);
- removeVertexButton = new QPushButton(tr("GHS3D_SMP_REMOVE"),mySmpGroup);
- anSmpLayout->addWidget(removeVertexButton, SMP_REMOVE_BTN, 1, 1, 2);
+ removeVertexButton = new QPushButton(tr("GHS3D_ENF_VER_REMOVE"),mySmpGroup);
+ 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( SMP_TAB, mySmpGroup, tr( "GHS3D_SIZE_MAP" ) );
+ tab->insertTab( ENF_VER_TAB, mySmpGroup, tr( "GHS3D_ENFORCED_VERTECES" ) );
tab->setCurrentIndex( STD_TAB );
// connections
connect( myInitialMemoryCheck, SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) );
connect( myBoundaryRecoveryCheck, SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) );
connect( dirBtn, SIGNAL( clicked() ), this, SLOT( onDirBtnClicked() ) );
+ connect( myXCoord, SIGNAL( textChanged(const QString&) ), this, SLOT( checkVertexIsDefined() ) );
+ connect( myYCoord, SIGNAL( textChanged(const QString&) ), this, SLOT( checkVertexIsDefined() ) );
+ connect( myZCoord, SIGNAL( textChanged(const QString&) ), this, SLOT( checkVertexIsDefined() ) );
+ connect( mySizeValue, SIGNAL( textChanged(const QString&) ), this, SLOT( checkVertexIsDefined() ) );
+ connect( this, SIGNAL( vertexDefined(bool) ), addVertexButton, SLOT( setEnabled(bool) ) );
connect( addVertexButton, SIGNAL( clicked() ), this, SLOT( onVertexBtnClicked() ) );
connect( removeVertexButton, SIGNAL( clicked() ), this, SLOT( onRemoveVertexBtnClicked() ) );
+
+
return fr;
}
{
const int rowCount = mySmpModel->rowCount();
for (int i=0 ; i < rowCount ; i++) {
- double myX = mySmpModel->data(mySmpModel->index(i, SMP_X_COLUMN)).toDouble();
+ double myX = mySmpModel->data(mySmpModel->index(i, ENF_VER_X_COLUMN)).toDouble();
if (myX == x) {
- MESSAGE("Found x value " << x << " at row " << i);
- double myY = mySmpModel->data(mySmpModel->index(i, SMP_Y_COLUMN)).toDouble();
+// MESSAGE("Found x value " << x << " at row " << i);
+ double myY = mySmpModel->data(mySmpModel->index(i, ENF_VER_Y_COLUMN)).toDouble();
if (myY == y) {
- MESSAGE("Found y value " << y << " at row " << i);
- double myZ = mySmpModel->data(mySmpModel->index(i, SMP_Z_COLUMN)).toDouble();
+// MESSAGE("Found y value " << y << " at row " << i);
+ double myZ = mySmpModel->data(mySmpModel->index(i, ENF_VER_Z_COLUMN)).toDouble();
if (myZ == z) {
+ MESSAGE("Found x value " << x << " at row " << i);
+ MESSAGE("Found y value " << y << " at row " << i);
MESSAGE("Found z value " << z << " at row " << i);
return true;
}
}
}
}
- MESSAGE("Not found x,y,z values: " << x << " " << y << " " << z);
+// MESSAGE("Not found x,y,z values: " << x << " " << y << " " << z);
return false;
}
+bool GHS3DPluginGUI_HypothesisCreator::checkVertexIsDefined()
+{
+ bool val = (!myXCoord->text().isEmpty())&&(!myYCoord->text().isEmpty())&&(!myZCoord->text().isEmpty())&&(!mySizeValue->text().isEmpty());
+ bool isDefined = val;
+ if (val)
+ isDefined = not smpVertexExists(myXCoord->text().toDouble(),myYCoord->text().toDouble(),myZCoord->text().toDouble());
+
+ emit vertexDefined(isDefined);
+ return isDefined;
+}
+
void GHS3DPluginGUI_HypothesisCreator::onVertexBtnClicked()
{
MESSAGE("GHS3DPluginGUI_HypothesisCreator::onVertexBtnClicked()");
double x = myXCoord->text().toDouble();
double y = myYCoord->text().toDouble();
double z = myZCoord->text().toDouble();
+ double size = mySizeValue->text().toDouble();
if (smpVertexExists(x,y,z)) return;
- double size = 10.0;
- // SMP_X_COLUMN
- mySmpModel->setData(mySmpModel->index(row, SMP_X_COLUMN),x);
- mySmpModel->setItem( row, SMP_X_COLUMN, new QStandardItem(QString::number(x)) );
- mySmpModel->item( row, SMP_X_COLUMN )->setFlags( Qt::ItemIsSelectable );
- // SMP_Y_COLUMN
- mySmpModel->setData(mySmpModel->index(row, SMP_Y_COLUMN),y);
- mySmpModel->setItem( row, SMP_Y_COLUMN, new QStandardItem(QString::number(y)) );
- mySmpModel->item( row, SMP_Y_COLUMN )->setFlags( Qt::ItemIsSelectable );
- // SMP_Z_COLUMN
- mySmpModel->setData(mySmpModel->index(row, SMP_Z_COLUMN),z);
- mySmpModel->setItem( row, SMP_Z_COLUMN, new QStandardItem(QString::number(z)) );
- mySmpModel->item( row, SMP_Z_COLUMN )->setFlags( Qt::ItemIsSelectable );
- // SMP_SIZE_COLUMN
- mySmpModel->setData(mySmpModel->index(row, SMP_SIZE_COLUMN),size);
- mySmpModel->setItem( row, SMP_SIZE_COLUMN, new QStandardItem(QString::number(size,'f')) );
-
- mySizeMapTableView->clearSelection();
- mySizeMapTableView->scrollTo( mySmpModel->item( row, SMP_SIZE_COLUMN )->index() );
+// double size = 10.0;
+ // ENF_VER_X_COLUMN
+ mySmpModel->setData(mySmpModel->index(row, ENF_VER_X_COLUMN),x);
+ mySmpModel->setItem( row, ENF_VER_X_COLUMN, new QStandardItem(QString::number(x)) );
+ mySmpModel->item( row, ENF_VER_X_COLUMN )->setFlags( Qt::ItemIsSelectable );
+ // ENF_VER_Y_COLUMN
+ mySmpModel->setData(mySmpModel->index(row, ENF_VER_Y_COLUMN),y);
+ mySmpModel->setItem( row, ENF_VER_Y_COLUMN, new QStandardItem(QString::number(y)) );
+ mySmpModel->item( row, ENF_VER_Y_COLUMN )->setFlags( Qt::ItemIsSelectable );
+ // ENF_VER_Z_COLUMN
+ mySmpModel->setData(mySmpModel->index(row, ENF_VER_Z_COLUMN),z);
+ mySmpModel->setItem( row, ENF_VER_Z_COLUMN, new QStandardItem(QString::number(z)) );
+ mySmpModel->item( row, ENF_VER_Z_COLUMN )->setFlags( Qt::ItemIsSelectable );
+ // ENF_VER_SIZE_COLUMN
+ mySmpModel->setData(mySmpModel->index(row, ENF_VER_SIZE_COLUMN),size);
+ mySmpModel->setItem( row, ENF_VER_SIZE_COLUMN, new QStandardItem(QString::number(size,'f')) );
+
+ myEnforcedTableView->clearSelection();
+ myEnforcedTableView->scrollTo( mySmpModel->item( row, ENF_VER_SIZE_COLUMN )->index() );
+ checkVertexIsDefined();
}
void GHS3DPluginGUI_HypothesisCreator::onRemoveVertexBtnClicked()
{
QList<int> selectedRows;
- QList<QModelIndex> selectedIndex = mySizeMapTableView->selectionModel()->selectedIndexes();
+ QList<QModelIndex> selectedIndex = myEnforcedTableView->selectionModel()->selectedIndexes();
int row;
QModelIndex index;
foreach( index, selectedIndex ) {
MESSAGE("delete row #"<< row);
mySmpModel->removeRow(row );
}
- mySizeMapTableView->clearSelection();
+ myEnforcedTableView->clearSelection();
}
void GHS3DPluginGUI_HypothesisCreator::onDirBtnClicked()
{
if ( myName )
myName->setText( data.myName );
- myToMeshHolesCheck ->setChecked ( data.myToMeshHoles );
- myOptimizationLevelCombo->setCurrentIndex( data.myOptimizationLevel );
- myMaximumMemoryCheck ->setChecked ( data.myMaximumMemory > 0 );
- myMaximumMemorySpin ->setValue ( qMax( data.myMaximumMemory,
- myMaximumMemorySpin->minimum() ));
- myInitialMemoryCheck ->setChecked ( data.myInitialMemory > 0 );
- myInitialMemorySpin ->setValue ( qMax( data.myInitialMemory,
- myInitialMemorySpin->minimum() ));
- myWorkingDir ->setText ( data.myWorkingDir );
- myKeepFiles ->setChecked ( data.myKeepFiles );
- myVerboseLevelSpin ->setValue ( data.myVerboseLevel );
- myToCreateNewNodesCheck ->setChecked ( data.myToCreateNewNodes );
- myBoundaryRecoveryCheck ->setChecked ( data.myBoundaryRecovery );
- myTextOption ->setText ( data.myTextOption );
-
- TSizeMapVertexValues::const_iterator it;
+ myToMeshHolesCheck ->setChecked ( data.myToMeshHoles );
+ myOptimizationLevelCombo ->setCurrentIndex( data.myOptimizationLevel );
+ myMaximumMemoryCheck ->setChecked ( data.myMaximumMemory > 0 );
+ myMaximumMemorySpin ->setValue ( qMax( data.myMaximumMemory,
+ myMaximumMemorySpin->minimum() ));
+ myInitialMemoryCheck ->setChecked ( data.myInitialMemory > 0 );
+ myInitialMemorySpin ->setValue ( qMax( data.myInitialMemory,
+ myInitialMemorySpin->minimum() ));
+ myWorkingDir ->setText ( data.myWorkingDir );
+ myKeepFiles ->setChecked ( data.myKeepFiles );
+ myVerboseLevelSpin ->setValue ( data.myVerboseLevel );
+ myToCreateNewNodesCheck ->setChecked ( data.myToCreateNewNodes );
+ myRemoveInitialCentralPointCheck ->setChecked ( data.myRemoveInitialCentralPoint );
+ myBoundaryRecoveryCheck ->setChecked ( data.myBoundaryRecovery );
+ myFEMCorrectionCheck ->setChecked ( data.myFEMCorrection );
+ myTextOption ->setText ( data.myTextOption );
+
+ TEnforcedVertexValues::const_iterator it;
int row = 0;
- for(it = data.mySizeMapVerteces.begin() ; it != data.mySizeMapVerteces.end(); it++ )
+ for(it = data.myEnforcedVerteces.begin() ; it != data.myEnforcedVerteces.end(); it++ )
{
double x = it->at(0);
double y = it->at(1);
double z = it->at(2);
double size = it->at(3);
- // SMP_X_COLUMN
- mySmpModel->setData(mySmpModel->index(row, SMP_X_COLUMN),x);
- mySmpModel->setItem( row, SMP_X_COLUMN, new QStandardItem(QString::number(x)) );
- mySmpModel->item( row, SMP_X_COLUMN )->setFlags( Qt::ItemIsSelectable );
- // SMP_Y_COLUMN
- mySmpModel->setData(mySmpModel->index(row, SMP_Y_COLUMN),y);
- mySmpModel->setItem( row, SMP_Y_COLUMN, new QStandardItem(QString::number(y)) );
- mySmpModel->item( row, SMP_Y_COLUMN )->setFlags( Qt::ItemIsSelectable );
- // SMP_Z_COLUMN
- mySmpModel->setData(mySmpModel->index(row, SMP_Z_COLUMN),z);
- mySmpModel->setItem( row, SMP_Z_COLUMN, new QStandardItem(QString::number(z)) );
- mySmpModel->item( row, SMP_Z_COLUMN )->setFlags( Qt::ItemIsSelectable );
- // SMP_SIZE_COLUMN
- mySmpModel->setData(mySmpModel->index(row, SMP_SIZE_COLUMN),size);
- mySmpModel->setItem( row, SMP_SIZE_COLUMN, new QStandardItem(QString::number(size)) );
+ // ENF_VER_X_COLUMN
+ mySmpModel->setData(mySmpModel->index(row, ENF_VER_X_COLUMN),x);
+ mySmpModel->setItem( row, ENF_VER_X_COLUMN, new QStandardItem(QString::number(x)) );
+ mySmpModel->item( row, ENF_VER_X_COLUMN )->setFlags( Qt::ItemIsSelectable );
+ // ENF_VER_Y_COLUMN
+ mySmpModel->setData(mySmpModel->index(row, ENF_VER_Y_COLUMN),y);
+ mySmpModel->setItem( row, ENF_VER_Y_COLUMN, new QStandardItem(QString::number(y)) );
+ mySmpModel->item( row, ENF_VER_Y_COLUMN )->setFlags( Qt::ItemIsSelectable );
+ // ENF_VER_Z_COLUMN
+ mySmpModel->setData(mySmpModel->index(row, ENF_VER_Z_COLUMN),z);
+ mySmpModel->setItem( row, ENF_VER_Z_COLUMN, new QStandardItem(QString::number(z)) );
+ mySmpModel->item( row, ENF_VER_Z_COLUMN )->setFlags( Qt::ItemIsSelectable );
+ // ENF_VER_SIZE_COLUMN
+ mySmpModel->setData(mySmpModel->index(row, ENF_VER_SIZE_COLUMN),size);
+ mySmpModel->setItem( row, ENF_VER_SIZE_COLUMN, new QStandardItem(QString::number(size)) );
MESSAGE("Row " << row << ": (" << x << ","<< y << ","<< z << ") ="<< size);
row++;
if ( !data.myBoundaryRecovery )
valStr = "-c " + QString::number( !data.myToMeshHoles );
- if ( data.myOptimizationLevel >= 0 && data.myOptimizationLevel < 4 && !data.myBoundaryRecovery) {
- char* level[] = { "none" , "light" , "standard" , "strong" };
+ if ( data.myOptimizationLevel >= 0 && data.myOptimizationLevel < 5 && !data.myBoundaryRecovery) {
+ char* level[] = { "none" , "light" , "standard" , "standard+" , "strong" };
valStr += " -o ";
valStr += level[ data.myOptimizationLevel ];
}
if ( !data.myToCreateNewNodes )
valStr += " -p0";
+ if ( data.myRemoveInitialCentralPoint )
+ valStr += " -no_initial_central_point";
+
if ( data.myBoundaryRecovery )
valStr += " -C";
+ if ( data.myFEMCorrection )
+ valStr += " -FEM";
+
valStr += " ";
valStr += data.myTextOption;
// Add size map parameters storage
for (int i=0 ; i<mySmpModel->rowCount() ; i++) {
valStr += " (";
- double x = mySmpModel->data(mySmpModel->index(i,SMP_X_COLUMN)).toDouble();
- double y = mySmpModel->data(mySmpModel->index(i,SMP_Y_COLUMN)).toDouble();
- double z = mySmpModel->data(mySmpModel->index(i,SMP_Z_COLUMN)).toDouble();
- double size = mySmpModel->data(mySmpModel->index(i,SMP_SIZE_COLUMN)).toDouble();
+ double x = mySmpModel->data(mySmpModel->index(i,ENF_VER_X_COLUMN)).toDouble();
+ double y = mySmpModel->data(mySmpModel->index(i,ENF_VER_Y_COLUMN)).toDouble();
+ double z = mySmpModel->data(mySmpModel->index(i,ENF_VER_Z_COLUMN)).toDouble();
+ double size = mySmpModel->data(mySmpModel->index(i,ENF_VER_SIZE_COLUMN)).toDouble();
valStr += QString::number( x );
valStr += ",";
valStr += QString::number( y );
HypothesisData* data = SMESH::GetHypothesisData( hypType() );
h_data.myName = isCreation() && data ? hypName() : "";
- h_data.myToMeshHoles = h->GetToMeshHoles();
- h_data.myMaximumMemory = h->GetMaximumMemory();
- h_data.myInitialMemory = h->GetInitialMemory();
- h_data.myInitialMemory = h->GetInitialMemory();
- h_data.myOptimizationLevel = h->GetOptimizationLevel();
- h_data.myKeepFiles = h->GetKeepFiles();
- h_data.myWorkingDir = h->GetWorkingDirectory();
- h_data.myVerboseLevel = h->GetVerboseLevel();
- h_data.myToCreateNewNodes = h->GetToCreateNewNodes();
- h_data.myBoundaryRecovery = h->GetToUseBoundaryRecoveryVersion();
- h_data.myTextOption = h->GetTextOption();
+ h_data.myToMeshHoles = h->GetToMeshHoles();
+ h_data.myMaximumMemory = h->GetMaximumMemory();
+ h_data.myInitialMemory = h->GetInitialMemory();
+ h_data.myInitialMemory = h->GetInitialMemory();
+ h_data.myOptimizationLevel = h->GetOptimizationLevel();
+ h_data.myKeepFiles = h->GetKeepFiles();
+ h_data.myWorkingDir = h->GetWorkingDirectory();
+ h_data.myVerboseLevel = h->GetVerboseLevel();
+ h_data.myToCreateNewNodes = h->GetToCreateNewNodes();
+ h_data.myRemoveInitialCentralPoint = h->GetToRemoveCentralPoint();
+ h_data.myBoundaryRecovery = h->GetToUseBoundaryRecoveryVersion();
+ h_data.myFEMCorrection = h->GetFEMCorrection();
+ h_data.myTextOption = h->GetTextOption();
- GHS3DPlugin::GHS3DSizeMapVertexList_var verteces = h->GetSizeMapVerteces();
+ GHS3DPlugin::GHS3DEnforcedVertexList_var verteces = h->GetEnforcedVerteces();
MESSAGE("verteces->length(): " << verteces->length());
- h_data.mySizeMapVerteces.clear();
+ h_data.myEnforcedVerteces.clear();
for (int i=0 ; i<verteces->length() ; i++) {
- GHS3DSizeMapVertex myVertex;
+ 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);
MESSAGE("Add enforced vertex ("<< myVertex[0] << ","<< myVertex[1] << ","<< myVertex[2] << ") ="<< myVertex[3]);
- h_data.mySizeMapVerteces.push_back(myVertex);
+ h_data.myEnforcedVerteces.push_back(myVertex);
}
return true;
}
h->SetVerboseLevel ( h_data.myVerboseLevel );
if ( h->GetToCreateNewNodes() != h_data.myToCreateNewNodes )
h->SetToCreateNewNodes( h_data.myToCreateNewNodes );
+ if ( h->GetToRemoveCentralPoint() != h_data.myRemoveInitialCentralPoint )
+ h->SetToRemoveCentralPoint( h_data.myRemoveInitialCentralPoint );
if ( h->GetToUseBoundaryRecoveryVersion() != h_data.myBoundaryRecovery )
h->SetToUseBoundaryRecoveryVersion( h_data.myBoundaryRecovery );
+ if ( h->GetFEMCorrection() != h_data.myFEMCorrection )
+ h->SetFEMCorrection( h_data.myFEMCorrection );
if ( h->GetTextOption() != h_data.myTextOption )
h->SetTextOption ( h_data.myTextOption.toLatin1().constData() );
- int nbVertex = (int) h_data.mySizeMapVerteces.size();
- GHS3DPlugin::GHS3DSizeMapVertexList_var vertexHyp = h->GetSizeMapVerteces();
+ int nbVertex = (int) h_data.myEnforcedVerteces.size();
+ GHS3DPlugin::GHS3DEnforcedVertexList_var vertexHyp = h->GetEnforcedVerteces();
int nbVertexHyp = vertexHyp->length();
MESSAGE("Store params for size maps: " << nbVertex << " enforced verteces");
- MESSAGE("h->GetSizeMapVerteces()->length(): " << nbVertexHyp);
+ MESSAGE("h->GetEnforcedVerteces()->length(): " << nbVertexHyp);
// Some verteces were removed
if (nbVertex < nbVertexHyp) {
- if (nbVertex == 0)
- h->ClearSizeMapVerteces();
- else {
+// if (nbVertex == 0)
+// h->ClearEnforcedVerteces();
+// else {
// iterate over verteces of hypo
for(int i = 0 ; i <nbVertexHyp ; i++) {
double x = vertexHyp[i].x;
double z = vertexHyp[i].z;
// vertex is removed
if (!smpVertexExists(x,y,z))
- h->RemoveSizeMapVertex(x,y,z);
+ h->RemoveEnforcedVertex(x,y,z);
}
- }
+// }
}
- TSizeMapVertexValues::const_iterator it;
- for(it = h_data.mySizeMapVerteces.begin() ; it != h_data.mySizeMapVerteces.end(); it++ ) {
+ TEnforcedVertexValues::const_iterator it;
+ for(it = h_data.myEnforcedVerteces.begin() ; it != h_data.myEnforcedVerteces.end(); it++ ) {
double x = it->at(0);
double y = it->at(1);
double z = it->at(2);
<< size );
double mySize;
try {
- mySize = h->GetSizeMapVertex(x,y,z);
+ mySize = h->GetEnforcedVertex(x,y,z);
MESSAGE("Old size: " << mySize);
if (mySize != size) {
MESSAGE("Setting new size: " << size);
- h->SetSizeMapVertex(x,y,z,size);
+ h->SetEnforcedVertex(x,y,z,size);
}
}
catch (...) {
MESSAGE("Setting new size: " << size);
- h->SetSizeMapVertex(x,y,z,size);
+ h->SetEnforcedVertex(x,y,z,size);
}
}
}
bool GHS3DPluginGUI_HypothesisCreator::readParamsFromWidgets( GHS3DHypothesisData& h_data ) const
{
MESSAGE("GHS3DPluginGUI_HypothesisCreator::readParamsFromWidgets");
- h_data.myName = myName ? myName->text() : "";
- h_data.myToMeshHoles = myToMeshHolesCheck->isChecked();
- h_data.myMaximumMemory = myMaximumMemoryCheck->isChecked() ? myMaximumMemorySpin->value() : -1;
- h_data.myInitialMemory = myInitialMemoryCheck->isChecked() ? myInitialMemorySpin->value() : -1;
- h_data.myOptimizationLevel = myOptimizationLevelCombo->currentIndex();
- h_data.myKeepFiles = myKeepFiles->isChecked();
- h_data.myWorkingDir = myWorkingDir->text().trimmed();
- h_data.myVerboseLevel = myVerboseLevelSpin->value();
- h_data.myToCreateNewNodes = myToCreateNewNodesCheck->isChecked();
- h_data.myBoundaryRecovery = myBoundaryRecoveryCheck->isChecked();
- h_data.myTextOption = myTextOption->text();
- h_data.mySizeMapVerteces.clear();
+ h_data.myName = myName ? myName->text() : "";
+ h_data.myToMeshHoles = myToMeshHolesCheck->isChecked();
+ h_data.myMaximumMemory = myMaximumMemoryCheck->isChecked() ? myMaximumMemorySpin->value() : -1;
+ h_data.myInitialMemory = myInitialMemoryCheck->isChecked() ? myInitialMemorySpin->value() : -1;
+ h_data.myOptimizationLevel = myOptimizationLevelCombo->currentIndex();
+ h_data.myKeepFiles = myKeepFiles->isChecked();
+ h_data.myWorkingDir = myWorkingDir->text().trimmed();
+ h_data.myVerboseLevel = myVerboseLevelSpin->value();
+ h_data.myToCreateNewNodes = myToCreateNewNodesCheck->isChecked();
+ h_data.myRemoveInitialCentralPoint = myRemoveInitialCentralPointCheck->isChecked();
+ h_data.myBoundaryRecovery = myBoundaryRecoveryCheck->isChecked();
+ h_data.myFEMCorrection = myFEMCorrectionCheck->isChecked();
+ h_data.myTextOption = myTextOption->text();
+ h_data.myEnforcedVerteces.clear();
for (int i=0 ; i<mySmpModel->rowCount() ; i++) {
- GHS3DSizeMapVertex myVertex;
- myVertex.push_back(mySmpModel->data(mySmpModel->index(i,SMP_X_COLUMN)).toDouble());
- myVertex.push_back(mySmpModel->data(mySmpModel->index(i,SMP_Y_COLUMN)).toDouble());
- myVertex.push_back(mySmpModel->data(mySmpModel->index(i,SMP_Z_COLUMN)).toDouble());
- myVertex.push_back(mySmpModel->data(mySmpModel->index(i,SMP_SIZE_COLUMN)).toDouble());
+ GHS3DEnforcedVertex myVertex;
+ myVertex.push_back(mySmpModel->data(mySmpModel->index(i,ENF_VER_X_COLUMN)).toDouble());
+ myVertex.push_back(mySmpModel->data(mySmpModel->index(i,ENF_VER_Y_COLUMN)).toDouble());
+ myVertex.push_back(mySmpModel->data(mySmpModel->index(i,ENF_VER_Z_COLUMN)).toDouble());
+ myVertex.push_back(mySmpModel->data(mySmpModel->index(i,ENF_VER_SIZE_COLUMN)).toDouble());
MESSAGE("Add new enforced vertex (" << myVertex[0] << ", "
<< myVertex[1] << ", "
<< myVertex[2] << ") = "
<< myVertex[3]);
- h_data.mySizeMapVerteces.push_back(myVertex);
+ h_data.myEnforcedVerteces.push_back(myVertex);
}
return true;
class QStandardItemModel;
class QTableView;
class QHeaderView;
-class QTableWidget;
class QDoubleSpinBox;
-class QItemDelegate;
-class QStandardItem;
-class QDoubleValidator;
+class LightApp_SelectionMgr;
-typedef std::vector<double> GHS3DSizeMapVertex;
-typedef std::vector<GHS3DSizeMapVertex> TSizeMapVertexValues;
+typedef std::vector<double> GHS3DEnforcedVertex;
+typedef std::vector<GHS3DEnforcedVertex> TEnforcedVertexValues;
typedef struct
{
- bool myToMeshHoles,myKeepFiles,myToCreateNewNodes,myBoundaryRecovery;
+ bool myToMeshHoles,myKeepFiles,myToCreateNewNodes,myBoundaryRecovery,myFEMCorrection,myRemoveInitialCentralPoint;
int myMaximumMemory,myInitialMemory,myOptimizationLevel;
QString myName,myWorkingDir,myTextOption;
short myVerboseLevel;
- TSizeMapVertexValues mySizeMapVerteces;
+ TEnforcedVertexValues myEnforcedVerteces;
} GHS3DHypothesisData;
/*!
virtual QString type() const;
protected slots:
- void onDirBtnClicked();
- void updateWidgets();
- void onVertexBtnClicked();
- void onRemoveVertexBtnClicked();
+ void onDirBtnClicked();
+ void updateWidgets();
+ void onVertexBtnClicked();
+ void onRemoveVertexBtnClicked();
+ bool checkVertexIsDefined();
+
+signals:
+ void vertexDefined(bool);
private:
- bool readParamsFromHypo( GHS3DHypothesisData& ) const;
- bool readParamsFromWidgets( GHS3DHypothesisData& ) const;
- bool storeParamsToHypo( const GHS3DHypothesisData& ) const;
- bool smpVertexExists(double, double, double) const;
+ bool readParamsFromHypo( GHS3DHypothesisData& ) const;
+ bool readParamsFromWidgets( GHS3DHypothesisData& ) const;
+ bool storeParamsToHypo( const GHS3DHypothesisData& ) const;
+ bool smpVertexExists(double, double, double) const;
private:
- QWidget* myStdGroup;
- QLineEdit* myName;
- QCheckBox* myToMeshHolesCheck;
- QComboBox* myOptimizationLevelCombo;
-
- QWidget* myAdvGroup;
- QCheckBox* myMaximumMemoryCheck;
- QSpinBox* myMaximumMemorySpin;
- QCheckBox* myInitialMemoryCheck;
- QSpinBox* myInitialMemorySpin;
- QLineEdit* myWorkingDir;
- QCheckBox* myKeepFiles;
- QSpinBox* myVerboseLevelSpin;
- QCheckBox* myToCreateNewNodesCheck;
- QCheckBox* myBoundaryRecoveryCheck;
- QLineEdit* myTextOption;
+ QWidget* myStdGroup;
+ QLineEdit* myName;
+ QCheckBox* myToMeshHolesCheck;
+ QComboBox* myOptimizationLevelCombo;
+
+ QWidget* myAdvGroup;
+ QCheckBox* myMaximumMemoryCheck;
+ QSpinBox* myMaximumMemorySpin;
+ QCheckBox* myInitialMemoryCheck;
+ QSpinBox* myInitialMemorySpin;
+ QLineEdit* myWorkingDir;
+ QCheckBox* myKeepFiles;
+ QSpinBox* myVerboseLevelSpin;
+ QCheckBox* myToCreateNewNodesCheck;
+ QCheckBox* myRemoveInitialCentralPointCheck;
+ QCheckBox* myBoundaryRecoveryCheck;
+ QCheckBox* myFEMCorrectionCheck;
+QLineEdit* myTextOption;
QWidget* mySmpGroup;
QStandardItemModel* mySmpModel;
- QTableView* mySizeMapTableView;
+ QTableView* myEnforcedTableView;
QLineEdit* myXCoord;
QLineEdit* myYCoord;
QLineEdit* myZCoord;
+ QLineEdit* mySizeValue;
QPushButton* addVertexButton;
QPushButton* removeVertexButton;
+
+ LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
+// SVTK_Selector* mySelector;
};
class DoubleLineEditDelegate : public QItemDelegate
<source>KEEP_WORKING_FILES</source>
<translation>To keep working files</translation>
</message>
+ <message>
+ <source>LEVEL_NONE</source>
+ <translation>None</translation>
+ </message>
<message>
<source>LEVEL_LIGHT</source>
<translation>Light</translation>
<translation>Medium (standard)</translation>
</message>
<message>
- <source>LEVEL_NONE</source>
- <translation>None</translation>
+ <source>LEVEL_STANDARDPLUS</source>
+ <translation>Standard+</translation>
</message>
<message>
<source>LEVEL_STRONG</source>
<source>MEGABYTE</source>
<translation>Megabytes</translation>
</message>
+ <message>
+ <source>NO_INITIAL_CENTRAL_POINT</source>
+ <translation>To remove initial central point</translation>
+ </message>
<message>
<source>RECOVERY_VERSION</source>
<translation>To use boundary recovery version</translation>
</message>
+ <message>
+ <source>FEM_CORRECTION</source>
+ <translation>To use FEM correction</translation>
+ </message>
<message>
<source>SELECT_DIR</source>
<translation>...</translation>
<translation>Working directory</translation>
</message>
<message>
- <source>GHS3D_SIZE_MAP</source>
- <translation>Size Map</translation>
+ <source>GHS3D_ENFORCED_VERTECES</source>
+ <translation>Enforced verteces</translation>
</message>
<message>
- <source>GHS3D_SMP_X_COLUMN</source>
+ <source>GHS3D_ENF_VER_X_COLUMN</source>
<translation>X</translation>
</message>
<message>
- <source>GHS3D_SMP_Y_COLUMN</source>
+ <source>GHS3D_ENF_VER_Y_COLUMN</source>
<translation>Y</translation>
</message>
<message>
- <source>GHS3D_SMP_Z_COLUMN</source>
+ <source>GHS3D_ENF_VER_Z_COLUMN</source>
<translation>Z</translation>
</message>
<message>
- <source>GHS3D_SMP_SIZEMAP_COLUMN</source>
+ <source>GHS3D_ENF_VER_SIZE_COLUMN</source>
<translation>Size</translation>
</message>
<message>
- <source>GHS3D_SMP_X_LABEL</source>
+ <source>GHS3D_ENF_VER_X_LABEL</source>
<translation>X:</translation>
</message>
<message>
- <source>GHS3D_SMP_Y_LABEL</source>
+ <source>GHS3D_ENF_VER_Y_LABEL</source>
<translation>Y:</translation>
</message>
<message>
- <source>GHS3D_SMP_Z_LABEL</source>
+ <source>GHS3D_ENF_VER_Z_LABEL</source>
<translation>Z:</translation>
</message>
<message>
- <source>GHS3D_SMP_VERTEX</source>
+ <source>GHS3D_ENF_VER_SIZE_LABEL</source>
+ <translation>Size:</translation>
+ </message>
+ <message>
+ <source>GHS3D_ENF_VER_VERTEX</source>
<translation>Add enforced vertex</translation>
</message>
<message>
- <source>GHS3D_SMP_REMOVE</source>
+ <source>GHS3D_ENF_VER_REMOVE</source>
<translation>Remove vertex</translation>
</message>
</context>