Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
25c824bbfc | ||
![]() |
0a178ce702 | ||
![]() |
3dcb2645a2 | ||
![]() |
1e3bfa2970 | ||
![]() |
7c2ac5565e | ||
![]() |
1ed2c1a5b5 | ||
![]() |
eb8f61fcf1 | ||
![]() |
e15e15b563 | ||
![]() |
f1f61535d6 |
@ -32,10 +32,10 @@ fi
|
|||||||
for option
|
for option
|
||||||
do
|
do
|
||||||
case $option in
|
case $option in
|
||||||
-with-ihm | --with-ihm)
|
-with-gui | --with-gui)
|
||||||
NETGENPLUGIN_WITH_GUI="yes"
|
NETGENPLUGIN_WITH_GUI="yes"
|
||||||
break;;
|
break;;
|
||||||
-without-ihm | --without-ihm | -with-ihm=no | --with-ihm=no)
|
-without-gui | --without-gui | -with-gui=no | --with-gui=no)
|
||||||
NETGENPLUGIN_WITH_GUI="no"
|
NETGENPLUGIN_WITH_GUI="no"
|
||||||
break;;
|
break;;
|
||||||
esac
|
esac
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
# Created from configure.in.base
|
# Created from configure.in.base
|
||||||
#
|
#
|
||||||
|
|
||||||
AC_INIT([Salome2 Project NETGENPLUGIN module], [4.1.1], [webmaster.salome@opencascade.com], [salome])
|
AC_INIT([Salome2 Project NETGENPLUGIN module], [4.1.3], [webmaster.salome@opencascade.com], [salome])
|
||||||
AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
|
AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
AC_CANONICAL_TARGET
|
AC_CANONICAL_TARGET
|
||||||
|
BIN
resources/mesh_tree_algo_netgen.png
Normal file
BIN
resources/mesh_tree_algo_netgen.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 148 B |
@ -123,15 +123,17 @@ QFrame* NETGENPluginGUI_HypothesisCreator::buildFrame()
|
|||||||
myGrowthRate->setMaxValue( 10 );
|
myGrowthRate->setMaxValue( 10 );
|
||||||
myGrowthRate->setLineStep( 0.1 );
|
myGrowthRate->setLineStep( 0.1 );
|
||||||
|
|
||||||
|
const double VALUE_MAX = 1.0e+6;
|
||||||
|
|
||||||
new QLabel( tr( "NETGEN_SEG_PER_EDGE" ), GroupC1 );
|
new QLabel( tr( "NETGEN_SEG_PER_EDGE" ), GroupC1 );
|
||||||
myNbSegPerEdge = new QtxDblSpinBox( GroupC1 );
|
myNbSegPerEdge = new QtxDblSpinBox( GroupC1 );
|
||||||
myNbSegPerEdge->setMinValue( 0.2 );
|
myNbSegPerEdge->setMinValue( 0.2 );
|
||||||
myNbSegPerEdge->setMaxValue( 5.0 );
|
myNbSegPerEdge->setMaxValue( VALUE_MAX ); // (PAL14890) max value in native netgen gui is 5
|
||||||
|
|
||||||
new QLabel( tr( "NETGEN_SEG_PER_RADIUS" ), GroupC1 );
|
new QLabel( tr( "NETGEN_SEG_PER_RADIUS" ), GroupC1 );
|
||||||
myNbSegPerRadius = new QtxDblSpinBox( GroupC1 );
|
myNbSegPerRadius = new QtxDblSpinBox( GroupC1 );
|
||||||
myNbSegPerRadius->setMinValue( 0.2 );
|
myNbSegPerRadius->setMinValue( 0.2 );
|
||||||
myNbSegPerRadius->setMaxValue( 5.0 );
|
myNbSegPerRadius->setMaxValue( VALUE_MAX ); // (PAL14890) max value in native netgen gui is 5
|
||||||
|
|
||||||
if ( hypType()=="NETGEN_Parameters_2D" )
|
if ( hypType()=="NETGEN_Parameters_2D" )
|
||||||
{
|
{
|
||||||
@ -343,3 +345,8 @@ QString NETGENPluginGUI_HypothesisCreator::type() const
|
|||||||
{
|
{
|
||||||
return tr( QString( "NETGEN_%1_HYPOTHESIS" ).arg(myIs2D?QString("2D"):QString("3D")) );
|
return tr( QString( "NETGEN_%1_HYPOTHESIS" ).arg(myIs2D?QString("2D"):QString("3D")) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString NETGENPluginGUI_HypothesisCreator::helpPage() const
|
||||||
|
{
|
||||||
|
return "netgen_2d_3d_hypo_page.html";
|
||||||
|
}
|
||||||
|
@ -65,6 +65,7 @@ public:
|
|||||||
virtual ~NETGENPluginGUI_HypothesisCreator();
|
virtual ~NETGENPluginGUI_HypothesisCreator();
|
||||||
|
|
||||||
virtual bool checkParams() const;
|
virtual bool checkParams() const;
|
||||||
|
virtual QString helpPage() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QFrame* buildFrame ();
|
virtual QFrame* buildFrame ();
|
||||||
|
@ -114,11 +114,15 @@ bool NETGENPlugin_NETGEN_2D_ONLY::CheckHypothesis (SMESH_Mesh& aMesh,
|
|||||||
_hypLengthFromEdges = 0;
|
_hypLengthFromEdges = 0;
|
||||||
_hypQuadranglePreference = 0;
|
_hypQuadranglePreference = 0;
|
||||||
|
|
||||||
aStatus = HYP_MISSING;
|
|
||||||
|
|
||||||
const list<const SMESHDS_Hypothesis*>& hyps = GetUsedHypothesis(aMesh, aShape, false);
|
const list<const SMESHDS_Hypothesis*>& hyps = GetUsedHypothesis(aMesh, aShape, false);
|
||||||
|
|
||||||
if (hyps.empty()) return false; // can't work with no hypothesis
|
if (hyps.empty())
|
||||||
|
{
|
||||||
|
aStatus = HYP_OK; //SMESH_Hypothesis::HYP_MISSING;
|
||||||
|
return true; // (PAL13464) can work with no hypothesis, LengthFromEdges is default one
|
||||||
|
}
|
||||||
|
|
||||||
|
aStatus = HYP_MISSING;
|
||||||
|
|
||||||
list<const SMESHDS_Hypothesis*>::const_iterator ith;
|
list<const SMESHDS_Hypothesis*>::const_iterator ith;
|
||||||
for (ith = hyps.begin(); ith != hyps.end(); ++ith )
|
for (ith = hyps.begin(); ith != hyps.end(); ++ith )
|
||||||
@ -328,7 +332,7 @@ bool NETGENPlugin_NETGEN_2D_ONLY::Compute(SMESH_Mesh& aMesh,
|
|||||||
// --------------------
|
// --------------------
|
||||||
|
|
||||||
double edgeLength = 0;
|
double edgeLength = 0;
|
||||||
if (_hypLengthFromEdges)
|
if (_hypLengthFromEdges || !_hypLengthFromEdges && !_hypMaxElementArea)
|
||||||
{
|
{
|
||||||
int nbSegments = 0;
|
int nbSegments = 0;
|
||||||
for ( int iW = 0; iW < nbWires; ++iW )
|
for ( int iW = 0; iW < nbWires; ++iW )
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "SMESH_Gen.hxx"
|
#include "SMESH_Gen.hxx"
|
||||||
#include "SMESH_Mesh.hxx"
|
#include "SMESH_Mesh.hxx"
|
||||||
#include "SMESH_MesherHelper.hxx"
|
#include "SMESH_MesherHelper.hxx"
|
||||||
|
#include "StdMeshers_QuadToTriaAdaptor.hxx"
|
||||||
|
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <TopExp.hxx>
|
#include <TopExp.hxx>
|
||||||
@ -179,6 +180,9 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
|||||||
map< int, int* >::iterator shId_ngId;
|
map< int, int* >::iterator shId_ngId;
|
||||||
list< int > degenNgIds;
|
list< int > degenNgIds;
|
||||||
|
|
||||||
|
StdMeshers_QuadToTriaAdaptor Adaptor;
|
||||||
|
Adaptor.Compute(aMesh,aShape);
|
||||||
|
|
||||||
for (TopExp_Explorer exp(aShape,TopAbs_FACE);exp.More();exp.Next())
|
for (TopExp_Explorer exp(aShape,TopAbs_FACE);exp.More();exp.Next())
|
||||||
{
|
{
|
||||||
const TopoDS_Shape& aShapeFace = exp.Current();
|
const TopoDS_Shape& aShapeFace = exp.Current();
|
||||||
@ -195,9 +199,31 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
|||||||
if ( !elem )
|
if ( !elem )
|
||||||
return error( COMPERR_BAD_INPUT_MESH, "Null element encounters");
|
return error( COMPERR_BAD_INPUT_MESH, "Null element encounters");
|
||||||
bool isTraingle = ( elem->NbNodes()==3 || (_quadraticMesh && elem->NbNodes()==6 ));
|
bool isTraingle = ( elem->NbNodes()==3 || (_quadraticMesh && elem->NbNodes()==6 ));
|
||||||
if ( !isTraingle )
|
if ( !isTraingle ) {
|
||||||
|
//return error( COMPERR_BAD_INPUT_MESH,
|
||||||
|
// SMESH_Comment("Not triangle element ")<<elem->GetID());
|
||||||
|
// using adaptor
|
||||||
|
std::list<const SMDS_FaceOfNodes*> faces = Adaptor.GetTriangles(elem);
|
||||||
|
if(faces.size()==0) {
|
||||||
return error( COMPERR_BAD_INPUT_MESH,
|
return error( COMPERR_BAD_INPUT_MESH,
|
||||||
SMESH_Comment("Not triangle element ")<<elem->GetID());
|
SMESH_Comment("Not triangles in adaptor for element ")<<elem->GetID());
|
||||||
|
}
|
||||||
|
std::list<const SMDS_FaceOfNodes*>::iterator itf = faces.begin();
|
||||||
|
for(; itf!=faces.end(); itf++ ) {
|
||||||
|
triangles.push_back( (*itf) );
|
||||||
|
isReversed.push_back( isRev );
|
||||||
|
// put triange's nodes to nodeToNetgenID map
|
||||||
|
SMDS_ElemIteratorPtr triangleNodesIt = (*itf)->nodesIterator();
|
||||||
|
while ( triangleNodesIt->more() ) {
|
||||||
|
const SMDS_MeshNode * node =
|
||||||
|
static_cast<const SMDS_MeshNode *>(triangleNodesIt->next());
|
||||||
|
if(myTool->IsMedium(node))
|
||||||
|
continue;
|
||||||
|
nodeToNetgenID.insert( make_pair( node, invalid_ID ));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
// keep a triangle
|
// keep a triangle
|
||||||
triangles.push_back( elem );
|
triangles.push_back( elem );
|
||||||
isReversed.push_back( isRev );
|
isReversed.push_back( isRev );
|
||||||
@ -210,6 +236,7 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
|||||||
continue;
|
continue;
|
||||||
nodeToNetgenID.insert( make_pair( node, invalid_ID ));
|
nodeToNetgenID.insert( make_pair( node, invalid_ID ));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#ifdef _DEBUG_
|
#ifdef _DEBUG_
|
||||||
// check if a trainge is degenerated
|
// check if a trainge is degenerated
|
||||||
areaControl.GetPoints( elem, nodesCoords );
|
areaControl.GetPoints( elem, nodesCoords );
|
||||||
@ -413,19 +440,40 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
|||||||
else if (MeshType == SMESH_MesherHelper::QUADRATIC)
|
else if (MeshType == SMESH_MesherHelper::QUADRATIC)
|
||||||
_quadraticMesh = true;
|
_quadraticMesh = true;
|
||||||
|
|
||||||
SMDS_FaceIteratorPtr iteratorFace = MeshDS->facesIterator();
|
StdMeshers_QuadToTriaAdaptor Adaptor;
|
||||||
|
Adaptor.Compute(aMesh);
|
||||||
|
|
||||||
while(iteratorFace->more())
|
SMDS_FaceIteratorPtr iteratorFace = MeshDS->facesIterator();
|
||||||
{
|
while(iteratorFace->more()) {
|
||||||
// check element
|
// check element
|
||||||
const SMDS_MeshElement* elem = iteratorFace->next();
|
const SMDS_MeshElement* elem = iteratorFace->next();
|
||||||
if ( !elem )
|
if ( !elem )
|
||||||
return error( COMPERR_BAD_INPUT_MESH, "Null element encounters");
|
return error( COMPERR_BAD_INPUT_MESH, "Null element encounters");
|
||||||
bool isTraingle = ( elem->NbNodes()==3 || (_quadraticMesh && elem->NbNodes()==6 ));
|
bool isTraingle = ( elem->NbNodes()==3 || (_quadraticMesh && elem->NbNodes()==6 ));
|
||||||
if ( !isTraingle )
|
if ( !isTraingle ) {
|
||||||
|
//return error( COMPERR_BAD_INPUT_MESH,
|
||||||
|
// SMESH_Comment("Not triangle element ")<<elem->GetID());
|
||||||
|
// using adaptor
|
||||||
|
std::list<const SMDS_FaceOfNodes*> faces = Adaptor.GetTriangles(elem);
|
||||||
|
if(faces.size()==0) {
|
||||||
return error( COMPERR_BAD_INPUT_MESH,
|
return error( COMPERR_BAD_INPUT_MESH,
|
||||||
SMESH_Comment("Not triangle element ")<<elem->GetID());
|
SMESH_Comment("Not triangles in adaptor for element ")<<elem->GetID());
|
||||||
|
}
|
||||||
|
std::list<const SMDS_FaceOfNodes*>::iterator itf = faces.begin();
|
||||||
|
for(; itf!=faces.end(); itf++ ) {
|
||||||
|
triangles.push_back( (*itf) );
|
||||||
|
// put triange's nodes to nodeToNetgenID map
|
||||||
|
SMDS_ElemIteratorPtr triangleNodesIt = (*itf)->nodesIterator();
|
||||||
|
while ( triangleNodesIt->more() ) {
|
||||||
|
const SMDS_MeshNode * node =
|
||||||
|
static_cast<const SMDS_MeshNode *>(triangleNodesIt->next());
|
||||||
|
if(aHelper->IsMedium(node))
|
||||||
|
continue;
|
||||||
|
nodeToNetgenID.insert( make_pair( node, invalid_ID ));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
// keep a triangle
|
// keep a triangle
|
||||||
triangles.push_back( elem );
|
triangles.push_back( elem );
|
||||||
// put elem nodes to nodeToNetgenID map
|
// put elem nodes to nodeToNetgenID map
|
||||||
@ -435,10 +483,10 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
|||||||
static_cast<const SMDS_MeshNode *>(triangleNodesIt->next());
|
static_cast<const SMDS_MeshNode *>(triangleNodesIt->next());
|
||||||
if(aHelper->IsMedium(node))
|
if(aHelper->IsMedium(node))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
nodeToNetgenID.insert( make_pair( node, invalid_ID ));
|
nodeToNetgenID.insert( make_pair( node, invalid_ID ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------------------------
|
// ---------------------------------
|
||||||
// Feed the Netgen with surface mesh
|
// Feed the Netgen with surface mesh
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
# This is a Qt message file in .po format. Each msgid starts with
|
|
||||||
# a scope. This scope should *NOT* be translated - eg. "Foo::Bar"
|
|
||||||
# would be translated to "Pub", not "Foo::Pub".
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: PROJECT VERSION\n"
|
|
||||||
"POT-Creation-Date: 2002-05-28 10:57:43 AM CEST\n"
|
|
||||||
"PO-Revision-Date: YYYY-MM-DD\n"
|
|
||||||
"Last-Translator: FULLNAME <EMAIL@ADDRESS>\n"
|
|
||||||
"Content-Type: text/plain; charset=iso-8859-1\n"
|
|
||||||
|
|
||||||
|
|
||||||
#-----------------------------------------------------------
|
|
||||||
# ObjectBrowser
|
|
||||||
#-----------------------------------------------------------
|
|
||||||
|
|
||||||
#mesh_tree_algo_netgen
|
|
||||||
msgid "ICON_SMESH_TREE_ALGO_NETGEN_3D"
|
|
||||||
msgstr "mesh_tree_algo_tetra.png"
|
|
||||||
#msgstr "mesh_tree_algo_netgen.png"
|
|
Loading…
x
Reference in New Issue
Block a user