* \brief Finds FaceQuadStruct having a side equal to a given one and rearranges
* the found FaceQuadStruct::side to have the given side at a Q_BOTTOM place
*/
- FaceQuadStructPtr getQuadWithBottom( StdMeshers_FaceSide* side,
- FaceQuadStructPtr quad[ 6 ])
+ FaceQuadStructPtr getQuadWithBottom( StdMeshers_FaceSidePtr side,
+ FaceQuadStructPtr quad[ 6 ])
{
FaceQuadStructPtr foundQuad;
for ( int i = 1; i < 6; ++i )
if ( !quad[i] ) continue;
for ( unsigned iS = 0; iS < quad[i]->side.size(); ++iS )
{
- const StdMeshers_FaceSide* side2 = quad[i]->side[iS];
+ const StdMeshers_FaceSidePtr side2 = quad[i]->side[iS];
if (( side->FirstVertex().IsSame( side2->FirstVertex() ) ||
side->FirstVertex().IsSame( side2->LastVertex() ))
&&
{
if ( iS != Q_BOTTOM )
{
- vector< StdMeshers_FaceSide*> newSides;
+ vector< FaceQuadStruct::Side > newSides;
for ( unsigned j = iS; j < quad[i]->side.size(); ++j )
newSides.push_back( quad[i]->side[j] );
for ( unsigned j = 0; j < iS; ++j )
for ( int i = 0; i < 6; ++i )
{
const TopoDS_Face& F = aCubeSide[i]._quad->face;
- StdMeshers_FaceSide* baseQuadSide = aCubeSide[i]._quad->side[ Q_BOTTOM ];
+ StdMeshers_FaceSidePtr baseQuadSide = aCubeSide[i]._quad->side[ Q_BOTTOM ];
list<TopoDS_Edge> baseEdges( baseQuadSide->Edges().begin(), baseQuadSide->Edges().end() );
// assure correctness of node positions on baseE:
algo->myProxyMesh->GetMesh() != helper->GetMesh() )
algo->myProxyMesh.reset( new SMESH_ProxyMesh( *helper->GetMesh() ));
- algo->myQuadStruct.reset();
+ algo->myQuadList.clear();
if ( helper )
algo->_quadraticMesh = helper->GetIsQuadratic();
//================================================================================
bool setBottomEdge( const TopoDS_Edge& botE,
- faceQuadStruct::Ptr& quad,
+ FaceQuadStruct::Ptr& quad,
const TopoDS_Shape& face)
{
- quad->side[ QUAD_TOP_SIDE ]->Reverse();
- quad->side[ QUAD_LEFT_SIDE ]->Reverse();
+ quad->side[ QUAD_TOP_SIDE ].grid->Reverse();
+ quad->side[ QUAD_LEFT_SIDE ].grid->Reverse();
int edgeIndex = 0;
for ( size_t i = 0; i < quad->side.size(); ++i )
{
- StdMeshers_FaceSide* quadSide = quad->side[i];
+ StdMeshers_FaceSidePtr quadSide = quad->side[i];
for ( int iE = 0; iE < quadSide->NbEdges(); ++iE )
if ( botE.IsSame( quadSide->Edge( iE )))
{
continue; // already computed prism
}
// find a source FACE of the SOLID: it's a FACE sharing a bottom EDGE with wFace
- const TopoDS_Edge& wEdge = (*wQuad)->side[ QUAD_TOP_SIDE ]->Edge(0);
+ const TopoDS_Edge& wEdge = (*wQuad)->side[ QUAD_TOP_SIDE ].grid->Edge(0);
PShapeIteratorPtr faceIt = myHelper->GetAncestors( wEdge, *myHelper->GetMesh(),
TopAbs_FACE);
while ( const TopoDS_Shape* f = faceIt->next() )
int nbKnownFaces;
do {
nbKnownFaces = faceMap.Extent();
- StdMeshers_FaceSide *rightSide, *topSide; // sides of the quad
+ StdMeshers_FaceSidePtr rightSide, topSide; // sides of the quad
for ( size_t i = 0; i < thePrism.myWallQuads.size(); ++i )
{
rightSide = thePrism.myWallQuads[i].back()->side[ QUAD_RIGHT_SIDE ];
{
for ( size_t i = 0; i < thePrism.myWallQuads.size(); ++i )
{
- StdMeshers_FaceSide* topSide = thePrism.myWallQuads[i].back()->side[ QUAD_TOP_SIDE ];
- const TopoDS_Edge & topE = topSide->Edge( 0 );
+ StdMeshers_FaceSidePtr topSide = thePrism.myWallQuads[i].back()->side[ QUAD_TOP_SIDE ];
+ const TopoDS_Edge & topE = topSide->Edge( 0 );
if ( topSide->NbEdges() > 1 )
return toSM( error(COMPERR_BAD_SHAPE, TCom("Side face #") <<
shapeID( thePrism.myWallQuads[i].back()->face )
// Check that the top FACE shares all the top EDGEs
for ( size_t i = 0; i < thePrism.myWallQuads.size(); ++i )
{
- StdMeshers_FaceSide* topSide = thePrism.myWallQuads[i].back()->side[ QUAD_TOP_SIDE ];
- const TopoDS_Edge & topE = topSide->Edge( 0 );
+ StdMeshers_FaceSidePtr topSide = thePrism.myWallQuads[i].back()->side[ QUAD_TOP_SIDE ];
+ const TopoDS_Edge & topE = topSide->Edge( 0 );
if ( !myHelper->IsSubShape( topE, thePrism.myTop ))
return toSM( error( TCom("Wrong source face (#") << shapeID( thePrism.myBottom )));
}
int wgt = 0; // "weight"
for ( ; quad != thePrism.myWallQuads[iW].end(); ++quad )
{
- StdMeshers_FaceSide* lftSide = (*quad)->side[ QUAD_LEFT_SIDE ];
+ StdMeshers_FaceSidePtr lftSide = (*quad)->side[ QUAD_LEFT_SIDE ];
for ( int i = 0; i < lftSide->NbEdges(); ++i )
{
++wgt;
quad = thePrism.myWallQuads[iW].begin();
for ( ; quad != thePrism.myWallQuads[iW].end(); ++quad )
for ( int i = 0; i < NB_QUAD_SIDES; ++i )
- (*quad)->side[ i ]->SetIgnoreMediumNodes( true );
+ (*quad)->side[ i ].grid->SetIgnoreMediumNodes( true );
}
}
Prism_3D::TQuadList::const_iterator quad = quads.begin();
for ( ; quad != quads.end(); ++quad )
{
- StdMeshers_FaceSide* rgtSide = (*quad)->side[ QUAD_RIGHT_SIDE ]; // tgt
- StdMeshers_FaceSide* lftSide = (*quad)->side[ QUAD_LEFT_SIDE ]; // src
+ StdMeshers_FaceSidePtr rgtSide = (*quad)->side[ QUAD_RIGHT_SIDE ]; // tgt
+ StdMeshers_FaceSidePtr lftSide = (*quad)->side[ QUAD_LEFT_SIDE ]; // src
bool swapLeftRight = ( lftSide->NbSegments( /*update=*/true ) == 0 &&
rgtSide->NbSegments( /*update=*/true ) > 0 );
if ( swapLeftRight )
// to compute stuctured quad mesh on wall FACEs
// ---------------------------------------------------
{
- const TopoDS_Edge& botE = (*quad)->side[ QUAD_BOTTOM_SIDE ]->Edge(0);
- const TopoDS_Edge& topE = (*quad)->side[ QUAD_TOP_SIDE ]->Edge(0);
+ const TopoDS_Edge& botE = (*quad)->side[ QUAD_BOTTOM_SIDE ].grid->Edge(0);
+ const TopoDS_Edge& topE = (*quad)->side[ QUAD_TOP_SIDE ].grid->Edge(0);
SMESH_subMesh* botSM = mesh->GetSubMesh( botE );
SMESH_subMesh* topSM = mesh->GetSubMesh( topE );
SMESH_subMesh* srcSM = botSM;
Prism_3D::TQuadList::const_iterator quad = thePrism.myWallQuads[ iE ].begin();
for ( ; quad != thePrism.myWallQuads[ iE ].end(); ++quad )
{
- const TopoDS_Edge& quadBot = (*quad)->side[ QUAD_BOTTOM_SIDE ]->Edge( 0 );
+ const TopoDS_Edge& quadBot = (*quad)->side[ QUAD_BOTTOM_SIDE ].grid->Edge( 0 );
if ( !myHelper->LoadNodeColumns( faceColumns, (*quad)->face, quadBot, meshDS ))
return error(COMPERR_BAD_INPUT_MESH, TCom("Can't find regular quadrangle mesh ")
<< "on a side face #" << MeshDS()->ShapeToIndex( (*quad)->face ));
Prism_3D::TQuadList::const_iterator quad = thePrism.myWallQuads[ iE ].begin();
for ( ; quad != thePrism.myWallQuads[ iE ].end(); ++quad )
{
- const TopoDS_Edge& quadBot = (*quad)->side[ QUAD_BOTTOM_SIDE ]->Edge( 0 );
+ const TopoDS_Edge& quadBot = (*quad)->side[ QUAD_BOTTOM_SIDE ].grid->Edge( 0 );
if ( !myHelper->LoadNodeColumns( faceColumns, (*quad)->face, quadBot, meshDS ))
return error(COMPERR_BAD_INPUT_MESH, TCom("Can't find regular quadrangle mesh ")
<< "on a side face #" << MeshDS()->ShapeToIndex( (*quad)->face ));