+ static int ShapeIndex( int theShapeID )
+ {
+ if ( IsVertexID( theShapeID )) return theShapeID - ID_V000;
+ if ( IsEdgeID( theShapeID )) return theShapeID - ID_Ex00;
+ if ( IsFaceID( theShapeID )) return theShapeID - ID_Fxy0;
+ return 0;
+ }
+ // return index [0-...] for each type of sub-shapes,
+ // for example :
+ // ShapeIndex( ID_Ex00 ) == 0
+ // ShapeIndex( ID_Ex10 ) == 1
+
+ static void GetFaceEdgesIDs (const int faceID, vector< int >& edgeVec );
+ // return edges IDs of a face in the order u0, u1, 0v, 1v
+
+ static void GetEdgeVertexIDs (const int edgeID, vector< int >& vertexVec );
+ // return vertex IDs of an edge
+
+ static int GetCoordIndOnEdge (const int theEdgeID)
+ { return (theEdgeID < ID_E0y0) ? 1 : (theEdgeID < ID_E00z) ? 2 : 3; }
+ // return an index of a coordinate which varies along the edge
+
+ static double* GetShapeCoef (const int theShapeID);
+ // for theShapeID( TShapeID ), returns 3 coefficients used
+ // to compute an addition of an on-theShape point to coordinates
+ // of an in-shell point. If an in-shell point has parameters (Px,Py,Pz),
+ // then the addition of a point P is computed as P*kx*ky*kz and ki is
+ // defined by the returned coef like this:
+ // ki = (coef[i] == 0) ? 1 : (coef[i] < 0) ? 1 - Pi : Pi
+
+ static int GetShapeIDByParams ( const gp_XYZ& theParams );
+ // define an id of the block sub-shape by point parameters
+
+ static ostream& DumpShapeID (const int theBlockShapeID, ostream& stream);
+ // DEBUG: dump an id of a block sub-shape
+
+
+ public: // initialization