Salome HOME
NPAL18095: Pb. with dump python and mesh group by filter.
[modules/smesh.git] / src / StdMeshers / StdMeshers_Prism_3D.cxx
index 267f0033f1c21f22ea527f2bae4171bbd0944347..4d818a4682668419cbfde9c19887dc023b15ed91 100644 (file)
 
 #include "utilities.h"
 
-#include <BRepAdaptor_Curve.hxx>
-#include <BRepAdaptor_Curve2d.hxx>
-#include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <Geom2dAdaptor_Curve.hxx>
 #include <Geom2d_Line.hxx>
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TopoDS.hxx>
 
 using namespace std;
 
-#define RETURN_BAD_RESULT(msg) { MESSAGE(msg); return false; }
+#define RETURN_BAD_RESULT(msg) { MESSAGE(")-: Error: " << msg); return false; }
 #define gpXYZ(n) gp_XYZ(n->X(),n->Y(),n->Z())
 #define SHOWYXZ(msg, xyz) // {\
 // gp_Pnt p (xyz); \
@@ -185,7 +185,7 @@ bool StdMeshers_Prism_3D::CheckHypothesis(SMESH_Mesh&                          a
                                           SMESH_Hypothesis::Hypothesis_Status& aStatus)
 {
   // Check shape geometry
-
+/*  PAL16229
   aStatus = SMESH_Hypothesis::HYP_BAD_GEOMETRY;
 
   // find not quadrangle faces
@@ -216,7 +216,7 @@ bool StdMeshers_Prism_3D::CheckHypothesis(SMESH_Mesh&                          a
     if ( nbFace != nbEdge + 2 )
       RETURN_BAD_RESULT("Bad nb of faces: " << nbFace << " but must be " << nbEdge + 2);
   }
-
+*/
   // no hypothesis
   aStatus = SMESH_Hypothesis::HYP_OK;
   return true;
@@ -553,8 +553,8 @@ bool StdMeshers_Prism_3D::assocOrProjBottom2Top()
         paramHint = prevTNode.GetParams();
       if ( !myBlock.ComputeParameters( bN.GetCoords(), bN.ChangeParams(),
                                        ID_BOT_FACE, paramHint ))
-        return error(TCom("Can't compute normalized parameters ")
-                     << "for node " << botNode->GetID() << " on the face #"<< botSM->GetId() );
+        return error(TCom("Can't compute normalized parameters for node ")
+                     << botNode->GetID() << " on the face #"<< botSM->GetId() );
       prevTNode = bN;
     }
     // create node column
@@ -608,8 +608,8 @@ bool StdMeshers_Prism_3D::projectBottomToTop()
       paramHint = prevTNode.GetParams();
     if ( !myBlock.ComputeParameters( bN.GetCoords(), bN.ChangeParams(),
                                      ID_BOT_FACE, paramHint ))
-      return error(TCom("Can't compute normalized parameters ")
-                   << "for node " << botNode->GetID() << " on the face #"<< botSM->GetId() );
+      return error(TCom("Can't compute normalized parameters for node ")
+                   << botNode->GetID() << " on the face #"<< botSM->GetId() );
     prevTNode = bN;
     // compute top node coords
     gp_XYZ topXYZ; gp_XY topUV;
@@ -875,11 +875,11 @@ bool StdMeshers_PrismAsBlock::Init(SMESH_MesherHelper* helper,
   // detect bad cases
   if ( nbNotQuad > 0 && nbNotQuad != 2 )
     return error(COMPERR_BAD_SHAPE,
-                 TCom("More than 2 not quadrilateral faces ")
+                 TCom("More than 2 not quadrilateral faces: ")
                  <<nbNotQuad);
   if ( nbNotQuadMeshed > 2 )
     return error(COMPERR_BAD_INPUT_MESH,
-                 TCom("More than 2 faces meshed with not quadrangle elements ")
+                 TCom("More than 2 faces with not quadrangle elements: ")
                  <<nbNotQuadMeshed);
 
   // get found submeshes