Algo building prisms on a prism shape. More...
#include <StdMeshers_Prism_3D.hxx>

Public Member Functions | |
| StdMeshers_Prism_3D (int hypId, int studyId, SMESH_Gen *gen) | |
| virtual | ~StdMeshers_Prism_3D () |
| Destructor. | |
| virtual bool | CheckHypothesis (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, SMESH_Hypothesis::Hypothesis_Status &aStatus) |
| Check hypothesis definition to mesh a shape. | |
| virtual bool | Compute (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape) |
| Computes mesh on a shape. | |
| virtual bool | Evaluate (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, MapShapeNbElems &aResMap) |
| evaluates size of prospective mesh on a shape | |
| void | ProjectTriangles () |
| Enable removal of quadrangles from the bottom face and triangles creation there by projection from the top (sole face meshed with triangles is considered to be a bottom one). | |
| virtual std::ostream & | SaveTo (std::ostream &save) |
| Saves nothing in a stream. | |
| virtual std::istream & | LoadFrom (std::istream &load) |
| Loads nothing from a stream. | |
| const std::vector< std::string > & | GetCompatibleHypothesis () |
| Returns all types of compatible hypotheses. | |
| virtual bool | Compute (SMESH_Mesh &aMesh, SMESH_MesherHelper *aHelper) |
| Computes mesh without geometry. | |
| virtual const std::list< const SMESHDS_Hypothesis * > & | GetUsedHypothesis (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, const bool ignoreAuxiliary=true) |
| Returns a list of compatible hypotheses used to mesh a shape. | |
| const list< const SMESHDS_Hypothesis * > & | GetAppliedHypothesis (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, const bool ignoreAuxiliary=true) |
| Returns a list of compatible hypotheses assigned to a shape in a mesh. | |
| bool | InitCompatibleHypoFilter (SMESH_HypoFilter &theFilter, const bool ignoreAuxiliary) const |
| Make the filter recognize only compatible hypotheses. | |
| virtual bool | SetParametersByMesh (const SMESH_Mesh *theMesh, const TopoDS_Shape &theShape) |
| Just return false as the algorithm does not hold parameters values. | |
| virtual bool | SetParametersByDefaults (const TDefaults &dflts, const SMESH_Mesh *theMesh=0) |
| SMESH_ComputeErrorPtr | GetComputeError () const |
| return compute error | |
| void | InitComputeError () |
| initialize compute error | |
| bool | OnlyUnaryInput () const |
| bool | NeedDescretBoundary () const |
| bool | NeedShape () const |
| bool | SupportSubmeshes () const |
| virtual void | SetEventListener (SMESH_subMesh *subMesh) |
| Sets event listener to submeshes if necessary. | |
| virtual void | SubmeshRestored (SMESH_subMesh *subMesh) |
| Allow algo to do something after persistent restoration. | |
Static Public Member Functions | |
| static void | AddPrisms (std::vector< const TNodeColumn * > &nodeColumns, SMESH_MesherHelper *helper) |
| Create prisms. | |
| static bool | GetNodeParamOnEdge (const SMESHDS_Mesh *theMesh, const TopoDS_Edge &theEdge, std::vector< double > &theParams) |
| Fill vector of node parameters on geometrical edge, including vertex nodes. | |
| static bool | GetSortedNodesOnEdge (const SMESHDS_Mesh *theMesh, const TopoDS_Edge &theEdge, const bool ignoreMediumNodes, std::map< double, const SMDS_MeshNode * > &theNodes) |
| Fill map of node parameter on geometrical edge to node it-self. | |
| static bool | IsReversedSubMesh (const TopoDS_Face &theFace, SMESHDS_Mesh *theMeshDS) |
| Find out elements orientation on a geometrical face. | |
| static double | EdgeLength (const TopoDS_Edge &E) |
| Compute length of an edge. | |
| static bool | FaceNormal (const SMDS_MeshElement *F, gp_XYZ &normal, bool normalized=true) |
| Calculate normal of a mesh face. | |
| static GeomAbs_Shape | Continuity (TopoDS_Edge E1, TopoDS_Edge E2) |
| Return continuity of two edges. | |
| static bool | IsContinuous (const TopoDS_Edge &E1, const TopoDS_Edge &E2) |
| Return true if an edge can be considered as a continuation of another. | |
| static const SMDS_MeshNode * | VertexNode (const TopoDS_Vertex &V, const SMESHDS_Mesh *meshDS) |
| Return the node built on a vertex. | |
| static std::vector< const SMDS_MeshNode * > | GetCommonNodes (const SMDS_MeshElement *e1, const SMDS_MeshElement *e2) |
| Return nodes common to two elements. | |
Protected Member Functions | |
| bool | error (int error, const SMESH_Comment &comment="") |
| store error and comment and then return ( error == COMPERR_OK ) | |
| bool | error (const SMESH_Comment &comment="") |
| store COMPERR_ALGO_FAILED error and comment and then return false | |
| bool | error (SMESH_ComputeErrorPtr error) |
| store error and return error->IsOK() | |
| void | addBadInputElement (const SMDS_MeshElement *elem) |
| store a bad input element preventing computation, which may be a temporary one i.e. | |
Protected Attributes | |
| std::vector< std::string > | _compatibleHypothesis |
| std::list< const SMESHDS_Hypothesis * > | _appliedHypList |
| std::list< const SMESHDS_Hypothesis * > | _usedHypList |
| bool | _onlyUnaryInput |
| bool | _requireDescretBoundary |
| bool | _requireShape |
| bool | _supportSubmeshes |
| bool | _quadraticMesh |
| int | _error |
| SMESH_ComputeErrorName or anything algo specific. | |
| std::string | _comment |
| any text explaining what is wrong in Compute() | |
| std::list< const SMDS_MeshElement * > | _badInputElements |
| to explain COMPERR_BAD_INPUT_MESH | |
Private Member Functions | |
| bool | assocOrProjBottom2Top () |
| Find correspondence between bottom and top nodes. | |
| bool | projectBottomToTop () |
| Remove quadrangles from the top face and create triangles there by projection from the bottom. | |
| bool | setFaceAndEdgesXYZ (const int faceID, const gp_XYZ ¶ms, int z) |
| Set projection coordinates of a node to a face and it's subshapes. | |
Private Attributes | |
| bool | myProjectTriangles |
| StdMeshers_PrismAsBlock | myBlock |
| SMESH_MesherHelper * | myHelper |
| std::vector< gp_XYZ > | myShapeXYZ |
| TNode2ColumnMap | myBotToColumnMap |
Algo building prisms on a prism shape.
Definition at line 389 of file StdMeshers_Prism_3D.hxx.
Definition at line 312 of file StdMeshers_Prism_3D.cxx.
References myProjectTriangles.
:SMESH_3D_Algo(hypId, studyId, gen) { _name = "Prism_3D"; _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID); // 1 bit per shape type myProjectTriangles = false; }
| StdMeshers_Prism_3D::~StdMeshers_Prism_3D | ( | ) | [virtual] |
| void SMESH_Algo::addBadInputElement | ( | const SMDS_MeshElement * | elem | ) | [protected, inherited] |
store a bad input element preventing computation, which may be a temporary one i.e.
not residing the mesh, then it will be deleted by InitComputeError()
Definition at line 674 of file SMESH_Algo.cxx.
{
if ( elem )
_badInputElements.push_back( elem );
}
| void StdMeshers_Prism_3D::AddPrisms | ( | std::vector< const TNodeColumn * > & | nodeColumns, |
| SMESH_MesherHelper * | helper | ||
| ) | [static] |
Create prisms.
| nodeColumns | - columns of nodes generated from nodes of a mesh face |
| helper | - helper initialized by mesh and shape to add prisms to |
| columns | - columns of nodes generated from nodes of a mesh face |
| helper | - helper initialized by mesh and shape to add prisms to |
Definition at line 689 of file StdMeshers_Prism_3D.cxx.
References SMESHDS_Mesh.AddPolyhedralVolume(), SMESH_MesherHelper.AddVolume(), SMESH_MesherHelper.GetMeshDS(), SMESH_MesherHelper.GetSubShapeID(), SMDS_VolumeTool.IsForward(), SMESH_AdvancedEditor.nodes, SMDS_VolumeTool.Set(), SMESHDS_Mesh.SetMeshElementOnShape(), and SMESH_demo_hexa2_upd.vol.
{
SMESHDS_Mesh * meshDS = helper->GetMeshDS();
int shapeID = helper->GetSubShapeID();
int nbNodes = columns.size();
int nbZ = columns[0]->size();
if ( nbZ < 2 ) return;
// find out orientation
bool isForward = true;
SMDS_VolumeTool vTool;
int z = 1;
switch ( nbNodes ) {
case 3: {
const SMDS_MeshNode* botNodes[3] = { (*columns[0])[z-1],
(*columns[1])[z-1],
(*columns[2])[z-1] };
const SMDS_MeshNode* topNodes[3] = { (*columns[0])[z],
(*columns[1])[z],
(*columns[2])[z] };
SMDS_VolumeOfNodes tmpVol ( botNodes[0], botNodes[1], botNodes[2],
topNodes[0], topNodes[1], topNodes[2]);
vTool.Set( &tmpVol );
isForward = vTool.IsForward();
break;
}
case 4: {
const SMDS_MeshNode* botNodes[4] = { (*columns[0])[z-1], (*columns[1])[z-1],
(*columns[2])[z-1], (*columns[3])[z-1] };
const SMDS_MeshNode* topNodes[4] = { (*columns[0])[z], (*columns[1])[z],
(*columns[2])[z], (*columns[3])[z] };
SMDS_VolumeOfNodes tmpVol ( botNodes[0], botNodes[1], botNodes[2], botNodes[3],
topNodes[0], topNodes[1], topNodes[2], topNodes[3]);
vTool.Set( &tmpVol );
isForward = vTool.IsForward();
break;
}
}
// vertical loop on columns
for ( z = 1; z < nbZ; ++z )
{
SMDS_MeshElement* vol = 0;
switch ( nbNodes ) {
case 3: {
const SMDS_MeshNode* botNodes[3] = { (*columns[0])[z-1],
(*columns[1])[z-1],
(*columns[2])[z-1] };
const SMDS_MeshNode* topNodes[3] = { (*columns[0])[z],
(*columns[1])[z],
(*columns[2])[z] };
if ( isForward )
vol = helper->AddVolume( botNodes[0], botNodes[1], botNodes[2],
topNodes[0], topNodes[1], topNodes[2]);
else
vol = helper->AddVolume( topNodes[0], topNodes[1], topNodes[2],
botNodes[0], botNodes[1], botNodes[2]);
break;
}
case 4: {
const SMDS_MeshNode* botNodes[4] = { (*columns[0])[z-1], (*columns[1])[z-1],
(*columns[2])[z-1], (*columns[3])[z-1] };
const SMDS_MeshNode* topNodes[4] = { (*columns[0])[z], (*columns[1])[z],
(*columns[2])[z], (*columns[3])[z] };
if ( isForward )
vol = helper->AddVolume( botNodes[0], botNodes[1], botNodes[2], botNodes[3],
topNodes[0], topNodes[1], topNodes[2], topNodes[3]);
else
vol = helper->AddVolume( topNodes[0], topNodes[1], topNodes[2], topNodes[3],
botNodes[0], botNodes[1], botNodes[2], botNodes[3]);
break;
}
default:
// polyhedron
vector<const SMDS_MeshNode*> nodes( 2*nbNodes + 4*nbNodes);
vector<int> quantities( 2 + nbNodes, 4 );
quantities[0] = quantities[1] = nbNodes;
columns.resize( nbNodes + 1 );
columns[ nbNodes ] = columns[ 0 ];
for ( int i = 0; i < nbNodes; ++i ) {
nodes[ i ] = (*columns[ i ])[z-1]; // bottom
nodes[ i+nbNodes ] = (*columns[ i ])[z ]; // top
// side
int di = 2*nbNodes + 4*i - 1;
nodes[ di ] = (*columns[i ])[z-1];
nodes[ di+1 ] = (*columns[i+1])[z-1];
nodes[ di+2 ] = (*columns[i+1])[z ];
nodes[ di+3 ] = (*columns[i ])[z ];
}
vol = meshDS->AddPolyhedralVolume( nodes, quantities );
}
if ( vol && shapeID > 0 )
meshDS->SetMeshElementOnShape( vol, shapeID );
}
}
| bool StdMeshers_Prism_3D::assocOrProjBottom2Top | ( | ) | [private] |
Find correspondence between bottom and top nodes.
Find correspondence between bottom and top nodes If elements on the bottom and top faces are topologically different, and projection is possible and allowed, perform the projection.
If elements on the bottom and top faces are topologically different, and projection is possible and allowed, perform the projection
| bool | - is a success or not |
| bool | - is a success or not |
RETURN_BAD_RESULT("Need to project but not allowed");
Definition at line 797 of file StdMeshers_Prism_3D.cxx.
References StdMeshers_ProjectionUtils.FindMatchingNodesOnFaces(), StdMeshers_ProjectionUtils.FindSubShapeAssociation(), SMDS_MeshNode.GetPosition(), SMDS_Position.GetTypeOfPosition(), ID_BOT_FACE, ID_TOP_FACE, MESSAGE, SMESHDS_SubMesh.NbElements(), SMESHDS_SubMesh.NbNodes(), and SMDS_TOP_FACE.
{
SMESH_subMesh * botSM = myBlock.SubMesh( ID_BOT_FACE );
SMESH_subMesh * topSM = myBlock.SubMesh( ID_TOP_FACE );
SMESHDS_SubMesh * botSMDS = botSM->GetSubMeshDS();
SMESHDS_SubMesh * topSMDS = topSM->GetSubMeshDS();
if ( !botSMDS || botSMDS->NbElements() == 0 )
return error(TCom("No elememts on face #") << botSM->GetId());
bool needProject = false;
if ( !topSMDS ||
botSMDS->NbElements() != topSMDS->NbElements() ||
botSMDS->NbNodes() != topSMDS->NbNodes())
{
MESSAGE("nb elem bot " << botSMDS->NbElements() << " top " << topSMDS->NbElements());
MESSAGE("nb node bot " << botSMDS->NbNodes() << " top " << topSMDS->NbNodes());
if ( myBlock.HasNotQuadElemOnTop() )
return error(TCom("Mesh on faces #") << botSM->GetId()
<<" and #"<< topSM->GetId() << " seems different" );
needProject = true;
}
if ( 0/*needProject && !myProjectTriangles*/ )
return error(TCom("Mesh on faces #") << botSM->GetId()
<<" and #"<< topSM->GetId() << " seems different" );
if ( needProject )
{
return projectBottomToTop();
}
TopoDS_Face botFace = TopoDS::Face( myBlock.Shape( ID_BOT_FACE ));
TopoDS_Face topFace = TopoDS::Face( myBlock.Shape( ID_TOP_FACE ));
// associate top and bottom faces
TAssocTool::TShapeShapeMap shape2ShapeMap;
if ( !TAssocTool::FindSubShapeAssociation( botFace, myBlock.Mesh(),
topFace, myBlock.Mesh(),
shape2ShapeMap) )
return error(TCom("Topology of faces #") << botSM->GetId()
<<" and #"<< topSM->GetId() << " seems different" );
// Find matching nodes of top and bottom faces
TNodeNodeMap n2nMap;
if ( ! TAssocTool::FindMatchingNodesOnFaces( botFace, myBlock.Mesh(),
topFace, myBlock.Mesh(),
shape2ShapeMap, n2nMap ))
return error(TCom("Mesh on faces #") << botSM->GetId()
<<" and #"<< topSM->GetId() << " seems different" );
// Fill myBotToColumnMap
int zSize = myBlock.VerticalSize();
//TNode prevTNode;
TNodeNodeMap::iterator bN_tN = n2nMap.begin();
for ( ; bN_tN != n2nMap.end(); ++bN_tN )
{
const SMDS_MeshNode* botNode = bN_tN->first;
const SMDS_MeshNode* topNode = bN_tN->second;
if ( botNode->GetPosition()->GetTypeOfPosition() != SMDS_TOP_FACE )
continue; // wall columns are contained in myBlock
// create node column
TNode bN( botNode );
TNode2ColumnMap::iterator bN_col =
myBotToColumnMap.insert( make_pair ( bN, TNodeColumn() )).first;
TNodeColumn & column = bN_col->second;
column.resize( zSize );
column.front() = botNode;
column.back() = topNode;
}
return true;
}
| virtual bool StdMeshers_Prism_3D.CheckHypothesis | ( | SMESH_Mesh & | aMesh, |
| const TopoDS_Shape & | aShape, | ||
| SMESH_Hypothesis::Hypothesis_Status & | aStatus | ||
| ) | [virtual] |
Check hypothesis definition to mesh a shape.
| aMesh | - the mesh |
| aShape | - the shape |
| aStatus | - check result |
| bool | - true if hypothesis is well defined |
Implements SMESH_Algo.
| virtual bool StdMeshers_Prism_3D.Compute | ( | SMESH_Mesh & | aMesh, |
| const TopoDS_Shape & | aShape | ||
| ) | [virtual] |
Computes mesh on a shape.
| aMesh | - the mesh |
| aShape | - the shape |
| bool | - is a success |
Algorithms that !NeedDescretBoundary() || !OnlyUnaryInput() are to set SMESH_ComputeError returned by SMESH_submesh.GetComputeError() to report problematic subshapes
Implements SMESH_Algo.
| virtual bool SMESH_Algo.Compute | ( | SMESH_Mesh & | aMesh, |
| SMESH_MesherHelper * | aHelper | ||
| ) | [virtual, inherited] |
Computes mesh without geometry.
| aMesh | - the mesh |
| aHelper | - helper that must be used for adding elements to |
| bool | - is a success |
The method is called if ( !aMesh->HasShapeToMesh() )
Reimplemented in StdMeshers_Hexa_3D, and StdMeshers_HexaFromSkin_3D.
| GeomAbs_Shape SMESH_Algo::Continuity | ( | TopoDS_Edge | E1, |
| TopoDS_Edge | E2 | ||
| ) | [static, inherited] |
Return continuity of two edges.
| E1 | - the 1st edge |
| E2 | - the 2nd edge |
| GeomAbs_Shape | - regularity at the junction between E1 and E2 |
Definition at line 494 of file SMESH_Algo.cxx.
References SMESH_AdvancedEditor.tol.
{
//E1.Orientation(TopAbs_FORWARD), E2.Orientation(TopAbs_FORWARD); // avoid pb with internal edges
if (E1.Orientation() > TopAbs_REVERSED) // INTERNAL
E1.Orientation( TopAbs_FORWARD );
if (E2.Orientation() > TopAbs_REVERSED) // INTERNAL
E2.Orientation( TopAbs_FORWARD );
TopoDS_Vertex V = TopExp::LastVertex (E1, true);
if ( !V.IsSame( TopExp::FirstVertex(E2, true )))
if ( !TopExp::CommonVertex( E1, E2, V ))
return GeomAbs_C0;
Standard_Real u1 = BRep_Tool::Parameter( V, E1 );
Standard_Real u2 = BRep_Tool::Parameter( V, E2 );
BRepAdaptor_Curve C1( E1 ), C2( E2 );
Standard_Real tol = BRep_Tool::Tolerance( V );
Standard_Real angTol = 2e-3;
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
return BRepLProp::Continuity(C1, C2, u1, u2, tol, angTol);
}
catch (Standard_Failure) {
}
return GeomAbs_C0;
}
| double SMESH_Algo::EdgeLength | ( | const TopoDS_Edge & | E | ) | [static, inherited] |
Compute length of an edge.
| E | - the edge |
| double | - the length |
Definition at line 167 of file SMESH_Algo.cxx.
References Handle().
Referenced by StdMeshers_PrismAsBlock.Init().
{
double UMin = 0, UMax = 0;
if (BRep_Tool::Degenerated(E))
return 0;
TopLoc_Location L;
Handle(Geom_Curve) C = BRep_Tool::Curve(E, L, UMin, UMax);
GeomAdaptor_Curve AdaptCurve(C, UMin, UMax); //range is important for periodic curves
double length = GCPnts_AbscissaPoint::Length(AdaptCurve, UMin, UMax);
return length;
}
| bool SMESH_Algo.error | ( | int | error, |
| const SMESH_Comment & | comment = "" |
||
| ) | [protected, inherited] |
store error and comment and then return ( error == COMPERR_OK )
Referenced by StdMeshers_Projection_3D.Compute(), StdMeshers_HexaFromSkin_3D.Compute(), StdMeshers_CompositeHexa_3D.Compute(), StdMeshers_Projection_3D.Evaluate(), and StdMeshers_HexaFromSkin_3D.Evaluate().
| bool SMESH_Algo::error | ( | SMESH_ComputeErrorPtr | error | ) | [protected, inherited] |
store error and return error->IsOK()
store error and return ( error == COMPERR_OK )
Definition at line 623 of file SMESH_Algo.cxx.
| bool SMESH_Algo.error | ( | const SMESH_Comment & | comment = "" | ) | [protected, inherited] |
store COMPERR_ALGO_FAILED error and comment and then return false
Definition at line 340 of file SMESH_Algo.hxx.
References COMPERR_ALGO_FAILED, and SMESH_Algo.error().
Referenced by SMESH_Algo.error().
{ return error(COMPERR_ALGO_FAILED, comment); }
| virtual bool StdMeshers_Prism_3D.Evaluate | ( | SMESH_Mesh & | aMesh, |
| const TopoDS_Shape & | aShape, | ||
| MapShapeNbElems & | aResMap | ||
| ) | [virtual] |
evaluates size of prospective mesh on a shape
| aMesh | - the mesh |
| aShape | - the shape |
| aNbElems | - prospective number of elements by types |
| bool | - is a success |
Implements SMESH_Algo.
| bool SMESH_Algo::FaceNormal | ( | const SMDS_MeshElement * | F, |
| gp_XYZ & | normal, | ||
| bool | normalized = true |
||
| ) | [static, inherited] |
Calculate normal of a mesh face.
Definition at line 185 of file SMESH_Algo.cxx.
References SMDS_MeshElement.GetNode(), SMDS_MeshElement.GetType(), SMDS_MeshElement.IsQuadratic(), SMDS_MeshElement.NbNodes(), ex29_refine.node(), SMDSAbs_Face, SMDS_MeshNode.X(), SMDS_MeshNode.Y(), and SMDS_MeshNode.Z().
Referenced by SMESH_ElementSearcherImpl.findOuterBoundary(), and SMESH_ElementSearcherImpl.GetPointState().
{
if ( !F || F->GetType() != SMDSAbs_Face )
return false;
normal.SetCoord(0,0,0);
int nbNodes = F->IsQuadratic() ? F->NbNodes()/2 : F->NbNodes();
for ( int i = 0; i < nbNodes-2; ++i )
{
gp_XYZ p[3];
for ( int n = 0; n < 3; ++n )
{
const SMDS_MeshNode* node = F->GetNode( i + n );
p[n].SetCoord( node->X(), node->Y(), node->Z() );
}
normal += ( p[2] - p[1] ) ^ ( p[0] - p[1] );
}
double size2 = normal.SquareModulus();
bool ok = ( size2 > numeric_limits<double>::min() * numeric_limits<double>::min());
if ( normalized && ok )
normal /= sqrt( size2 );
return ok;
}
| const list< const SMESHDS_Hypothesis * > & SMESH_Algo::GetAppliedHypothesis | ( | SMESH_Mesh & | aMesh, |
| const TopoDS_Shape & | aShape, | ||
| const bool | ignoreAuxiliary = true |
||
| ) | [inherited] |
Returns a list of compatible hypotheses assigned to a shape in a mesh.
List the relevant hypothesis associated to the shape.
| aMesh | - the mesh |
| aShape | - the shape |
| ignoreAuxiliary | - do not include auxiliary hypotheses in the list |
| const | std.list <const SMESHDS_Hypothesis*> - hypotheses list |
List the relevant hypothesis associated to the shape. Relevant hypothesis have a name (type) listed in the algorithm. Hypothesis associated to father shape -are not- taken into account (see GetUsedHypothesis)
Relevant hypothesis have a name (type) listed in the algorithm. Hypothesis associated to father shape -are not- taken into account (see GetUsedHypothesis)
Definition at line 149 of file SMESH_Algo.cxx.
{
_appliedHypList.clear();
SMESH_HypoFilter filter;
if ( InitCompatibleHypoFilter( filter, ignoreAuxiliary ))
aMesh.GetHypotheses( aShape, filter, _appliedHypList, false );
return _appliedHypList;
}
| vector< const SMDS_MeshNode * > SMESH_Algo::GetCommonNodes | ( | const SMDS_MeshElement * | e1, |
| const SMDS_MeshElement * | e2 | ||
| ) | [static, inherited] |
Return nodes common to two elements.
Definition at line 547 of file SMESH_Algo.cxx.
References SMDS_MeshElement.GetNode(), SMDS_MeshElement.GetNodeIndex(), and SMDS_MeshElement.NbNodes().
Referenced by StdMeshers_QuadToTriaAdaptor.Compute2ndPart(), SMESH_MeshEditor.ConvertFromQuadratic(), and SMESH_ElementSearcherImpl.GetPointState().
{
vector< const SMDS_MeshNode*> common;
for ( int i = 0 ; i < e1->NbNodes(); ++i )
if ( e2->GetNodeIndex( e1->GetNode( i )) >= 0 )
common.push_back( e1->GetNode( i ));
return common;
}
| const std::vector< std::string >& SMESH_Algo.GetCompatibleHypothesis | ( | ) | [inherited] |
Returns all types of compatible hypotheses.
| SMESH_ComputeErrorPtr SMESH_Algo.GetComputeError | ( | ) | const [inherited] |
return compute error
Referenced by StdMeshers_Hexa_3D.Compute().
| bool SMESH_Algo::GetNodeParamOnEdge | ( | const SMESHDS_Mesh * | theMesh, |
| const TopoDS_Edge & | theEdge, | ||
| std::vector< double > & | theParams | ||
| ) | [static, inherited] |
Fill vector of node parameters on geometrical edge, including vertex nodes.
| theMesh | - The mesh containing nodes |
| theEdge | - The geometrical edge of interest |
| theParams | - The resulting vector of sorted node parameters |
| bool | - false if not all parameters are OK |
Definition at line 343 of file SMESH_Algo.cxx.
References SMESHDS_SubMesh.GetElements(), SMESHDS_SubMesh.GetNodes(), SMDS_MeshNode.GetPosition(), SMDS_Position.GetTypeOfPosition(), SMDS_EdgePosition.GetUParameter(), SMESHDS_Mesh.MeshElements(), ex29_refine.node(), and SMDS_TOP_EDGE.
Referenced by StdMeshers_Arithmetic1D.SetParametersByMesh().
{
theParams.clear();
if ( !theMesh || theEdge.IsNull() )
return false;
SMESHDS_SubMesh * eSubMesh = theMesh->MeshElements( theEdge );
if ( !eSubMesh || !eSubMesh->GetElements()->more() )
return false; // edge is not meshed
//int nbEdgeNodes = 0;
set < double > paramSet;
if ( eSubMesh )
{
// loop on nodes of an edge: sort them by param on edge
SMDS_NodeIteratorPtr nIt = eSubMesh->GetNodes();
while ( nIt->more() )
{
const SMDS_MeshNode* node = nIt->next();
const SMDS_PositionPtr& pos = node->GetPosition();
if ( pos->GetTypeOfPosition() != SMDS_TOP_EDGE )
return false;
const SMDS_EdgePosition* epos =
static_cast<const SMDS_EdgePosition*>(node->GetPosition());
if ( !paramSet.insert( epos->GetUParameter() ).second )
return false; // equal parameters
}
}
// add vertex nodes params
TopoDS_Vertex V1,V2;
TopExp::Vertices( theEdge, V1, V2);
if ( VertexNode( V1, theMesh ) &&
!paramSet.insert( BRep_Tool::Parameter(V1,theEdge) ).second )
return false; // there are equal parameters
if ( VertexNode( V2, theMesh ) &&
!paramSet.insert( BRep_Tool::Parameter(V2,theEdge) ).second )
return false; // there are equal parameters
// fill the vector
theParams.resize( paramSet.size() );
set < double >::iterator par = paramSet.begin();
vector< double >::iterator vecPar = theParams.begin();
for ( ; par != paramSet.end(); ++par, ++vecPar )
*vecPar = *par;
return theParams.size() > 1;
}
| bool SMESH_Algo::GetSortedNodesOnEdge | ( | const SMESHDS_Mesh * | theMesh, |
| const TopoDS_Edge & | theEdge, | ||
| const bool | ignoreMediumNodes, | ||
| std::map< double, const SMDS_MeshNode * > & | theNodes | ||
| ) | [static, inherited] |
Fill map of node parameter on geometrical edge to node it-self.
Fill vector of node parameters on geometrical edge, including vertex nodes.
| theMesh | - The mesh containing nodes |
| theEdge | - The geometrical edge of interest |
| theNodes | - The resulting map |
| ignoreMediumNodes | - to store medium nodes of quadratic elements or not |
| bool | - false if not all parameters are OK |
| theMesh | - The mesh containing nodes |
| theEdge | - The geometrical edge of interest |
| theParams | - The resulting vector of sorted node parameters |
| bool | - false if not all parameters are OK |
Definition at line 404 of file SMESH_Algo.cxx.
References SMESHDS_SubMesh.GetElements(), SMDS_MeshNode.GetInverseElementIterator(), SMESHDS_SubMesh.GetNodes(), SMDS_MeshNode.GetPosition(), SMDS_Position.GetTypeOfPosition(), SMDS_EdgePosition.GetUParameter(), SMESHDS_Mesh.MeshElements(), SMESH_AdvancedEditor.n1, SMESH_AdvancedEditor.n2, ex29_refine.node(), and SMDS_TOP_EDGE.
Referenced by VISCOUS._ViscousBuilder.addBoundaryElements(), SMESH_MesherHelper.LoadNodeColumns(), and _FaceSide.StoreNodes().
{
theNodes.clear();
if ( !theMesh || theEdge.IsNull() )
return false;
SMESHDS_SubMesh * eSubMesh = theMesh->MeshElements( theEdge );
if ( !eSubMesh || !eSubMesh->GetElements()->more() )
return false; // edge is not meshed
int nbNodes = 0;
set < double > paramSet;
if ( eSubMesh )
{
// loop on nodes of an edge: sort them by param on edge
SMDS_NodeIteratorPtr nIt = eSubMesh->GetNodes();
while ( nIt->more() )
{
const SMDS_MeshNode* node = nIt->next();
if ( ignoreMediumNodes ) {
SMDS_ElemIteratorPtr elemIt = node->GetInverseElementIterator();
if ( elemIt->more() && elemIt->next()->IsMediumNode( node ))
continue;
}
const SMDS_PositionPtr& pos = node->GetPosition();
if ( pos->GetTypeOfPosition() != SMDS_TOP_EDGE )
return false;
const SMDS_EdgePosition* epos =
static_cast<const SMDS_EdgePosition*>(node->GetPosition());
theNodes.insert( make_pair( epos->GetUParameter(), node ));
//MESSAGE("U " << epos->GetUParameter() << " ID " << node->GetID());
++nbNodes;
}
}
// add vertex nodes
TopoDS_Vertex v1, v2;
TopExp::Vertices(theEdge, v1, v2);
const SMDS_MeshNode* n1 = VertexNode( v1, (SMESHDS_Mesh*) theMesh );
const SMDS_MeshNode* n2 = VertexNode( v2, (SMESHDS_Mesh*) theMesh );
//MESSAGE("Vertices ID " << n1->GetID() << " " << n2->GetID());
Standard_Real f, l;
BRep_Tool::Range(theEdge, f, l);
if ( v1.Orientation() != TopAbs_FORWARD )
std::swap( f, l );
if ( n1 && ++nbNodes )
theNodes.insert( make_pair( f, n1 ));
if ( n2 && ++nbNodes )
theNodes.insert( make_pair( l, n2 ));
return theNodes.size() == nbNodes;
}
| virtual const std::list<const SMESHDS_Hypothesis *>& SMESH_Algo.GetUsedHypothesis | ( | SMESH_Mesh & | aMesh, |
| const TopoDS_Shape & | aShape, | ||
| const bool | ignoreAuxiliary = true |
||
| ) | [virtual, inherited] |
Returns a list of compatible hypotheses used to mesh a shape.
| aMesh | - the mesh |
| aShape | - the shape |
| ignoreAuxiliary | - do not include auxiliary hypotheses in the list |
| const | std.list <const SMESHDS_Hypothesis*> - hypotheses list |
List the hypothesis used by the algorithm associated to the shape. Hypothesis associated to father shape -are- taken into account (see GetAppliedHypothesis). Relevant hypothesis have a name (type) listed in the algorithm. This method could be surcharged by specific algorithms, in case of several hypothesis simultaneously applicable.
Reimplemented in StdMeshers_Regular_1D.
Referenced by StdMeshers_SegmentAroundVertex_0D.CheckHypothesis(), and StdMeshers_Projection_3D.CheckHypothesis().
| bool SMESH_Algo::InitCompatibleHypoFilter | ( | SMESH_HypoFilter & | theFilter, |
| const bool | ignoreAuxiliary | ||
| ) | const [inherited] |
Make the filter recognize only compatible hypotheses.
Make filter recognize only compatible hypotheses.
| theFilter | - the filter to initialize |
| ignoreAuxiliary | - make filter ignore compatible auxiliary hypotheses |
| bool | - true if the algo has compatible hypotheses |
| theFilter | - the filter to initialize |
| ignoreAuxiliary | - make filter ignore compatible auxiliary hypotheses |
Definition at line 468 of file SMESH_Algo.cxx.
References SMESH_HypoFilter.AndNot(), SMESH_HypoFilter.HasName(), SMESH_HypoFilter.Init(), SMESH_HypoFilter.IsAuxiliary(), and SMESH_HypoFilter.Or().
{
if ( !_compatibleHypothesis.empty() )
{
theFilter.Init( theFilter.HasName( _compatibleHypothesis[0] ));
for ( int i = 1; i < _compatibleHypothesis.size(); ++i )
theFilter.Or( theFilter.HasName( _compatibleHypothesis[ i ] ));
if ( ignoreAuxiliary )
theFilter.AndNot( theFilter.IsAuxiliary() );
return true;
}
return false;
}
| void SMESH_Algo::InitComputeError | ( | ) | [inherited] |
initialize compute error
Definition at line 655 of file SMESH_Algo.cxx.
References COMPERR_OK.
Referenced by StdMeshers_Hexa_3D.Compute().
{
_error = COMPERR_OK;
_comment.clear();
list<const SMDS_MeshElement*>::iterator elem = _badInputElements.begin();
for ( ; elem != _badInputElements.end(); ++elem )
if ( (*elem)->GetID() < 1 )
delete *elem;
_badInputElements.clear();
}
| static bool SMESH_Algo.IsContinuous | ( | const TopoDS_Edge & | E1, |
| const TopoDS_Edge & | E2 | ||
| ) | [static, inherited] |
Return true if an edge can be considered as a continuation of another.
Definition at line 313 of file SMESH_Algo.hxx.
Referenced by StdMeshers_Quadrangle_2D.CheckNbEdges(), StdMeshers_Quadrangle_2D.CheckNbEdgesForEvaluate(), and _QuadFaceGrid.Init().
{
return ( Continuity( E1, E2 ) >= GeomAbs_G1 );
}
| bool SMESH_Algo::IsReversedSubMesh | ( | const TopoDS_Face & | theFace, |
| SMESHDS_Mesh * | theMeshDS | ||
| ) | [static, inherited] |
Find out elements orientation on a geometrical face.
| theFace | - The face correctly oriented in the shape being meshed |
| theMeshDS | - The mesh data structure |
| bool | - true if the face normal and the normal of first element in the correspoding submesh point in different directions |
Definition at line 220 of file SMESH_Algo.cxx.
References SMESHDS_SubMesh.GetElements(), SMDS_MeshNode.GetPosition(), SMDS_MeshElement.getshapeId(), SMDS_Position.GetTypeOfPosition(), SMDS_FacePosition.GetUParameter(), SMDS_FacePosition.GetVParameter(), Handle(), SMESHDS_Mesh.IndexToShape(), SMESHDS_Mesh.MeshElements(), SMDS_MeshElement.NbNodes(), ex29_refine.node(), SMDS_MeshElement.nodesIterator(), SMESHDS_Mesh.ShapeToIndex(), SMDS_TOP_FACE, SMDS_TOP_VERTEX, SMDS_MeshNode.X(), SMDS_MeshNode.Y(), and SMDS_MeshNode.Z().
Referenced by StdMeshers_QuadToTriaAdaptor.Compute(), and VISCOUS._ViscousBuilder.findFacesWithLayers().
{
if ( theFace.IsNull() || !theMeshDS )
return false;
// find out orientation of a meshed face
int faceID = theMeshDS->ShapeToIndex( theFace );
TopoDS_Shape aMeshedFace = theMeshDS->IndexToShape( faceID );
bool isReversed = ( theFace.Orientation() != aMeshedFace.Orientation() );
const SMESHDS_SubMesh * aSubMeshDSFace = theMeshDS->MeshElements( faceID );
if ( !aSubMeshDSFace )
return isReversed;
// find element with node located on face and get its normal
const SMDS_FacePosition* facePos = 0;
int vertexID = 0;
gp_Pnt nPnt[3];
gp_Vec Ne;
bool normalOK = false;
SMDS_ElemIteratorPtr iteratorElem = aSubMeshDSFace->GetElements();
while ( iteratorElem->more() ) // loop on elements on theFace
{
const SMDS_MeshElement* elem = iteratorElem->next();
if ( elem && elem->NbNodes() > 2 ) {
SMDS_ElemIteratorPtr nodesIt = elem->nodesIterator();
const SMDS_FacePosition* fPos = 0;
int i = 0, vID = 0;
while ( nodesIt->more() ) { // loop on nodes
const SMDS_MeshNode* node
= static_cast<const SMDS_MeshNode *>(nodesIt->next());
if ( i == 3 ) i = 2;
nPnt[ i++ ].SetCoord( node->X(), node->Y(), node->Z() );
// check position
const SMDS_PositionPtr& pos = node->GetPosition();
if ( !pos ) continue;
if ( pos->GetTypeOfPosition() == SMDS_TOP_FACE ) {
fPos = dynamic_cast< const SMDS_FacePosition* >( pos );
}
else if ( pos->GetTypeOfPosition() == SMDS_TOP_VERTEX ) {
vID = node->getshapeId();
}
}
if ( fPos || ( !normalOK && vID )) {
// compute normal
gp_Vec v01( nPnt[0], nPnt[1] ), v02( nPnt[0], nPnt[2] );
if ( v01.SquareMagnitude() > RealSmall() &&
v02.SquareMagnitude() > RealSmall() )
{
Ne = v01 ^ v02;
normalOK = ( Ne.SquareMagnitude() > RealSmall() );
}
// we need position on theFace or at least on vertex
if ( normalOK ) {
vertexID = vID;
if ((facePos = fPos))
break;
}
}
}
}
if ( !normalOK )
return isReversed;
// node position on face
double u,v;
if ( facePos ) {
u = facePos->GetUParameter();
v = facePos->GetVParameter();
}
else if ( vertexID ) {
TopoDS_Shape V = theMeshDS->IndexToShape( vertexID );
if ( V.IsNull() || V.ShapeType() != TopAbs_VERTEX )
return isReversed;
gp_Pnt2d uv = BRep_Tool::Parameters( TopoDS::Vertex( V ), theFace );
u = uv.X();
v = uv.Y();
}
else
{
return isReversed;
}
// face normal at node position
TopLoc_Location loc;
Handle(Geom_Surface) surf = BRep_Tool::Surface( theFace, loc );
if ( surf.IsNull() || surf->Continuity() < GeomAbs_C1 ) return isReversed;
gp_Vec d1u, d1v;
surf->D1( u, v, nPnt[0], d1u, d1v );
gp_Vec Nf = (d1u ^ d1v).Transformed( loc );
if ( theFace.Orientation() == TopAbs_REVERSED )
Nf.Reverse();
return Ne * Nf < 0.;
}
| virtual std::istream& SMESH_Algo.LoadFrom | ( | std::istream & | load | ) | [virtual, inherited] |
Loads nothing from a stream.
| load | - the stream |
| std.ostream | & - the stream |
| bool SMESH_Algo.NeedDescretBoundary | ( | ) | const [inherited] |
Definition at line 222 of file SMESH_Algo.hxx.
{ return _requireDescretBoundary; }
| bool SMESH_Algo.NeedShape | ( | ) | const [inherited] |
Definition at line 225 of file SMESH_Algo.hxx.
{ return _requireShape; }
| bool SMESH_Algo.OnlyUnaryInput | ( | ) | const [inherited] |
Definition at line 214 of file SMESH_Algo.hxx.
{ return _onlyUnaryInput; }
| bool StdMeshers_Prism_3D::projectBottomToTop | ( | ) | [private] |
Remove quadrangles from the top face and create triangles there by projection from the bottom.
| bool | - a success or not |
Definition at line 880 of file StdMeshers_Prism_3D.cxx.
References SMESHDS_Mesh.AddNode(), SMESHDS_Mesh.AddPolygonalFace(), TNode.ChangeParams(), SMESH_subMesh.CLEAN, TNode.GetCoords(), SMESHDS_SubMesh.GetElements(), SMDS_MeshElement.GetID(), SMDS_MeshElement.GetNode(), SMESHDS_SubMesh.GetNodes(), TNode.GetParams(), SMDS_MeshNode.GetPosition(), SMDS_MeshElement.GetType(), SMDS_Position.GetTypeOfPosition(), ID_BOT_FACE, ID_TOP_FACE, TNode.IsNeighbor(), SMDS_MeshElement.IsQuadratic(), SMDS_MeshElement.NbNodes(), SMESH_AdvancedEditor.nodes, SMESHDS_Mesh.SetMeshElementOnShape(), SMESHDS_Mesh.SetNodeOnFace(), SMESHDS_Mesh.ShapeToIndex(), SMDS_TOP_FACE, and SMDSAbs_Face.
{
SMESH_subMesh * botSM = myBlock.SubMesh( ID_BOT_FACE );
SMESH_subMesh * topSM = myBlock.SubMesh( ID_TOP_FACE );
SMESHDS_SubMesh * botSMDS = botSM->GetSubMeshDS();
SMESHDS_SubMesh * topSMDS = topSM->GetSubMeshDS();
if ( topSMDS )
topSM->ComputeStateEngine( SMESH_subMesh::CLEAN );
SMESHDS_Mesh* meshDS = myBlock.MeshDS();
int shapeID = myHelper->GetSubShapeID();
int topFaceID = meshDS->ShapeToIndex( topSM->GetSubShape() );
// Fill myBotToColumnMap
int zSize = myBlock.VerticalSize();
TNode prevTNode;
SMDS_NodeIteratorPtr nIt = botSMDS->GetNodes();
while ( nIt->more() )
{
const SMDS_MeshNode* botNode = nIt->next();
if ( botNode->GetPosition()->GetTypeOfPosition() != SMDS_TOP_FACE )
continue; // strange
// compute bottom node params
TNode bN( botNode );
gp_XYZ paramHint(-1,-1,-1);
if ( prevTNode.IsNeighbor( bN ))
paramHint = prevTNode.GetParams();
if ( !myBlock.ComputeParameters( bN.GetCoords(), bN.ChangeParams(),
ID_BOT_FACE, paramHint ))
return error(TCom("Can't compute normalized parameters for node ")
<< botNode->GetID() << " on the face #"<< botSM->GetId() );
prevTNode = bN;
// compute top node coords
gp_XYZ topXYZ; gp_XY topUV;
if ( !myBlock.FacePoint( ID_TOP_FACE, bN.GetParams(), topXYZ ) ||
!myBlock.FaceUV ( ID_TOP_FACE, bN.GetParams(), topUV ))
return error(TCom("Can't compute coordinates "
"by normalized parameters on the face #")<< topSM->GetId() );
SMDS_MeshNode * topNode = meshDS->AddNode( topXYZ.X(),topXYZ.Y(),topXYZ.Z() );
meshDS->SetNodeOnFace( topNode, topFaceID, topUV.X(), topUV.Y() );
// create node column
TNode2ColumnMap::iterator bN_col =
myBotToColumnMap.insert( make_pair ( bN, TNodeColumn() )).first;
TNodeColumn & column = bN_col->second;
column.resize( zSize );
column.front() = botNode;
column.back() = topNode;
}
// Create top faces
// loop on bottom mesh faces
SMDS_ElemIteratorPtr faceIt = botSMDS->GetElements();
while ( faceIt->more() )
{
const SMDS_MeshElement* face = faceIt->next();
if ( !face || face->GetType() != SMDSAbs_Face )
continue;
int nbNodes = face->NbNodes();
if ( face->IsQuadratic() )
nbNodes /= 2;
// find top node in columns for each bottom node
vector< const SMDS_MeshNode* > nodes( nbNodes );
for ( int i = 0; i < nbNodes; ++i )
{
const SMDS_MeshNode* n = face->GetNode( nbNodes - i - 1 );
if ( n->GetPosition()->GetTypeOfPosition() == SMDS_TOP_FACE ) {
TNode2ColumnMap::iterator bot_column = myBotToColumnMap.find( n );
if ( bot_column == myBotToColumnMap.end() )
return error(TCom("No nodes found above node ") << n->GetID() );
nodes[ i ] = bot_column->second.back();
}
else {
const TNodeColumn* column = myBlock.GetNodeColumn( n );
if ( !column )
return error(TCom("No side nodes found above node ") << n->GetID() );
nodes[ i ] = column->back();
}
}
// create a face, with reversed orientation
SMDS_MeshElement* newFace = 0;
switch ( nbNodes ) {
case 3: {
newFace = myHelper->AddFace(nodes[0], nodes[1], nodes[2]);
break;
}
case 4: {
newFace = myHelper->AddFace( nodes[0], nodes[1], nodes[2], nodes[3] );
break;
}
default:
newFace = meshDS->AddPolygonalFace( nodes );
}
if ( newFace && shapeID > 0 )
meshDS->SetMeshElementOnShape( newFace, shapeID );
}
return true;
}
| void StdMeshers_Prism_3D.ProjectTriangles | ( | ) |
Enable removal of quadrangles from the bottom face and triangles creation there by projection from the top (sole face meshed with triangles is considered to be a bottom one).
If there are two faces with triangles, triangles must be of the same topology, else the algo fails. The method must be called before Compute()
Definition at line 412 of file StdMeshers_Prism_3D.hxx.
{ myProjectTriangles = true; }
| virtual std::ostream& SMESH_Algo.SaveTo | ( | std::ostream & | save | ) | [virtual, inherited] |
Saves nothing in a stream.
| save | - the stream |
| std.ostream | & - the stream |
| virtual void SMESH_Algo.SetEventListener | ( | SMESH_subMesh * | subMesh | ) | [virtual, inherited] |
Sets event listener to submeshes if necessary.
| subMesh | - submesh where algo is set |
This method is called when a submesh gets HYP_OK algo_state. After being set, event listener is notified on each event of a submesh. By default none listener is set
Reimplemented in StdMeshers_CompositeSegment_1D, StdMeshers_Import_1D, StdMeshers_Import_1D2D, StdMeshers_Projection_1D, StdMeshers_Projection_2D, StdMeshers_Projection_3D, and StdMeshers_Regular_1D.
| bool StdMeshers_Prism_3D::setFaceAndEdgesXYZ | ( | const int | faceID, |
| const gp_XYZ & | params, | ||
| int | z | ||
| ) | [private] |
Set projection coordinates of a node to a face and it's subshapes.
| faceID | - the face given by in-block ID |
| params | - node normalized parameters |
| bool | - is a success |
Definition at line 994 of file StdMeshers_Prism_3D.cxx.
References SMESH_Block.GetFaceEdgesIDs(), SMESH_Block.ID_Fx0z, SMESH_Block.ID_Fx1z, and SHOWYXZ.
{
// find base and top edges of the face
enum { BASE = 0, TOP, LEFT, RIGHT };
vector< int > edgeVec; // 0-base, 1-top
SMESH_Block::GetFaceEdgesIDs( faceID, edgeVec );
myBlock.EdgePoint( edgeVec[ BASE ], params, myShapeXYZ[ edgeVec[ BASE ]]);
myBlock.EdgePoint( edgeVec[ TOP ], params, myShapeXYZ[ edgeVec[ TOP ]]);
SHOWYXZ("\nparams ", params);
SHOWYXZ("TOP is " <<edgeVec[ TOP ], myShapeXYZ[ edgeVec[ TOP]]);
SHOWYXZ("BASE is "<<edgeVec[ BASE], myShapeXYZ[ edgeVec[ BASE]]);
if ( faceID == SMESH_Block::ID_Fx0z || faceID == SMESH_Block::ID_Fx1z )
{
myBlock.EdgePoint( edgeVec[ LEFT ], params, myShapeXYZ[ edgeVec[ LEFT ]]);
myBlock.EdgePoint( edgeVec[ RIGHT ], params, myShapeXYZ[ edgeVec[ RIGHT ]]);
SHOWYXZ("VER "<<edgeVec[ LEFT], myShapeXYZ[ edgeVec[ LEFT]]);
SHOWYXZ("VER "<<edgeVec[ RIGHT], myShapeXYZ[ edgeVec[ RIGHT]]);
}
myBlock.FacePoint( faceID, params, myShapeXYZ[ faceID ]);
SHOWYXZ("FacePoint "<<faceID, myShapeXYZ[ faceID]);
return true;
}
| virtual bool SMESH_Algo.SetParametersByDefaults | ( | const TDefaults & | dflts, |
| const SMESH_Mesh * | theMesh = 0 |
||
| ) | [virtual, inherited] |
| virtual bool SMESH_Algo.SetParametersByMesh | ( | const SMESH_Mesh * | theMesh, |
| const TopoDS_Shape & | theShape | ||
| ) | [virtual, inherited] |
Just return false as the algorithm does not hold parameters values.
| virtual void SMESH_Algo.SubmeshRestored | ( | SMESH_subMesh * | subMesh | ) | [virtual, inherited] |
Allow algo to do something after persistent restoration.
| subMesh | - restored submesh |
This method is called only if a submesh has HYP_OK algo_state.
Reimplemented in StdMeshers_Import_1D, StdMeshers_Import_1D2D, StdMeshers_RadialQuadrangle_1D2D, and StdMeshers_Regular_1D.
| bool SMESH_Algo.SupportSubmeshes | ( | ) | const [inherited] |
Definition at line 228 of file SMESH_Algo.hxx.
{ return _supportSubmeshes; }
| const SMDS_MeshNode * SMESH_Algo::VertexNode | ( | const TopoDS_Vertex & | V, |
| const SMESHDS_Mesh * | meshDS | ||
| ) | [static, inherited] |
Return the node built on a vertex.
| V | - the vertex |
| meshDS | - mesh |
| const | SMDS_MeshNode* - found node or NULL |
Definition at line 531 of file SMESH_Algo.cxx.
References SMESHDS_Mesh.MeshElements().
Referenced by SMESH.SMESH_Gen.Compute(), StdMeshers_ProjectionUtils.FindMatchingNodesOnFaces(), StdMeshers_FaceSide.GetFaceWires(), and StdMeshers_FaceSide.GetUVPtStruct().
{
if ( SMESHDS_SubMesh* sm = meshDS->MeshElements(V) ) {
SMDS_NodeIteratorPtr nIt= sm->GetNodes();
if (nIt->more())
return nIt->next();
}
return 0;
}
std::list<const SMESHDS_Hypothesis *> SMESH_Algo._appliedHypList [protected, inherited] |
Definition at line 356 of file SMESH_Algo.hxx.
std::list<const SMDS_MeshElement*> SMESH_Algo._badInputElements [protected, inherited] |
to explain COMPERR_BAD_INPUT_MESH
Definition at line 373 of file SMESH_Algo.hxx.
std::string SMESH_Algo._comment [protected, inherited] |
any text explaining what is wrong in Compute()
Definition at line 372 of file SMESH_Algo.hxx.
std::vector<std::string> SMESH_Algo._compatibleHypothesis [protected, inherited] |
Definition at line 355 of file SMESH_Algo.hxx.
Referenced by StdMeshers_Hexa_3D.StdMeshers_Hexa_3D(), StdMeshers_Import_1D.StdMeshers_Import_1D(), StdMeshers_Import_1D2D.StdMeshers_Import_1D2D(), StdMeshers_MEFISTO_2D.StdMeshers_MEFISTO_2D(), StdMeshers_Projection_1D.StdMeshers_Projection_1D(), StdMeshers_Projection_2D.StdMeshers_Projection_2D(), StdMeshers_Projection_3D.StdMeshers_Projection_3D(), StdMeshers_Quadrangle_2D.StdMeshers_Quadrangle_2D(), StdMeshers_RadialPrism_3D.StdMeshers_RadialPrism_3D(), StdMeshers_RadialQuadrangle_1D2D.StdMeshers_RadialQuadrangle_1D2D(), and StdMeshers_Regular_1D.StdMeshers_Regular_1D().
int SMESH_Algo._error [protected, inherited] |
SMESH_ComputeErrorName or anything algo specific.
Definition at line 371 of file SMESH_Algo.hxx.
Referenced by SMESH_Algo.SMESH_Algo().
bool SMESH_Algo._onlyUnaryInput [protected, inherited] |
Definition at line 362 of file SMESH_Algo.hxx.
Referenced by SMESH_Algo.SMESH_Algo().
bool SMESH_Algo._quadraticMesh [protected, inherited] |
Definition at line 369 of file SMESH_Algo.hxx.
Referenced by StdMeshers_CompositeHexa_3D.Compute(), StdMeshers_CompositeHexa_3D.Evaluate(), and SMESH_Algo.SMESH_Algo().
bool SMESH_Algo._requireDescretBoundary [protected, inherited] |
Definition at line 363 of file SMESH_Algo.hxx.
Referenced by SMESH_Algo.SMESH_Algo(), StdMeshers_Import_1D2D.StdMeshers_Import_1D2D(), and StdMeshers_RadialQuadrangle_1D2D.StdMeshers_RadialQuadrangle_1D2D().
bool SMESH_Algo._requireShape [protected, inherited] |
Definition at line 364 of file SMESH_Algo.hxx.
Referenced by SMESH_Algo.SMESH_Algo(), and StdMeshers_Hexa_3D.StdMeshers_Hexa_3D().
bool SMESH_Algo._supportSubmeshes [protected, inherited] |
Definition at line 365 of file SMESH_Algo.hxx.
Referenced by SMESH_Algo.SMESH_Algo(), and StdMeshers_RadialQuadrangle_1D2D.StdMeshers_RadialQuadrangle_1D2D().
std::list<const SMESHDS_Hypothesis *> SMESH_Algo._usedHypList [protected, inherited] |
Definition at line 357 of file SMESH_Algo.hxx.
Definition at line 451 of file StdMeshers_Prism_3D.hxx.
Definition at line 458 of file StdMeshers_Prism_3D.hxx.
SMESH_MesherHelper* StdMeshers_Prism_3D.myHelper [private] |
Definition at line 452 of file StdMeshers_Prism_3D.hxx.
bool StdMeshers_Prism_3D.myProjectTriangles [private] |
Definition at line 449 of file StdMeshers_Prism_3D.hxx.
Referenced by StdMeshers_Prism_3D().
std::vector<gp_XYZ> StdMeshers_Prism_3D.myShapeXYZ [private] |
Definition at line 454 of file StdMeshers_Prism_3D.hxx.