+ int nbZ = columns[0]->size();
+ if ( nbZ < 2 ) return;
+
+ // find out orientation
+ bool isForward = true;
+ SMDS_VolumeTool vTool;
+ int z = 1;
+ switch ( nbNodes ) {
+ case 3: {
+ const SMDS_MeshNode* botNodes[3] = { (*columns[0])[z-1],
+ (*columns[1])[z-1],
+ (*columns[2])[z-1] };
+ const SMDS_MeshNode* topNodes[3] = { (*columns[0])[z],
+ (*columns[1])[z],
+ (*columns[2])[z] };
+ SMDS_VolumeOfNodes tmpVol ( botNodes[0], botNodes[1], botNodes[2],
+ topNodes[0], topNodes[1], topNodes[2]);
+ vTool.Set( &tmpVol );
+ isForward = vTool.IsForward();
+ break;
+ }
+ case 4: {
+ const SMDS_MeshNode* botNodes[4] = { (*columns[0])[z-1], (*columns[1])[z-1],
+ (*columns[2])[z-1], (*columns[3])[z-1] };
+ const SMDS_MeshNode* topNodes[4] = { (*columns[0])[z], (*columns[1])[z],
+ (*columns[2])[z], (*columns[3])[z] };
+ SMDS_VolumeOfNodes tmpVol ( botNodes[0], botNodes[1], botNodes[2], botNodes[3],
+ topNodes[0], topNodes[1], topNodes[2], topNodes[3]);
+ vTool.Set( &tmpVol );
+ isForward = vTool.IsForward();
+ break;
+ }
+ }