if ( myIs2D )
{
NETGENPlugin::NETGENPlugin_Hypothesis_2D_var h_2d =
- NETGENPlugin::NETGENPlugin_Hypothesis_2D::_narrow( initParamsHypothesis() );
+ NETGENPlugin::NETGENPlugin_Hypothesis_2D::_narrow( initParamsHypothesis() );
if ( !h_2d->_is_nil() )
- h_data.myAllowQuadrangles = h_2d->GetQuadAllowed();
+ h_data.myAllowQuadrangles = h_2d->GetQuadAllowed();
}
return true;
if( fineness==UserDefined )
{
- h->SetGrowthRate( h_data.myGrowthRate );
- h->SetNbSegPerEdge( h_data.myNbSegPerEdge );
- h->SetNbSegPerRadius( h_data.myNbSegPerRadius );
+ h->SetGrowthRate( h_data.myGrowthRate );
+ h->SetNbSegPerEdge( h_data.myNbSegPerEdge );
+ h->SetNbSegPerRadius( h_data.myNbSegPerRadius );
aVariablesList.append(h_data.myGrowthRateVar);
aVariablesList.append(h_data.myNbSegPerEdgeVar);
if ( myIs2D )
{
- NETGENPlugin::NETGENPlugin_Hypothesis_2D_var h_2d =
- NETGENPlugin::NETGENPlugin_Hypothesis_2D::_narrow( h );
-
- if ( !h_2d->_is_nil() )
- h_2d->SetQuadAllowed( h_data.myAllowQuadrangles );
+ NETGENPlugin::NETGENPlugin_Hypothesis_2D_var h_2d =
+ NETGENPlugin::NETGENPlugin_Hypothesis_2D::_narrow( h );
+
+ if ( !h_2d->_is_nil() )
+ h_2d->SetQuadAllowed( h_data.myAllowQuadrangles );
}
h->SetParameters(aVariablesList.join(":").toLatin1().constData());
double aGrowthRate, aNbSegPerEdge, aNbSegPerRadius;
switch ( myFineness->currentIndex() )
- {
- case VeryCoarse:
- aGrowthRate = 0.7;
- aNbSegPerEdge = 0.3;
- aNbSegPerRadius = 1;
- break;
- case Coarse:
- aGrowthRate = 0.5;
- aNbSegPerEdge = 0.5;
- aNbSegPerRadius = 1.5;
- break;
- case Fine:
- aGrowthRate = 0.2;
- aNbSegPerEdge = 2;
- aNbSegPerRadius = 3;
- break;
- case VeryFine:
- aGrowthRate = 0.1;
- aNbSegPerEdge = 3;
- aNbSegPerRadius = 5;
- break;
- case Moderate:
- default:
- aGrowthRate = 0.3;
- aNbSegPerEdge = 1;
- aNbSegPerRadius = 2;
- break;
- }
+ {
+ case VeryCoarse:
+ aGrowthRate = 0.7;
+ aNbSegPerEdge = 0.3;
+ aNbSegPerRadius = 1;
+ break;
+ case Coarse:
+ aGrowthRate = 0.5;
+ aNbSegPerEdge = 0.5;
+ aNbSegPerRadius = 1.5;
+ break;
+ case Fine:
+ aGrowthRate = 0.2;
+ aNbSegPerEdge = 2;
+ aNbSegPerRadius = 3;
+ break;
+ case VeryFine:
+ aGrowthRate = 0.1;
+ aNbSegPerEdge = 3;
+ aNbSegPerRadius = 5;
+ break;
+ case Moderate:
+ default:
+ aGrowthRate = 0.3;
+ aNbSegPerEdge = 1;
+ aNbSegPerRadius = 2;
+ break;
+ }
myGrowthRate->setValue( aGrowthRate );
myNbSegPerEdge->setValue( aNbSegPerEdge );
SMESH_Hypothesis::Hypothesis_Status& aStatus);
virtual bool Compute(SMESH_Mesh& aMesh,
- const TopoDS_Shape& aShape);
+ const TopoDS_Shape& aShape);
virtual bool Evaluate(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape,
MapShapeNbElems& aResMap);
//=============================================================================
bool NETGENPlugin_NETGEN_2D3D::Evaluate(SMESH_Mesh& aMesh,
- const TopoDS_Shape& aShape,
- MapShapeNbElems& aResMap)
+ const TopoDS_Shape& aShape,
+ MapShapeNbElems& aResMap)
{
NETGENPlugin_Mesher mesher(&aMesh, aShape, true);
mesher.SetParameters(dynamic_cast<const NETGENPlugin_Hypothesis*>(_hypothesis));
SMESH_Hypothesis::Hypothesis_Status& aStatus);
virtual bool Compute(SMESH_Mesh& aMesh,
- const TopoDS_Shape& aShape);
+ const TopoDS_Shape& aShape);
virtual bool Evaluate(SMESH_Mesh& aMesh,
- const TopoDS_Shape& aShape,
- MapShapeNbElems& aResMap);
+ const TopoDS_Shape& aShape,
+ MapShapeNbElems& aResMap);
protected:
const SMESHDS_Hypothesis* _hypothesis;
//=============================================================================
NETGENPlugin_NETGEN_2D_ONLY_i::NETGENPlugin_NETGEN_2D_ONLY_i( PortableServer::POA_ptr thePOA,
- int theStudyId,
- ::SMESH_Gen* theGenImpl )
+ int theStudyId,
+ ::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ),
SMESH_Algo_i( thePOA ),
//=============================================================================
NETGENPlugin_NETGEN_3D::NETGENPlugin_NETGEN_3D(int hypId, int studyId,
- SMESH_Gen* gen)
+ SMESH_Gen* gen)
: SMESH_3D_Algo(hypId, studyId, gen)
{
MESSAGE("NETGENPlugin_NETGEN_3D::NETGENPlugin_NETGEN_3D");
{
Ng_GetPoint( Netgen_mesh, nodeIndex, Netgen_point );
SMDS_MeshNode * node = aHelper->AddNode(Netgen_point[0],
- Netgen_point[1],
- Netgen_point[2]);
+ Netgen_point[1],
+ Netgen_point[2]);
nodeVec.at(nodeIndex) = node;
}
{
Ng_GetVolumeElement(Netgen_mesh, elemIndex, Netgen_tetrahedron);
aHelper->AddVolume (nodeVec.at( Netgen_tetrahedron[0] ),
- nodeVec.at( Netgen_tetrahedron[1] ),
- nodeVec.at( Netgen_tetrahedron[2] ),
- nodeVec.at( Netgen_tetrahedron[3] ));
+ nodeVec.at( Netgen_tetrahedron[1] ),
+ nodeVec.at( Netgen_tetrahedron[2] ),
+ nodeVec.at( Netgen_tetrahedron[3] ));
}
}
//=============================================================================
bool NETGENPlugin_NETGEN_3D::Evaluate(SMESH_Mesh& aMesh,
- const TopoDS_Shape& aShape,
- MapShapeNbElems& aResMap)
+ const TopoDS_Shape& aShape,
+ MapShapeNbElems& aResMap)
{
int nbtri = 0, nbqua = 0;
double fullArea = 0.0;
if( anIt==aResMap.end() ) {
SMESH_ComputeErrorPtr& smError = aSubMesh->GetComputeError();
smError.reset( new SMESH_ComputeError(COMPERR_ALGO_FAILED,
- "Submesh can not be evaluated",this));
+ "Submesh can not be evaluated",this));
return false;
}
std::vector<int> aVec = (*anIt).second;
SMESH_Hypothesis::Hypothesis_Status& aStatus);
virtual bool Compute(SMESH_Mesh& aMesh,
- const TopoDS_Shape& aShape);
+ const TopoDS_Shape& aShape);
virtual bool Compute(SMESH_Mesh& aMesh,
SMESH_MesherHelper* aHelper);
virtual bool Evaluate(SMESH_Mesh& aMesh,
- const TopoDS_Shape& aShape,
- MapShapeNbElems& aResMap);
+ const TopoDS_Shape& aShape,
+ MapShapeNbElems& aResMap);
protected:
double _maxElementVolume;
//=============================================================================
NETGENPlugin_NETGEN_3D_i::NETGENPlugin_NETGEN_3D_i( PortableServer::POA_ptr thePOA,
- int theStudyId,
- ::SMESH_Gen* theGenImpl )
+ int theStudyId,
+ ::SMESH_Gen* theGenImpl )
: SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA ),
SMESH_Algo_i( thePOA ),
{
MESSAGE( "NETGENPlugin_NETGEN_3D_i::NETGENPlugin_NETGEN_3D_i" );
myBaseImpl = new ::NETGENPlugin_NETGEN_3D( theGenImpl->GetANewId(),
- theStudyId,
- theGenImpl );
+ theStudyId,
+ theGenImpl );
}
//=============================================================================