+//=======================================================================
+//function : VertexParameters
+//purpose : return parameters of a vertex given by TShapeID
+//=======================================================================
+
+bool SMESH_Block::VertexParameters(const int theVertexID, gp_XYZ& theParams)
+{
+ switch ( theVertexID ) {
+ case ID_V000: theParams.SetCoord(0., 0., 0.); return true;
+ case ID_V100: theParams.SetCoord(1., 0., 0.); return true;
+ case ID_V110: theParams.SetCoord(1., 1., 0.); return true;
+ case ID_V010: theParams.SetCoord(0., 1., 0.); return true;
+ default:;
+ }
+ return false;
+}
+
+//=======================================================================
+//function : EdgeParameters
+//purpose : return parameters of a point given by theU on edge
+//=======================================================================
+
+bool SMESH_Block::EdgeParameters(const int theEdgeID, const double theU, gp_XYZ& theParams)
+{
+ if ( IsEdgeID( theEdgeID )) {
+ vector< int > vertexVec;
+ GetEdgeVertexIDs( theEdgeID, vertexVec );
+ VertexParameters( vertexVec[0], theParams );
+ TEdge& e = myEdge[ theEdgeID - ID_Ex00 ];
+ double param = ( theU - e.myFirst ) / ( e.myLast - e.myFirst );
+ theParams.SetCoord( e.myCoordInd, param );
+ return true;
+ }
+ return false;
+}
+