1D and 2D algorithms doing nothing to allow mesh generation by mesh edition functions in TUI mode More...
#include <StdMeshers_UseExisting_1D2D.hxx>
Public Types | |
enum | Hypothesis_Status { HYP_OK = 0, HYP_MISSING, HYP_CONCURENT, HYP_BAD_PARAMETER, HYP_HIDDEN_ALGO, HYP_HIDING_ALGO, HYP_UNKNOWN_FATAL, HYP_INCOMPATIBLE, HYP_NOTCONFORM, HYP_ALREADY_EXIST, HYP_BAD_DIM, HYP_BAD_SUBSHAPE, HYP_BAD_GEOMETRY, HYP_NEED_SHAPE } |
enum | hypothesis_type { PARAM_ALGO, ALGO_0D, ALGO_1D, ALGO_2D, ALGO_3D } |
Public Member Functions | |
StdMeshers_UseExisting_2D (int hypId, int studyId, SMESH_Gen *gen) | |
virtual bool | CheckHypothesis (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, SMESH_Hypothesis::Hypothesis_Status &aStatus) |
Check hypothesis definition to mesh a shape. | |
virtual bool | Compute (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape) |
Computes mesh on a shape. | |
virtual bool | Evaluate (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, MapShapeNbElems &aResMap) |
evaluates size of prospective mesh on a shape | |
int | NumberOfWires (const TopoDS_Shape &S) |
int | NumberOfPoints (SMESH_Mesh &aMesh, const TopoDS_Wire &W) |
virtual std::ostream & | SaveTo (std::ostream &save) |
Saves nothing in a stream. | |
virtual std::istream & | LoadFrom (std::istream &load) |
Loads nothing from a stream. | |
const std::vector< std::string > & | GetCompatibleHypothesis () |
Returns all types of compatible hypotheses. | |
virtual bool | Compute (SMESH_Mesh &aMesh, SMESH_MesherHelper *aHelper) |
Computes mesh without geometry. | |
virtual const std::list< const SMESHDS_Hypothesis * > & | GetUsedHypothesis (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, const bool ignoreAuxiliary=true) |
Returns a list of compatible hypotheses used to mesh a shape. | |
const std::list< const SMESHDS_Hypothesis * > & | GetAppliedHypothesis (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, const bool ignoreAuxiliary=true) |
Returns a list of compatible hypotheses assigned to a shape in a mesh. | |
bool | InitCompatibleHypoFilter (SMESH_HypoFilter &theFilter, const bool ignoreAuxiliary) const |
Make the filter recognize only compatible hypotheses. | |
virtual bool | SetParametersByMesh (const SMESH_Mesh *theMesh, const TopoDS_Shape &theShape) |
Just return false as the algorithm does not hold parameters values. | |
virtual bool | SetParametersByDefaults (const TDefaults &dflts, const SMESH_Mesh *theMesh=0) |
Initialize my parameter values by default parameters. | |
SMESH_ComputeErrorPtr | GetComputeError () const |
return compute error | |
void | InitComputeError () |
initialize compute error | |
bool | OnlyUnaryInput () const |
bool | NeedDescretBoundary () const |
bool | NeedShape () const |
bool | SupportSubmeshes () const |
virtual void | SetEventListener (SMESH_subMesh *subMesh) |
Sets event listener to submeshes if necessary. | |
virtual void | SubmeshRestored (SMESH_subMesh *subMesh) |
Allow algo to do something after persistent restoration. | |
virtual int | GetDim () const |
int | GetStudyId () const |
virtual void | NotifySubMeshesHypothesisModification () |
virtual int | GetShapeType () const |
virtual const char * | GetLibName () const |
void | SetLibName (const char *theLibName) |
void | SetParameters (const char *theParameters) |
char * | GetParameters () const |
void | SetLastParameters (const char *theParameters) |
char * | GetLastParameters () const |
void | ClearParameters () |
virtual bool | IsAuxiliary () const |
Return true if me is an auxiliary hypothesis. | |
const char * | GetName () const |
int | GetID () const |
int | GetType () const |
Static Public Member Functions | |
static bool | GetNodeParamOnEdge (const SMESHDS_Mesh *theMesh, const TopoDS_Edge &theEdge, std::vector< double > &theParams) |
Fill vector of node parameters on geometrical edge, including vertex nodes. | |
static bool | GetSortedNodesOnEdge (const SMESHDS_Mesh *theMesh, const TopoDS_Edge &theEdge, const bool ignoreMediumNodes, std::map< double, const SMDS_MeshNode * > &theNodes) |
Fill map of node parameter on geometrical edge to node it-self. | |
static bool | IsReversedSubMesh (const TopoDS_Face &theFace, SMESHDS_Mesh *theMeshDS) |
Find out elements orientation on a geometrical face. | |
static double | EdgeLength (const TopoDS_Edge &E) |
Compute length of an edge. | |
static GeomAbs_Shape | Continuity (const TopoDS_Edge &E1, const TopoDS_Edge &E2) |
Return continuity of two edges. | |
static bool | IsContinuous (const TopoDS_Edge &E1, const TopoDS_Edge &E2) |
Return true if an edge can be considered as a continuation of another. | |
static const SMDS_MeshNode * | VertexNode (const TopoDS_Vertex &V, const SMESHDS_Mesh *meshDS) |
Return the node built on a vertex. | |
static bool | IsStatusFatal (Hypothesis_Status theStatus) |
Protected Member Functions | |
bool | error (int error, const SMESH_Comment &comment="") |
store error and comment and then return ( error == COMPERR_OK ) | |
bool | error (const SMESH_Comment &comment="") |
store COMPERR_ALGO_FAILED error and comment and then return false | |
bool | error (SMESH_ComputeErrorPtr error) |
store error and return error->IsOK() | |
void | addBadInputElement (const SMDS_MeshElement *elem) |
store a bad input element preventing computation, which may be a temporary one i.e. not residing the mesh, then it will be deleted by InitComputeError() | |
Protected Attributes | |
std::vector< std::string > | _compatibleHypothesis |
std::list< const SMESHDS_Hypothesis * > | _appliedHypList |
std::list< const SMESHDS_Hypothesis * > | _usedHypList |
bool | _onlyUnaryInput |
bool | _requireDescretBoundary |
bool | _requireShape |
bool | _supportSubmeshes |
bool | _quadraticMesh |
int | _error |
SMESH_ComputeErrorName or anything algo specific. | |
std::string | _comment |
any text explaining what is wrong in Compute() | |
std::list< const SMDS_MeshElement * > | _badInputElements |
to explain COMPERR_BAD_INPUT_MESH | |
SMESH_Gen * | _gen |
int | _studyId |
int | _shapeType |
int | _param_algo_dim |
std::string | _name |
int | _hypId |
int | _type |
1D and 2D algorithms doing nothing to allow mesh generation by mesh edition functions in TUI mode
Definition at line 38 of file StdMeshers_UseExisting_1D2D.hxx.
enum SMESH_Hypothesis::Hypothesis_Status [inherited] |
Definition at line 50 of file SMESH_Hypothesis.hxx.
enum SMESHDS_Hypothesis::hypothesis_type [inherited] |
Definition at line 49 of file SMESHDS_Hypothesis.hxx.
virtual bool StdMeshers_UseExisting_2D.CheckHypothesis | ( | SMESH_Mesh & | aMesh, | |
const TopoDS_Shape & | aShape, | |||
SMESH_Hypothesis::Hypothesis_Status & | aStatus | |||
) | [virtual] |
Check hypothesis definition to mesh a shape.
aMesh | - the mesh | |
aShape | - the shape | |
aStatus | - check result |
bool | - true if hypothesis is well defined |
Implements SMESH_Algo.
virtual bool StdMeshers_UseExisting_2D.Compute | ( | SMESH_Mesh & | aMesh, | |
const TopoDS_Shape & | aShape | |||
) | [virtual] |
Computes mesh on a shape.
aMesh | - the mesh | |
aShape | - the shape |
bool | - is a success |
Algorithms that !NeedDescretBoundary() || !OnlyUnaryInput() are to set SMESH_ComputeError returned by SMESH_submesh.GetComputeError() to report problematic subshapes
Implements SMESH_Algo.
virtual bool StdMeshers_UseExisting_2D.Evaluate | ( | SMESH_Mesh & | aMesh, | |
const TopoDS_Shape & | aShape, | |||
MapShapeNbElems & | aResMap | |||
) | [virtual] |
evaluates size of prospective mesh on a shape
aMesh | - the mesh | |
aShape | - the shape | |
aNbElems | - prospective number of elements by types |
bool | - is a success |
Implements SMESH_Algo.
int SMESH_2D_Algo.NumberOfWires | ( | const TopoDS_Shape & | S | ) | [inherited] |
int SMESH_2D_Algo.NumberOfPoints | ( | SMESH_Mesh & | aMesh, | |
const TopoDS_Wire & | W | |||
) | [inherited] |
virtual std::ostream& SMESH_Algo.SaveTo | ( | std::ostream & | save | ) | [virtual, inherited] |
Saves nothing in a stream.
save | - the stream |
virtual | std.ostream & - the stream |
Implements SMESHDS_Hypothesis.
virtual std::istream& SMESH_Algo.LoadFrom | ( | std::istream & | load | ) | [virtual, inherited] |
Loads nothing from a stream.
load | - the stream |
virtual | std.ostream & - the stream |
Implements SMESHDS_Hypothesis.
const std::vector< std::string >& SMESH_Algo.GetCompatibleHypothesis | ( | ) | [inherited] |
Returns all types of compatible hypotheses.
virtual bool SMESH_Algo.Compute | ( | SMESH_Mesh & | aMesh, | |
SMESH_MesherHelper * | aHelper | |||
) | [virtual, inherited] |
Computes mesh without geometry.
aMesh | - the mesh | |
aHelper | - helper that must be used for adding elements to |
bool | - is a success |
The method is called if ( !aMesh->HasShapeToMesh() )
Reimplemented in NETGENPlugin_NETGEN_3D.
virtual const std::list<const SMESHDS_Hypothesis *>& SMESH_Algo.GetUsedHypothesis | ( | SMESH_Mesh & | aMesh, | |
const TopoDS_Shape & | aShape, | |||
const bool | ignoreAuxiliary = true | |||
) | [virtual, inherited] |
Returns a list of compatible hypotheses used to mesh a shape.
aMesh | - the mesh | |
aShape | - the shape | |
ignoreAuxiliary | - do not include auxiliary hypotheses in the list |
const | std.list <const SMESHDS_Hypothesis*> - hypotheses list |
List the hypothesis used by the algorithm associated to the shape. Hypothesis associated to father shape -are- taken into account (see GetAppliedHypothesis). Relevant hypothesis have a name (type) listed in the algorithm. This method could be surcharged by specific algorithms, in case of several hypothesis simultaneously applicable.
Reimplemented in StdMeshers_Regular_1D.
const std::list<const SMESHDS_Hypothesis *>& SMESH_Algo.GetAppliedHypothesis | ( | SMESH_Mesh & | aMesh, | |
const TopoDS_Shape & | aShape, | |||
const bool | ignoreAuxiliary = true | |||
) | [inherited] |
Returns a list of compatible hypotheses assigned to a shape in a mesh.
aMesh | - the mesh | |
aShape | - the shape | |
ignoreAuxiliary | - do not include auxiliary hypotheses in the list |
const | std.list <const SMESHDS_Hypothesis*> - hypotheses list |
List the relevant hypothesis associated to the shape. Relevant hypothesis have a name (type) listed in the algorithm. Hypothesis associated to father shape -are not- taken into account (see GetUsedHypothesis)
bool SMESH_Algo.InitCompatibleHypoFilter | ( | SMESH_HypoFilter & | theFilter, | |
const bool | ignoreAuxiliary | |||
) | const [inherited] |
Make the filter recognize only compatible hypotheses.
theFilter | - the filter to initialize | |
ignoreAuxiliary | - make filter ignore compatible auxiliary hypotheses |
bool | - true if the algo has compatible hypotheses |
virtual bool SMESH_Algo.SetParametersByMesh | ( | const SMESH_Mesh * | theMesh, | |
const TopoDS_Shape & | theShape | |||
) | [virtual, inherited] |
Just return false as the algorithm does not hold parameters values.
Implements SMESH_Hypothesis.
virtual bool SMESH_Algo.SetParametersByDefaults | ( | const TDefaults & | dflts, | |
const SMESH_Mesh * | theMesh = 0 | |||
) | [virtual, inherited] |
Initialize my parameter values by default parameters.
bool | - true if parameter values have been successfully defined |
Implements SMESH_Hypothesis.
SMESH_ComputeErrorPtr SMESH_Algo.GetComputeError | ( | ) | const [inherited] |
return compute error
void SMESH_Algo.InitComputeError | ( | ) | [inherited] |
initialize compute error
bool SMESH_Algo.OnlyUnaryInput | ( | ) | const [inherited] |
Definition at line 201 of file SMESH_Algo.hxx.
bool SMESH_Algo.NeedDescretBoundary | ( | ) | const [inherited] |
Definition at line 209 of file SMESH_Algo.hxx.
bool SMESH_Algo.NeedShape | ( | ) | const [inherited] |
Definition at line 212 of file SMESH_Algo.hxx.
bool SMESH_Algo.SupportSubmeshes | ( | ) | const [inherited] |
Definition at line 215 of file SMESH_Algo.hxx.
virtual void SMESH_Algo.SetEventListener | ( | SMESH_subMesh * | subMesh | ) | [virtual, inherited] |
Sets event listener to submeshes if necessary.
subMesh | - submesh where algo is set |
This method is called when a submesh gets HYP_OK algo_state. After being set, event listener is notified on each event of a submesh. By default non listener is set
Reimplemented in StdMeshers_CompositeSegment_1D, StdMeshers_Projection_1D, StdMeshers_Projection_2D, StdMeshers_Projection_3D, and StdMeshers_Regular_1D.
virtual void SMESH_Algo.SubmeshRestored | ( | SMESH_subMesh * | subMesh | ) | [virtual, inherited] |
Allow algo to do something after persistent restoration.
subMesh | - restored submesh |
This method is called only if a submesh has HYP_OK algo_state.
Reimplemented in StdMeshers_RadialQuadrangle_1D2D, and StdMeshers_Regular_1D.
static bool SMESH_Algo.GetNodeParamOnEdge | ( | const SMESHDS_Mesh * | theMesh, | |
const TopoDS_Edge & | theEdge, | |||
std::vector< double > & | theParams | |||
) | [static, inherited] |
Fill vector of node parameters on geometrical edge, including vertex nodes.
theMesh | - The mesh containing nodes | |
theEdge | - The geometrical edge of interest | |
theParams | - The resulting vector of sorted node parameters |
bool | - false if not all parameters are OK |
static bool SMESH_Algo.GetSortedNodesOnEdge | ( | const SMESHDS_Mesh * | theMesh, | |
const TopoDS_Edge & | theEdge, | |||
const bool | ignoreMediumNodes, | |||
std::map< double, const SMDS_MeshNode * > & | theNodes | |||
) | [static, inherited] |
Fill map of node parameter on geometrical edge to node it-self.
theMesh | - The mesh containing nodes | |
theEdge | - The geometrical edge of interest | |
theNodes | - The resulting map | |
ignoreMediumNodes | - to store medium nodes of quadratic elements or not |
bool | - false if not all parameters are OK |
static bool SMESH_Algo.IsReversedSubMesh | ( | const TopoDS_Face & | theFace, | |
SMESHDS_Mesh * | theMeshDS | |||
) | [static, inherited] |
Find out elements orientation on a geometrical face.
theFace | - The face correctly oriented in the shape being meshed | |
theMeshDS | - The mesh data structure |
bool | - true if the face normal and the normal of first element in the correspoding submesh point in different directions |
static double SMESH_Algo.EdgeLength | ( | const TopoDS_Edge & | E | ) | [static, inherited] |
Compute length of an edge.
E | - the edge |
double | - the length |
static GeomAbs_Shape SMESH_Algo.Continuity | ( | const TopoDS_Edge & | E1, | |
const TopoDS_Edge & | E2 | |||
) | [static, inherited] |
Return continuity of two edges.
E1 | - the 1st edge | |
E2 | - the 2nd edge |
GeomAbs_Shape | - regularity at the junction between E1 and E2 |
static bool SMESH_Algo.IsContinuous | ( | const TopoDS_Edge & | E1, | |
const TopoDS_Edge & | E2 | |||
) | [static, inherited] |
Return true if an edge can be considered as a continuation of another.
Definition at line 295 of file SMESH_Algo.hxx.
static const SMDS_MeshNode* SMESH_Algo.VertexNode | ( | const TopoDS_Vertex & | V, | |
const SMESHDS_Mesh * | meshDS | |||
) | [static, inherited] |
Return the node built on a vertex.
V | - the vertex | |
meshDS | - mesh |
const | SMDS_MeshNode* - found node or NULL |
bool SMESH_Algo.error | ( | int | error, | |
const SMESH_Comment & | comment = "" | |||
) | [protected, inherited] |
store error and comment and then return ( error == COMPERR_OK )
bool SMESH_Algo.error | ( | const SMESH_Comment & | comment = "" |
) | [protected, inherited] |
store COMPERR_ALGO_FAILED error and comment and then return false
Definition at line 317 of file SMESH_Algo.hxx.
References COMPERR_ALGO_FAILED, and SMESH_Algo.error().
Referenced by SMESH_Algo.error().
bool SMESH_Algo.error | ( | SMESH_ComputeErrorPtr | error | ) | [protected, inherited] |
store error and return error->IsOK()
void SMESH_Algo.addBadInputElement | ( | const SMDS_MeshElement * | elem | ) | [protected, inherited] |
store a bad input element preventing computation, which may be a temporary one i.e. not residing the mesh, then it will be deleted by InitComputeError()
static bool SMESH_Hypothesis.IsStatusFatal | ( | Hypothesis_Status | theStatus | ) | [static, inherited] |
Definition at line 68 of file SMESH_Hypothesis.hxx.
virtual int SMESH_Hypothesis.GetDim | ( | ) | const [virtual, inherited] |
int SMESH_Hypothesis.GetStudyId | ( | ) | const [inherited] |
virtual void SMESH_Hypothesis.NotifySubMeshesHypothesisModification | ( | ) | [virtual, inherited] |
virtual int SMESH_Hypothesis.GetShapeType | ( | ) | const [virtual, inherited] |
virtual const char* SMESH_Hypothesis.GetLibName | ( | ) | const [virtual, inherited] |
void SMESH_Hypothesis.SetLibName | ( | const char * | theLibName | ) | [inherited] |
void SMESH_Hypothesis.SetParameters | ( | const char * | theParameters | ) | [inherited] |
char* SMESH_Hypothesis.GetParameters | ( | ) | const [inherited] |
void SMESH_Hypothesis.SetLastParameters | ( | const char * | theParameters | ) | [inherited] |
char* SMESH_Hypothesis.GetLastParameters | ( | ) | const [inherited] |
void SMESH_Hypothesis.ClearParameters | ( | ) | [inherited] |
virtual bool SMESH_Hypothesis.IsAuxiliary | ( | ) | const [virtual, inherited] |
Return true if me is an auxiliary hypothesis.
bool | - auxiliary or not |
An auxiliary hypothesis is optional, i.e. an algorithm can work without it and another hypothesis of the same dimention can be assigned to the shape
Definition at line 114 of file SMESH_Hypothesis.hxx.
References SMESHDS_Hypothesis.GetType().
const char* SMESHDS_Hypothesis.GetName | ( | ) | const [inherited] |
int SMESHDS_Hypothesis.GetID | ( | ) | const [inherited] |
int SMESHDS_Hypothesis.GetType | ( | ) | const [inherited] |
std::vector<std::string> SMESH_Algo._compatibleHypothesis [protected, inherited] |
Definition at line 332 of file SMESH_Algo.hxx.
std::list<const SMESHDS_Hypothesis *> SMESH_Algo._appliedHypList [protected, inherited] |
Definition at line 333 of file SMESH_Algo.hxx.
std::list<const SMESHDS_Hypothesis *> SMESH_Algo._usedHypList [protected, inherited] |
Definition at line 334 of file SMESH_Algo.hxx.
bool SMESH_Algo._onlyUnaryInput [protected, inherited] |
Definition at line 339 of file SMESH_Algo.hxx.
bool SMESH_Algo._requireDescretBoundary [protected, inherited] |
Definition at line 340 of file SMESH_Algo.hxx.
bool SMESH_Algo._requireShape [protected, inherited] |
Definition at line 341 of file SMESH_Algo.hxx.
bool SMESH_Algo._supportSubmeshes [protected, inherited] |
Definition at line 342 of file SMESH_Algo.hxx.
bool SMESH_Algo._quadraticMesh [protected, inherited] |
Definition at line 346 of file SMESH_Algo.hxx.
int SMESH_Algo._error [protected, inherited] |
SMESH_ComputeErrorName or anything algo specific.
Definition at line 348 of file SMESH_Algo.hxx.
std::string SMESH_Algo._comment [protected, inherited] |
any text explaining what is wrong in Compute()
Definition at line 349 of file SMESH_Algo.hxx.
std::list<const SMDS_MeshElement*> SMESH_Algo._badInputElements [protected, inherited] |
to explain COMPERR_BAD_INPUT_MESH
Definition at line 350 of file SMESH_Algo.hxx.
SMESH_Gen* SMESH_Hypothesis._gen [protected, inherited] |
Definition at line 118 of file SMESH_Hypothesis.hxx.
int SMESH_Hypothesis._studyId [protected, inherited] |
Definition at line 119 of file SMESH_Hypothesis.hxx.
int SMESH_Hypothesis._shapeType [protected, inherited] |
Definition at line 120 of file SMESH_Hypothesis.hxx.
int SMESH_Hypothesis._param_algo_dim [protected, inherited] |
Definition at line 121 of file SMESH_Hypothesis.hxx.
std::string SMESHDS_Hypothesis._name [protected, inherited] |
Definition at line 52 of file SMESHDS_Hypothesis.hxx.
int SMESHDS_Hypothesis._hypId [protected, inherited] |
Definition at line 53 of file SMESHDS_Hypothesis.hxx.
int SMESHDS_Hypothesis._type [protected, inherited] |
Definition at line 54 of file SMESHDS_Hypothesis.hxx.