SALOME - SMESH
|
1D Hypothesis to compute segment length free of thinking More...
#include <StdMeshers_AutomaticLength.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_AutomaticLength (int hypId, int studyId, SMESH_Gen *gen) | |
virtual | ~ StdMeshers_AutomaticLength () |
double | GetLength (const SMESH_Mesh *aMesh, const TopoDS_Shape &anEdge) throw ( SMESH_Exception ) |
Computes segment for a given edge. More... | |
double | GetLength (const SMESH_Mesh *aMesh, const double edgeLength) throw ( SMESH_Exception ) |
Computes segment length for an edge of given length. More... | |
void | SetFineness (double theFineness) throw ( SMESH_Exception ) |
Set Fineness. More... | |
double | GetFineness () const |
Return mesh Fineness. More... | |
virtual std::ostream & | SaveTo (std::ostream &save) |
virtual std::istream & | LoadFrom (std::istream &load) |
virtual bool | SetParametersByMesh (const SMESH_Mesh *theMesh, const TopoDS_Shape &theShape) |
Initialize Fineness by the mesh built on the geometry. More... | |
virtual bool | SetParametersByDefaults (const TDefaults &dflts, const SMESH_Mesh *theMesh=0) |
Initialize my parameter values by default parameters. More... | |
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. More... | |
const char * | GetName () const |
int | GetID () const |
int | GetType () const |
Static Public Member Functions | |
static bool | IsStatusFatal (Hypothesis_Status theStatus) |
Protected Attributes | |
std::map< const TopoDS_TShape *, double > | _TShapeToLength |
const SMESH_Mesh * | _mesh |
double | _fineness |
double | _S0 |
double | _minLen |
SMESH_Gen * | _gen |
int | _studyId |
int | _shapeType |
int | _param_algo_dim |
std::string | _name |
int | _hypId |
int | _type |
Friends | |
std::ostream & | operator<< (std::ostream &save, StdMeshers_AutomaticLength &hyp) |
std::istream & | operator>> (std::istream &load, StdMeshers_AutomaticLength &hyp) |
1D Hypothesis to compute segment length free of thinking
It computes segment length basing on max shape size to shortest edge length ratio: S = S0 * f(L/Lmin) where f(x) = 1 + (2/Pi * 7 * atan(x/5) )
Definition at line 48 of file StdMeshers_AutomaticLength.hxx.
|
inherited |
Definition at line 50 of file SMESH_Hypothesis.hxx.
|
inherited |
Enumerator | |
---|---|
PARAM_ALGO | |
ALGO_0D | |
ALGO_1D | |
ALGO_2D | |
ALGO_3D |
Definition at line 49 of file SMESHDS_Hypothesis.hxx.
|
virtual |
double StdMeshers_AutomaticLength::GetLength | ( | const SMESH_Mesh * | aMesh, |
const TopoDS_Shape & | anEdge | ||
) | |||
throw | ( | SMESH_Exception | |
) |
Computes segment for a given edge.
double StdMeshers_AutomaticLength::GetLength | ( | const SMESH_Mesh * | aMesh, |
const double | edgeLength | ||
) | |||
throw | ( | SMESH_Exception | |
) |
Computes segment length for an edge of given length.
void StdMeshers_AutomaticLength::SetFineness | ( | double | theFineness | ) | |
throw | ( | SMESH_Exception | |||
) |
Set Fineness.
theFineness | - The Fineness value [0.0-1.0], 0 - coarse mesh 1 - fine mesh |
Raise if theFineness is out of range The "Initial Number of Elements on the Shortest Edge" (S0) is divided by (0.5 + 4.5 x theFineness)
double StdMeshers_AutomaticLength::GetFineness | ( | ) | const |
Return mesh Fineness.
double | - Fineness value [0.0-1.0] |
Definition at line 83 of file StdMeshers_AutomaticLength.hxx.
References SMESHDS_Hypothesis::LoadFrom(), SMESHDS_Hypothesis::SaveTo(), SMESH_Hypothesis::SetParametersByDefaults(), and SMESH_Hypothesis::SetParametersByMesh().
|
virtual |
Implements SMESHDS_Hypothesis.
|
virtual |
Implements SMESHDS_Hypothesis.
|
virtual |
Initialize Fineness by the mesh built on the geometry.
theMesh | - the built mesh |
theShape | - the geometry of interest |
bool | - true if parameter values have been successfully defined |
Implements SMESH_Hypothesis.
|
virtual |
Initialize my parameter values by default parameters.
bool | - true if parameter values have been successfully defined |
Implements SMESH_Hypothesis.
|
staticinherited |
Definition at line 68 of file SMESH_Hypothesis.hxx.
|
virtualinherited |
|
inherited |
|
virtualinherited |
|
virtualinherited |
|
virtualinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
virtualinherited |
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.
|
inherited |
|
inherited |
|
inherited |
|
friend |
|
friend |
|
protected |
Definition at line 105 of file StdMeshers_AutomaticLength.hxx.
|
protected |
Definition at line 106 of file StdMeshers_AutomaticLength.hxx.
|
protected |
Definition at line 107 of file StdMeshers_AutomaticLength.hxx.
|
protected |
Definition at line 107 of file StdMeshers_AutomaticLength.hxx.
|
protected |
Definition at line 107 of file StdMeshers_AutomaticLength.hxx.
|
protectedinherited |
Definition at line 118 of file SMESH_Hypothesis.hxx.
|
protectedinherited |
Definition at line 119 of file SMESH_Hypothesis.hxx.
|
protectedinherited |
Definition at line 120 of file SMESH_Hypothesis.hxx.
|
protectedinherited |
Definition at line 121 of file SMESH_Hypothesis.hxx.
|
protectedinherited |
Definition at line 52 of file SMESHDS_Hypothesis.hxx.
|
protectedinherited |
Definition at line 53 of file SMESHDS_Hypothesis.hxx.
|
protectedinherited |
Definition at line 54 of file SMESHDS_Hypothesis.hxx.