0021130: EDF 1746 SMESH: Issue with export in STL format

move TNodeXYZ from SMESH_MeshEditor to SMESH_TypeDefs.hxx as SMESH_TNodeXYZ
This commit is contained in:
eap 2011-01-27 16:45:55 +00:00
parent 40b9d1ba43
commit e3409934a4
8 changed files with 63 additions and 74 deletions

View File

@ -247,7 +247,7 @@ namespace
//!< True if all blocks this side belongs to have beem found
bool isBound() const { return _nbBlocksExpected <= _nbBlocksFound; }
//!< Return coordinates of node at XY
gp_XYZ getXYZ(int x, int y) const { return SMESH_MeshEditor::TNodeXYZ( getNode( x, y )); }
gp_XYZ getXYZ(int x, int y) const { return SMESH_TNodeXYZ( getNode( x, y )); }
//!< Return gravity center of the four corners and the middle node
gp_XYZ getGC() const
{
@ -276,7 +276,7 @@ namespace
//!< return coordinates by XY
gp_XYZ xyz(int x, int y) const
{
return SMESH_MeshEditor::TNodeXYZ( _grid_access_(_side, _index( x, y )) );
return SMESH_TNodeXYZ( _grid_access_(_side, _index( x, y )) );
}
//!< safely return a node by XY
const SMDS_MeshNode* node(int x, int y) const
@ -745,7 +745,7 @@ namespace
gp_Vec p1p2( p1, p2 );
const SMDS_MeshElement* face1 = side1->getCornerFace( n1 );
gp_XYZ p1Op = SMESH_MeshEditor::TNodeXYZ( oppositeNode( face1, face1->GetNodeIndex(n1)));
gp_XYZ p1Op = SMESH_TNodeXYZ( oppositeNode( face1, face1->GetNodeIndex(n1)));
gp_Vec side1Dir( p1, p1Op );
gp_Ax2 pln( p1, p1p2, side1Dir ); // plane with normal p1p2 and X dir side1Dir
_DUMP_(" Select adjacent for "<< side1._side << " - side dir ("
@ -756,7 +756,7 @@ namespace
{
_BlockSide* sideI = *sideIt;
const SMDS_MeshElement* faceI = sideI->getCornerFace( n1 );
gp_XYZ p1Op = SMESH_MeshEditor::TNodeXYZ( oppositeNode( faceI, faceI->GetNodeIndex(n1)));
gp_XYZ p1Op = SMESH_TNodeXYZ( oppositeNode( faceI, faceI->GetNodeIndex(n1)));
gp_Vec sideIDir( p1, p1Op );
// compute angle of (sideIDir projection to pln) and (X dir of pln)
gp_Vec2d sideIDirProj( sideIDir * pln.XDirection(), sideIDir * pln.YDirection());

View File

@ -189,7 +189,7 @@ namespace
}
gp_XYZ GetXYZ(int iCol, int iRow) const
{
return SMESH_MeshEditor::TNodeXYZ( GetNode( iCol, iRow ));
return SMESH_TNodeXYZ( GetNode( iCol, iRow ));
}
};

View File

@ -633,8 +633,8 @@ bool StdMeshers_Import_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & th
subShapeIDs.insert( shapeID );
// get nodes on vertices
list < SMESH_MeshEditor::TNodeXYZ > vertexNodes;
list < SMESH_MeshEditor::TNodeXYZ >::iterator vNIt;
list < SMESH_TNodeXYZ > vertexNodes;
list < SMESH_TNodeXYZ >::iterator vNIt;
TopExp_Explorer vExp( theShape, TopAbs_VERTEX );
for ( ; vExp.More(); vExp.Next() )
{
@ -648,7 +648,7 @@ bool StdMeshers_Import_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & th
n = SMESH_Algo::VertexNode( v, tgtMesh );
if ( !n ) return false; // very strange
}
vertexNodes.push_back( SMESH_MeshEditor::TNodeXYZ( n ));
vertexNodes.push_back( SMESH_TNodeXYZ( n ));
}
// import edges from groups
@ -989,8 +989,8 @@ bool StdMeshers_Import_1D::Evaluate(SMESH_Mesh & theMesh,
const SMDS_MeshElement* edge = srcElems->next();
// find out if edge is located on geomEdge by projecting
// a middle of edge to geomEdge
SMESH_MeshEditor::TNodeXYZ p1( edge->GetNode(0));
SMESH_MeshEditor::TNodeXYZ p2( edge->GetNode(1));
SMESH_TNodeXYZ p1( edge->GetNode(0));
SMESH_TNodeXYZ p2( edge->GetNode(1));
gp_XYZ middle = ( p1 + p2 ) / 2.;
tmpNode->setXYZ( middle.X(), middle.Y(), middle.Z());
double u = 0;

View File

@ -161,8 +161,8 @@ bool StdMeshers_Import_1D2D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape &
subShapeIDs.insert( shapeID );
// get nodes on vertices
list < SMESH_MeshEditor::TNodeXYZ > vertexNodes;
list < SMESH_MeshEditor::TNodeXYZ >::iterator vNIt;
list < SMESH_TNodeXYZ > vertexNodes;
list < SMESH_TNodeXYZ >::iterator vNIt;
TopExp_Explorer exp( theShape, TopAbs_VERTEX );
for ( ; exp.More(); exp.Next() )
{
@ -176,7 +176,7 @@ bool StdMeshers_Import_1D2D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape &
n = SMESH_Algo::VertexNode( v, tgtMesh );
if ( !n ) return false; // very strange
}
vertexNodes.push_back( SMESH_MeshEditor::TNodeXYZ( n ));
vertexNodes.push_back( SMESH_TNodeXYZ( n ));
}
// to count now many times a link between nodes encounters
@ -269,9 +269,9 @@ bool StdMeshers_Import_1D2D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape &
int iNext = helper.WrapIndex( iNode+1, face->NbCornerNodes() );
int iPrev = helper.WrapIndex( iNode-1, face->NbCornerNodes() );
SMESH_MeshEditor::TNodeXYZ prevNode( newNodes[iPrev] );
SMESH_MeshEditor::TNodeXYZ curNode ( newNodes[iNode] );
SMESH_MeshEditor::TNodeXYZ nextNode( newNodes[iNext] );
SMESH_TNodeXYZ prevNode( newNodes[iPrev] );
SMESH_TNodeXYZ curNode ( newNodes[iNode] );
SMESH_TNodeXYZ nextNode( newNodes[iNext] );
gp_Vec n1n0( prevNode - curNode);
gp_Vec n1n2( nextNode - curNode );
gp_Vec meshNorm = n1n2 ^ n1n0;
@ -529,7 +529,7 @@ bool StdMeshers_Import_1D2D::Evaluate(SMESH_Mesh & theMesh,
else
{
// std-like iterator used to get coordinates of nodes of mesh element
typedef SMDS_StdIterator< SMESH_MeshEditor::TNodeXYZ, SMDS_ElemIteratorPtr > TXyzIterator;
typedef SMDS_StdIterator< SMESH_TNodeXYZ, SMDS_ElemIteratorPtr > TXyzIterator;
SMESH_MesherHelper helper(theMesh);
helper.SetSubShape(theShape);

View File

@ -35,7 +35,6 @@
#include "SMESH_Block.hxx"
#include "SMESH_Gen.hxx"
#include "SMESH_Hypothesis.hxx"
#include "SMESH_IndexedDataMapOfShapeIndexedMapOfShape.hxx"
#include "SMESH_Mesh.hxx"
#include "SMESH_MesherHelper.hxx"
#include "SMESH_subMesh.hxx"
@ -56,6 +55,7 @@
#include <TopTools_Array1OfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
@ -1505,7 +1505,7 @@ StdMeshers_ProjectionUtils::GetPropagationEdge( SMESH_Mesh* aMesh,
const TopoDS_Edge& theEdge,
const TopoDS_Edge& fromEdge)
{
SMESH_IndexedMapOfShape aChain;
TopTools_IndexedMapOfShape aChain;
int step = 0;
// List of edges, added to chain on the previous cycle pass

View File

@ -398,7 +398,7 @@ namespace {
SMDS_NodeIteratorPtr nIt = srcSmds->GetNodes();
while ( nIt->more() )
{
SMESH_MeshEditor::TNodeXYZ p ( nIt->next());
SMESH_TNodeXYZ p ( nIt->next());
bool pOK = false;
switch ( srcPP.size() )
{
@ -438,7 +438,7 @@ namespace {
while ( nItT->more() && !pOK )
{
const SMDS_MeshNode* n = nItT->next();
tgtP = SMESH_MeshEditor::TNodeXYZ( n );
tgtP = SMESH_TNodeXYZ( n );
pOK = ( fabs( srcDist - tgtPP[0].Distance( tgtP )) < 2*eTol );
//cout << "E - nS " << p._node->GetID() << " - nT " << n->GetID()<< " OK - " << pOK<< " " << fabs( srcDist - tgtPP[0].Distance( tgtP ))<< " tol " << eTol<< endl;
}
@ -491,13 +491,13 @@ namespace {
if ( !tgtEdge.IsPartner( srcEdge.Current() ))
{
// check that transformation is OK by three nodes
gp_Pnt p0S = SMESH_MeshEditor::TNodeXYZ( (srcNodes.begin()) ->second);
gp_Pnt p1S = SMESH_MeshEditor::TNodeXYZ( (srcNodes.rbegin()) ->second);
gp_Pnt p2S = SMESH_MeshEditor::TNodeXYZ( (++srcNodes.begin())->second);
gp_Pnt p0S = SMESH_TNodeXYZ( (srcNodes.begin()) ->second);
gp_Pnt p1S = SMESH_TNodeXYZ( (srcNodes.rbegin()) ->second);
gp_Pnt p2S = SMESH_TNodeXYZ( (++srcNodes.begin())->second);
gp_Pnt p0T = SMESH_MeshEditor::TNodeXYZ( (tgtNodes.begin()) ->second);
gp_Pnt p1T = SMESH_MeshEditor::TNodeXYZ( (tgtNodes.rbegin()) ->second);
gp_Pnt p2T = SMESH_MeshEditor::TNodeXYZ( (++tgtNodes.begin())->second);
gp_Pnt p0T = SMESH_TNodeXYZ( (tgtNodes.begin()) ->second);
gp_Pnt p1T = SMESH_TNodeXYZ( (tgtNodes.rbegin()) ->second);
gp_Pnt p2T = SMESH_TNodeXYZ( (++tgtNodes.begin())->second);
// transform source points, they must coincide with target ones
if ( p0T.SquareDistance( p0S.Transformed( trsf )) > tol ||

View File

@ -47,7 +47,7 @@ using namespace std;
enum EQuadNature { NOT_QUAD, QUAD, DEGEN_QUAD, PYRAM_APEX = 4, TRIA_APEX = 0 };
// std-like iterator used to get coordinates of nodes of mesh element
typedef SMDS_StdIterator< SMESH_MeshEditor::TNodeXYZ, SMDS_ElemIteratorPtr > TXyzIterator;
typedef SMDS_StdIterator< SMESH_TNodeXYZ, SMDS_ElemIteratorPtr > TXyzIterator;
namespace
{
@ -99,10 +99,10 @@ namespace
if ( !baseNodes[1] ) return false; // not adjacent
// Get normals of triangles sharing baseNodes
gp_XYZ apexI = SMESH_MeshEditor::TNodeXYZ( nApexI );
gp_XYZ apexJ = SMESH_MeshEditor::TNodeXYZ( nApexJ );
gp_XYZ base1 = SMESH_MeshEditor::TNodeXYZ( baseNodes[0]);
gp_XYZ base2 = SMESH_MeshEditor::TNodeXYZ( baseNodes[1]);
gp_XYZ apexI = SMESH_TNodeXYZ( nApexI );
gp_XYZ apexJ = SMESH_TNodeXYZ( nApexJ );
gp_XYZ base1 = SMESH_TNodeXYZ( baseNodes[0]);
gp_XYZ base2 = SMESH_TNodeXYZ( baseNodes[1]);
gp_Vec baseVec( base1, base2 );
gp_Vec baI( base1, apexI );
gp_Vec baJ( base1, apexJ );
@ -160,7 +160,7 @@ namespace
continue; // f is a base quadrangle
// check projections of face direction (baOFN) to triange normals (nI and nJ)
gp_Vec baOFN( base1, SMESH_MeshEditor::TNodeXYZ( otherFaceNode ));
gp_Vec baOFN( base1, SMESH_TNodeXYZ( otherFaceNode ));
( isOutI ? nJ : nI ).Reverse();
if ( nI * baOFN > 0 && nJ * baOFN > 0 )
{
@ -186,13 +186,13 @@ void StdMeshers_QuadToTriaAdaptor::MergePiramids( const SMDS_MeshElement* Pr
{
const SMDS_MeshNode* Nrem = PrmJ->GetNode(4); // node to remove
int nbJ = Nrem->NbInverseElements( SMDSAbs_Volume );
SMESH_MeshEditor::TNodeXYZ Pj( Nrem );
SMESH_TNodeXYZ Pj( Nrem );
// an apex node to make common to all merged pyramids
SMDS_MeshNode* CommonNode = const_cast<SMDS_MeshNode*>(PrmI->GetNode(4));
if ( CommonNode == Nrem ) return; // already merged
int nbI = CommonNode->NbInverseElements( SMDSAbs_Volume );
SMESH_MeshEditor::TNodeXYZ Pi( CommonNode );
SMESH_TNodeXYZ Pi( CommonNode );
gp_XYZ Pnew = ( nbI*Pi + nbJ*Pj ) / (nbI+nbJ);
CommonNode->setXYZ( Pnew.X(), Pnew.Y(), Pnew.Z() );
@ -471,22 +471,13 @@ bool StdMeshers_QuadToTriaAdaptor::CheckIntersection (const gp_Pnt& P,
vector< const SMDS_MeshElement* > suspectElems;
searcher->GetElementsNearLine( line, SMDSAbs_Face, suspectElems);
// for (TopExp_Explorer exp(aShape,TopAbs_FACE);exp.More();exp.Next()) {
// const TopoDS_Shape& aShapeFace = exp.Current();
// if(aShapeFace==NotCheckedFace)
// continue;
// const SMESHDS_SubMesh * aSubMeshDSFace = meshDS->MeshElements(aShapeFace);
// if ( aSubMeshDSFace ) {
// SMDS_ElemIteratorPtr iteratorElem = aSubMeshDSFace->GetElements();
// while ( iteratorElem->more() ) { // loop on elements on a face
// const SMDS_MeshElement* face = iteratorElem->next();
for ( int i = 0; i < suspectElems.size(); ++i )
{
const SMDS_MeshElement* face = suspectElems[i];
if ( face == NotCheckedFace ) continue;
Handle(TColgp_HSequenceOfPnt) aContour = new TColgp_HSequenceOfPnt;
for ( int i = 0; i < face->NbCornerNodes(); ++i )
aContour->Append( SMESH_MeshEditor::TNodeXYZ( face->GetNode(i) ));
aContour->Append( SMESH_TNodeXYZ( face->GetNode(i) ));
if( HasIntersection(P, PC, Pres, aContour) ) {
res = true;
double tmp = PC.Distance(Pres);
@ -524,7 +515,6 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement* face
{
if( face->NbCornerNodes() != 4 )
{
//myNbTriangles += int( face->NbCornerNodes() == 3 );
return NOT_QUAD;
}
@ -532,12 +522,11 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement* face
gp_XYZ xyzC(0., 0., 0.);
for ( i = 0; i < 4; ++i )
{
gp_XYZ p = SMESH_MeshEditor::TNodeXYZ( FNodes[i] = face->GetNode(i) );
gp_XYZ p = SMESH_TNodeXYZ( FNodes[i] = face->GetNode(i) );
PN->SetValue( i+1, p );
xyzC += p;
}
PC = xyzC/4;
//cout<<" PC("<<PC.X()<<","<<PC.Y()<<","<<PC.Z()<<")"<<endl;
int nbp = 4;
@ -885,7 +874,7 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh)
if(F==face) continue;
Handle(TColgp_HSequenceOfPnt) aContour = new TColgp_HSequenceOfPnt;
for ( int i = 0; i < 4; ++i )
aContour->Append( SMESH_MeshEditor::TNodeXYZ( F->GetNode(i) ));
aContour->Append( SMESH_TNodeXYZ( F->GetNode(i) ));
gp_Pnt PPP;
if( !volumes[0] && HasIntersection(Ptmp1, PC, PPP, aContour) ) {
IsOK1 = true;
@ -973,7 +962,7 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh)
Handle(TColgp_HSequenceOfPnt) aContour = new TColgp_HSequenceOfPnt;
int nbN = F->NbNodes() / ( F->IsQuadratic() ? 2 : 1 );
for ( i = 0; i < nbN; ++i )
aContour->Append( SMESH_MeshEditor::TNodeXYZ( F->GetNode(i) ));
aContour->Append( SMESH_TNodeXYZ( F->GetNode(i) ));
gp_Pnt intP;
for ( int isRev = 0; isRev < 2; ++isRev )
{
@ -1065,7 +1054,7 @@ bool StdMeshers_QuadToTriaAdaptor::Compute2ndPart(SMESH_Mesh&
for(k=0; k<5; k++) // loop on 4 base nodes of PrmI
{
const SMDS_MeshNode* n = PrmI->GetNode(k);
PsI[k] = SMESH_MeshEditor::TNodeXYZ( n );
PsI[k] = SMESH_TNodeXYZ( n );
SMDS_ElemIteratorPtr vIt = n->GetInverseElementIterator( SMDSAbs_Volume );
while ( vIt->more() )
checkedPyrams.insert( vIt->next() );

View File

@ -1288,7 +1288,7 @@ void _ViscousBuilder::limitStepSize( _SolidData& data,
if ( nextN->GetPosition()->GetTypeOfPosition() == SMDS_TOP_FACE ||
curN->GetPosition()->GetTypeOfPosition() == SMDS_TOP_FACE )
{
double dist = SMESH_MeshEditor::TNodeXYZ( face->GetNode(i)).Distance( nextN );
double dist = SMESH_TNodeXYZ( face->GetNode(i)).Distance( nextN );
if ( dist < minSize )
minSize = dist, iN = i;
}
@ -1317,7 +1317,7 @@ void _ViscousBuilder::limitStepSize( _SolidData& data, const double minSize)
if ( data._stepSizeNodes[0] )
{
double dist =
SMESH_MeshEditor::TNodeXYZ(data._stepSizeNodes[0]).Distance(data._stepSizeNodes[1]);
SMESH_TNodeXYZ(data._stepSizeNodes[0]).Distance(data._stepSizeNodes[1]);
data._stepSizeCoeff = data._stepSize / dist;
}
}
@ -1604,7 +1604,7 @@ bool _ViscousBuilder::setEdgeData(_LayerEdge& edge,
}
else
{
edge._pos.push_back( SMESH_MeshEditor::TNodeXYZ( node ));
edge._pos.push_back( SMESH_TNodeXYZ( node ));
if ( posType == SMDS_TOP_FACE )
{
@ -1612,7 +1612,7 @@ bool _ViscousBuilder::setEdgeData(_LayerEdge& edge,
double avgNormProj = 0, avgLen = 0;
for ( unsigned i = 0; i < edge._simplices.size(); ++i )
{
gp_XYZ vec = edge._pos.back() - SMESH_MeshEditor::TNodeXYZ( edge._simplices[i]._nPrev );
gp_XYZ vec = edge._pos.back() - SMESH_TNodeXYZ( edge._simplices[i]._nPrev );
avgNormProj += edge._normal * vec;
avgLen += vec.Modulus();
}
@ -1702,9 +1702,9 @@ void _LayerEdge::SetDataByNeighbors( const SMDS_MeshNode* n1,
if ( _nodes[0]->GetPosition()->GetTypeOfPosition() != SMDS_TOP_EDGE )
return;
gp_XYZ pos = SMESH_MeshEditor::TNodeXYZ( _nodes[0] );
gp_XYZ vec1 = pos - SMESH_MeshEditor::TNodeXYZ( n1 );
gp_XYZ vec2 = pos - SMESH_MeshEditor::TNodeXYZ( n2 );
gp_XYZ pos = SMESH_TNodeXYZ( _nodes[0] );
gp_XYZ vec1 = pos - SMESH_TNodeXYZ( n1 );
gp_XYZ vec2 = pos - SMESH_TNodeXYZ( n2 );
// Set _curvature
@ -1845,7 +1845,7 @@ void _ViscousBuilder::makeGroupOfLE()
for ( unsigned j = 0 ; j < _sdVec[i]._edges.size(); ++j )
{
_LayerEdge& edge = *_sdVec[i]._edges[j];
SMESH_MeshEditor::TNodeXYZ nXYZ( edge._nodes[0] );
SMESH_TNodeXYZ nXYZ( edge._nodes[0] );
nXYZ += edge._normal * _sdVec[i]._stepSize;
dumpCmd(SMESH_Comment("mesh.AddEdge([ ") <<edge._nodes[0]->GetID()
<< ", mesh.AddNode( " << nXYZ.X()<<","<< nXYZ.Y()<<","<< nXYZ.Z()<<")])");
@ -1978,7 +1978,7 @@ bool _ViscousBuilder::inflate(_SolidData& data)
limitStepSize( data, 0.25 * distToIntersection );
if ( data._stepSizeNodes[0] )
data._stepSize = data._stepSizeCoeff *
SMESH_MeshEditor::TNodeXYZ(data._stepSizeNodes[0]).Distance(data._stepSizeNodes[1]);
SMESH_TNodeXYZ(data._stepSizeNodes[0]).Distance(data._stepSizeNodes[1]);
}
if (nbSteps == 0 )
@ -2067,7 +2067,7 @@ bool _ViscousBuilder::smoothAndCheck(_SolidData& data,
for ( int i = iBeg; i < iEnd; ++i )
{
_LayerEdge* edge = data._edges[i];
SMESH_MeshEditor::TNodeXYZ tgtXYZ( edge->_nodes.back() );
SMESH_TNodeXYZ tgtXYZ( edge->_nodes.back() );
for ( unsigned j = 0; j < edge->_simplices.size(); ++j )
if ( !edge->_simplices[j].IsForward( edge->_nodes[0], &tgtXYZ ))
{
@ -2473,7 +2473,7 @@ gp_Ax1 _LayerEdge::LastSegment(double& segLen) const
gp_Ax1 segDir;
if ( iPrev < 0 )
{
segDir.SetLocation( SMESH_MeshEditor::TNodeXYZ( _nodes[0] ));
segDir.SetLocation( SMESH_TNodeXYZ( _nodes[0] ));
segDir.SetDirection( _normal );
segLen = 0;
}
@ -2494,7 +2494,7 @@ gp_Ax1 _LayerEdge::LastSegment(double& segLen) const
Handle(Geom_Surface) surface = BRep_Tool::Surface( TopoDS::Face(_sWOL), loc );
pPrev = surface->Value( pPrev.X(), pPrev.Y() ).Transformed( loc );
}
dir = SMESH_MeshEditor::TNodeXYZ( _nodes.back() ) - pPrev.XYZ();
dir = SMESH_TNodeXYZ( _nodes.back() ) - pPrev.XYZ();
}
segDir.SetLocation( pPrev );
segDir.SetDirection( dir );
@ -2524,9 +2524,9 @@ bool _LayerEdge::SegTriaInter( const gp_Ax1& lastSegment,
gp_XYZ orig = lastSegment.Location().XYZ();
gp_XYZ dir = lastSegment.Direction().XYZ();
SMESH_MeshEditor::TNodeXYZ vert0( n0 );
SMESH_MeshEditor::TNodeXYZ vert1( n1 );
SMESH_MeshEditor::TNodeXYZ vert2( n2 );
SMESH_TNodeXYZ vert0( n0 );
SMESH_TNodeXYZ vert1( n1 );
SMESH_TNodeXYZ vert2( n2 );
/* calculate distance from vert0 to ray origin */
gp_XYZ tvec = orig - vert0;
@ -2607,11 +2607,11 @@ bool _LayerEdge::SmoothOnEdge(Handle(Geom_Surface)& surface,
ASSERT( IsOnEdge() );
SMDS_MeshNode* tgtNode = const_cast<SMDS_MeshNode*>( _nodes.back() );
SMESH_MeshEditor::TNodeXYZ oldPos( tgtNode );
SMESH_TNodeXYZ oldPos( tgtNode );
double dist01, distNewOld;
SMESH_MeshEditor::TNodeXYZ p0( _2neibors->_nodes[0]);
SMESH_MeshEditor::TNodeXYZ p1( _2neibors->_nodes[1]);
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];
@ -2629,7 +2629,7 @@ bool _LayerEdge::SmoothOnEdge(Handle(Geom_Surface)& surface,
if ( _2neibors->_plnNorm )
{
// put newPos on the plane defined by source node and _plnNorm
gp_XYZ new2src = SMESH_MeshEditor::TNodeXYZ( _nodes[0] ) - newPos.XYZ();
gp_XYZ new2src = SMESH_TNodeXYZ( _nodes[0] ) - newPos.XYZ();
double new2srcProj = (*_2neibors->_plnNorm) * new2src;
newPos.ChangeCoord() += (*_2neibors->_plnNorm) * new2srcProj;
}
@ -2675,7 +2675,7 @@ bool _LayerEdge::Smooth(int& badNb)
// compute new position for the last _pos
gp_XYZ newPos (0,0,0);
for ( unsigned i = 0; i < _simplices.size(); ++i )
newPos += SMESH_MeshEditor::TNodeXYZ( _simplices[i]._nPrev );
newPos += SMESH_TNodeXYZ( _simplices[i]._nPrev );
newPos /= _simplices.size();
if ( _curvature )
@ -2696,7 +2696,7 @@ bool _LayerEdge::Smooth(int& badNb)
// }
// count quality metrics (orientation) of tetras around _tgtNode
int nbOkBefore = 0;
SMESH_MeshEditor::TNodeXYZ tgtXYZ( _nodes.back() );
SMESH_TNodeXYZ tgtXYZ( _nodes.back() );
for ( unsigned i = 0; i < _simplices.size(); ++i )
nbOkBefore += _simplices[i].IsForward( _nodes[0], &tgtXYZ );
@ -2709,7 +2709,7 @@ bool _LayerEdge::Smooth(int& badNb)
SMDS_MeshNode* n = const_cast< SMDS_MeshNode* >( _nodes.back() );
_len -= prevPos.Distance(SMESH_MeshEditor::TNodeXYZ( n ));
_len -= prevPos.Distance(SMESH_TNodeXYZ( n ));
_len += prevPos.Distance(newPos);
n->setXYZ( newPos.X(), newPos.Y(), newPos.Z());
@ -2737,7 +2737,7 @@ void _LayerEdge::SetNewLength( double len, SMESH_MesherHelper& helper )
}
SMDS_MeshNode* n = const_cast< SMDS_MeshNode*>( _nodes.back() );
SMESH_MeshEditor::TNodeXYZ oldXYZ( n );
SMESH_TNodeXYZ oldXYZ( n );
gp_XYZ nXYZ = oldXYZ + _normal * ( len - _len ) * _lenFactor;
n->setXYZ( nXYZ.X(), nXYZ.Y(), nXYZ.Z() );