#include <StdMeshers_Penta_3D.hxx>
Public Member Functions | |
| StdMeshers_SMESHBlock () | |
| void | Load (const TopoDS_Shell &theShell) |
| void | Load (const TopoDS_Shell &theShell, const TopoDS_Vertex &theV000, const TopoDS_Vertex &theV001) |
| void | ComputeParameters (const gp_Pnt &thePnt, gp_XYZ &theXYZ) |
| void | ComputeParameters (const gp_Pnt &thePnt, const TopoDS_Shape &theShape, gp_XYZ &theXYZ) |
| void | ComputeParameters (const double &theU, const TopoDS_Shape &theShape, gp_XYZ &theXYZ) |
| void | Point (const gp_XYZ &theParams, gp_Pnt &thePnt) |
| void | Point (const gp_XYZ &theParams, const TopoDS_Shape &theShape, gp_Pnt &thePnt) |
| int | ShapeID (const TopoDS_Shape &theShape) |
| const TopoDS_Shape & | Shape (const int theID) |
| SMESH_Block & | Block () |
| bool | IsForwadEdge (const int theEdgeID) |
| int | ErrorStatus () const |
| SMESH_ComputeErrorPtr | GetError () const |
| Return problem description. | |
Protected Attributes | |
| TopoDS_Shell | myShell |
| TopTools_IndexedMapOfOrientedShape | myShapeIDMap |
| SMESH_Block | myTBlock |
| TopoDS_Shape | myEmptyShape |
| std::vector< int > | myIsEdgeForward |
| int | myErrorStatus |
Definition at line 53 of file StdMeshers_Penta_3D.hxx.
| StdMeshers_SMESHBlock::StdMeshers_SMESHBlock | ( | ) |
Definition at line 1604 of file StdMeshers_Penta_3D.cxx.
References myErrorStatus, myIsEdgeForward, and SMESH_Block.NbEdges().
{
myErrorStatus=1;
myIsEdgeForward.resize( SMESH_Block::NbEdges(), -1 );
}
| SMESH_Block& StdMeshers_SMESHBlock.Block | ( | ) |
Definition at line 87 of file StdMeshers_Penta_3D.hxx.
Referenced by StdMeshers_Penta_3D.SetHorizEdgeXYZ().
{ return myTBlock; }
| void StdMeshers_SMESHBlock::ComputeParameters | ( | const gp_Pnt & | thePnt, |
| gp_XYZ & | theXYZ | ||
| ) |
Definition at line 1696 of file StdMeshers_Penta_3D.cxx.
References myShell.
Referenced by StdMeshers_Penta_3D.MakeNodes().
{
ComputeParameters(thePnt, myShell, theXYZ);
}
| void StdMeshers_SMESHBlock::ComputeParameters | ( | const gp_Pnt & | thePnt, |
| const TopoDS_Shape & | theShape, | ||
| gp_XYZ & | theXYZ | ||
| ) |
Definition at line 1706 of file StdMeshers_Penta_3D.cxx.
References SMESH_Block.ComputeParameters(), myErrorStatus, myTBlock, and ShapeID().
{
myErrorStatus=0;
//
int aID;
bool bOk;
//
aID = ShapeID(theShape);
if (myErrorStatus) {
return;
}
bOk = myTBlock.ComputeParameters(thePnt, theXYZ, aID);
if (!bOk) {
myErrorStatus=4; // problems with computation Parameters
return;
}
}
| void StdMeshers_SMESHBlock::ComputeParameters | ( | const double & | theU, |
| const TopoDS_Shape & | theShape, | ||
| gp_XYZ & | theXYZ | ||
| ) |
Definition at line 1731 of file StdMeshers_Penta_3D.cxx.
References SMESH_Block.EdgeParameters(), SMESH_Block.IsEdgeID(), myErrorStatus, myTBlock, and ShapeID().
{
myErrorStatus=0;
//
int aID;
bool bOk=false;
//
aID = ShapeID(theShape);
if (myErrorStatus) {
return;
}
if ( SMESH_Block::IsEdgeID( aID ))
bOk = myTBlock.EdgeParameters( aID, theU, theXYZ );
if (!bOk) {
myErrorStatus=4; // problems with computation Parameters
return;
}
}
| int StdMeshers_SMESHBlock::ErrorStatus | ( | ) | const |
Definition at line 1632 of file StdMeshers_Penta_3D.cxx.
References myErrorStatus.
Referenced by StdMeshers_Penta_3D.MakeBlock(), and StdMeshers_Penta_3D.MakeNodes().
{
return myErrorStatus;
}
| SMESH_ComputeErrorPtr StdMeshers_SMESHBlock::GetError | ( | ) | const |
Return problem description.
Definition at line 1643 of file StdMeshers_Penta_3D.cxx.
References myErrorStatus, and SMESH_ComputeError.New().
Referenced by StdMeshers_Penta_3D.MakeBlock(), and StdMeshers_Penta_3D.MakeNodes().
{
SMESH_ComputeErrorPtr err = SMESH_ComputeError::New();
string & text = err->myComment;
switch ( myErrorStatus ) {
case 2:
case 3: text = "Internal error of StdMeshers_Penta_3D"; break;
case 4: text = "Can't compute normalized parameters of a point inside a block"; break;
case 5: text = "Can't compute coordinates by normalized parameters inside a block"; break;
case 6: text = "Can't detect block subshapes. Not a block?"; break;
}
if (!text.empty())
err->myName = myErrorStatus;
return err;
}
Definition at line 1615 of file StdMeshers_Penta_3D.cxx.
References SMESH_Block.IsEdgeID(), SMESH_Block.IsForwardEdge(), myIsEdgeForward, myShapeIDMap, myTBlock, Shape(), and SMESH_Block.ShapeIndex().
Referenced by StdMeshers_Penta_3D.SetHorizEdgeXYZ().
{
int index = myTBlock.ShapeIndex( theEdgeID );
if ( !myTBlock.IsEdgeID( theEdgeID ))
return false;
if ( myIsEdgeForward[ index ] < 0 )
myIsEdgeForward[ index ] =
myTBlock.IsForwardEdge( TopoDS::Edge( Shape( theEdgeID )), myShapeIDMap );
return myIsEdgeForward[ index ];
}
| void StdMeshers_SMESHBlock::Load | ( | const TopoDS_Shell & | theShell, |
| const TopoDS_Vertex & | theV000, | ||
| const TopoDS_Vertex & | theV001 | ||
| ) |
Definition at line 1674 of file StdMeshers_Penta_3D.cxx.
References SMESH_Block.LoadBlockShapes(), myErrorStatus, myShapeIDMap, myShell, and myTBlock.
{
myErrorStatus=0;
//
myShell=theShell;
//
bool bOk;
//
myShapeIDMap.Clear();
bOk = myTBlock.LoadBlockShapes(myShell, theV000, theV001, myShapeIDMap);
if (!bOk) {
myErrorStatus=6;
return;
}
}
| void StdMeshers_SMESHBlock::Load | ( | const TopoDS_Shell & | theShell | ) |
Definition at line 1663 of file StdMeshers_Penta_3D.cxx.
Referenced by StdMeshers_Penta_3D.MakeBlock().
{
TopoDS_Vertex aV000, aV001;
//
Load(theShell, aV000, aV001);
}
| void StdMeshers_SMESHBlock::Point | ( | const gp_XYZ & | theParams, |
| const TopoDS_Shape & | theShape, | ||
| gp_Pnt & | thePnt | ||
| ) |
Definition at line 1767 of file StdMeshers_Penta_3D.cxx.
References SMESH_Block.EdgePoint(), SMESH_Block.FacePoint(), SMESH_Block.IsEdgeID(), SMESH_Block.IsFaceID(), SMESH_Block.IsVertexID(), myErrorStatus, myTBlock, ShapeID(), SMESH_Block.ShellPoint(), and SMESH_Block.VertexPoint().
{
myErrorStatus = 0;
//
int aID;
bool bOk = false;
gp_XYZ aXYZ(99.,99.,99.);
aP3D.SetXYZ(aXYZ);
//
if (theShape.IsNull()) {
bOk = myTBlock.ShellPoint(theParams, aXYZ);
}
//
else {
aID=ShapeID(theShape);
if (myErrorStatus) {
return;
}
//
if (SMESH_Block::IsVertexID(aID)) {
bOk = myTBlock.VertexPoint(aID, aXYZ);
}
else if (SMESH_Block::IsEdgeID(aID)) {
bOk = myTBlock.EdgePoint(aID, theParams, aXYZ);
}
//
else if (SMESH_Block::IsFaceID(aID)) {
bOk = myTBlock.FacePoint(aID, theParams, aXYZ);
}
}
if (!bOk) {
myErrorStatus=5; // problems with point computation
return;
}
aP3D.SetXYZ(aXYZ);
}
| void StdMeshers_SMESHBlock::Point | ( | const gp_XYZ & | theParams, |
| gp_Pnt & | thePnt | ||
| ) |
Definition at line 1756 of file StdMeshers_Penta_3D.cxx.
Referenced by StdMeshers_Penta_3D.FindNodeOnShape().
{
TopoDS_Shape aS;
//
Point(theParams, aS, aP3D);
}
| const TopoDS_Shape & StdMeshers_SMESHBlock::Shape | ( | const int | theID | ) |
Definition at line 1838 of file StdMeshers_Penta_3D.cxx.
References myEmptyShape, myErrorStatus, and myShapeIDMap.
Referenced by StdMeshers_Penta_3D.ClearMeshOnFxy1(), IsForwadEdge(), StdMeshers_Penta_3D.MakeMeshOnFxy1(), StdMeshers_Penta_3D.MakeNodes(), and StdMeshers_Penta_3D.MakeVolumeMesh().
{
myErrorStatus=0;
//
int aNb;
//
aNb=myShapeIDMap.Extent();
if (theID<1 || theID>aNb) {
myErrorStatus=3; // ID is out of range
return myEmptyShape;
}
//
const TopoDS_Shape& aS=myShapeIDMap.FindKey(theID);
return aS;
}
| int StdMeshers_SMESHBlock::ShapeID | ( | const TopoDS_Shape & | theShape | ) |
Definition at line 1810 of file StdMeshers_Penta_3D.cxx.
References myErrorStatus, and myShapeIDMap.
Referenced by ComputeParameters(), StdMeshers_Penta_3D.FindNodeOnShape(), and Point().
{
myErrorStatus=0;
//
int aID=-1;
TopoDS_Shape aSF, aSR;
//
aSF=theShape;
aSF.Orientation(TopAbs_FORWARD);
aSR=theShape;
aSR.Orientation(TopAbs_REVERSED);
//
if (myShapeIDMap.Contains(aSF)) {
aID=myShapeIDMap.FindIndex(aSF);
return aID;
}
if (myShapeIDMap.Contains(aSR)) {
aID=myShapeIDMap.FindIndex(aSR);
return aID;
}
myErrorStatus=2; // unknown shape;
return aID;
}
TopoDS_Shape StdMeshers_SMESHBlock.myEmptyShape [protected] |
Definition at line 100 of file StdMeshers_Penta_3D.hxx.
Referenced by Shape().
int StdMeshers_SMESHBlock.myErrorStatus [protected] |
Definition at line 103 of file StdMeshers_Penta_3D.hxx.
Referenced by ComputeParameters(), ErrorStatus(), GetError(), Load(), Point(), Shape(), ShapeID(), and StdMeshers_SMESHBlock().
std::vector<int> StdMeshers_SMESHBlock.myIsEdgeForward [protected] |
Definition at line 101 of file StdMeshers_Penta_3D.hxx.
Referenced by IsForwadEdge(), and StdMeshers_SMESHBlock().
TopTools_IndexedMapOfOrientedShape StdMeshers_SMESHBlock.myShapeIDMap [protected] |
Definition at line 98 of file StdMeshers_Penta_3D.hxx.
Referenced by IsForwadEdge(), Load(), Shape(), and ShapeID().
TopoDS_Shell StdMeshers_SMESHBlock.myShell [protected] |
Definition at line 97 of file StdMeshers_Penta_3D.hxx.
Referenced by ComputeParameters(), and Load().
SMESH_Block StdMeshers_SMESHBlock.myTBlock [protected] |
Definition at line 99 of file StdMeshers_Penta_3D.hxx.
Referenced by ComputeParameters(), IsForwadEdge(), Load(), and Point().