Further implementing parameter setting

This commit is contained in:
jriegel
2013-05-05 19:34:05 +02:00
parent e8476604d0
commit 568a6da8ab
5 changed files with 71 additions and 8 deletions

View File

@@ -31,6 +31,7 @@
#include <App/DocumentObjectPy.h>
#include <Base/Placement.h>
#include <Mod/Part/App/PartFeature.h>
#include <Base/Console.h>
#include <SMESH_Gen.hxx>
#include <SMESH_Mesh.hxx>
@@ -100,17 +101,22 @@ App::DocumentObjectExecReturn *FemMeshShapeNetgenObject::execute(void)
NETGENPlugin_Hypothesis* tet= new NETGENPlugin_Hypothesis(hyp++,1,myGen);
tet->SetMaxSize(MaxSize.getValue());
tet->SetSecondOrder(SecondOrder.getValue());
tet->SetOptimize(Optimize.getValue());
tet->SetFineness((NETGENPlugin_Hypothesis::Fineness)Fininess.getValue());
tet->SetGrowthRate(GrothRate.getValue());
tet->SetNbSegPerEdge(NbSegsPerEdge.getValue());
tet->SetNbSegPerRadius(NbSegsPerRadius.getValue());
tet->SetOptimize(Optimize.getValue());
int iFininess = Fininess.getValue();
tet->SetFineness((NETGENPlugin_Hypothesis::Fineness)iFininess);
if(iFininess == 5){
tet->SetGrowthRate(GrothRate.getValue());
tet->SetNbSegPerEdge(NbSegsPerEdge.getValue());
tet->SetNbSegPerRadius(NbSegsPerRadius.getValue());
}
myNetGenMesher.SetParameters( tet);
myNetGenMesher.Compute();
SMESHDS_Mesh* data = const_cast<SMESH_Mesh*>(newMesh.getSMesh())->GetMeshDS();
const SMDS_MeshInfo& info = data->GetMeshInfo();
int numFaces = data->NbFaces();
int numNode = info.NbNodes();
int numTria = info.NbTriangles();
int numQuad = info.NbQuadrangles();
@@ -122,6 +128,8 @@ App::DocumentObjectExecReturn *FemMeshShapeNetgenObject::execute(void)
int numPris = info.NbPrisms();
int numHedr = info.NbPolyhedrons();
Base::Console().Log("NetgenMesh: %i Nodes, %i Volumes, %i Faces\n",numNode,numVolu,numFaces);
// set the value to the object
FemMesh.setValue(newMesh);