Version: 8.3.0
VISCOUS_3D::_ViscousBuilder Class Reference

Builder of viscous layers. More...

Public Member Functions

 _ViscousBuilder ()
 Constructor of _ViscousBuilder. More...
 
SMESH_ComputeErrorPtr Compute (SMESH_Mesh &mesh, const TopoDS_Shape &shape)
 Does its job. More...
 
SMESH_ComputeErrorPtr CheckHypotheses (SMESH_Mesh &mesh, const TopoDS_Shape &shape)
 Check validity of hypotheses. More...
 
void RestoreListeners ()
 At study restoration, restore event listeners used to clear an inferior dim sub-mesh modified by viscous layers. More...
 
bool MakeN2NMap (_MeshOfSolid *pm)
 computes SMESH_ProxyMesh::SubMesh::_n2n More...
 

Private Member Functions

bool findSolidsWithLayers ()
 Finds SOLIDs to compute using viscous layers. More...
 
bool setBefore (_SolidData &solidBefore, _SolidData &solidAfter)
 Set a _SolidData to be computed before another. More...
 
bool findFacesWithLayers (const bool onlyWith=false)
 
void getIgnoreFaces (const TopoDS_Shape &solid, const StdMeshers_ViscousLayers *hyp, const TopoDS_Shape &hypShape, set< TGeomID > &ignoreFaces)
 Finds FACEs w/o layers for a given SOLID by an hypothesis. More...
 
bool makeLayer (_SolidData &data)
 Create the inner surface of the viscous layer and prepare data for infation. More...
 
void setShapeData (_EdgesOnShape &eos, SMESH_subMesh *sm, _SolidData &data)
 initialize data of _EdgesOnShape More...
 
bool setEdgeData (_LayerEdge &edge, _EdgesOnShape &eos, SMESH_MesherHelper &helper, _SolidData &data)
 Set data of _LayerEdge needed for smoothing. More...
 
gp_XYZ getFaceNormal (const SMDS_MeshNode *n, const TopoDS_Face &face, SMESH_MesherHelper &helper, bool &isOK, bool shiftInside=false)
 Return normal to a FACE at a node. More...
 
bool getFaceNormalAtSingularity (const gp_XY &uv, const TopoDS_Face &face, SMESH_MesherHelper &helper, gp_Dir &normal)
 Try to get normal at a singularity of a surface basing on it's nature. More...
 
gp_XYZ getWeigthedNormal (const _LayerEdge *edge)
 Return a normal at a node weighted with angles taken by faces. More...
 
gp_XYZ getNormalByOffset (_LayerEdge *edge, std::pair< TopoDS_Face, gp_XYZ > fId2Normal[], int nbFaces, bool lastNoOffset=false)
 Return a normal at a node by getting a common point of offset planes defined by the FACE normals. More...
 
bool findNeiborsOnEdge (const _LayerEdge *edge, const SMDS_MeshNode *&n1, const SMDS_MeshNode *&n2, _EdgesOnShape &eos, _SolidData &data)
 Find 2 neigbor nodes of a node on EDGE. More...
 
void findSimplexTestEdges (_SolidData &data, vector< vector< _LayerEdge * > > &edgesByGeom)
 
void computeGeomSize (_SolidData &data)
 Find maximal _LayerEdge length (layer thickness) limited by geometry. More...
 
bool findShapesToSmooth (_SolidData &data)
 Detect shapes (and _LayerEdge's on them) to smooth. More...
 
void limitStepSizeByCurvature (_SolidData &data)
 Limit data._stepSize by evaluating curvature of shapes and fill data._convexFaces. More...
 
void limitStepSize (_SolidData &data, const SMDS_MeshElement *face, const _LayerEdge *maxCosinEdge)
 Compute inflation step size by min size of element on a convex surface. More...
 
void limitStepSize (_SolidData &data, const double minSize)
 Compute inflation step size by min size of element on a convex surface. More...
 
bool inflate (_SolidData &data)
 Increase length of _LayerEdge's to reach the required thickness of layers. More...
 
bool smoothAndCheck (_SolidData &data, const int nbSteps, double &distToIntersection)
 Improve quality of layer inner surface and check intersection. More...
 
int invalidateBadSmooth (_SolidData &data, SMESH_MesherHelper &helper, vector< _LayerEdge * > &badSmooEdges, vector< _EdgesOnShape * > &eosC1, const int infStep)
 try to fix bad simplices by removing the last inflation step of some _LayerEdge's More...
 
void makeOffsetSurface (_EdgesOnShape &eos, SMESH_MesherHelper &)
 Create an offset surface. More...
 
void putOnOffsetSurface (_EdgesOnShape &eos, int infStep, vector< _EdgesOnShape * > &eosC1, int smooStep=0, bool moveAll=false)
 Put nodes of a curved FACE to its offset surface. More...
 
void findCollisionEdges (_SolidData &data, SMESH_MesherHelper &helper)
 Fill data._collisionEdges. More...
 
void limitMaxLenByCurvature (_SolidData &data, SMESH_MesherHelper &helper)
 Limit _LayerEdge::_maxLen according to local curvature. More...
 
void limitMaxLenByCurvature (_LayerEdge *e1, _LayerEdge *e2, _EdgesOnShape &eos1, _EdgesOnShape &eos2, SMESH_MesherHelper &helper)
 Limit _LayerEdge::_maxLen according to local curvature. More...
 
bool updateNormals (_SolidData &data, SMESH_MesherHelper &helper, int stepNb, double stepSize)
 Modify normals of _LayerEdge's on EDGE's to avoid intersection with _LayerEdge's on neighbor EDGE's. More...
 
bool updateNormalsOfConvexFaces (_SolidData &data, SMESH_MesherHelper &helper, int stepNb)
 Modify normals of _LayerEdge's on _ConvexFace's. More...
 
void updateNormalsOfC1Vertices (_SolidData &data)
 Modify normals of _LayerEdge's on C1 VERTEXes. More...
 
bool updateNormalsOfSmoothed (_SolidData &data, SMESH_MesherHelper &helper, const int nbSteps, const double stepSize)
 Modify normals of _LayerEdge's on FACE to reflex smoothing. More...
 
bool isNewNormalOk (_SolidData &data, _LayerEdge &edge, const gp_XYZ &newNormal)
 Check if a new normal is OK. More...
 
bool refine (_SolidData &data)
 case brief: default: More...
 
bool shrink (_SolidData &data)
 Shrink 2D mesh on faces to let space for inflated layers. More...
 
bool prepareEdgeToShrink (_LayerEdge &edge, _EdgesOnShape &eos, SMESH_MesherHelper &helper, const SMESHDS_SubMesh *faceSubMesh)
 Computes 2d shrink direction and finds nodes limiting shrinking. More...
 
void restoreNoShrink (_LayerEdge &edge) const
 Restore position of a sole node of a _LayerEdge based on _noShrinkShapes. More...
 
void fixBadFaces (const TopoDS_Face &F, SMESH_MesherHelper &helper, const bool is2D, const int step, set< const SMDS_MeshNode * > *involvedNodes=NULL)
 Try to fix triangles with high aspect ratio by swaping diagonals. More...
 
bool addBoundaryElements (_SolidData &data)
 Creates 2D and 1D elements on boundaries of new prisms. More...
 
bool error (const string &text, int solidID=-1)
 Stores error description and returns false. More...
 
SMESHDS_MeshgetMeshDS () const
 
void makeGroupOfLE ()
 DEBUG. More...
 

Private Attributes

SMESH_Mesh_mesh
 
SMESH_ComputeErrorPtr _error
 
vector< _SolidData_sdVec
 
TopTools_IndexedMapOfShape _solids
 
TopTools_MapOfShape _shrinkedFaces
 
int _tmpFaceID
 

Detailed Description

Builder of viscous layers.

Constructor & Destructor Documentation

_ViscousBuilder::_ViscousBuilder ( )

Member Function Documentation

SMESH_ComputeErrorPtr _ViscousBuilder::CheckHypotheses ( SMESH_Mesh mesh,
const TopoDS_Shape &  shape 
)
void VISCOUS_3D::_ViscousBuilder::findSimplexTestEdges ( _SolidData data,
vector< vector< _LayerEdge * > > &  edgesByGeom 
)
private
gp_XYZ _ViscousBuilder::getFaceNormal ( const SMDS_MeshNode node,
const TopoDS_Face &  face,
SMESH_MesherHelper helper,
bool isOK,
bool  shiftInside = false 
)
private
bool _ViscousBuilder::getFaceNormalAtSingularity ( const gp_XY &  uv,
const TopoDS_Face &  face,
SMESH_MesherHelper helper,
gp_Dir &  normal 
)
private

Try to get normal at a singularity of a surface basing on it's nature.

References MESHCUT::d, VISCOUS_3D::getRovolutionAxis(), and Handle().

Referenced by getFaceNormal().

void _ViscousBuilder::getIgnoreFaces ( const TopoDS_Shape &  solid,
const StdMeshers_ViscousLayers hyp,
const TopoDS_Shape &  hypShape,
set< TGeomID > &  ignoreFaces 
)
private

Finds FACEs w/o layers for a given SOLID by an hypothesis.

References _mesh, Face, getMeshDS(), SMESHDS_Mesh::IndexToShape(), SMESH_MesherHelper::NbAncestors(), and SMESHDS_Mesh::ShapeToIndex().

Referenced by findFacesWithLayers().

gp_XYZ _ViscousBuilder::getNormalByOffset ( _LayerEdge edge,
std::pair< TopoDS_Face, gp_XYZ >  fId2Normal[],
int  nbFaces,
bool  lastNoOffset = false 
)
private
gp_XYZ _ViscousBuilder::getWeigthedNormal ( const _LayerEdge edge)
private

Return a normal at a node weighted with angles taken by faces.

References VISCOUS_3D::_LayerEdge::_nodes, VISCOUS_3D::_LayerEdge::_simplices, and SMESH_TNodeXYZ::Set().

Referenced by getNormalByOffset(), and setEdgeData().

bool _ViscousBuilder::isNewNormalOk ( _SolidData data,
_LayerEdge edge,
const gp_XYZ &  newNormal 
)
private
void _ViscousBuilder::limitMaxLenByCurvature ( _LayerEdge e1,
_LayerEdge e2,
_EdgesOnShape eos1,
_EdgesOnShape eos2,
SMESH_MesherHelper helper 
)
private
void _ViscousBuilder::limitStepSize ( _SolidData data,
const double  minSize 
)
private

Compute inflation step size by min size of element on a convex surface.

References VISCOUS_3D::_SolidData::_stepSize, VISCOUS_3D::_SolidData::_stepSizeCoeff, VISCOUS_3D::_SolidData::_stepSizeNodes, and SMESH_TNodeXYZ::Distance().

bool _ViscousBuilder::makeLayer ( _SolidData data)
private

Create the inner surface of the viscous layer and prepare data for infation.

References VISCOUS_3D::_LayerEdge::_2neibors, VISCOUS_3D::_LayerEdge::_cosin, VISCOUS_3D::_2NearEdges::_edges, VISCOUS_3D::_EdgesOnShape::_edges, VISCOUS_3D::_SolidData::_edgesOnShape, VISCOUS_3D::_SolidData::_epsilon, VISCOUS_3D::_SolidData::_ignoreFaceIds, VISCOUS_3D::_SolidData::_index, VISCOUS_3D::_LayerEdge::_lenFactor, _mesh, VISCOUS_3D::_SolidData::_n2eMap, VISCOUS_3D::_LayerEdge::_neibors, VISCOUS_3D::_Simplex::_nNext, VISCOUS_3D::_LayerEdge::_nodes, VISCOUS_3D::_LayerEdge::_normal, VISCOUS_3D::_SolidData::_noShrinkShapes, VISCOUS_3D::_Simplex::_nPrev, VISCOUS_3D::_LayerEdge::_pos, VISCOUS_3D::_SolidData::_proxyMesh, VISCOUS_3D::_SolidData::_s2neMap, _sdVec, VISCOUS_3D::_EdgesOnShape::_shape, VISCOUS_3D::_SolidData::_shrinkShape2Shape, VISCOUS_3D::_LayerEdge::_simplices, VISCOUS_3D::_SolidData::_solid, VISCOUS_3D::_SolidData::_stepSize, VISCOUS_3D::_SolidData::_stepSizeNodes, _tmpFaceID, SMESH_ProxyMesh::SubMesh::AddElement(), SMESH_MesherHelper::AddNode(), SMDS_MeshElement::begin_nodes(), VISCOUS_3D::_LayerEdge::Block(), VISCOUS_3D::_LayerEdge::Copy(), dumpFunction, dumpFunctionEnd, dumpMove, Edge, SMDS_MeshElement::end_nodes(), error(), Face, findNeiborsOnEdge(), findShapesToSmooth(), SMDS_Position::GetDim(), SMESHDS_SubMesh::GetElements(), VISCOUS_3D::_MeshOfSolid::getFaceSubM(), SMDS_MeshElement::getIdInShape(), getMeshDS(), SMDS_MeshElement::GetNode(), SMDS_MeshNode::GetPosition(), SMDS_MeshElement::getshapeId(), SMDS_Position::GetTypeOfPosition(), SMESHDS_Mesh::IndexToShape(), SMESH_MesherHelper::IsDegenShape(), VISCOUS_3D::_LayerEdge::IsOnEdge(), SMESH_MesherHelper::IthVertex(), limitStepSize(), limitStepSizeByCurvature(), SMESHDS_Mesh::MaxShapeIndex(), SMDS_MeshElement::NbCornerNodes(), VISCOUS_3D::_LayerEdge::SetDataByNeighbors(), setEdgeData(), SMESH_MesherHelper::SetElementsOnShape(), setShapeData(), SMESH_MesherHelper::SetSubShape(), VISCOUS_3D::_EdgesOnShape::ShapeType(), SMDS_TOP_FACE, SMDSAbs_Face, VISCOUS_3D::_2NearEdges::srcNode(), VISCOUS_3D::theMinSmoothCosin, and SMESH_Algo::VertexNode().

Referenced by Compute().

void _ViscousBuilder::makeOffsetSurface ( _EdgesOnShape eos,
SMESH_MesherHelper helper 
)
private
bool _ViscousBuilder::refine ( _SolidData data)
private

case brief: default:

References VISCOUS_3D::_SolidData::_convexFaces, VISCOUS_3D::_EdgesOnShape::_edges, VISCOUS_3D::_SolidData::_edgesOnShape, VISCOUS_3D::_EdgesOnShape::_eosC1, VISCOUS_3D::_EdgesOnShape::_hyp, VISCOUS_3D::_SolidData::_ignoreFaceIds, VISCOUS_3D::_SolidData::_index, VISCOUS_3D::_EdgesOnShape::_isRegularSWOL, VISCOUS_3D::_LayerEdge::_len, _mesh, VISCOUS_3D::_SolidData::_n2eMap, VISCOUS_3D::_LayerEdge::_nodes, VISCOUS_3D::_LayerEdge::_normal, VISCOUS_3D::_LayerEdge::_pos, VISCOUS_3D::_SolidData::_reversedFaceIds, VISCOUS_3D::_SolidData::_s2neMap, VISCOUS_3D::_EdgesOnShape::_shape, VISCOUS_3D::_EdgesOnShape::_shapeID, VISCOUS_3D::_SolidData::_solid, VISCOUS_3D::_EdgesOnShape::_sWOL, VISCOUS_3D::_EdgesOnShape::_toSmooth, SMESH_MesherHelper::AddNode(), SMESH_MesherHelper::AddVolume(), COMPERR_WARNING, Edge, error(), Face, faceID, SMESHDS_SubMesh::GetElements(), VISCOUS_3D::_SolidData::GetHelper(), getMeshDS(), SMESH_MesherHelper::GetNodeU(), SMESH_MesherHelper::GetNodeUV(), VISCOUS_3D::AverageHyp::GetNumberLayers(), SMDS_MeshNode::GetPosition(), VISCOUS_3D::_LayerEdge::GetSmoothedPos(), VISCOUS_3D::AverageHyp::GetStretchFactor(), SMESH_MesherHelper::GetSubShapeID(), Handle(), SMESH_MesherHelper::HasDegeneratedEdges(), VISCOUS_3D::_LayerEdge::Is(), SMESHDS_Mesh::MeshElements(), SMESHDS_Mesh::MoveNode(), SMDS_MeshElement::NbCornerNodes(), SMDS_MeshElement::nodeIterator(), VISCOUS_3D::_LayerEdge::NORMAL_UPDATED, setEdgeData(), SMESH_MesherHelper::SetElementsOnShape(), SMESHDS_Mesh::SetNodeInVolume(), SMESHDS_Mesh::SetNodeOnEdge(), SMESHDS_Mesh::SetNodeOnFace(), SMDS_FacePosition::SetUParameter(), SMDS_EdgePosition::SetUParameter(), SMDS_FacePosition::SetVParameter(), SMESHDS_Mesh::ShapeToIndex(), VISCOUS_3D::_EdgesOnShape::ShapeType(), VISCOUS_3D::_LayerEdge::SMOOTHED_C1, VISCOUS_3D::_LayerEdge::SmoothPos(), VISCOUS_3D::_EdgesOnShape::SWOLType(), SMESH_MesherHelper::WrapIndex(), and SMDS_MeshNode::X().

Referenced by Compute().

void _ViscousBuilder::RestoreListeners ( )

At study restoration, restore event listeners used to clear an inferior dim sub-mesh modified by viscous layers.

bool _ViscousBuilder::setBefore ( _SolidData solidBefore,
_SolidData solidAfter 
)
private

Set a _SolidData to be computed before another.

References VISCOUS_3D::_SolidData::_before, _sdVec, VISCOUS_3D::_SolidData::_solid, and _solids.

Referenced by findFacesWithLayers().

bool _ViscousBuilder::setEdgeData ( _LayerEdge edge,
_EdgesOnShape eos,
SMESH_MesherHelper helper,
_SolidData data 
)
private

Set data of _LayerEdge needed for smoothing.

References VISCOUS_3D::_LayerEdge::_2neibors, VISCOUS_3D::_LayerEdge::_cosin, VISCOUS_3D::_LayerEdge::_curvature, VISCOUS_3D::_LayerEdge::_flags, VISCOUS_3D::_EdgesOnShape::_hyp, VISCOUS_3D::_SolidData::_ignoreFaceIds, VISCOUS_3D::_SolidData::_index, VISCOUS_3D::_LayerEdge::_len, VISCOUS_3D::_LayerEdge::_lenFactor, VISCOUS_3D::_LayerEdge::_maxLen, VISCOUS_3D::_LayerEdge::_minAngle, VISCOUS_3D::_LayerEdge::_nodes, VISCOUS_3D::_LayerEdge::_normal, VISCOUS_3D::_LayerEdge::_pos, VISCOUS_3D::_EdgesOnShape::_shape, VISCOUS_3D::_EdgesOnShape::_shapeID, VISCOUS_3D::_LayerEdge::_simplices, VISCOUS_3D::_SolidData::_solid, VISCOUS_3D::_EdgesOnShape::_sWOL, Abs(), Edge, error(), Face, VISCOUS_3D::getEdgeDir(), VISCOUS_3D::getFaceDir(), getFaceNormal(), SMDS_MeshElement::GetID(), SMDS_MeshNode::GetInverseElementIterator(), getMeshDS(), SMESH_MesherHelper::GetNodeU(), SMESH_MesherHelper::GetNodeUV(), getNormalByOffset(), SMDS_MeshElement::getshapeId(), VISCOUS_3D::_Simplex::GetSimplices(), SMESH_MesherHelper::GetSubShapeOri(), getWeigthedNormal(), SMESHDS_Mesh::IndexToShape(), VISCOUS_3D::_LayerEdge::Is(), SMESH_MesherHelper::IsSeamShape(), SMESH_MesherHelper::IsSubShape(), Max(), VISCOUS_3D::_LayerEdge::MULTI_NORMAL, SMESHDS_Mesh::RemoveFreeNode(), VISCOUS_3D::_LayerEdge::RISKY_SWOL, VISCOUS_3D::_LayerEdge::Set(), VISCOUS_3D::_LayerEdge::SetCosin(), SMESHDS_Mesh::SetNodeOnEdge(), SMESHDS_Mesh::SetNodeOnFace(), VISCOUS_3D::_EdgesOnShape::ShapeType(), SMDSAbs_Face, VISCOUS_3D::_EdgesOnShape::SWOLType(), and VISCOUS_3D::AverageHyp::UseSurfaceNormal().

Referenced by makeLayer(), and refine().

bool _ViscousBuilder::shrink ( _SolidData data)
private

Shrink 2D mesh on faces to let space for inflated layers.

!!

References VISCOUS_3D::_EdgesOnShape::_edges, _mesh, VISCOUS_3D::_LayerEdge::_nodes, VISCOUS_3D::_SolidData::_noShrinkShapes, VISCOUS_3D::_LayerEdge::_pos, VISCOUS_3D::_SolidData::_proxyMesh, _sdVec, VISCOUS_3D::_EdgesOnShape::_shape, _shrinkedFaces, VISCOUS_3D::_SolidData::_shrinkShape2Shape, VISCOUS_3D::_LayerEdge::_simplices, VISCOUS_3D::_SolidData::_solid, VISCOUS_3D::_EdgesOnShape::_sWOL, VISCOUS_3D::_Shrinker1D::AddEdge(), SMESHDS_SubMesh::AddElement(), SMESH_ProxyMesh::SubMesh::AddElement(), VISCOUS_3D::_SmoothNode::ANGULAR, SMESHDS_Mesh::ChangeElementNodes(), SMESH_subMesh::CHECK_COMPUTE_STATE, SMESHDS_SubMesh::Clear(), VISCOUS_3D::_Shrinker1D::Compute(), SMESH_subMesh::COMPUTE_OK, SMESH_subMesh::COMPUTE_SUBMESH, SMESHDS_SubMesh::Contains(), debugMsg, dumpChangeNodes, dumpFunction, dumpFunctionEnd, dumpMove, Edge, error(), Face, fixBadFaces(), VISCOUS_3D::_Shrinker1D::GeomEdge(), SMDS_Position::GetDim(), SMESHDS_SubMesh::GetElements(), SMESH_ProxyMesh::SubMesh::GetElements(), VISCOUS_3D::_MeshOfSolid::getFaceSubM(), SMDS_MeshNode::GetInverseElementIterator(), SMESH_MesherHelper::GetMeshDS(), getMeshDS(), SMDS_MeshElement::GetNode(), SMESHDS_SubMesh::GetNodes(), SMESH_MesherHelper::GetNodeU(), SMESH_MesherHelper::GetNodeUV(), SMDS_MeshNode::GetPosition(), VISCOUS_3D::_SolidData::GetShapeEdges(), VISCOUS_3D::_Simplex::GetSimplices(), SMESH_Algo::GetSortedNodesOnEdge(), SMDS_EdgePosition::GetUParameter(), Handle(), VISCOUS_3D::_LayerEdge::Is(), VISCOUS_3D::isConcave(), SMDS_MeshElement::isMarked(), SMESH_MesherHelper::IthVertex(), VISCOUS_3D::_SmoothNode::LAPLACIAN, SMESHDS_Mesh::MoveNode(), SMESH_ProxyMesh::SubMesh::NbElements(), SMESHDS_SubMesh::NbElements(), SMESHDS_SubMesh::NbNodes(), SMDS_MeshElement::NbNodes(), SMDS_MeshElement::nodeIterator(), prepareEdgeToShrink(), SMESHDS_Mesh::RemoveFreeElement(), SMESHDS_Mesh::RemoveFreeNode(), VISCOUS_3D::_Shrinker1D::RestoreParams(), SMDS_MeshElement::setIsMarked(), StdMeshers_ViscousLayers2D::SetProxyMeshOfEdge(), SMESH_MesherHelper::SetSubShape(), SMDS_EdgePosition::SetUParameter(), SMDS_FacePosition::SetUParameter(), SMDS_FacePosition::SetVParameter(), SMDS_MeshNode::setXYZ(), SMESHDS_Mesh::ShapeToIndex(), VISCOUS_3D::_EdgesOnShape::ShapeType(), VISCOUS_3D::_LayerEdge::SHRUNK, SMDSAbs_Face, VISCOUS_3D::_SolidData::SortOnEdge(), VISCOUS_3D::_Shrinker1D::SrcNode(), VISCOUS_3D::_EdgesOnShape::SWOLType(), VISCOUS_3D::_Shrinker1D::TgtNode(), VISCOUS_3D::ToClearSubWithMain(), SMESH_MesherHelper::ToFixNodeParameters(), and VISCOUS_3D::U_TGT.

Referenced by Compute().

bool _ViscousBuilder::smoothAndCheck ( _SolidData data,
const int  nbSteps,
double &  distToIntersection 
)
private

Improve quality of layer inner surface and check intersection.

References VISCOUS_3D::_SolidData::_concaveFaces, VISCOUS_3D::_EdgesOnShape::_edges, VISCOUS_3D::_EdgesOnShape::_edgeSmoother, VISCOUS_3D::_SolidData::_edgesOnShape, VISCOUS_3D::_EdgesOnShape::_eosC1, VISCOUS_3D::_SolidData::_epsilon, VISCOUS_3D::_EdgesOnShape::_hyp, VISCOUS_3D::_SolidData::_index, _mesh, VISCOUS_3D::_SolidData::_n2eMap, VISCOUS_3D::_SolidData::_nbShapesToSmooth, VISCOUS_3D::_LayerEdge::_neibors, SMESH_TNodeXYZ::_node, VISCOUS_3D::_LayerEdge::_nodes, VISCOUS_3D::_LayerEdge::_pos, VISCOUS_3D::_SolidData::_proxyMesh, VISCOUS_3D::_EdgesOnShape::_shape, VISCOUS_3D::_EdgesOnShape::_shapeID, VISCOUS_3D::_LayerEdge::_simplices, VISCOUS_3D::_SolidData::_solid, VISCOUS_3D::_EdgesOnShape::_sWOL, VISCOUS_3D::_EdgesOnShape::_toSmooth, SMDS_MeshElement::begin_nodes(), VISCOUS_3D::_LayerEdge::BLOCKED, VISCOUS_3D::_LayerEdge::CheckNeiborsOnBoundary(), debugMsg, dumpCmd, dumpFunction, dumpFunctionEnd, Face, SMESH_MeshAlgos::FaceNormal(), VISCOUS_3D::_SolidData::GetConvexFace(), SMESH_MeshAlgos::GetElementSearcher(), SMESH_ProxyMesh::GetFaces(), SMDS_MeshElement::GetID(), SMDS_MeshElement::getIdInShape(), getMeshDS(), SMDS_MeshElement::GetNodeIndex(), VISCOUS_3D::_SolidData::GetShapeEdges(), SMDS_MeshElement::getshapeId(), Handle(), SMESHDS_Mesh::IndexToShape(), VISCOUS_3D::_LayerEdge::INTERSECTED, invalidateBadSmooth(), VISCOUS_3D::_LayerEdge::Is(), SMESH_MesherHelper::IsSubShape(), makeOffsetSurface(), VISCOUS_3D::_LayerEdge::MOVED, VISCOUS_3D::_LayerEdge::MULTI_NORMAL, VISCOUS_3D::_LayerEdge::NEAR_BOUNDARY, SMDS_MeshElement::nodesIterator(), VISCOUS_3D::_LayerEdge::ON_CONCAVE_FACE, VISCOUS_3D::_Smoother1D::Perform(), VISCOUS_3D::_LayerEdge::PrevCheckPos(), putOnOffsetSurface(), SMESH_MesherHelper::SetSubShape(), VISCOUS_3D::_EdgesOnShape::ShapeType(), VISCOUS_3D::_LayerEdge::Smooth(), VISCOUS_3D::_LayerEdge::SMOOTHED, VISCOUS_3D::_EdgesOnShape::SWOLType(), VISCOUS_3D::theThickToIntersection, VISCOUS_3D::_LayerEdge::TO_SMOOTH, VISCOUS_3D::AverageHyp::ToSmooth(), and VISCOUS_3D::_LayerEdge::Unset().

Referenced by inflate().

bool _ViscousBuilder::updateNormals ( _SolidData data,
SMESH_MesherHelper helper,
int  stepNb,
double  stepSize 
)
private

Modify normals of _LayerEdge's on EDGE's to avoid intersection with _LayerEdge's on neighbor EDGE's.

References VISCOUS_3D::_LayerEdge::_2neibors, VISCOUS_3D::_SolidData::_collisionEdges, VISCOUS_3D::_LayerEdge::_cosin, VISCOUS_3D::_CollisionEdges::_edge, VISCOUS_3D::_2NearEdges::_edges, VISCOUS_3D::_SolidData::_index, VISCOUS_3D::_CollisionEdges::_intEdges, VISCOUS_3D::_LayerEdge::_len, VISCOUS_3D::_LayerEdge::_lenFactor, VISCOUS_3D::_LayerEdge::_maxLen, _mesh, VISCOUS_3D::_LayerEdge::_nodes, VISCOUS_3D::_LayerEdge::_normal, VISCOUS_3D::_EdgesOnShape::_sWOL, Abs(), VISCOUS_3D::_SolidData::AddShapesToSmooth(), VISCOUS_3D::_LayerEdge::BLOCKED, dumpFunction, dumpFunctionEnd, Edge, SMESH_MesherHelper::GetAncestors(), VISCOUS_3D::_TmpMeshFaceOnEdge::GetDir(), VISCOUS_3D::getEdgeDir(), getMeshDS(), VISCOUS_3D::_SolidData::GetShapeEdges(), SMESH_MesherHelper::GetSubShapeByNode(), VISCOUS_3D::_LayerEdge::InvalidateStep(), VISCOUS_3D::_LayerEdge::Is(), isNewNormalOk(), VISCOUS_3D::_LayerEdge::IsOnEdge(), VISCOUS_3D::_LayerEdge::LastSegment(), VISCOUS_3D::_LayerEdge::MARKED, Min(), VISCOUS_3D::_LayerEdge::NORMAL_UPDATED, VISCOUS_3D::_CollisionEdges::nSrc(), VISCOUS_3D::_CollisionEdges::nTgt(), VISCOUS_3D::_LayerEdge::SegTriaInter(), VISCOUS_3D::_LayerEdge::Set(), VISCOUS_3D::_LayerEdge::SetCosin(), VISCOUS_3D::_LayerEdge::SetDataByNeighbors(), VISCOUS_3D::_LayerEdge::SetNewLength(), VISCOUS_3D::_LayerEdge::SetNormal(), SMDSAbs_Face, VISCOUS_3D::_2NearEdges::srcNode(), VISCOUS_3D::theMinSmoothCosin, VISCOUS_3D::_SolidData::UnmarkEdges(), updateNormalsOfC1Vertices(), and updateNormalsOfConvexFaces().

Referenced by inflate().

bool _ViscousBuilder::updateNormalsOfConvexFaces ( _SolidData data,
SMESH_MesherHelper helper,
int  stepNb 
)
private

Modify normals of _LayerEdge's on _ConvexFace's.

References VISCOUS_3D::_CentralCurveOnEdge::_adjFace, VISCOUS_3D::_SolidData::_convexFaces, VISCOUS_3D::_LayerEdge::_cosin, VISCOUS_3D::_CentralCurveOnEdge::_curvaCenters, VISCOUS_3D::_CentralCurveOnEdge::_edge, VISCOUS_3D::_EdgesOnShape::_edges, VISCOUS_3D::_ConvexFace::_face, VISCOUS_3D::_SolidData::_index, VISCOUS_3D::_CentralCurveOnEdge::_isDegenerated, VISCOUS_3D::_CentralCurveOnEdge::_ledges, VISCOUS_3D::_LayerEdge::_len, VISCOUS_3D::_LayerEdge::_neibors, VISCOUS_3D::_LayerEdge::_nodes, VISCOUS_3D::_CentralCurveOnEdge::_normals, VISCOUS_3D::_ConvexFace::_normalsFixed, VISCOUS_3D::_EdgesOnShape::_shape, VISCOUS_3D::_ConvexFace::_subIdToEOS, VISCOUS_3D::_EdgesOnShape::_sWOL, VISCOUS_3D::_EdgesOnShape::_toSmooth, VISCOUS_3D::_SolidData::AddShapesToSmooth(), VISCOUS_3D::_ConvexFace::CheckPrisms(), SMESH_MesherHelper::Count(), debugMsg, dumpFunction, dumpFunctionEnd, Edge, faceID, VISCOUS_3D::_ConvexFace::GetCenterOfCurvature(), VISCOUS_3D::getFaceDir(), SMESH_MesherHelper::GetMeshDS(), VISCOUS_3D::_SolidData::GetShapeEdges(), VISCOUS_3D::_LayerEdge::InvalidateStep(), SMESH_MesherHelper::IthVertex(), VISCOUS_3D::_LayerEdge::MOVED, VISCOUS_3D::_LayerEdge::NEAR_BOUNDARY, VISCOUS_3D::_LayerEdge::NORMAL_UPDATED, VISCOUS_3D::_LayerEdge::Set(), VISCOUS_3D::_LayerEdge::SetCosin(), VISCOUS_3D::_LayerEdge::SetNewLength(), VISCOUS_3D::_LayerEdge::SetNormal(), VISCOUS_3D::_CentralCurveOnEdge::SetShapes(), VISCOUS_3D::_LayerEdge::SetSmooLen(), SMESH_MesherHelper::SetSubShape(), SMESHDS_Mesh::ShapeToIndex(), VISCOUS_3D::_EdgesOnShape::ShapeType(), VISCOUS_3D::_SolidData::SortOnEdge(), and VISCOUS_3D::theMinSmoothCosin.

Referenced by updateNormals().

Field Documentation

SMESH_ComputeErrorPtr VISCOUS_3D::_ViscousBuilder::_error
private
TopTools_MapOfShape VISCOUS_3D::_ViscousBuilder::_shrinkedFaces
private

Referenced by shrink().

TopTools_IndexedMapOfShape VISCOUS_3D::_ViscousBuilder::_solids
private
int VISCOUS_3D::_ViscousBuilder::_tmpFaceID
private