const int theNode001Index,
vector<const SMDS_MeshNode*>& theOrderedNodes)
{
const int theNode001Index,
vector<const SMDS_MeshNode*>& theOrderedNodes)
{
//function : LoadBlockShapes
//purpose : Initialize block geometry with theShell,
// add sub-shapes of theBlock to theShapeIDMap so that they get
//function : LoadBlockShapes
//purpose : Initialize block geometry with theShell,
// add sub-shapes of theBlock to theShapeIDMap so that they get
//=======================================================================
bool SMESH_Block::LoadBlockShapes(const TopoDS_Shell& theShell,
//=======================================================================
bool SMESH_Block::LoadBlockShapes(const TopoDS_Shell& theShell,
const TopoDS_Vertex& theVertex001,
TopTools_IndexedMapOfOrientedShape& theShapeIDMap )
{
const TopoDS_Vertex& theVertex001,
TopTools_IndexedMapOfOrientedShape& theShapeIDMap )
{
return ( FindBlockShapes( theShell, theVertex000, theVertex001, theShapeIDMap ) &&
LoadBlockShapes( theShapeIDMap ));
}
return ( FindBlockShapes( theShell, theVertex000, theVertex001, theShapeIDMap ) &&
LoadBlockShapes( theShapeIDMap ));
}
//=======================================================================
//function : LoadBlockShapes
//purpose : add sub-shapes of theBlock to theShapeIDMap so that they get
//=======================================================================
//function : LoadBlockShapes
//purpose : add sub-shapes of theBlock to theShapeIDMap so that they get
//=======================================================================
bool SMESH_Block::FindBlockShapes(const TopoDS_Shell& theShell,
//=======================================================================
bool SMESH_Block::FindBlockShapes(const TopoDS_Shell& theShell,
const TopoDS_Vertex& theVertex001,
TopTools_IndexedMapOfOrientedShape& theShapeIDMap )
{
const TopoDS_Vertex& theVertex001,
TopTools_IndexedMapOfOrientedShape& theShapeIDMap )
{
// 8 vertices
TopoDS_Shape V000, V100, V010, V110, V001, V101, V011, V111;
// 12 edges
// 8 vertices
TopoDS_Shape V000, V100, V010, V110, V001, V101, V011, V111;
// 12 edges
for ( int i = 1; i <= 8; i++ ) {
const TopoDS_Vertex& v = TopoDS::Vertex( vfMap.FindKey( i ));
gp_Pnt P = BRep_Tool::Pnt( v );
for ( int i = 1; i <= 8; i++ ) {
const TopoDS_Vertex& v = TopoDS::Vertex( vfMap.FindKey( i ));
gp_Pnt P = BRep_Tool::Pnt( v );
- int i, j, iFound1, iFound2;
+ int i, j, iFound1=0, iFound2=0;
for ( j = 0; f000It.More(); f000It.Next(), j++ )
{
if ( NB_FACES_BY_VERTEX == 6 && j % 2 ) continue; // each face encounters twice
for ( j = 0; f000It.More(); f000It.Next(), j++ )
{
if ( NB_FACES_BY_VERTEX == 6 && j % 2 ) continue; // each face encounters twice