-// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// SMESH SMESH : implementaion of SMESH idl descriptions
}
gp_XYZ GetXYZ(int iCol, int iRow) const
{
- return SMESH_MeshEditor::TNodeXYZ( GetNode( iCol, iRow ));
+ return SMESH_TNodeXYZ( GetNode( iCol, iRow ));
}
};
const TopoDS_Edge& baseE = baseQuadSide->Edge( iE );
eOri[ iE ] = baseE.Orientation();
- // assure correctness of node positions on baseE
+ // assure correctness of node positions on baseE:
+ // helper.GetNodeU() will fix positions if they are wrong
if ( SMESHDS_SubMesh* smDS = meshDS->MeshElements( baseE ))
{
bool ok;
append( aCubeSide[i]._u2nodesMap, u2nodesMap.rbegin(), u2nodesMap.rend());
}
}
+ // check if the loaded grid corresponds to nb of quadrangles
+ const SMESHDS_SubMesh* faceSubMesh =
+ proxymesh ? proxymesh->GetSubMesh( F ) : meshDS->MeshElements( F );
+ const int nbQuads = faceSubMesh->NbElements();
+ const int nbHor = aCubeSide[i]._u2nodesMap.size() - 1;
+ const int nbVer = aCubeSide[i]._u2nodesMap.begin()->second.size() - 1;
+ if ( nbQuads != nbHor * nbVer )
+ {
+ SMESH_ComputeErrorPtr err = ComputePentahedralMesh(aMesh, aShape, proxymesh.get());
+ return error( err );
+ }
}
// Orient loaded grids of cube sides along axis of the unitary cube coord system