Edge normal to surface, connecting a node on solid surface (_nodes[0]) and a node of the most internal layer (_nodes.back()) More...
Public Member Functions | |
| void | SetNewLength (double len, SMESH_MesherHelper &helper) |
| Add a new segment to _LayerEdge during inflation. | |
| bool | SetNewLength2d (Handle(Geom_Surface)&surface, const TopoDS_Face &F, SMESH_MesherHelper &helper) |
| Move target node to it's final position on the FACE during shrinking. | |
| void | SetDataByNeighbors (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, SMESH_MesherHelper &helper) |
| Set _curvature and _2neibors->_plnNorm by 2 neigbor nodes residing the same EDGE. | |
| void | InvalidateStep (int curStep) |
| Remove last inflation step. | |
| bool | Smooth (int &badNb) |
| Perform laplacian smooth in 3D of nodes inflated from FACE. | |
| bool | SmoothOnEdge (Handle(Geom_Surface)&surface, const TopoDS_Face &F, SMESH_MesherHelper &helper) |
| Perform smooth of _LayerEdge's based on EDGE's. | |
| bool | FindIntersection (SMESH_ElementSearcher &searcher, double &distance, const double &epsilon, const SMDS_MeshElement **face=0) |
| Find common submeshes (based on shared subshapes with other. | |
| 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. | |
| gp_Ax1 | LastSegment (double &segLen) const |
| Returns size and direction of the last segment. | |
| bool | IsOnEdge () const |
| void | Copy (_LayerEdge &other, 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. | |
| void | SetCosin (double cosin) |
| Set _cosin and _lenFactor. | |
Data Fields | |
| vector< const SMDS_MeshNode * > | _nodes |
| gp_XYZ | _normal |
| vector< gp_XYZ > | _pos |
| double | _len |
| double | _cosin |
| double | _lenFactor |
| TopoDS_Shape | _sWOL |
| vector< _Simplex > | _simplices |
| _2NearEdges * | _2neibors |
| _Curvature * | _curvature |
Edge normal to surface, connecting a node on solid surface (_nodes[0]) and a node of the most internal layer (_nodes.back())
Definition at line 290 of file StdMeshers_ViscousLayers.cxx.
| void _LayerEdge::Copy | ( | _LayerEdge & | other, |
| 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.
Definition at line 1775 of file StdMeshers_ViscousLayers.cxx.
References VISCOUS._LayerEdge._2neibors, VISCOUS._LayerEdge._cosin, VISCOUS._LayerEdge._curvature, VISCOUS._LayerEdge._lenFactor, VISCOUS._LayerEdge._nodes, VISCOUS._LayerEdge._normal, VISCOUS._LayerEdge._sWOL, SMESH_MesherHelper.GetNodeU(), and SMESH_MesherHelper.GetNodeUV().
Referenced by VISCOUS._ViscousBuilder.makeLayer().
{
_nodes = other._nodes;
_normal = other._normal;
_len = 0;
_lenFactor = other._lenFactor;
_cosin = other._cosin;
_sWOL = other._sWOL;
_2neibors = other._2neibors;
_curvature = 0; std::swap( _curvature, other._curvature );
_2neibors = 0; std::swap( _2neibors, other._2neibors );
if ( _sWOL.ShapeType() == TopAbs_EDGE )
{
double u = helper.GetNodeU( TopoDS::Edge( _sWOL ), _nodes[0] );
_pos.push_back( gp_XYZ( u, 0, 0));
}
else // TopAbs_FACE
{
gp_XY uv = helper.GetNodeUV( TopoDS::Face( _sWOL ), _nodes[0]);
_pos.push_back( gp_XYZ( uv.X(), uv.Y(), 0));
}
}
| bool _LayerEdge::FindIntersection | ( | SMESH_ElementSearcher & | searcher, |
| double & | distance, | ||
| const double & | epsilon, | ||
| const SMDS_MeshElement ** | face = 0 |
||
| ) |
Find common submeshes (based on shared subshapes with other.
Looks for intersection of it's last segment with faces.
| theOther | submesh to check |
| theSetOfCommon | set of common submesh |
| distance | - returns shortest distance from the last node to intersection |
Definition at line 2245 of file SMESH_subMesh.cxx.
Referenced by VISCOUS._ViscousBuilder.updateNormals().
{
int oldNb = theSetOfCommon.size();
// check main submeshes
const map <int, SMESH_subMesh*>::const_iterator otherEnd = theOther->_mapDepend.end();
if ( theOther->_mapDepend.find(this->GetId()) != otherEnd )
theSetOfCommon.insert( this );
if ( _mapDepend.find(theOther->GetId()) != _mapDepend.end() )
theSetOfCommon.insert( theOther );
// check common submeshes
map <int, SMESH_subMesh*>::const_iterator mapIt = _mapDepend.begin();
for( ; mapIt != _mapDepend.end(); mapIt++ )
if ( theOther->_mapDepend.find((*mapIt).first) != otherEnd )
theSetOfCommon.insert( (*mapIt).second );
return oldNb < theSetOfCommon.size();
}
| void _LayerEdge::InvalidateStep | ( | int | curStep | ) |
Remove last inflation step.
Definition at line 3062 of file StdMeshers_ViscousLayers.cxx.
References SMDS_MeshNode.GetPosition(), Handle(), SMDS_FacePosition.SetUParameter(), SMDS_EdgePosition.SetUParameter(), SMDS_FacePosition.SetVParameter(), and SMDS_MeshNode.setXYZ().
Referenced by VISCOUS._ViscousBuilder.updateNormals().
{
if ( _pos.size() > curStep )
{
_pos.resize( curStep );
gp_Pnt nXYZ = _pos.back();
SMDS_MeshNode* n = const_cast< SMDS_MeshNode*>( _nodes.back() );
if ( !_sWOL.IsNull() )
{
TopLoc_Location loc;
if ( _sWOL.ShapeType() == TopAbs_EDGE )
{
SMDS_EdgePosition* pos = static_cast<SMDS_EdgePosition*>( n->GetPosition() );
pos->SetUParameter( nXYZ.X() );
double f,l;
Handle(Geom_Curve) curve = BRep_Tool::Curve( TopoDS::Edge( _sWOL ), loc, f,l);
nXYZ = curve->Value( nXYZ.X() ).Transformed( loc );
}
else
{
SMDS_FacePosition* pos = static_cast<SMDS_FacePosition*>( n->GetPosition() );
pos->SetUParameter( nXYZ.X() );
pos->SetVParameter( nXYZ.Y() );
Handle(Geom_Surface) surface = BRep_Tool::Surface( TopoDS::Face(_sWOL), loc );
nXYZ = surface->Value( nXYZ.X(), nXYZ.Y() ).Transformed( loc );
}
}
n->setXYZ( nXYZ.X(), nXYZ.Y(), nXYZ.Z() );
dumpMove( n );
}
}
| bool VISCOUS._LayerEdge.IsOnEdge | ( | ) | const |
Definition at line 334 of file StdMeshers_ViscousLayers.cxx.
Referenced by VISCOUS._ViscousBuilder.updateNormals().
{ return _2neibors; }
| gp_Ax1 _LayerEdge::LastSegment | ( | double & | segLen | ) | const |
Returns size and direction of the last segment.
Definition at line 2742 of file StdMeshers_ViscousLayers.cxx.
References ex10_grid4geometry.dir, and Handle().
{
// find two non-coincident positions
gp_XYZ orig = _pos.back();
gp_XYZ dir;
int iPrev = _pos.size() - 2;
while ( iPrev >= 0 )
{
dir = orig - _pos[iPrev];
if ( dir.SquareModulus() > 1e-100 )
break;
else
iPrev--;
}
// make gp_Ax1
gp_Ax1 segDir;
if ( iPrev < 0 )
{
segDir.SetLocation( SMESH_TNodeXYZ( _nodes[0] ));
segDir.SetDirection( _normal );
segLen = 0;
}
else
{
gp_Pnt pPrev = _pos[ iPrev ];
if ( !_sWOL.IsNull() )
{
TopLoc_Location loc;
if ( _sWOL.ShapeType() == TopAbs_EDGE )
{
double f,l;
Handle(Geom_Curve) curve = BRep_Tool::Curve( TopoDS::Edge( _sWOL ), loc, f,l);
pPrev = curve->Value( pPrev.X() ).Transformed( loc );
}
else
{
Handle(Geom_Surface) surface = BRep_Tool::Surface( TopoDS::Face(_sWOL), loc );
pPrev = surface->Value( pPrev.X(), pPrev.Y() ).Transformed( loc );
}
dir = SMESH_TNodeXYZ( _nodes.back() ) - pPrev.XYZ();
}
segDir.SetLocation( pPrev );
segDir.SetDirection( dir );
segLen = dir.Modulus();
}
return segDir;
}
| 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.
Definition at line 2800 of file StdMeshers_ViscousLayers.cxx.
References ex06_hole1boolean.edge1, and ex06_hole1boolean.edge2.
{
//const double EPSILON = 1e-6;
gp_XYZ orig = lastSegment.Location().XYZ();
gp_XYZ dir = lastSegment.Direction().XYZ();
SMESH_TNodeXYZ vert0( n0 );
SMESH_TNodeXYZ vert1( n1 );
SMESH_TNodeXYZ vert2( n2 );
/* calculate distance from vert0 to ray origin */
gp_XYZ tvec = orig - vert0;
if ( tvec * dir > EPSILON )
// intersected face is at back side of the temporary face this _LayerEdge belongs to
return false;
gp_XYZ edge1 = vert1 - vert0;
gp_XYZ edge2 = vert2 - vert0;
/* begin calculating determinant - also used to calculate U parameter */
gp_XYZ pvec = dir ^ edge2;
/* if determinant is near zero, ray lies in plane of triangle */
double det = edge1 * pvec;
if (det > -EPSILON && det < EPSILON)
return 0;
double inv_det = 1.0 / det;
/* calculate U parameter and test bounds */
double u = ( tvec * pvec ) * inv_det;
if (u < 0.0 || u > 1.0)
return 0;
/* prepare to test V parameter */
gp_XYZ qvec = tvec ^ edge1;
/* calculate V parameter and test bounds */
double v = (dir * qvec) * inv_det;
if ( v < 0.0 || u + v > 1.0 )
return 0;
/* calculate t, ray intersects triangle */
t = (edge2 * qvec) * inv_det;
// if (det < EPSILON)
// return false;
// /* calculate distance from vert0 to ray origin */
// gp_XYZ tvec = orig - vert0;
// /* calculate U parameter and test bounds */
// double u = tvec * pvec;
// if (u < 0.0 || u > det)
// return 0;
// /* prepare to test V parameter */
// gp_XYZ qvec = tvec ^ edge1;
// /* calculate V parameter and test bounds */
// double v = dir * qvec;
// if (v < 0.0 || u + v > det)
// return 0;
// /* calculate t, scale parameters, ray intersects triangle */
// double t = edge2 * qvec;
// double inv_det = 1.0 / det;
// t *= inv_det;
// //u *= inv_det;
// //v *= inv_det;
return true;
}
| void _LayerEdge::SetCosin | ( | double | cosin | ) |
Set _cosin and _lenFactor.
Definition at line 1805 of file StdMeshers_ViscousLayers.cxx.
Referenced by VISCOUS._ViscousBuilder.setEdgeData(), and VISCOUS._ViscousBuilder.updateNormals().
{
_cosin = cosin;
_lenFactor = ( _cosin > 0.1 ) ? 1./sqrt(1-_cosin*_cosin) : 1.0;
}
| void _LayerEdge::SetDataByNeighbors | ( | const SMDS_MeshNode * | n1, |
| const SMDS_MeshNode * | n2, | ||
| SMESH_MesherHelper & | helper | ||
| ) |
Set _curvature and _2neibors->_plnNorm by 2 neigbor nodes residing the same EDGE.
Definition at line 1723 of file StdMeshers_ViscousLayers.cxx.
References SMESH_MesherHelper.GetMeshDS(), SMESH_MesherHelper.GetSubShapeByNode(), and SMDS_TOP_EDGE.
Referenced by VISCOUS._ViscousBuilder.setEdgeData(), and VISCOUS._ViscousBuilder.updateNormals().
{
if ( _nodes[0]->GetPosition()->GetTypeOfPosition() != SMDS_TOP_EDGE )
return;
gp_XYZ pos = SMESH_TNodeXYZ( _nodes[0] );
gp_XYZ vec1 = pos - SMESH_TNodeXYZ( n1 );
gp_XYZ vec2 = pos - SMESH_TNodeXYZ( n2 );
// Set _curvature
double sumLen = vec1.Modulus() + vec2.Modulus();
_2neibors->_wgt[0] = 1 - vec1.Modulus() / sumLen;
_2neibors->_wgt[1] = 1 - vec2.Modulus() / sumLen;
double avgNormProj = 0.5 * ( _normal * vec1 + _normal * vec2 );
double avgLen = 0.5 * ( vec1.Modulus() + vec2.Modulus() );
if ( _curvature ) delete _curvature;
_curvature = _Curvature::New( avgNormProj, avgLen );
#ifdef __myDEBUG
// if ( _curvature )
// cout << _nodes[0]->GetID()
// << " CURV r,k: " << _curvature->_r<<","<<_curvature->_k
// << " proj = "<<avgNormProj<< " len = " << avgLen << "| lenDelta(0) = "
// << _curvature->lenDelta(0) << endl;
#endif
// Set _plnNorm
if ( _sWOL.IsNull() )
{
TopoDS_Shape S = helper.GetSubShapeByNode( _nodes[0], helper.GetMeshDS() );
gp_XYZ dirE = getEdgeDir( TopoDS::Edge( S ), _nodes[0], helper );
gp_XYZ plnNorm = dirE ^ _normal;
double proj0 = plnNorm * vec1;
double proj1 = plnNorm * vec2;
if ( fabs( proj0 ) > 1e-10 || fabs( proj1 ) > 1e-10 )
{
if ( _2neibors->_plnNorm ) delete _2neibors->_plnNorm;
_2neibors->_plnNorm = new gp_XYZ( plnNorm.Normalized() );
}
}
}
| void _LayerEdge::SetNewLength | ( | double | len, |
| SMESH_MesherHelper & | helper | ||
| ) |
Add a new segment to _LayerEdge during inflation.
Definition at line 3016 of file StdMeshers_ViscousLayers.cxx.
References SMESH_MesherHelper.CheckNodeU(), SMESH_MesherHelper.CheckNodeUV(), SMDS_MeshNode.GetPosition(), SMDS_FacePosition.SetUParameter(), SMDS_EdgePosition.SetUParameter(), SMDS_FacePosition.SetVParameter(), and SMDS_MeshNode.setXYZ().
Referenced by VISCOUS._ViscousBuilder.updateNormals().
{
if ( _len - len > -1e-6 )
{
_pos.push_back( _pos.back() );
return;
}
SMDS_MeshNode* n = const_cast< SMDS_MeshNode*>( _nodes.back() );
SMESH_TNodeXYZ oldXYZ( n );
gp_XYZ nXYZ = oldXYZ + _normal * ( len - _len ) * _lenFactor;
n->setXYZ( nXYZ.X(), nXYZ.Y(), nXYZ.Z() );
_pos.push_back( nXYZ );
_len = len;
if ( !_sWOL.IsNull() )
{
double distXYZ[4];
if ( _sWOL.ShapeType() == TopAbs_EDGE )
{
double u = Precision::Infinite(); // to force projection w/o distance check
helper.CheckNodeU( TopoDS::Edge( _sWOL ), n, u, 1e-10, /*force=*/true, distXYZ );
_pos.back().SetCoord( u, 0, 0 );
SMDS_EdgePosition* pos = static_cast<SMDS_EdgePosition*>( n->GetPosition() );
pos->SetUParameter( u );
}
else // TopAbs_FACE
{
gp_XY uv( Precision::Infinite(), 0 );
helper.CheckNodeUV( TopoDS::Face( _sWOL ), n, uv, 1e-10, /*force=*/true, distXYZ );
_pos.back().SetCoord( uv.X(), uv.Y(), 0 );
SMDS_FacePosition* pos = static_cast<SMDS_FacePosition*>( n->GetPosition() );
pos->SetUParameter( uv.X() );
pos->SetVParameter( uv.Y() );
}
n->setXYZ( distXYZ[1], distXYZ[2], distXYZ[3]);
}
dumpMove( n ); //debug
}
| bool _LayerEdge::SetNewLength2d | ( | Handle(Geom_Surface)& | surface, |
| const TopoDS_Face & | F, | ||
| SMESH_MesherHelper & | helper | ||
| ) |
Move target node to it's final position on the FACE during shrinking.
Definition at line 3718 of file StdMeshers_ViscousLayers.cxx.
References SMESH_MesherHelper.GetNodeU(), SMESH_MesherHelper.GetNodeUV(), SMDS_MeshNode.GetPosition(), VISCOUS.LEN_TGT, SMESH_AdvancedEditor.n2, SMDS_EdgePosition.SetUParameter(), SMDS_FacePosition.SetUParameter(), SMDS_FacePosition.SetVParameter(), SMDS_MeshNode.setXYZ(), VISCOUS.U_SRC, and VISCOUS.U_TGT.
{
if ( _pos.empty() )
return false; // already at the target position
SMDS_MeshNode* tgtNode = const_cast< SMDS_MeshNode*& >( _nodes.back() );
if ( _sWOL.ShapeType() == TopAbs_FACE )
{
gp_XY curUV = helper.GetNodeUV( F, tgtNode );
gp_Pnt2d tgtUV( _pos[0].X(), _pos[0].Y());
gp_Vec2d uvDir( _normal.X(), _normal.Y() );
const double uvLen = tgtUV.Distance( curUV );
// Select shrinking step such that not to make faces with wrong orientation.
const double kSafe = 0.8;
const double minStepSize = uvLen / 10;
double stepSize = uvLen;
for ( unsigned i = 0; i < _simplices.size(); ++i )
{
const SMDS_MeshNode* nn[2] = { _simplices[i]._nPrev, _simplices[i]._nNext };
for ( int j = 0; j < 2; ++j )
if ( const SMDS_MeshNode* n = nn[j] )
{
gp_XY uv = helper.GetNodeUV( F, n );
gp_Vec2d uvDirN( curUV, uv );
double proj = uvDirN * uvDir * kSafe;
if ( proj < stepSize && proj > minStepSize )
stepSize = proj;
}
}
gp_Pnt2d newUV;
if ( stepSize == uvLen )
{
newUV = tgtUV;
_pos.clear();
}
else
{
newUV = curUV + uvDir.XY() * stepSize;
}
SMDS_FacePosition* pos = static_cast<SMDS_FacePosition*>( tgtNode->GetPosition() );
pos->SetUParameter( newUV.X() );
pos->SetVParameter( newUV.Y() );
#ifdef __myDEBUG
gp_Pnt p = surface->Value( newUV.X(), newUV.Y() );
tgtNode->setXYZ( p.X(), p.Y(), p.Z() );
dumpMove( tgtNode );
#endif
}
else // _sWOL is TopAbs_EDGE
{
TopoDS_Edge E = TopoDS::Edge( _sWOL );
const SMDS_MeshNode* n2 = _simplices[0]._nPrev;
const double u2 = helper.GetNodeU( E, n2, tgtNode );
const double uSrc = _pos[0].Coord( U_SRC );
const double lenTgt = _pos[0].Coord( LEN_TGT );
double newU = _pos[0].Coord( U_TGT );
if ( lenTgt < 0.99 * fabs( uSrc-u2 ))
{
_pos.clear();
}
else
{
newU = 0.1 * uSrc + 0.9 * u2;
}
SMDS_EdgePosition* pos = static_cast<SMDS_EdgePosition*>( tgtNode->GetPosition() );
pos->SetUParameter( newU );
#ifdef __myDEBUG
gp_XY newUV = helper.GetNodeUV( F, tgtNode, _nodes[0]);
gp_Pnt p = surface->Value( newUV.X(), newUV.Y() );
tgtNode->setXYZ( p.X(), p.Y(), p.Z() );
dumpMove( tgtNode );
#endif
}
return true;
}
Perform laplacian smooth in 3D of nodes inflated from FACE.
| bool | - true if _tgtNode has been moved |
Definition at line 2955 of file StdMeshers_ViscousLayers.cxx.
References SMDS_MeshNode.setXYZ().
{
if ( _simplices.size() < 2 )
return false; // _LayerEdge inflated along EDGE or FACE
// compute new position for the last _pos
gp_XYZ newPos (0,0,0);
for ( unsigned i = 0; i < _simplices.size(); ++i )
newPos += SMESH_TNodeXYZ( _simplices[i]._nPrev );
newPos /= _simplices.size();
if ( _curvature )
newPos += _normal * _curvature->lenDelta( _len );
gp_Pnt prevPos( _pos[ _pos.size()-2 ]);
// if ( _cosin < -0.1)
// {
// // Avoid decreasing length of edge on concave surface
// //gp_Vec oldMove( _pos[ _pos.size()-2 ], _pos.back() );
// gp_Vec newMove( prevPos, newPos );
// newPos = _pos.back() + newMove.XYZ();
// }
// else if ( _cosin > 0.3 )
// {
// // Avoid increasing length of edge too much
// }
// count quality metrics (orientation) of tetras around _tgtNode
int nbOkBefore = 0;
SMESH_TNodeXYZ tgtXYZ( _nodes.back() );
for ( unsigned i = 0; i < _simplices.size(); ++i )
nbOkBefore += _simplices[i].IsForward( _nodes[0], &tgtXYZ );
int nbOkAfter = 0;
for ( unsigned i = 0; i < _simplices.size(); ++i )
nbOkAfter += _simplices[i].IsForward( _nodes[0], &newPos );
if ( nbOkAfter < nbOkBefore )
return false;
SMDS_MeshNode* n = const_cast< SMDS_MeshNode* >( _nodes.back() );
_len -= prevPos.Distance(SMESH_TNodeXYZ( n ));
_len += prevPos.Distance(newPos);
n->setXYZ( newPos.X(), newPos.Y(), newPos.Z());
_pos.back() = newPos;
badNb += _simplices.size() - nbOkAfter;
dumpMove( n );
return true;
}
| bool _LayerEdge::SmoothOnEdge | ( | Handle(Geom_Surface)& | surface, |
| const TopoDS_Face & | F, | ||
| SMESH_MesherHelper & | helper | ||
| ) |
Perform smooth of _LayerEdge's based on EDGE's.
| bool | - true if node has been moved |
Definition at line 2888 of file StdMeshers_ViscousLayers.cxx.
References SMESH_MesherHelper.CheckNodeUV(), SMESH_TNodeXYZ.Distance(), SMESH_fixation.p0, PAL_MESH_041_mesh.p1, and SMDS_MeshNode.setXYZ().
{
ASSERT( IsOnEdge() );
SMDS_MeshNode* tgtNode = const_cast<SMDS_MeshNode*>( _nodes.back() );
SMESH_TNodeXYZ oldPos( tgtNode );
double dist01, distNewOld;
SMESH_TNodeXYZ p0( _2neibors->_nodes[0]);
SMESH_TNodeXYZ p1( _2neibors->_nodes[1]);
dist01 = p0.Distance( _2neibors->_nodes[1] );
gp_Pnt newPos = p0 * _2neibors->_wgt[0] + p1 * _2neibors->_wgt[1];
double lenDelta = 0;
if ( _curvature )
{
lenDelta = _curvature->lenDelta( _len );
newPos.ChangeCoord() += _normal * lenDelta;
}
distNewOld = newPos.Distance( oldPos );
if ( F.IsNull() )
{
if ( _2neibors->_plnNorm )
{
// put newPos on the plane defined by source node and _plnNorm
gp_XYZ new2src = SMESH_TNodeXYZ( _nodes[0] ) - newPos.XYZ();
double new2srcProj = (*_2neibors->_plnNorm) * new2src;
newPos.ChangeCoord() += (*_2neibors->_plnNorm) * new2srcProj;
}
tgtNode->setXYZ( newPos.X(), newPos.Y(), newPos.Z() );
_pos.back() = newPos.XYZ();
}
else
{
tgtNode->setXYZ( newPos.X(), newPos.Y(), newPos.Z() );
gp_XY uv( Precision::Infinite(), 0 );
helper.CheckNodeUV( F, tgtNode, uv, 1e-10, /*force=*/true );
_pos.back().SetCoord( uv.X(), uv.Y(), 0 );
newPos = surface->Value( uv.X(), uv.Y() );
tgtNode->setXYZ( newPos.X(), newPos.Y(), newPos.Z() );
}
if ( _curvature && lenDelta < 0 )
{
gp_Pnt prevPos( _pos[ _pos.size()-2 ]);
_len -= prevPos.Distance( oldPos );
_len += prevPos.Distance( newPos );
}
bool moved = distNewOld > dist01/50;
//if ( moved )
dumpMove( tgtNode ); // debug
return moved;
}
Definition at line 306 of file StdMeshers_ViscousLayers.cxx.
Referenced by VISCOUS._LayerEdge.Copy(), VISCOUS._ViscousBuilder.setEdgeData(), and VISCOUS._ViscousBuilder.updateNormals().
| double VISCOUS._LayerEdge._cosin |
Definition at line 297 of file StdMeshers_ViscousLayers.cxx.
Referenced by VISCOUS._LayerEdge.Copy(), VISCOUS._ViscousBuilder.makeLayer(), VISCOUS._ViscousBuilder.setEdgeData(), and VISCOUS._ViscousBuilder.updateNormals().
Definition at line 308 of file StdMeshers_ViscousLayers.cxx.
Referenced by VISCOUS._LayerEdge.Copy(), and VISCOUS._ViscousBuilder.setEdgeData().
| double VISCOUS._LayerEdge._len |
Definition at line 296 of file StdMeshers_ViscousLayers.cxx.
Referenced by VISCOUS._ViscousBuilder.setEdgeData(), and VISCOUS._ViscousBuilder.updateNormals().
Definition at line 298 of file StdMeshers_ViscousLayers.cxx.
Referenced by VISCOUS._LayerEdge.Copy().
| vector< const SMDS_MeshNode*> VISCOUS._LayerEdge._nodes |
Definition at line 292 of file StdMeshers_ViscousLayers.cxx.
Referenced by VISCOUS._Shrinker1D.AddEdge(), VISCOUS._LayerEdge.Copy(), VISCOUS._ViscousBuilder.findNeiborsOnEdge(), VISCOUS._ViscousBuilder.makeGroupOfLE(), VISCOUS._ViscousBuilder.makeLayer(), VISCOUS._LayerEdgeCmp.operator()(), VISCOUS._ViscousBuilder.prepareEdgeToShrink(), VISCOUS._ViscousBuilder.refine(), VISCOUS._ViscousBuilder.setEdgeData(), VISCOUS._ViscousBuilder.shrink(), VISCOUS._ViscousBuilder.smoothAndCheck(), and VISCOUS._ViscousBuilder.updateNormals().
| gp_XYZ VISCOUS._LayerEdge._normal |
Definition at line 294 of file StdMeshers_ViscousLayers.cxx.
Referenced by VISCOUS._LayerEdge.Copy(), VISCOUS._ViscousBuilder.makeGroupOfLE(), VISCOUS._ViscousBuilder.prepareEdgeToShrink(), VISCOUS._ViscousBuilder.setEdgeData(), and VISCOUS._ViscousBuilder.updateNormals().
| vector<gp_XYZ> VISCOUS._LayerEdge._pos |
Definition at line 295 of file StdMeshers_ViscousLayers.cxx.
Referenced by VISCOUS._ViscousBuilder.prepareEdgeToShrink(), VISCOUS._ViscousBuilder.refine(), and VISCOUS._ViscousBuilder.setEdgeData().
Definition at line 304 of file StdMeshers_ViscousLayers.cxx.
Referenced by VISCOUS._ViscousBuilder.prepareEdgeToShrink(), VISCOUS._ViscousBuilder.setEdgeData(), and VISCOUS._ViscousBuilder.smoothAndCheck().
| TopoDS_Shape VISCOUS._LayerEdge._sWOL |
Definition at line 301 of file StdMeshers_ViscousLayers.cxx.
Referenced by VISCOUS._Shrinker1D.AddEdge(), VISCOUS._Shrinker1D.Compute(), VISCOUS._LayerEdge.Copy(), VISCOUS._ViscousBuilder.findNeiborsOnEdge(), VISCOUS._ViscousBuilder.prepareEdgeToShrink(), VISCOUS._ViscousBuilder.refine(), VISCOUS._ViscousBuilder.setEdgeData(), VISCOUS._ViscousBuilder.shrink(), and VISCOUS._ViscousBuilder.updateNormals().