X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHUtils%2FSMESH_TypeDefs.hxx;h=0dbdd74226f2f5ef47a19b241e021a0b25823b07;hb=c889773a15495b7c12da2367c88ba5687a73e06f;hp=e43222958180dcba52de3ef7d1bc596415a57189;hpb=d4a710ce52f6e76786a7b3845e2f7975dc9a00b1;p=modules%2Fsmesh.git diff --git a/src/SMESHUtils/SMESH_TypeDefs.hxx b/src/SMESHUtils/SMESH_TypeDefs.hxx index e43222958..0dbdd7422 100644 --- a/src/SMESHUtils/SMESH_TypeDefs.hxx +++ b/src/SMESHUtils/SMESH_TypeDefs.hxx @@ -60,6 +60,12 @@ namespace SMESHUtils TVECTOR v2; vec.swap( v2 ); } + template + void CompactVector(TVECTOR& vec) + { + TVECTOR v2( vec ); + vec.swap( v2 ); + } } //======================================================================= @@ -99,13 +105,13 @@ struct SMESH_OrientedLink: public SMESH_TLink struct SMESH_TNodeXYZ : public gp_XYZ { const SMDS_MeshNode* _node; + double _xyz[3]; SMESH_TNodeXYZ( const SMDS_MeshElement* e):gp_XYZ(0,0,0),_node(0) { if (e) { assert( e->GetType() == SMDSAbs_Node ); _node = static_cast(e); - double xyz[3]; - _node->GetXYZ(xyz); // - thread safe gatting coords - SetCoord( xyz[0], xyz[1], xyz[2] ); + _node->GetXYZ(_xyz); // - thread safe getting coords + SetCoord( _xyz[0], _xyz[1], _xyz[2] ); } } double Distance(const SMDS_MeshNode* n) const { return (SMESH_TNodeXYZ( n )-*this).Modulus(); } @@ -113,6 +119,28 @@ struct SMESH_TNodeXYZ : public gp_XYZ bool operator==(const SMESH_TNodeXYZ& other) const { return _node == other._node; } }; +//-------------------------------------------------- +/*! + * \brief Data of a node generated on FACE boundary + */ +//-------------------------------------------------- +typedef struct uvPtStruct +{ + double param; + double normParam; + double u, v; // original 2d parameter + double x, y; // 2d parameter, normalized [0,1] + const SMDS_MeshNode * node; + + struct NodeAccessor // accessor to iterate on nodes in UVPtStructVec + { + static const SMDS_MeshNode* value(std::vector< uvPtStruct >::const_iterator it) + { return it->node; } + }; +} UVPtStruct; + +typedef std::vector< UVPtStruct > UVPtStructVec; + // -------------------------------------------------------------------------------- // class SMESH_SequenceOfElemPtr #include