X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_Prism_3D.cxx;h=b3f34cadb7cbbb3613de17c4de15abd01bee04af;hb=5eeb7596d358e5527cb8dc5548423408d18fcd9e;hp=9aed55e3e88f7ea1e16b69652f2b98737fc31c31;hpb=ac96f997ef6d5e09b407a5363a3c69415e2442dc;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index 9aed55e3e..b3f34cadb 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -2400,6 +2400,9 @@ double StdMeshers_Prism_3D::getSweepTolerance( const Prism_3D::TPrismTopo& thePr bool StdMeshers_Prism_3D::isSimpleBottom( const Prism_3D::TPrismTopo& thePrism ) { + if ( thePrism.myBottomEdges.size() != 4 ) + return false; + // analyse angles between edges double nbConcaveAng = 0, nbConvexAng = 0; TopoDS_Face reverseBottom = TopoDS::Face( thePrism.myBottom.Reversed() ); // see initPrism() @@ -2541,8 +2544,8 @@ namespace // utils used by StdMeshers_Prism_3D::IsApplicable() bool _isBase; /* is used in a base FACE */ EdgeWithNeighbors(const TopoDS_Edge& E, int iE, int nbE, int shift, bool isBase ): _edge( E ), _iBase( iE + shift ), - _iL( SMESH_MesherHelper::WrapIndex( iE-1, nbE ) + shift ), - _iR( SMESH_MesherHelper::WrapIndex( iE+1, nbE ) + shift ), + _iL( SMESH_MesherHelper::WrapIndex( iE-1, Max( 1, nbE )) + shift ), + _iR( SMESH_MesherHelper::WrapIndex( iE+1, Max( 1, nbE )) + shift ), _isBase( isBase ) { } @@ -2671,16 +2674,16 @@ namespace // utils used by StdMeshers_Prism_3D::IsApplicable() edges[ iFirst ]._iL = edges[ iFirst ]._iBase; // connect to self edges[ iLast ]._iR = edges[ iLast ]._iBase; - // look for an EDGE of the outer WIRE connected to vv + // look for an EDGE of the outer WIREs connected to vv TopoDS_Vertex v0, v1; - for ( iE = 0; iE < nbEdgesInWires.front(); ++iE ) + for ( iE = 0; iE < iFirst; ++iE ) { v0 = SMESH_MesherHelper::IthVertex( 0, edges[ iE ]._edge ); v1 = SMESH_MesherHelper::IthVertex( 1, edges[ iE ]._edge ); if ( vv[0].IsSame( v0 ) || vv[0].IsSame( v1 )) edges[ iFirst ]._iL = edges[ iE ]._iBase; if ( vv[1].IsSame( v0 ) || vv[1].IsSame( v1 )) - edges[ iLast ]._iR = edges[ iE ]._iBase; + edges[ iLast ]._iR = edges[ iE ]._iBase; } } iFirst += *nbE; @@ -4889,8 +4892,8 @@ bool StdMeshers_Sweeper::ComputeNodes( SMESH_MesherHelper& helper, } } - //centerIntErrorIsSmall = true; - //bndErrorIsSmall = true; + centerIntErrorIsSmall = true; // 3D_mesh_Extrusion_00/A3 + bndErrorIsSmall = true; if ( !centerIntErrorIsSmall ) { // Compensate the central error; continue adding projection