#include "SMDS_FaceOfNodes.hxx"
#include "SMDS_FacePosition.hxx"
#include "SMDS_MeshNode.hxx"
+#include "SMDS_PolygonalFaceOfNodes.hxx"
#include "SMDS_SetIterator.hxx"
#include "SMESHDS_Group.hxx"
#include "SMESHDS_Hypothesis.hxx"
#include <list>
#include <queue>
#include <string>
+#include <unordered_map>
#ifdef _DEBUG_
#define __myDEBUG
vector< _EdgesOnShape* > _eosConcaVer; // edges at concave VERTEXes of a FACE
vector< _EdgesOnShape* > _eosC1; // to smooth together several C1 continues shapes
- vector< gp_XYZ > _faceNormals; // if _shape is FACE
+ typedef std::unordered_map< const SMDS_MeshElement*, gp_XYZ > TFace2NormMap;
+ TFace2NormMap _faceNormals; // if _shape is FACE
vector< _EdgesOnShape* > _faceEOS; // to get _faceNormals of adjacent FACEs
Handle(ShapeAnalysis_Surface) _offsetSurf;
// Convex FACEs whose radius of curvature is less than the thickness of layers
map< TGeomID, _ConvexFace > _convexFaces;
- // shapes (EDGEs and VERTEXes) srink from which is forbidden due to collisions with
+ // shapes (EDGEs and VERTEXes) shrink from which is forbidden due to collisions with
// the adjacent SOLID
set< TGeomID > _noShrinkShapes;
/*!
* \brief Class of temporary mesh face.
* We can't use SMDS_FaceOfNodes since it's impossible to set it's ID which is
- * needed because SMESH_ElementSearcher internaly uses set of elements sorted by ID
+ * needed because SMESH_ElementSearcher internally uses set of elements sorted by ID
*/
- struct _TmpMeshFace : public SMDS_MeshElement
+ struct _TmpMeshFace : public SMDS_PolygonalFaceOfNodes
{
- vector<const SMDS_MeshNode* > _nn;
+ const SMDS_MeshElement* _srcFace;
+
_TmpMeshFace( const vector<const SMDS_MeshNode*>& nodes,
- int id, int faceID=-1, int idInFace=-1):
- SMDS_MeshElement(id), _nn(nodes) { setShapeId(faceID); setIdInShape(idInFace); }
- virtual const SMDS_MeshNode* GetNode(const int ind) const { return _nn[ind]; }
- virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Face; }
- virtual vtkIdType GetVtkType() const { return -1; }
- virtual SMDSAbs_EntityType GetEntityType() const { return SMDSEntity_Last; }
- virtual SMDSAbs_GeometryType GetGeomType() const
- { return _nn.size() == 3 ? SMDSGeom_TRIANGLE : SMDSGeom_QUADRANGLE; }
- virtual SMDS_ElemIteratorPtr elementsIterator(SMDSAbs_ElementType) const
- { return SMDS_ElemIteratorPtr( new SMDS_NodeVectorElemIterator( _nn.begin(), _nn.end()));}
+ int ID,
+ int faceID=-1,
+ const SMDS_MeshElement* srcFace=0 ):
+ SMDS_PolygonalFaceOfNodes(nodes), _srcFace( srcFace ) { setID( ID ); setShapeID( faceID ); }
+ virtual SMDSAbs_EntityType GetEntityType() const
+ { return _srcFace ? _srcFace->GetEntityType() : SMDSEntity_Quadrangle; }
+ virtual SMDSAbs_GeometryType GetGeomType() const
+ { return _srcFace ? _srcFace->GetGeomType() : SMDSGeom_QUADRANGLE; }
};
//--------------------------------------------------------------------------------
/*!
- * \brief Class of temporary mesh face storing _LayerEdge it's based on
+ * \brief Class of temporary mesh quadrangle face storing _LayerEdge it's based on
*/
struct _TmpMeshFaceOnEdge : public _TmpMeshFace
{
_TmpMeshFaceOnEdge( _LayerEdge* le1, _LayerEdge* le2, int ID ):
_TmpMeshFace( vector<const SMDS_MeshNode*>(4), ID ), _le1(le1), _le2(le2)
{
- _nn[0]=_le1->_nodes[0];
- _nn[1]=_le1->_nodes.back();
- _nn[2]=_le2->_nodes.back();
- _nn[3]=_le2->_nodes[0];
+ myNodes[0]=_le1->_nodes[0];
+ myNodes[1]=_le1->_nodes.back();
+ myNodes[2]=_le2->_nodes.back();
+ myNodes[3]=_le2->_nodes[0];
+ }
+ const SMDS_MeshNode* n( size_t i ) const
+ {
+ return myNodes[ i ];
}
gp_XYZ GetDir() const // return average direction of _LayerEdge's, normal to EDGE
{
- SMESH_TNodeXYZ p0s( _nn[0] );
- SMESH_TNodeXYZ p0t( _nn[1] );
- SMESH_TNodeXYZ p1t( _nn[2] );
- SMESH_TNodeXYZ p1s( _nn[3] );
+ SMESH_TNodeXYZ p0s( myNodes[0] );
+ SMESH_TNodeXYZ p0t( myNodes[1] );
+ SMESH_TNodeXYZ p1t( myNodes[2] );
+ SMESH_TNodeXYZ p1s( myNodes[3] );
gp_XYZ v0 = p0t - p0s;
gp_XYZ v1 = p1t - p1s;
gp_XYZ v01 = p1s - p0s;
}
gp_XYZ GetDir(_LayerEdge* le1, _LayerEdge* le2) // return average direction of _LayerEdge's
{
- _nn[0]=le1->_nodes[0];
- _nn[1]=le1->_nodes.back();
- _nn[2]=le2->_nodes.back();
- _nn[3]=le2->_nodes[0];
+ myNodes[0]=le1->_nodes[0];
+ myNodes[1]=le1->_nodes.back();
+ myNodes[2]=le2->_nodes.back();
+ myNodes[3]=le2->_nodes[0];
return GetDir();
}
};
//================================================================================
// StdMeshers_ViscousLayers hypothesis
//
-StdMeshers_ViscousLayers::StdMeshers_ViscousLayers(int hypId, int studyId, SMESH_Gen* gen)
- :SMESH_Hypothesis(hypId, studyId, gen),
+StdMeshers_ViscousLayers::StdMeshers_ViscousLayers(int hypId, SMESH_Gen* gen)
+ :SMESH_Hypothesis(hypId, gen),
_isToIgnoreShapes(1), _nbLayers(1), _thickness(1), _stretchFactor(1),
_method( SURF_OFFSET_SMOOTH )
{
py = _pyStream = new ofstream(fname);
*py << "import SMESH" << endl
<< "from salome.smesh import smeshBuilder" << endl
- << "smesh = smeshBuilder.New(salome.myStudy)" << endl
- << "meshSO = smesh.GetCurrentStudy().FindObjectID('0:1:2:" << tag <<"')" << endl
+ << "smesh = smeshBuilder.New()" << endl
+ << "meshSO = salome.myStudy.FindObjectID('0:1:2:" << tag <<"')" << endl
<< "mesh = smesh.Mesh( meshSO.GetObject() )"<<endl;
theNbPyFunc = 0;
}
// create a temporary face
const SMDS_MeshElement* newFace =
- new _TmpMeshFace( newNodes, --_tmpFaceID, face->getshapeId(), face->getIdInShape() );
+ new _TmpMeshFace( newNodes, --_tmpFaceID, face->GetShapeID(), face );
proxySub->AddElement( newFace );
// compute inflation step size by min size of element on a convex surface
}
- // Fill _eosC1 to make that C1 FACEs and EGDEs between them to be smoothed as a whole
+ // Fill _eosC1 to make that C1 FACEs and EDGEs between them to be smoothed as a whole
TopTools_MapOfShape c1VV;
{
SMESHDS_SubMesh* smDS = sm->GetSubMeshDS();
if ( !smDS ) return;
- eos._faceNormals.resize( smDS->NbElements() );
+ eos._faceNormals.reserve( smDS->NbElements() );
+ double oriFactor = helper.IsReversedSubMesh( TopoDS::Face( eos._shape )) ? 1.: -1.;
SMDS_ElemIteratorPtr eIt = smDS->GetElements();
- for ( int iF = 0; eIt->more(); ++iF )
+ for ( ; eIt->more(); )
{
const SMDS_MeshElement* face = eIt->next();
- if ( !SMESH_MeshAlgos::FaceNormal( face, eos._faceNormals[iF], /*normalized=*/true ))
- eos._faceNormals[iF].SetCoord( 0,0,0 );
+ gp_XYZ& norm = eos._faceNormals[face];
+ if ( !SMESH_MeshAlgos::FaceNormal( face, norm, /*normalized=*/true ))
+ norm.SetCoord( 0,0,0 );
+ norm *= oriFactor;
}
-
- if ( !helper.IsReversedSubMesh( TopoDS::Face( eos._shape )))
- for ( size_t iF = 0; iF < eos._faceNormals.size(); ++iF )
- eos._faceNormals[iF].Reverse();
}
else // find EOS of adjacent FACEs
{
bool _EdgesOnShape::GetNormal( const SMDS_MeshElement* face, gp_Vec& norm )
{
bool ok = false;
- const _EdgesOnShape* eos = 0;
+ _EdgesOnShape* eos = 0;
if ( face->getshapeId() == _shapeID )
{
}
if (( eos ) &&
- ( ok = ( face->getIdInShape() < (int) eos->_faceNormals.size() )))
+ ( ok = ( eos->_faceNormals.count( face ) )))
{
- norm = eos->_faceNormals[ face->getIdInShape() ];
+ norm = eos->_faceNormals[ face ];
}
else if ( !eos )
{
{
const SMDS_MeshNode* tgtNode = edge._nodes.back();
if ( SMESHDS_SubMesh* sm = getMeshDS()->MeshElements( data._solid ))
- sm->RemoveNode( tgtNode , /*isNodeDeleted=*/false );
+ sm->RemoveNode( tgtNode );
// set initial position which is parameters on _sWOL in this case
if ( eos.SWOLType() == TopAbs_EDGE )
//================================================================================
/*!
- * \brief DEBUG. Create groups contating temorary data of _LayerEdge's
+ * \brief DEBUG. Create groups containing temporary data of _LayerEdge's
*/
//================================================================================
if ( nbBad == oldBadNb &&
nbBad > 0 &&
- step < stepLimit ) // smooth w/o chech of validity
+ step < stepLimit ) // smooth w/o check of validity
{
dumpFunctionEnd();
dumpFunction(SMESH_Comment("smoothWoCheck")<<data._index<<"_Fa"<<sInd
eos._edges[i]->Set( _LayerEdge::INTERSECTED ); // not to intersect
eos._edges[i]->Block( data ); // not to inflate
- if ( _EdgesOnShape* eof = data.GetShapeEdges( intFace->getshapeId() ))
+ //if ( _EdgesOnShape* eof = data.GetShapeEdges( intFace->getshapeId() ))
{
// block _LayerEdge's, on top of which intFace is
if ( const _TmpMeshFace* f = dynamic_cast< const _TmpMeshFace*>( intFace ))
{
- const SMDS_MeshElement* srcFace =
- eof->_subMesh->GetSubMeshDS()->GetElement( f->getIdInShape() );
- SMDS_ElemIteratorPtr nIt = srcFace->nodesIterator();
+ const SMDS_MeshElement* srcFace = f->_srcFace;
+ SMDS_ElemIteratorPtr nIt = srcFace->nodesIterator();
while ( nIt->more() )
{
const SMDS_MeshNode* srcNode = static_cast<const SMDS_MeshNode*>( nIt->next() );
tgtNode->setXYZ( newPos.X(), newPos.Y(), newPos.Z() );
dumpMove( tgtNode );
- SMDS_FacePosition* pos = static_cast<SMDS_FacePosition*>( tgtNode->GetPosition() );
+ SMDS_FacePositionPtr pos = tgtNode->GetPosition();
pos->SetUParameter( newUV.X() );
pos->SetVParameter( newUV.Y() );
tgtNode->setXYZ( newPos.X(), newPos.Y(), newPos.Z() );
dumpMove( tgtNode );
- SMDS_FacePosition* pos = static_cast<SMDS_FacePosition*>( tgtNode->GetPosition() );
+ SMDS_FacePositionPtr pos = tgtNode->GetPosition();
pos->SetUParameter( newUV.X() );
pos->SetVParameter( newUV.Y() );
{
edge->Set( _LayerEdge::SMOOTHED_C1 );
isCurved = true;
- SMDS_FacePosition* fPos = dynamic_cast<SMDS_FacePosition*>( edge->_nodes[0]->GetPosition() );
+ SMDS_FacePositionPtr fPos = edge->_nodes[0]->GetPosition();
if ( !fPos )
for ( size_t iS = 0; iS < edge->_simplices.size() && !fPos; ++iS )
- fPos = dynamic_cast<SMDS_FacePosition*>( edge->_simplices[iS]._nPrev->GetPosition() );
+ fPos = edge->_simplices[iS]._nPrev->GetPosition();
if ( fPos )
edge->_curvature->_uv.SetCoord( fPos->GetUParameter(), fPos->GetVParameter() );
}
_EdgesOnShape& eos = data._edgesOnShape[iS];
if ( eos._edges.empty() ) continue;
if ( eos.ShapeType() != TopAbs_EDGE && eos.ShapeType() != TopAbs_VERTEX ) continue;
+ if ( !eos._sWOL.IsNull() ) continue; // PAL23566
for ( size_t i = 0; i < eos._edges.size(); ++i )
{
src2->GetID() < edge->_nodes[0]->GetID() )
continue; // avoid using same segment twice
- // a _LayerEdge containg tgt2
+ // a _LayerEdge containing tgt2
_LayerEdge* neiborEdge = edge->_2neibors->_edges[j];
_TmpMeshFaceOnEdge* f = new _TmpMeshFaceOnEdge( edge, neiborEdge, --_tmpFaceID );
( f->_le2->IsOnEdge() && f->_le2->_2neibors->include( edge ))) continue;
}
dist1 = dist2 = Precision::Infinite();
- if ( !edge->SegTriaInter( lastSegment, f->_nn[0], f->_nn[1], f->_nn[2], dist1, eps ))
+ if ( !edge->SegTriaInter( lastSegment, f->n(0), f->n(1), f->n(2), dist1, eps ))
dist1 = Precision::Infinite();
- if ( !edge->SegTriaInter( lastSegment, f->_nn[3], f->_nn[2], f->_nn[0], dist2, eps ))
+ if ( !edge->SegTriaInter( lastSegment, f->n(3), f->n(2), f->n(0), dist2, eps ))
dist2 = Precision::Infinite();
if (( dist1 > segLen ) && ( dist2 > segLen ))
continue;
if ( edge->IsOnEdge() )
{
// skip perpendicular EDGEs
- gp_Vec fSegDir = SMESH_TNodeXYZ( f->_nn[0] ) - SMESH_TNodeXYZ( f->_nn[3] );
+ gp_Vec fSegDir = SMESH_TNodeXYZ( f->n(0) ) - SMESH_TNodeXYZ( f->n(3) );
bool isParallel = ( isLessAngle( eSegDir0, fSegDir, angle45 ) ||
isLessAngle( eSegDir1, fSegDir, angle45 ) ||
isLessAngle( eSegDir0, fSegDir.Reversed(), angle45 ) ||
prevPosV = surface.Value( prevPosV.X(), prevPosV.Y() ).XYZ();
}
- SMDS_FacePosition* fPos;
+ SMDS_FacePositionPtr fPos;
//double r = 1. - Min( 0.9, step / 10. );
for ( set< _LayerEdge* >::iterator e = edges.begin(); e != edges.end(); ++e )
{
// set _curvature to make edgeF updated by putOnOffsetSurface()
if ( !edgeF->_curvature )
- if (( fPos = dynamic_cast<SMDS_FacePosition*>( edgeF->_nodes[0]->GetPosition() )))
+ if (( fPos = edgeF->_nodes[0]->GetPosition() ))
{
edgeF->_curvature = new _Curvature;
edgeF->_curvature->_r = 0;
//================================================================================
/*!
- * \brief Chooses a smoothing technic giving a position most close to an initial one.
+ * \brief Chooses a smoothing technique giving a position most close to an initial one.
* For a correct result, _simplices must contain nodes lying on geometry.
*/
//================================================================================
}
}
- // // this coice is done only if ( !concaveVertices.empty() ) for Grids/smesh/bugs_19/X1
+ // // this choice is done only if ( !concaveVertices.empty() ) for Grids/smesh/bugs_19/X1
// // where the nodes are smoothed too far along a sphere thus creating
// // inverted _simplices
// double dist[theNbSmooFuns];
_pos.back().SetCoord( u, 0, 0 );
if ( _nodes.size() > 1 && uvOK )
{
- SMDS_EdgePosition* pos = static_cast<SMDS_EdgePosition*>( n->GetPosition() );
+ SMDS_EdgePositionPtr pos = n->GetPosition();
pos->SetUParameter( u );
}
}
_pos.back().SetCoord( uv.X(), uv.Y(), 0 );
if ( _nodes.size() > 1 && uvOK )
{
- SMDS_FacePosition* pos = static_cast<SMDS_FacePosition*>( n->GetPosition() );
+ SMDS_FacePositionPtr pos = n->GetPosition();
pos->SetUParameter( uv.X() );
pos->SetVParameter( uv.Y() );
}
TopLoc_Location loc;
if ( eos.SWOLType() == TopAbs_EDGE )
{
- SMDS_EdgePosition* pos = static_cast<SMDS_EdgePosition*>( n->GetPosition() );
+ SMDS_EdgePositionPtr pos = n->GetPosition();
pos->SetUParameter( nXYZ.X() );
double f,l;
Handle(Geom_Curve) curve = BRep_Tool::Curve( TopoDS::Edge( eos._sWOL ), loc, f,l);
}
else
{
- SMDS_FacePosition* pos = static_cast<SMDS_FacePosition*>( n->GetPosition() );
+ SMDS_FacePositionPtr pos = n->GetPosition();
pos->SetUParameter( nXYZ.X() );
pos->SetVParameter( nXYZ.Y() );
Handle(Geom_Surface) surface = BRep_Tool::Surface( TopoDS::Face(eos._sWOL), loc );
SMDS_PositionPtr lastPos = tgtNode->GetPosition();
if ( isOnEdge )
{
- SMDS_EdgePosition* epos = static_cast<SMDS_EdgePosition*>( lastPos );
+ SMDS_EdgePositionPtr epos = lastPos;
epos->SetUParameter( otherTgtPos.X() );
}
else
{
- SMDS_FacePosition* fpos = static_cast<SMDS_FacePosition*>( lastPos );
+ SMDS_FacePositionPtr fpos = lastPos;
fpos->SetUParameter( otherTgtPos.X() );
fpos->SetVParameter( otherTgtPos.Y() );
}
u = helper.GetNodeU( geomEdge, node );
pos = curve->Value( u ).Transformed(loc);
- SMDS_EdgePosition* epos = static_cast<SMDS_EdgePosition*>( node->GetPosition() );
+ SMDS_EdgePositionPtr epos = node->GetPosition();
epos->SetUParameter( u );
}
else
uv = helper.GetNodeUV( geomFace, node );
pos = surface->Value( uv );
- SMDS_FacePosition* fpos = static_cast<SMDS_FacePosition*>( node->GetPosition() );
+ SMDS_FacePositionPtr fpos = node->GetPosition();
fpos->SetUParameter( uv.X() );
fpos->SetVParameter( uv.Y() );
}
SMESH_ComputeErrorPtr& err = _mesh->GetSubMesh( data._solid )->GetComputeError();
if ( !err || err->IsOK() )
{
- err.reset( new SMESH_ComputeError( COMPERR_WARNING,
- "Bad quality volumes created" ));
- err->myBadElements.insert( err->myBadElements.end(),
- degenVols.begin(),degenVols.end() );
+ SMESH_BadInputElements* badElems =
+ new SMESH_BadInputElements( getMeshDS(), COMPERR_WARNING, "Bad quality volumes created" );
+ badElems->myBadElements.insert( badElems->myBadElements.end(),
+ degenVols.begin(),degenVols.end() );
+ err.reset( badElems );
}
}
vector< _EdgesOnShape* > subEOS;
vector< _LayerEdge* > lEdges;
- // loop on FACEs to srink mesh on
+ // loop on FACEs to shrink mesh on
map< TGeomID, list< _SolidData* > >::iterator f2sd = f2sdMap.begin();
for ( ; f2sd != f2sdMap.end(); ++f2sd )
{
if ( eos.SWOLType() == TopAbs_EDGE )
{
SMESH_subMesh* edgeSM = _mesh->GetSubMesh( eos._sWOL );
- _Shrinker1D& srinker = e2shrMap[ edgeSM->GetId() ];
- eShri1D.insert( & srinker );
- srinker.AddEdge( eos._edges[0], eos, helper );
+ _Shrinker1D& shrinker = e2shrMap[ edgeSM->GetId() ];
+ eShri1D.insert( & shrinker );
+ shrinker.AddEdge( eos._edges[0], eos, helper );
VISCOUS_3D::ToClearSubWithMain( edgeSM, data._solid );
- // restore params of nodes on EGDE if the EDGE has been already
- // srinked while srinking other FACE
- srinker.RestoreParams();
+ // restore params of nodes on EDGE if the EDGE has been already
+ // shrinked while shrinking other FACE
+ shrinker.RestoreParams();
}
for ( size_t i = 0; i < eos._edges.size(); ++i )
{
edge->Is( _LayerEdge::SHRUNK )) continue;
if ( subEOS[iS]->SWOLType() == TopAbs_FACE )
{
- SMDS_FacePosition* pos = static_cast<SMDS_FacePosition*>( tgtNode->GetPosition() );
+ SMDS_FacePositionPtr pos = tgtNode->GetPosition();
pos->SetUParameter( edge->_pos[0].X() );
pos->SetVParameter( edge->_pos[0].Y() );
p = surface->Value( edge->_pos[0].X(), edge->_pos[0].Y() );
}
else
{
- SMDS_EdgePosition* pos = static_cast<SMDS_EdgePosition*>( tgtNode->GetPosition() );
+ SMDS_EdgePositionPtr pos = tgtNode->GetPosition();
pos->SetUParameter( edge->_pos[0].Coord( U_TGT ));
p = BRepAdaptor_Curve( TopoDS::Edge( subEOS[iS]->_sWOL )).Value( pos->GetUParameter() );
}
if ( data2 )
VISCOUS_3D::ToClearSubWithMain( sm, data2->_solid );
- } // loop on FACES to srink mesh on
+ } // loop on FACES to shrink mesh on
// Replace source nodes by target nodes in shrinked mesh edges
edge._pos[0].SetCoord( tgtUV.X(), tgtUV.Y(), 0 );
// set UV of source node to target node
- SMDS_FacePosition* pos = static_cast<SMDS_FacePosition*>( tgtNode->GetPosition() );
+ SMDS_FacePositionPtr pos = tgtNode->GetPosition();
pos->SetUParameter( srcUV.X() );
pos->SetVParameter( srcUV.Y() );
}
edge._simplices[0]._nPrev = n2;
// set U of source node to the target node
- SMDS_EdgePosition* pos = static_cast<SMDS_EdgePosition*>( tgtNode->GetPosition() );
+ SMDS_EdgePositionPtr pos = tgtNode->GetPosition();
pos->SetUParameter( uSrc );
}
return true;
TopLoc_Location loc;
Handle(Geom_Curve) curve = BRep_Tool::Curve( TopoDS::Edge( S ), loc, f, l );
if ( curve.IsNull() ) return;
- SMDS_EdgePosition* ePos = static_cast<SMDS_EdgePosition*>( srcNode->GetPosition() );
+ SMDS_EdgePositionPtr ePos = srcNode->GetPosition();
p = curve->Value( ePos->GetUParameter() );
break;
}
//================================================================================
/*!
- * \brief Try to fix triangles with high aspect ratio by swaping diagonals
+ * \brief Try to fix triangles with high aspect ratio by swapping diagonals
*/
//================================================================================
{
return true;
}
- SMDS_FacePosition* pos = static_cast<SMDS_FacePosition*>( tgtNode->GetPosition() );
+ SMDS_FacePositionPtr pos = tgtNode->GetPosition();
pos->SetUParameter( newUV.X() );
pos->SetVParameter( newUV.Y() );
{
const TopoDS_Edge& E = TopoDS::Edge( eos._sWOL );
const SMDS_MeshNode* n2 = _simplices[0]._nPrev;
- SMDS_EdgePosition* tgtPos = static_cast<SMDS_EdgePosition*>( tgtNode->GetPosition() );
+ SMDS_EdgePositionPtr tgtPos = tgtNode->GetPosition();
const double u2 = helper.GetNodeU( E, n2, tgtNode );
const double uSrc = _pos[0].Coord( U_SRC );
return false;
}
- SMDS_FacePosition* pos = static_cast<SMDS_FacePosition*>( _node->GetPosition() );
+ SMDS_FacePositionPtr pos = _node->GetPosition();
pos->SetUParameter( newPos.X() );
pos->SetVParameter( newPos.Y() );
//================================================================================
/*!
- * \brief Computes new UV using angle based smoothing technic
+ * \brief Computes new UV using angle based smoothing technique
*/
//================================================================================
if ( !discret.IsDone() )
return throw SALOME_Exception(LOCALIZED("GCPnts_AbscissaPoint failed"));
double u = discret.Parameter();
- SMDS_EdgePosition* pos = static_cast<SMDS_EdgePosition*>( _nodes[i]->GetPosition() );
+ SMDS_EdgePositionPtr pos = _nodes[i]->GetPosition();
pos->SetUParameter( u );
gp_Pnt p = C->Value( u );
const_cast< SMDS_MeshNode*>( _nodes[i] )->setXYZ( p.X(), p.Y(), p.Z() );
{
if ( !_nodes[i] ) continue;
double u = f * ( 1-_normPar[i] ) + l * _normPar[i];
- SMDS_EdgePosition* pos = static_cast<SMDS_EdgePosition*>( _nodes[i]->GetPosition() );
+ SMDS_EdgePositionPtr pos = _nodes[i]->GetPosition();
pos->SetUParameter( u );
}
}
for ( size_t i = 0; i < _nodes.size(); ++i )
{
if ( !_nodes[i] ) continue;
- SMDS_EdgePosition* pos = static_cast<SMDS_EdgePosition*>( _nodes[i]->GetPosition() );
+ SMDS_EdgePositionPtr pos = _nodes[i]->GetPosition();
pos->SetUParameter( _initU[i] );
}
_done = false;