PAL16202,16203 (Propagation 1D on edges group)

remove useless includes
This commit is contained in:
eap 2007-11-07 09:57:05 +00:00
parent a4deef590d
commit 42e8757bfc
10 changed files with 72 additions and 70 deletions

View File

@ -45,13 +45,11 @@
#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"

View File

@ -50,16 +50,20 @@
#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;

View 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;
int oldNumberOfSegments = _numberOfSegments;
if (segmentsNumber <= 0)
throw SALOME_Exception(LOCALIZED("number of segments must be positive"));
_numberOfSegments = segmentsNumber;
if (oldNumberOfSegments != _numberOfSegments)
NotifySubMeshesHypothesisModification();
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();

View File

@ -40,25 +40,18 @@
#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>

View File

@ -38,17 +38,17 @@
#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); \

View File

@ -48,7 +48,11 @@
#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); \

View File

@ -34,9 +34,10 @@
#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;

View File

@ -43,23 +43,16 @@
#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"

View File

@ -45,19 +45,20 @@
#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;

View File

@ -54,12 +54,14 @@
#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>