Salome HOME
PAL16202,16203 (Propagation 1D on edges group)
authoreap <eap@opencascade.com>
Wed, 7 Nov 2007 09:57:05 +0000 (09:57 +0000)
committereap <eap@opencascade.com>
Wed, 7 Nov 2007 09:57:05 +0000 (09:57 +0000)
   remove useless includes

src/StdMeshers/StdMeshers_Hexa_3D.cxx
src/StdMeshers/StdMeshers_MEFISTO_2D.cxx
src/StdMeshers/StdMeshers_NumberOfSegments.cxx
src/StdMeshers/StdMeshers_Penta_3D.cxx
src/StdMeshers/StdMeshers_Prism_3D.cxx
src/StdMeshers/StdMeshers_Projection_3D.cxx
src/StdMeshers/StdMeshers_Propagation.cxx
src/StdMeshers/StdMeshers_Quadrangle_2D.cxx
src/StdMeshers/StdMeshers_RadialPrism_3D.cxx
src/StdMeshers/StdMeshers_Regular_1D.cxx

index d1567ae0852aad64a8450b6cc68077878e719f15..33efea5e7243d429415f555ac0e3e01b818521f5 100644 (file)
 #include "SMDS_VolumeOfNodes.hxx"
 
 #include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TColStd_MapOfInteger.hxx>
-
-#include <BRep_Tool.hxx>
-#include <Geom_Surface.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopoDS.hxx>
 #include <gp_Pnt2d.hxx>
 
 #include "utilities.h"
index ebf2080601532d6238d69b864d941848dc78ee09..7b76b35455e95acc1fba4b4cfcb831cb2a266415 100644 (file)
 
 #include "utilities.h"
 
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Edge.hxx>
-#include <Geom_Surface.hxx>
-#include <Geom2d_Curve.hxx>
-#include <gp_Pnt2d.hxx>
-#include <BRep_Tool.hxx>
 #include <BRepTools.hxx>
+#include <BRep_Tool.hxx>
+#include <Geom2d_Curve.hxx>
+#include <Geom_Surface.hxx>
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <TopTools_ListOfShape.hxx>
 #include <TopTools_MapOfShape.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Iterator.hxx>
+#include <gp_Pnt2d.hxx>
 
 using namespace std;
 
index f4819f92c0fd0ec66996ad502700954cdc1c6ba9..a6364114a63a70c7a071b410c33f3e0fc0490a04 100644 (file)
@@ -63,8 +63,9 @@ const double PRECISION = 1e-7;
  */
 //=============================================================================
 
-StdMeshers_NumberOfSegments::StdMeshers_NumberOfSegments(int hypId, int studyId,
-       SMESH_Gen * gen)
+StdMeshers_NumberOfSegments::StdMeshers_NumberOfSegments(int         hypId,
+                                                         int         studyId,
+                                                         SMESH_Gen * gen)
   : SMESH_Hypothesis(hypId, studyId, gen),
     _numberOfSegments(1),
     _distrType(DT_Regular),
@@ -90,17 +91,20 @@ StdMeshers_NumberOfSegments::~StdMeshers_NumberOfSegments()
  *  
  */
 //=============================================================================
-const std::vector<double>& StdMeshers_NumberOfSegments::BuildDistributionExpr( const char* expr, int nbSeg, int conv )
-throw ( SALOME_Exception )
+const vector<double>&
+StdMeshers_NumberOfSegments::BuildDistributionExpr( const char* expr,int nbSeg,int conv )
+  throw ( SALOME_Exception )
 {
   if( !buildDistribution( TCollection_AsciiString( ( Standard_CString )expr ), conv, 0.0, 1.0, nbSeg, _distr, 1E-4 ) )
     _distr.resize( 0 );
   return _distr;
 }
 
-const std::vector<double>& StdMeshers_NumberOfSegments::BuildDistributionTab( const std::vector<double>& tab,
-                                                                             int nbSeg, int conv )
-throw ( SALOME_Exception )
+const vector<double>&
+StdMeshers_NumberOfSegments::BuildDistributionTab( const vector<double>& tab,
+                                                   int nbSeg,
+                                                   int conv )
+  throw ( SALOME_Exception )
 {
   if( !buildDistribution( tab, conv, 0.0, 1.0, nbSeg, _distr, 1E-4 ) )
     _distr.resize( 0 );
@@ -116,14 +120,13 @@ throw ( SALOME_Exception )
 void StdMeshers_NumberOfSegments::SetNumberOfSegments(int segmentsNumber)
 throw(SALOME_Exception)
 {
-       int oldNumberOfSegments = _numberOfSegments;
-       if (segmentsNumber <= 0)
-               throw
-                       SALOME_Exception(LOCALIZED("number of segments must be positive"));
-       _numberOfSegments = segmentsNumber;
-
-       if (oldNumberOfSegments != _numberOfSegments)
-               NotifySubMeshesHypothesisModification();
+  int oldNumberOfSegments = _numberOfSegments;
+  if (segmentsNumber <= 0)
+    throw SALOME_Exception(LOCALIZED("number of segments must be positive"));
+  _numberOfSegments = segmentsNumber;
+
+  if (oldNumberOfSegments != _numberOfSegments)
+    NotifySubMeshesHypothesisModification();
 }
 
 //=============================================================================
@@ -134,7 +137,7 @@ throw(SALOME_Exception)
 
 int StdMeshers_NumberOfSegments::GetNumberOfSegments() const
 {
-       return _numberOfSegments;
+  return _numberOfSegments;
 }
 
 //================================================================================
@@ -177,7 +180,8 @@ void StdMeshers_NumberOfSegments::SetScaleFactor(double scaleFactor)
   throw(SALOME_Exception)
 {
   if (_distrType != DT_Scale)
-    throw SALOME_Exception(LOCALIZED("not a scale distribution"));
+    _distrType = DT_Scale;
+    //throw SALOME_Exception(LOCALIZED("not a scale distribution"));
   if (scaleFactor < PRECISION)
     throw SALOME_Exception(LOCALIZED("scale factor must be positive"));
   //if (fabs(scaleFactor - 1.0) < PRECISION)
@@ -210,11 +214,12 @@ double StdMeshers_NumberOfSegments::GetScaleFactor() const
  */
 //================================================================================
 
-void StdMeshers_NumberOfSegments::SetTableFunction(const std::vector<double>& table)
+void StdMeshers_NumberOfSegments::SetTableFunction(const vector<double>& table)
   throw(SALOME_Exception)
 {
   if (_distrType != DT_TabFunc)
-    throw SALOME_Exception(LOCALIZED("not a table function distribution"));
+    _distrType = DT_TabFunc;
+  //throw SALOME_Exception(LOCALIZED("not a table function distribution"));
   if ( (table.size() % 2) != 0 )
     throw SALOME_Exception(LOCALIZED("odd size of vector of table function"));
 
@@ -282,7 +287,7 @@ void StdMeshers_NumberOfSegments::SetTableFunction(const std::vector<double>& ta
  */
 //================================================================================
 
-const std::vector<double>& StdMeshers_NumberOfSegments::GetTableFunction() const
+const vector<double>& StdMeshers_NumberOfSegments::GetTableFunction() const
   throw(SALOME_Exception)
 {
   if (_distrType != DT_TabFunc)
@@ -396,7 +401,8 @@ void StdMeshers_NumberOfSegments::SetExpressionFunction(const char* expr)
   throw(SALOME_Exception)
 {
   if (_distrType != DT_ExprFunc)
-    throw SALOME_Exception(LOCALIZED("not an expression function distribution"));
+    _distrType = DT_ExprFunc;
+    //throw SALOME_Exception(LOCALIZED("not an expression function distribution"));
 
   // remove white spaces
   TCollection_AsciiString str((Standard_CString)expr);
@@ -428,7 +434,7 @@ void StdMeshers_NumberOfSegments::SetExpressionFunction(const char* expr)
     return;
   }
   
-  std::string func = expr;
+  string func = expr;
   if( _func != func )
   {
     _func = func;
@@ -459,8 +465,8 @@ const char* StdMeshers_NumberOfSegments::GetExpressionFunction() const
 void StdMeshers_NumberOfSegments::SetConversionMode( int conv )
   throw(SALOME_Exception)
 {
-  if (_distrType != DT_TabFunc && _distrType != DT_ExprFunc)
-    throw SALOME_Exception(LOCALIZED("not a functional distribution"));
+//   if (_distrType != DT_TabFunc && _distrType != DT_ExprFunc)
+//     throw SALOME_Exception(LOCALIZED("not a functional distribution"));
 
   if( conv != _convMode )
   {
@@ -478,8 +484,8 @@ void StdMeshers_NumberOfSegments::SetConversionMode( int conv )
 int StdMeshers_NumberOfSegments::ConversionMode() const
   throw(SALOME_Exception)
 {
-  if (_distrType != DT_TabFunc && _distrType != DT_ExprFunc)
-    throw SALOME_Exception(LOCALIZED("not a functional distribution"));
+//   if (_distrType != DT_TabFunc && _distrType != DT_ExprFunc)
+//     throw SALOME_Exception(LOCALIZED("not a functional distribution"));
   return _convMode;
 }
 
@@ -675,10 +681,10 @@ bool StdMeshers_NumberOfSegments::SetParametersByMesh(const SMESH_Mesh*   theMes
   int nbEdges = 0;
   TopTools_IndexedMapOfShape edgeMap;
   TopExp::MapShapes( theShape, TopAbs_EDGE, edgeMap );
+  SMESHDS_Mesh* aMeshDS = const_cast< SMESH_Mesh* >( theMesh )->GetMeshDS();
   for ( int i = 1; i <= edgeMap.Extent(); ++i )
   {
     // get current segment length
-    SMESHDS_Mesh* aMeshDS = const_cast< SMESH_Mesh* >( theMesh )->GetMeshDS();
     SMESHDS_SubMesh * eSubMesh = aMeshDS->MeshElements( edgeMap( i ));
     if ( eSubMesh && eSubMesh->NbElements())
       _numberOfSegments += eSubMesh->NbElements();
index fd1fe47cf719a5afb75831b7f4862bc0a58c1723..4030cdfce3c7b8f362c41277f6b01bd2f30e45e8 100644 (file)
 #include "SMESH_subMeshEventListener.hxx"
 #include "SMESH_Comment.hxx"
 
-#include <BRepTools.hxx>
-#include <BRepTools_WireExplorer.hxx>
 #include <BRep_Tool.hxx>
-#include <TopAbs_ShapeEnum.hxx>
 #include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
 #include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <TopTools_ListOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
 #include <TopoDS.hxx>
 #include <TopoDS_Edge.hxx>
 #include <TopoDS_Shell.hxx>
 #include <TopoDS_Vertex.hxx>
 #include <gp_Pnt.hxx>
-#include <BRepTools.hxx>
-#include <BRepTools_WireExplorer.hxx>
-#include <TopTools_MapOfShape.hxx>
 
 #include <stdio.h>
 #include <algorithm>
index 6d28721e3246bbfd1dd45bb366f8a4ebca28a134..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); \
index 4a3d9a63070b61c2662bd4aacfcfce09efa7a199..af93f888de2313eacc45570822effb1785534564 100644 (file)
 
 #include "utilities.h"
 
-#define RETURN_BAD_RESULT(msg) { MESSAGE(msg); return false; }
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopoDS.hxx>
+
+#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); \
index 306ae1830b11493e3cf31c72aba4964bdc1c2815..64ff66f350fbb2f7a6efcc141f89889b80ff1017 100644 (file)
 #include "SMESH_Mesh.hxx"
 #include "SMESH_subMesh.hxx"
 
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <BRepTools_WireExplorer.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopoDS.hxx>
 
 #define DBGMSG(txt) \
 //  cout << txt << endl;
index 2c3c741286e41e01d8b0b1016213a8fb3a8fd6c1..12c132959fe4f4924901a0960a991e9be86d8306 100644 (file)
 #include "SMDS_EdgePosition.hxx"
 #include "SMDS_FacePosition.hxx"
 
-#include <BRepAdaptor_Curve.hxx>
-#include <BRep_Tool.hxx>
-#include <BRepLProp.hxx>
 #include <BRepTools.hxx>
 #include <BRepTools_WireExplorer.hxx>
+#include <BRep_Tool.hxx>
 #include <Geom_Surface.hxx>
-#include <Geom_Curve.hxx>
-#include <Geom2d_Curve.hxx>
-#include <GeomAdaptor_Curve.hxx>
-#include <GCPnts_UniformAbscissa.hxx>
-#include <TopExp.hxx>
+#include <NCollection_DefineArray2.hxx>
 #include <Precision.hxx>
-#include <gp_Pnt2d.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
 #include <TColStd_SequenceOfReal.hxx>
 #include <TColgp_SequenceOfXY.hxx>
-#include <NCollection_DefineArray2.hxx>
+#include <TopExp.hxx>
+#include <TopoDS.hxx>
 
 #include "utilities.h"
 #include "Utils_ExceptHandlers.hxx"
index 128b32077354caca976777bf214dc0ac52f87489..cc1b4f89e4be741559018d6601ecad5745423b9a 100644 (file)
 
 #include "utilities.h"
 
-#include <TopoDS_Solid.hxx>
-#include <TopoDS_Shell.hxx>
-#include <BRepTools.hxx>
 #include <BRepAdaptor_Curve.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <BRepBuilderAPI_MakeEdge.hxx>
+#include <BRepTools.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Shell.hxx>
+#include <TopoDS_Solid.hxx>
 #include <gp.hxx>
 #include <gp_Pnt.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())
 
 typedef StdMeshers_ProjectionUtils TAssocTool;
index ba5f7450329801135cf9f6445fe72c57eeb9b95c..dffe2629f2a0e5d95eccbe7642069b016fc77d8a 100644 (file)
 
 #include <BRepAdaptor_Curve.hxx>
 #include <BRep_Tool.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopExp_Explorer.hxx>
 #include <GCPnts_AbscissaPoint.hxx>
 #include <GCPnts_UniformAbscissa.hxx>
 #include <GCPnts_UniformDeflection.hxx>
 #include <Precision.hxx>
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Edge.hxx>
 
 #include <string>