mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-12 00:29:17 +05:00
fix MakeMeshOnFxy1(): set medium nodes to the Fxy1 face instead of volume
This commit is contained in:
parent
20a656158d
commit
e069a4fc65
@ -69,7 +69,7 @@ enum { NB_WALL_FACES = 4 };
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
StdMeshers_Penta_3D::StdMeshers_Penta_3D()
|
||||
: myErrorStatus(SMESH_ComputeError::New())
|
||||
: myErrorStatus(SMESH_ComputeError::New())
|
||||
{
|
||||
myTol3D=0.1;
|
||||
myWallNodesMaps.resize( SMESH_Block::NbFaces() );
|
||||
@ -437,7 +437,7 @@ void StdMeshers_Penta_3D::MakeNodes()
|
||||
FindNodeOnShape(aS, aCoords, i, aTN);
|
||||
}
|
||||
else{
|
||||
// create node and get it id
|
||||
// create node and get its id
|
||||
CreateNode (bIsUpperLayer, aCoords, aTN);
|
||||
//
|
||||
if ( bIsUpperLayer ) {
|
||||
@ -477,33 +477,6 @@ void StdMeshers_Penta_3D::MakeNodes()
|
||||
myTNodes[ij]=aTN;
|
||||
}
|
||||
}
|
||||
//DEB
|
||||
/*
|
||||
{
|
||||
int iSSID, iBNID, aID;
|
||||
//
|
||||
for (i=0; i<myISize; ++i) {
|
||||
printf(" Layer# %d\n", i);
|
||||
for (j=0; j<myJSize; ++j) {
|
||||
ij=i*myJSize+j;
|
||||
const StdMeshers_TNode& aTN=myTNodes[ij];
|
||||
//const StdMeshers_TNode& aTN=aTNodes[ij];
|
||||
const gp_XYZ& aXYZ=aTN.NormCoord();
|
||||
iSSID=aTN.ShapeSupportID();
|
||||
iBNID=aTN.BaseNodeID();
|
||||
//
|
||||
const SMDS_MeshNode* aNode=aTN.Node();
|
||||
aID=aNode->GetID();
|
||||
aX=aNode->X();
|
||||
aY=aNode->Y();
|
||||
aZ=aNode->Z();
|
||||
printf("*** j:%d BNID#%d iSSID:%d ID:%d { %lf %lf %lf }, { %lf %lf %lf }\n",
|
||||
j, iBNID, iSSID, aID, aXYZ.X(), aXYZ.Y(), aXYZ.Z(), aX, aY, aZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
//DEB t
|
||||
}
|
||||
|
||||
|
||||
@ -634,16 +607,16 @@ double StdMeshers_Penta_3D::SetHorizEdgeXYZ(const gp_XYZ& aBase
|
||||
}
|
||||
else {
|
||||
// this variant is better for other cases
|
||||
// SMESH_MesherHelper helper( *GetMesh() );
|
||||
// const TopoDS_Edge & edge = TopoDS::Edge( myBlock.Shape( edgeVec[ TOP ]));
|
||||
// double u1 = helper.GetNodeU( edge, n1 );
|
||||
// double u2 = helper.GetNodeU( edge, n2 );
|
||||
// double u = ( 1. - r ) * u1 + r * u2;
|
||||
// gp_XYZ topNodeParams;
|
||||
// myBlock.Block().EdgeParameters( edgeVec[ TOP ], u, topNodeParams );
|
||||
// myBlock.Block().EdgePoint( edgeVec[ TOP ],
|
||||
// topNodeParams,
|
||||
// myShapeXYZ[ edgeVec[ TOP ]]);
|
||||
// SMESH_MesherHelper helper( *GetMesh() );
|
||||
// const TopoDS_Edge & edge = TopoDS::Edge( myBlock.Shape( edgeVec[ TOP ]));
|
||||
// double u1 = helper.GetNodeU( edge, n1 );
|
||||
// double u2 = helper.GetNodeU( edge, n2 );
|
||||
// double u = ( 1. - r ) * u1 + r * u2;
|
||||
// gp_XYZ topNodeParams;
|
||||
// myBlock.Block().EdgeParameters( edgeVec[ TOP ], u, topNodeParams );
|
||||
// myBlock.Block().EdgePoint( edgeVec[ TOP ],
|
||||
// topNodeParams,
|
||||
// myShapeXYZ[ edgeVec[ TOP ]]);
|
||||
}
|
||||
|
||||
// base edge
|
||||
@ -822,7 +795,7 @@ void StdMeshers_Penta_3D::MakeMeshOnFxy1()
|
||||
itn = aSM0->GetNodes();
|
||||
aNbNodes = aSM0->NbNodes();
|
||||
//printf("** aNbNodes=%d\n", aNbNodes);
|
||||
|
||||
myTool->SetSubShape( aFxy1 ); // to set medium nodes to aFxy1
|
||||
//
|
||||
// set elements on aFxy1
|
||||
vector<const SMDS_MeshNode*> aNodes1;
|
||||
@ -873,6 +846,7 @@ void StdMeshers_Penta_3D::MakeMeshOnFxy1()
|
||||
}
|
||||
meshDS->SetMeshElementOnShape(face, aFxy1);
|
||||
}
|
||||
myTool->SetSubShape( myShape );
|
||||
|
||||
// update compute state of top face submesh
|
||||
aSubMesh1->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
|
||||
@ -949,15 +923,15 @@ void StdMeshers_Penta_3D::CreateNode(const bool bIsUpperLayer,
|
||||
SMDS_MeshNode* pNode=NULL;
|
||||
aTN.SetNode(pNode);
|
||||
//
|
||||
// if (bIsUpperLayer) {
|
||||
// // point on face Fxy1
|
||||
// const TopoDS_Shape& aS=myBlock.Shape(SMESH_Block::ID_Fxy1);
|
||||
// myBlock.Point(aParams, aS, aP);
|
||||
// }
|
||||
// else {
|
||||
// // point inside solid
|
||||
// myBlock.Point(aParams, aP);
|
||||
// }
|
||||
// if (bIsUpperLayer) {
|
||||
// // point on face Fxy1
|
||||
// const TopoDS_Shape& aS=myBlock.Shape(SMESH_Block::ID_Fxy1);
|
||||
// myBlock.Point(aParams, aS, aP);
|
||||
// }
|
||||
// else {
|
||||
// // point inside solid
|
||||
// myBlock.Point(aParams, aP);
|
||||
// }
|
||||
if (bIsUpperLayer) {
|
||||
double u = aParams.X(), v = aParams.Y();
|
||||
double u1 = ( 1. - u ), v1 = ( 1. - v );
|
||||
@ -975,11 +949,11 @@ void StdMeshers_Penta_3D::CreateNode(const bool bIsUpperLayer,
|
||||
SMESH_Block::ShellPoint( aParams, myShapeXYZ, aP.ChangeCoord() );
|
||||
}
|
||||
//
|
||||
// iErr=myBlock.ErrorStatus();
|
||||
// if (iErr) {
|
||||
// myErrorStatus=12; // can not find the node point;
|
||||
// return;
|
||||
// }
|
||||
// iErr=myBlock.ErrorStatus();
|
||||
// if (iErr) {
|
||||
// myErrorStatus=12; // can not find the node point;
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
aX=aP.X(); aY=aP.Y(); aZ=aP.Z();
|
||||
//
|
||||
@ -1784,8 +1758,7 @@ void StdMeshers_SMESHBlock::ComputeParameters(const double& theU,
|
||||
//function : Point
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StdMeshers_SMESHBlock::Point(const gp_XYZ& theParams,
|
||||
gp_Pnt& aP3D)
|
||||
void StdMeshers_SMESHBlock::Point(const gp_XYZ& theParams, gp_Pnt& aP3D)
|
||||
{
|
||||
TopoDS_Shape aS;
|
||||
//
|
||||
@ -1796,7 +1769,7 @@ void StdMeshers_SMESHBlock::ComputeParameters(const double& theU,
|
||||
//function : Point
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StdMeshers_SMESHBlock::Point(const gp_XYZ& theParams,
|
||||
void StdMeshers_SMESHBlock::Point(const gp_XYZ& theParams,
|
||||
const TopoDS_Shape& theShape,
|
||||
gp_Pnt& aP3D)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user