28 #ifndef _SMESH_GEN_HXX_
29 #define _SMESH_GEN_HXX_
33 #include "Utils_SALOME_Exception.hxx"
46 #include <TopoDS_Shape.hxx>
47 #include <TopTools_IndexedMapOfShape.hxx>
73 SMESH_Mesh* CreateMesh(
bool theIsEmbeddedMode);
94 const TopoDS_Shape & aShape,
95 const int aFlags = COMPACT_MESH,
98 TopTools_IndexedMapOfShape* anAllowedSubShapes=0);
101 const TopoDS_Shape & aShape);
103 const TopoDS_Shape & aShape);
115 const TopoDS_Shape & aShape,
117 const bool anUpward=
false,
120 bool CheckAlgoState(
SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape);
145 { _name = name; _algo = algo; _algoDim = algo->
GetDim(); _isGlobalAlgo = isGlobal; }
147 { _name = name; _algo = 0; _algoDim = algoDim; _isGlobalAlgo = isGlobal; }
150 bool GetAlgoState(
SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape,
151 std::list< SMESH_Gen::TAlgoStateError > & theErrors);
158 static int GetShapeDim(
const TopAbs_ShapeEnum & aShapeType);
160 {
return GetShapeDim( aShape.ShapeType() ); }
161 static int GetFlatShapeDim(
const TopoDS_Shape &aShape);
163 SMESH_Algo* GetAlgo(
SMESH_Mesh & aMesh,
const TopoDS_Shape & aShape, TopoDS_Shape* assignedTo=0);
168 static std::vector< std::string > GetPluginXMLPaths();
173 void send_mesh(
SMESH_Mesh & aMesh, std::string filename);
175 bool parallelComputeSubMeshes(
177 const TopoDS_Shape & aShape,
180 TopTools_IndexedMapOfShape* allowedSubShapes,
182 const bool includeSelf,
183 const bool complexShapeFirst,
184 const bool aShapeOnly);
186 bool sequentialComputeSubMeshes(
188 const TopoDS_Shape & aShape,
191 TopTools_IndexedMapOfShape* allowedSubShapes,
193 const bool includeSelf,
194 const bool complexShapeFirst,
195 const bool aShapeOnly);
214 void resetCurrentSubMesh();
std::map< SMESH_subMesh *, std::vector< smIdType > > MapShapeNbElems
Definition: SMESH_Algo.hxx:61
SMESH_Hypothesis::Hypothesis_Status TAlgoStateErrorName
Definition: SMESH_Gen.hxx:53
struct studyContextStruct StudyContextStruct
std::set< int > TSetOfInt
Definition: SMESH_Gen.hxx:65
MeshDimension
Definition: SMESH_Hypothesis.hxx:40
@ MeshDim_3D
Definition: SMESH_Hypothesis.hxx:44
#define SMESH_EXPORT
Definition: SMESH_SMESH.hxx:37
Definition: SMESHDS_Document.hxx:38
Root of all algorithms.
Definition: SMESH_Algo.hxx:79
Definition: SMESH_Gen.hxx:68
bool Compute(::SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, const int aFlags=COMPACT_MESH, const ::MeshDimension aDim=::MeshDim_3D, TSetOfInt *aShapesId=0, TopTools_IndexedMapOfShape *anAllowedSubShapes=0)
Computes aMesh on aShape.
void SetDefaultNbSegments(int nb)
Sets default number of segments per edge.
Definition: SMESH_Gen.hxx:133
static int GetShapeDim(const TopoDS_Shape &aShape)
Definition: SMESH_Gen.hxx:159
int _nbSegments
Definition: SMESH_Gen.hxx:211
bool Evaluate(::SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, MapShapeNbElems &aResMap, const bool anUpward=false, TSetOfInt *aShapesId=0)
evaluates size of prospective mesh on a shape
volatile bool _compute_canceled
Definition: SMESH_Gen.hxx:216
int _localId
Definition: SMESH_Gen.hxx:201
int GetBoundaryBoxSegmentation() const
Definition: SMESH_Gen.hxx:129
StudyContextStruct * _studyContext
Definition: SMESH_Gen.hxx:202
void SetBoundaryBoxSegmentation(int theNbSegments)
Sets number of segments per diagonal of boundary box of geometry by which default segment length of a...
Definition: SMESH_Gen.hxx:128
int _hypId
Definition: SMESH_Gen.hxx:205
void CancelCompute(::SMESH_Mesh &aMesh, const TopoDS_Shape &aShape)
ComputeFlags
Definition: SMESH_Gen.hxx:77
int GetDefaultNbSegments() const
Definition: SMESH_Gen.hxx:134
int _segmentation
Definition: SMESH_Gen.hxx:209
std::list< SMESH_subMesh * > _sm_current
Definition: SMESH_Gen.hxx:217
Definition: SMESH_Hypothesis.hxx:48
Hypothesis_Status
Definition: SMESH_Hypothesis.hxx:51
virtual int GetDim() const
Definition: SMESH_Hypothesis.cxx:75
Definition: SMESH_Mesh.hxx:80
Definition: SMESH_ParallelMesh.hxx:45
Definition: SMESH_subMesh.hxx:61
compute_event
Definition: SMESH_subMesh.hxx:116
@ HYP_OK
Definition: SMESH_Mesh.idl:209
Definition: SMESH_Gen.hxx:137
bool _isGlobalAlgo
Definition: SMESH_Gen.hxx:141
TAlgoStateErrorName _name
Definition: SMESH_Gen.hxx:138
int _algoDim
Definition: SMESH_Gen.hxx:140
void Set(TAlgoStateErrorName name, const SMESH_Algo *algo, bool isGlobal)
Definition: SMESH_Gen.hxx:144
void Set(TAlgoStateErrorName name, const int algoDim, bool isGlobal)
Definition: SMESH_Gen.hxx:146
TAlgoStateError()
Definition: SMESH_Gen.hxx:143
const SMESH_Algo * _algo
Definition: SMESH_Gen.hxx:139
Definition: SMESH_Gen.hxx:59
SMESHDS_Document * myDocument
Definition: SMESH_Gen.hxx:62
std::map< int, SMESH_Hypothesis * > mapHypothesis
Definition: SMESH_Gen.hxx:60
std::map< int, SMESH_Mesh * > mapMesh
Definition: SMESH_Gen.hxx:61