mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-05 00:24:17 +05:00
PAL9022. Attach generated mesh elements to whatever meshed shape, SHELL or SOLID
This commit is contained in:
parent
f62232e212
commit
2ac338d578
@ -606,17 +606,7 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
|
|||||||
// - compute the point 3D
|
// - compute the point 3D
|
||||||
// - store the point 3D in SMESHDS, store its ID in 3D structure
|
// - store the point 3D in SMESHDS, store its ID in 3D structure
|
||||||
|
|
||||||
TopoDS_Shell aShell;
|
int shapeID = meshDS->ShapeToIndex( aShape );
|
||||||
TopExp_Explorer exp(aShape, TopAbs_SHELL);
|
|
||||||
if (exp.More())
|
|
||||||
{
|
|
||||||
aShell = TopoDS::Shell(exp.Current());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MESSAGE("no shell...");
|
|
||||||
ASSERT(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
Pt3 p000, p001, p010, p011, p100, p101, p110, p111;
|
Pt3 p000, p001, p010, p011, p100, p101, p110, p111;
|
||||||
Pt3 px00, px01, px10, px11;
|
Pt3 px00, px01, px10, px11;
|
||||||
@ -690,8 +680,7 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
|
|||||||
|
|
||||||
SMDS_MeshNode * node = meshDS->AddNode(X[0], X[1], X[2]);
|
SMDS_MeshNode * node = meshDS->AddNode(X[0], X[1], X[2]);
|
||||||
np[ijk].node = node;
|
np[ijk].node = node;
|
||||||
//meshDS->SetNodeInVolume(node, TopoDS::Solid(aShape));
|
meshDS->SetNodeInVolume(node, shapeID);
|
||||||
meshDS->SetNodeInVolume(node, aShell);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -755,9 +744,7 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
|
|||||||
np[n7].node,
|
np[n7].node,
|
||||||
np[n6].node);
|
np[n6].node);
|
||||||
|
|
||||||
meshDS->SetMeshElementOnShape(elt, aShell);
|
meshDS->SetMeshElementOnShape(elt, shapeID);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( np ) delete [] np;
|
if ( np ) delete [] np;
|
||||||
@ -1062,7 +1049,7 @@ bool ComputePentahedralMesh(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape)
|
|||||||
//printf(" ComputePentahedralMesh HERE\n");
|
//printf(" ComputePentahedralMesh HERE\n");
|
||||||
//
|
//
|
||||||
bool bOK;
|
bool bOK;
|
||||||
int iErr;
|
//int iErr;
|
||||||
StdMeshers_Penta_3D anAlgo;
|
StdMeshers_Penta_3D anAlgo;
|
||||||
//
|
//
|
||||||
bOK=anAlgo.Compute(aMesh, aShape);
|
bOK=anAlgo.Compute(aMesh, aShape);
|
||||||
|
@ -60,10 +60,6 @@ using namespace std;
|
|||||||
typedef map < int, int, less<int> >::iterator \
|
typedef map < int, int, less<int> >::iterator \
|
||||||
StdMeshers_IteratorOfDataMapOfIntegerInteger;
|
StdMeshers_IteratorOfDataMapOfIntegerInteger;
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//
|
|
||||||
// StdMeshers_Penta_3D
|
|
||||||
//
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : StdMeshers_Penta_3D
|
//function : StdMeshers_Penta_3D
|
||||||
//purpose :
|
//purpose :
|
||||||
@ -597,17 +593,10 @@ void StdMeshers_Penta_3D::MakeVolumeMesh()
|
|||||||
//
|
//
|
||||||
int i, j, ij, ik, i1, i2, aSSID;
|
int i, j, ij, ik, i1, i2, aSSID;
|
||||||
//
|
//
|
||||||
TopoDS_Shell aShell;
|
|
||||||
TopExp_Explorer aExp;
|
|
||||||
//
|
|
||||||
SMESH_Mesh* pMesh =GetMesh();
|
SMESH_Mesh* pMesh =GetMesh();
|
||||||
SMESHDS_Mesh* meshDS=pMesh->GetMeshDS();
|
SMESHDS_Mesh* meshDS=pMesh->GetMeshDS();
|
||||||
//
|
//
|
||||||
aExp.Init(myShape, TopAbs_SHELL);
|
int shapeID = meshDS->ShapeToIndex( myShape );
|
||||||
for (; aExp.More(); aExp.Next()){
|
|
||||||
aShell=TopoDS::Shell(aExp.Current());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
//
|
//
|
||||||
// 1. Set Node In Volume
|
// 1. Set Node In Volume
|
||||||
ik=myISize-1;
|
ik=myISize-1;
|
||||||
@ -618,7 +607,7 @@ void StdMeshers_Penta_3D::MakeVolumeMesh()
|
|||||||
aSSID=aTN.ShapeSupportID();
|
aSSID=aTN.ShapeSupportID();
|
||||||
if (aSSID==SMESH_Block::ID_NONE) {
|
if (aSSID==SMESH_Block::ID_NONE) {
|
||||||
SMDS_MeshNode* aNode=(SMDS_MeshNode*)aTN.Node();
|
SMDS_MeshNode* aNode=(SMDS_MeshNode*)aTN.Node();
|
||||||
meshDS->SetNodeInVolume(aNode, aShell);
|
meshDS->SetNodeInVolume(aNode, shapeID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -714,7 +703,7 @@ void StdMeshers_Penta_3D::MakeVolumeMesh()
|
|||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
meshDS->SetMeshElementOnShape(aV, aShell);
|
meshDS->SetMeshElementOnShape(aV, shapeID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -873,7 +862,7 @@ void StdMeshers_Penta_3D::CreateNode(const bool bIsUpperLayer,
|
|||||||
{
|
{
|
||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
//
|
//
|
||||||
int iErr;
|
// int iErr;
|
||||||
double aX, aY, aZ;
|
double aX, aY, aZ;
|
||||||
//
|
//
|
||||||
gp_Pnt aP;
|
gp_Pnt aP;
|
||||||
|
Loading…
Reference in New Issue
Block a user