Edge normal to surface, connecting a node on solid surface (_nodes[0]) and a node of the most internal layer (_nodes.back()) More...

Public Types

enum  {
  FUN_LAPLACIAN , FUN_LENWEIGHTED , FUN_CENTROIDAL , FUN_NEFPOLY ,
  FUN_ANGULAR , FUN_NB
}
 
typedef gp_XYZ(_LayerEdge::* PSmooFun) ()
 

Public Member Functions

void ChooseSmooFunction (const set< TGeomID > &concaveVertices, const TNode2Edge &n2eMap)
 Chooses a smoothing technic giving a position most close to an initial one. For a correct result, _simplices must contain nodes lying on geometry. More...
 
gp_XYZ Copy (_LayerEdge &other, _EdgesOnShape &eos, SMESH_MesherHelper &helper)
 Copy data from a _LayerEdge of other SOLID and based on the same node; this and other _LayerEdge's are inflated along a FACE or an EDGE. More...
 
bool FindIntersection (SMESH_ElementSearcher &searcher, double &distance, const double &epsilon, _EdgesOnShape &eos, const SMDS_MeshElement **face=0)
 Looks for intersection of it's last segment with faces. More...
 
void InvalidateStep (int curStep, const _EdgesOnShape &eos, bool restoreLength=false)
 Remove last inflation step. More...
 
bool IsOnEdge () const
 
gp_Ax1 LastSegment (double &segLen, _EdgesOnShape &eos) const
 Returns size and direction of the last segment. More...
 
gp_XY LastUV (const TopoDS_Face &F, _EdgesOnShape &eos) const
 Return the last position of the target node on a FACE. More...
 
int NbSteps () const
 
bool SegTriaInter (const gp_Ax1 &lastSegment, const SMDS_MeshNode *n0, const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, double &dist, const double &epsilon) const
 Test intersection of the last segment with a given triangle using Moller-Trumbore algorithm Intersection is detected if distance to intersection is less than _LayerEdge._len. More...
 
void SetCosin (double cosin)
 Set _cosin and _lenFactor. More...
 
void SetDataByNeighbors (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const _EdgesOnShape &eos, SMESH_MesherHelper &helper)
 Set _curvature and _2neibors->_plnNorm by 2 neigbor nodes residing the same EDGE. More...
 
void SetNewLength (double len, _EdgesOnShape &eos, SMESH_MesherHelper &helper)
 Add a new segment to _LayerEdge during inflation. More...
 
bool SetNewLength2d (Handle(Geom_Surface)&surface, const TopoDS_Face &F, _EdgesOnShape &eos, SMESH_MesherHelper &helper)
 Move target node to it's final position on the FACE during shrinking. More...
 
int smooFunID (PSmooFun fun=0) const
 Returns a name of _SmooFunction. More...
 
int Smooth (const int step, const bool isConcaveFace, const bool findBest)
 Perform laplacian smooth in 3D of nodes inflated from FACE. More...
 
gp_XYZ smoothAngular ()
 Computes a new node position using angular-based smoothing. More...
 
gp_XYZ smoothCentroidal ()
 Computes a new node position using angular-based smoothing. More...
 
gp_XYZ smoothLaplacian ()
 Computes a new node position using Laplacian smoothing. More...
 
gp_XYZ smoothLengthWeighted ()
 Computes a new node position using weigthed node positions. More...
 
gp_XYZ smoothNefPolygon ()
 Computes a new node position located inside a Nef polygon. More...
 
bool SmoothOnEdge (Handle(Geom_Surface)&surface, const TopoDS_Face &F, SMESH_MesherHelper &helper)
 Perform smooth of _LayerEdge's based on EDGE's. More...
 

Static Public Attributes

static const int theNbSmooFuns = FUN_NB
 

Detailed Description

Edge normal to surface, connecting a node on solid surface (_nodes[0]) and a node of the most internal layer (_nodes.back())

Member Typedef Documentation

◆ PSmooFun

typedef gp_XYZ(_LayerEdge::* VISCOUS_3D::_LayerEdge::PSmooFun) ()

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
FUN_LAPLACIAN 
FUN_LENWEIGHTED 
FUN_CENTROIDAL 
FUN_NEFPOLY 
FUN_ANGULAR 
FUN_NB 

Member Function Documentation

◆ ChooseSmooFunction()

void _LayerEdge::ChooseSmooFunction ( const set< TGeomID > &  concaveVertices,
const TNode2Edge n2eMap 
)

Chooses a smoothing technic giving a position most close to an initial one. For a correct result, _simplices must contain nodes lying on geometry.

References DraftVecUtils::dist().

Referenced by VISCOUS_3D::_SolidData::PrepareEdgesToSmoothOnFace().

◆ Copy()

gp_XYZ _LayerEdge::Copy ( _LayerEdge other,
_EdgesOnShape eos,
SMESH_MesherHelper helper 
)

Copy data from a _LayerEdge of other SOLID and based on the same node; this and other _LayerEdge's are inflated along a FACE or an EDGE.

References SMESH_MesherHelper::GetNodeU(), SMESH_MesherHelper::GetNodeUV(), and VISCOUS_3D::_EdgesOnShape::SWOLType().

◆ FindIntersection()

bool _LayerEdge::FindIntersection ( SMESH_ElementSearcher searcher,
double &  distance,
const double &  epsilon,
_EdgesOnShape eos,
const SMDS_MeshElement **  face = 0 
)

Looks for intersection of it's last segment with faces.

Parameters
distance- returns shortest distance from the last node to intersection

References DraftVecUtils::dist(), draftutils.utils::epsilon(), SMESH_ElementSearcher::GetElementsNearLine(), SMESHDS_Hypothesis::GetID(), and SMDS_MeshElement::NbCornerNodes().

◆ InvalidateStep()

void _LayerEdge::InvalidateStep ( int  curStep,
const _EdgesOnShape eos,
bool  restoreLength = false 
)

Remove last inflation step.

References VISCOUS_3D::_EdgesOnShape::SWOLType().

◆ IsOnEdge()

bool VISCOUS_3D::_LayerEdge::IsOnEdge ( ) const

◆ LastSegment()

gp_Ax1 _LayerEdge::LastSegment ( double &  segLen,
_EdgesOnShape eos 
) const

Returns size and direction of the last segment.

References VISCOUS_3D::_EdgesOnShape::SWOLType().

◆ LastUV()

gp_XY _LayerEdge::LastUV ( const TopoDS_Face &  F,
_EdgesOnShape eos 
) const

Return the last position of the target node on a FACE.

Parameters
[in]F- the FACE this _LayerEdge is inflated along
Returns
gp_XY - result UV

References VISCOUS_3D::_EdgesOnShape::SWOLType().

◆ NbSteps()

int VISCOUS_3D::_LayerEdge::NbSteps ( ) const

◆ SegTriaInter()

bool _LayerEdge::SegTriaInter ( const gp_Ax1 &  lastSegment,
const SMDS_MeshNode n0,
const SMDS_MeshNode n1,
const SMDS_MeshNode n2,
double &  dist,
const double &  epsilon 
) const

Test intersection of the last segment with a given triangle using Moller-Trumbore algorithm Intersection is detected if distance to intersection is less than _LayerEdge._len.

◆ SetCosin()

void _LayerEdge::SetCosin ( double  cosin)

Set _cosin and _lenFactor.

◆ SetDataByNeighbors()

void _LayerEdge::SetDataByNeighbors ( const SMDS_MeshNode n1,
const SMDS_MeshNode n2,
const _EdgesOnShape eos,
SMESH_MesherHelper helper 
)

Set _curvature and _2neibors->_plnNorm by 2 neigbor nodes residing the same EDGE.

References VISCOUS_3D::getEdgeDir(), and VISCOUS_3D::_EdgesOnShape::ShapeType().

◆ SetNewLength()

void _LayerEdge::SetNewLength ( double  len,
_EdgesOnShape eos,
SMESH_MesherHelper helper 
)

◆ SetNewLength2d()

bool _LayerEdge::SetNewLength2d ( Handle(Geom_Surface)&  surface,
const TopoDS_Face &  F,
_EdgesOnShape eos,
SMESH_MesherHelper helper 
)

◆ smooFunID()

int _LayerEdge::smooFunID ( _LayerEdge::PSmooFun  fun = 0) const

Returns a name of _SmooFunction.

◆ Smooth()

int _LayerEdge::Smooth ( const int  step,
const bool  isConcaveFace,
const bool  findBest 
)

Perform laplacian smooth in 3D of nodes inflated from FACE.

Return values
bool- true if _tgtNode has been moved

References VISCOUS_3D::_Curvature::lenDelta(), and SMDS_MeshNode::setXYZ().

◆ smoothAngular()

gp_XYZ _LayerEdge::smoothAngular ( )

Computes a new node position using angular-based smoothing.

◆ smoothCentroidal()

gp_XYZ _LayerEdge::smoothCentroidal ( )

Computes a new node position using angular-based smoothing.

◆ smoothLaplacian()

gp_XYZ _LayerEdge::smoothLaplacian ( )

Computes a new node position using Laplacian smoothing.

◆ smoothLengthWeighted()

gp_XYZ _LayerEdge::smoothLengthWeighted ( )

Computes a new node position using weigthed node positions.

◆ smoothNefPolygon()

gp_XYZ _LayerEdge::smoothNefPolygon ( )

Computes a new node position located inside a Nef polygon.

References draftguitools.gui_annotationstyleeditor::param, and SMESH_MesherHelper::WrapIndex().

◆ SmoothOnEdge()

bool _LayerEdge::SmoothOnEdge ( Handle(Geom_Surface)&  surface,
const TopoDS_Face &  F,
SMESH_MesherHelper helper 
)

Perform smooth of _LayerEdge's based on EDGE's.

Return values
bool- true if node has been moved

References SMESH_MesherHelper::CheckNodeUV(), SMESH_TNodeXYZ::Distance(), VISCOUS_3D::_Curvature::lenDeltaByDist(), SMDS_MeshNode::setXYZ(), and VISCOUS_3D::_2NearEdges::tgtNode().

Member Data Documentation

◆ theNbSmooFuns

const int VISCOUS_3D::_LayerEdge::theNbSmooFuns = FUN_NB
static

The documentation for this struct was generated from the following file:
  • Sources/FreeCAD/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp