// - compute the point 3D
// - store the point 3D in SMESHDS, store its ID in 3D structure
- TopoDS_Shell aShell;
- TopExp_Explorer exp(aShape, TopAbs_SHELL);
- if (exp.More())
- {
- aShell = TopoDS::Shell(exp.Current());
- }
- else
- {
- MESSAGE("no shell...");
- ASSERT(0);
- }
+ int shapeID = meshDS->ShapeToIndex( aShape );
Pt3 p000, p001, p010, p011, p100, p101, p110, p111;
Pt3 px00, px01, px10, px11;
SMDS_MeshNode * node = meshDS->AddNode(X[0], X[1], X[2]);
np[ijk].node = node;
- //meshDS->SetNodeInVolume(node, TopoDS::Solid(aShape));
- meshDS->SetNodeInVolume(node, aShell);
+ meshDS->SetNodeInVolume(node, shapeID);
}
}
}
np[n7].node,
np[n6].node);
- meshDS->SetMeshElementOnShape(elt, aShell);
-
-
+ meshDS->SetMeshElementOnShape(elt, shapeID);
}
}
if ( np ) delete [] np;
//printf(" ComputePentahedralMesh HERE\n");
//
bool bOK;
- int iErr;
+ //int iErr;
StdMeshers_Penta_3D anAlgo;
//
bOK=anAlgo.Compute(aMesh, aShape);
typedef map < int, int, less<int> >::iterator \
StdMeshers_IteratorOfDataMapOfIntegerInteger;
-//=======================================================================
-//
-// StdMeshers_Penta_3D
-//
//=======================================================================
//function : StdMeshers_Penta_3D
//purpose :
//
int i, j, ij, ik, i1, i2, aSSID;
//
- TopoDS_Shell aShell;
- TopExp_Explorer aExp;
- //
SMESH_Mesh* pMesh =GetMesh();
SMESHDS_Mesh* meshDS=pMesh->GetMeshDS();
//
- aExp.Init(myShape, TopAbs_SHELL);
- for (; aExp.More(); aExp.Next()){
- aShell=TopoDS::Shell(aExp.Current());
- break;
- }
+ int shapeID = meshDS->ShapeToIndex( myShape );
//
// 1. Set Node In Volume
ik=myISize-1;
aSSID=aTN.ShapeSupportID();
if (aSSID==SMESH_Block::ID_NONE) {
SMDS_MeshNode* aNode=(SMDS_MeshNode*)aTN.Node();
- meshDS->SetNodeInVolume(aNode, aShell);
+ meshDS->SetNodeInVolume(aNode, shapeID);
}
}
}
default:
continue;
}
- meshDS->SetMeshElementOnShape(aV, aShell);
+ meshDS->SetMeshElementOnShape(aV, shapeID);
}
}
}
{
myErrorStatus=0;
//
- int iErr;
+ // int iErr;
double aX, aY, aZ;
//
gp_Pnt aP;