mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-31 05:40:33 +05:00
0021893: EDF 2133 SMESH : Improvement of 3D extrusion algorithm
+ bool NeedLowerHyps(int dim) const { return _neededLowerHyps[ dim ]; } + void addBadInputElements(const SMESHDS_SubMesh* sm, + const bool addNodes=false); + bool _neededLowerHyps[4]; // hyp dims needed by algo that !NeedDiscreteBoundary(). Df. FALSE
This commit is contained in:
parent
fef790995d
commit
3a62786158
@ -87,6 +87,8 @@ SMESH_Algo::SMESH_Algo (int hypId, int studyId, SMESH_Gen * gen)
|
|||||||
_onlyUnaryInput = _requireDiscreteBoundary = _requireShape = true;
|
_onlyUnaryInput = _requireDiscreteBoundary = _requireShape = true;
|
||||||
_quadraticMesh = _supportSubmeshes = false;
|
_quadraticMesh = _supportSubmeshes = false;
|
||||||
_error = COMPERR_OK;
|
_error = COMPERR_OK;
|
||||||
|
for ( int i = 0; i < 4; ++i )
|
||||||
|
_neededLowerHyps[ i ] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -823,19 +825,42 @@ void SMESH_Algo::addBadInputElement(const SMDS_MeshElement* elem)
|
|||||||
_badInputElements.push_back( elem );
|
_badInputElements.push_back( elem );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : addBadInputElements
|
||||||
|
//purpose : store a bad input elements or nodes preventing computation
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
void SMESH_Algo::addBadInputElements(const SMESHDS_SubMesh* sm,
|
||||||
|
const bool addNodes)
|
||||||
|
{
|
||||||
|
if ( sm )
|
||||||
|
{
|
||||||
|
if ( addNodes )
|
||||||
|
{
|
||||||
|
SMDS_NodeIteratorPtr nIt = sm->GetNodes();
|
||||||
|
while ( nIt->more() ) addBadInputElement( nIt->next() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SMDS_ElemIteratorPtr eIt = sm->GetElements();
|
||||||
|
while ( eIt->more() ) addBadInputElement( eIt->next() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
int SMESH_Algo::NumberOfWires(const TopoDS_Shape& S)
|
// int SMESH_Algo::NumberOfWires(const TopoDS_Shape& S)
|
||||||
{
|
// {
|
||||||
int i = 0;
|
// int i = 0;
|
||||||
for (TopExp_Explorer exp(S,TopAbs_WIRE); exp.More(); exp.Next())
|
// for (TopExp_Explorer exp(S,TopAbs_WIRE); exp.More(); exp.Next())
|
||||||
i++;
|
// i++;
|
||||||
return i;
|
// return i;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
|
@ -43,17 +43,18 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
class SMDS_MeshNode;
|
||||||
|
class SMESHDS_Mesh;
|
||||||
|
class SMESHDS_SubMesh;
|
||||||
class SMESH_Gen;
|
class SMESH_Gen;
|
||||||
class SMESH_Mesh;
|
|
||||||
class SMESH_HypoFilter;
|
class SMESH_HypoFilter;
|
||||||
class TopoDS_Vertex;
|
class SMESH_Mesh;
|
||||||
class TopoDS_Wire;
|
class SMESH_MesherHelper;
|
||||||
|
class SMESH_subMesh;
|
||||||
class TopoDS_Face;
|
class TopoDS_Face;
|
||||||
class TopoDS_Shape;
|
class TopoDS_Shape;
|
||||||
class SMESHDS_Mesh;
|
class TopoDS_Vertex;
|
||||||
class SMDS_MeshNode;
|
class TopoDS_Wire;
|
||||||
class SMESH_subMesh;
|
|
||||||
class SMESH_MesherHelper;
|
|
||||||
class gp_XYZ;
|
class gp_XYZ;
|
||||||
|
|
||||||
typedef std::map< SMESH_subMesh*, std::vector<int> > MapShapeNbElems;
|
typedef std::map< SMESH_subMesh*, std::vector<int> > MapShapeNbElems;
|
||||||
@ -231,6 +232,10 @@ public:
|
|||||||
bool SupportSubmeshes() const { return _supportSubmeshes; }
|
bool SupportSubmeshes() const { return _supportSubmeshes; }
|
||||||
// 5 - whether supports submeshes if !NeedDiscreteBoundary()
|
// 5 - whether supports submeshes if !NeedDiscreteBoundary()
|
||||||
|
|
||||||
|
bool NeedLowerHyps(int dim) const { return _neededLowerHyps[ dim ]; }
|
||||||
|
// 6 - if algo !NeedDiscreteBoundary() but requires presence of
|
||||||
|
// hypotheses of dimension <dim> to generate all-dimensional mesh.
|
||||||
|
// This info is used not to issue warnings on hiding of lower global algos.
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// ==================================================================
|
// ==================================================================
|
||||||
@ -302,7 +307,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
static bool FaceNormal(const SMDS_MeshElement* F, gp_XYZ& normal, bool normalized=true);
|
static bool FaceNormal(const SMDS_MeshElement* F, gp_XYZ& normal, bool normalized=true);
|
||||||
|
|
||||||
static int NumberOfWires(const TopoDS_Shape& S);
|
//static int NumberOfWires(const TopoDS_Shape& S);
|
||||||
int NumberOfPoints(SMESH_Mesh& aMesh,const TopoDS_Wire& W);
|
int NumberOfPoints(SMESH_Mesh& aMesh,const TopoDS_Wire& W);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -363,6 +368,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
void addBadInputElement(const SMDS_MeshElement* elem);
|
void addBadInputElement(const SMDS_MeshElement* elem);
|
||||||
|
|
||||||
|
void addBadInputElements(const SMESHDS_SubMesh* sm,
|
||||||
|
const bool addNodes=false);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
std::vector<std::string> _compatibleHypothesis;
|
std::vector<std::string> _compatibleHypothesis;
|
||||||
@ -373,9 +381,10 @@ protected:
|
|||||||
// in what turn and with what input shape.
|
// in what turn and with what input shape.
|
||||||
// These fields must be redefined if necessary by each descendant at constructor.
|
// These fields must be redefined if necessary by each descendant at constructor.
|
||||||
bool _onlyUnaryInput; // mesh one shape of GetDim() at once. Default TRUE
|
bool _onlyUnaryInput; // mesh one shape of GetDim() at once. Default TRUE
|
||||||
bool _requireDiscreteBoundary; // GetDim()-1 mesh must be present. Default TRUE
|
bool _requireDiscreteBoundary;// GetDim()-1 mesh must be present. Default TRUE
|
||||||
bool _requireShape; // work with GetDim()-1 mesh bound to geom only. Default TRUE
|
bool _requireShape; // work with GetDim()-1 mesh bound to geom only. Default TRUE
|
||||||
bool _supportSubmeshes; // if !_requireDiscreteBoundary. Default FALSE
|
bool _supportSubmeshes; // if !_requireDiscreteBoundary. Default FALSE
|
||||||
|
bool _neededLowerHyps[4]; // hyp dims needed by algo that !NeedDiscreteBoundary(). Df. FALSE
|
||||||
|
|
||||||
// indicates if quadratic mesh creation is required,
|
// indicates if quadratic mesh creation is required,
|
||||||
// is usually set like this: _quadraticMesh = SMESH_MesherHelper::IsQuadraticSubMesh(shape)
|
// is usually set like this: _quadraticMesh = SMESH_MesherHelper::IsQuadraticSubMesh(shape)
|
||||||
|
Loading…
Reference in New Issue
Block a user