X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_QuadToTriaAdaptor.cxx;h=95617d10a6979ea00e6ffe0f33946fd4e7fffb80;hb=e15a3a87cc738a5e3da00b3e09e7c8e17d733dc7;hp=2e4ea50b8fb3effa05cc7ff8904de0bbbf3d0df4;hpb=831b40eb011a5f2ad1738518e86fdc6d924f891d;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx b/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx index 2e4ea50b8..95617d10a 100644 --- a/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx +++ b/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx @@ -174,7 +174,7 @@ namespace PrmJ->GetNodeIndex( otherFaceNode ) >= 0 )) continue; // f is a base quadrangle - // check projections of face direction (baOFN) to triange normals (nI and nJ) + // check projections of face direction (baOFN) to triangle normals (nI and nJ) gp_Vec baOFN( base2, SMESH_TNodeXYZ( otherFaceNode )); if ( nI * baOFN > 0 && nJ * baOFN > 0 && baI* baOFN > 0 && baJ* baOFN > 0 ) // issue 0023212 @@ -296,12 +296,13 @@ namespace SMESH_ComputeErrorPtr& err = sm->GetComputeError(); if ( !err || err->IsOK() ) { - err = SMESH_ComputeError::New( COMPERR_BAD_INPUT_MESH, msg, sm->GetAlgo() ); - err->myBadElements.push_back( face1 ); - err->myBadElements.push_back( face2 ); + SMESH_BadInputElements* badElems = + new SMESH_BadInputElements( mesh.GetMeshDS(),COMPERR_BAD_INPUT_MESH, msg, sm->GetAlgo() ); + badElems->add( face1 ); + badElems->add( face2 ); + err.reset( badElems ); } } - //throw SALOME_Exception( msg.c_str() ); return false; // == "algo fails" } @@ -666,7 +667,7 @@ bool StdMeshers_QuadToTriaAdaptor::LimitHeight (gp_Pnt& //================================================================================ /*! - * \brief Prepare data for the given face + * \brief Retrieve data of the given face * \param PN - coordinates of face nodes * \param VN - cross products of vectors (PC-PN(i)) ^ (PC-PN(i+1)) * \param FNodes - face nodes @@ -705,7 +706,8 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement* face int nbp = 4; int j = 0; - for(i=1; i<4; i++) { + for ( i = 1; i < 4; i++ ) + { j = i+1; for(; j<=4; j++) { if( PN(i).Distance(PN(j)) < 1.e-6 ) @@ -713,11 +715,10 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement* face } if(j<=4) break; } - //int deg_num = IsDegenarate(PN); - //if(deg_num>0) { + bool hasdeg = false; - if(i<4) { - //cout<<"find degeneration"<X(),N->Y(),N->Z()); if(Pdeg.Distance(Ptmp)<1.e-6) { DegNode = N; - //DegNode = const_cast(N); break; } } @@ -748,6 +748,7 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement* face PN.SetValue(nbp+1,PN(1)); FNodes[nbp] = FNodes[0]; + // find normal direction gp_Vec V1(PC,PN(nbp)); gp_Vec V2(PC,PN(1)); @@ -789,7 +790,6 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement* face } } - //cout<<" VNorm("< FNodes(5); TColgp_SequenceOfPnt aContour; - SMDS_FaceIteratorPtr fIt = meshDS->facesIterator(/*idInceasingOrder=*/true); + SMDS_FaceIteratorPtr fIt = meshDS->facesIterator(); while( fIt->more()) { const SMDS_MeshElement* face = fIt->next();