1D Hypothesis to compute segment length free of thinking More...
#include <StdMeshers_AutomaticLength.hxx>
Public Member Functions | |
double | GetFineness () const |
Return mesh Fineness. More... | |
double | GetLength (const SMESH_Mesh *aMesh, const double edgeLength) |
Computes segment length for an edge of given length. More... | |
double | GetLength (const SMESH_Mesh *aMesh, const TopoDS_Shape &anEdge) |
Computes segment for a given edge. More... | |
virtual std::istream & | LoadFrom (std::istream &load) |
virtual std::ostream & | SaveTo (std::ostream &save) |
void | SetFineness (double theFineness) |
Set Fineness. More... | |
virtual bool | SetParametersByDefaults (const TDefaults &dflts, const SMESH_Mesh *theMesh=0) |
Initialize my parameter values by default parameters. More... | |
virtual bool | SetParametersByMesh (const SMESH_Mesh *theMesh, const TopoDS_Shape &theShape) |
Initialize Fineness by the mesh built on the geometry. More... | |
StdMeshers_AutomaticLength (int hypId, int studyId, SMESH_Gen *gen) | |
virtual | ~StdMeshers_AutomaticLength () |
Public Member Functions inherited from SMESH_Hypothesis | |
void | ClearParameters () |
virtual bool | DataDependOnParams () const |
The returned value is used by NotifySubMeshesHypothesisModification() to decide to call subMesh->AlgoStateEngine( MODIF_HYP, hyp ) or not if subMesh is ready to be computed (algo+hyp==OK) but not yet computed. True result is reasonable for example if EventListeners depend on parameters of hypothesis. More... | |
virtual int | GetDim () const |
SMESH_Gen * | GetGen () const |
char * | GetLastParameters () const |
virtual const char * | GetLibName () const |
SMESH_Mesh * | GetMeshByPersistentID (int id) |
Find a mesh with given persistent ID. More... | |
char * | GetParameters () const |
virtual int | GetShapeType () const |
int | GetStudyId () const |
virtual bool | IsAuxiliary () const |
Return true if me is an auxiliary hypothesis. More... | |
virtual void | NotifySubMeshesHypothesisModification () |
void | SetLastParameters (const char *theParameters) |
void | SetLibName (const char *theLibName) |
void | SetParameters (const char *theParameters) |
virtual bool | SetParametersByDefaults (const TDefaults &dflts, const SMESH_Mesh *theMesh=0)=0 |
Initialize my parameter values by default parameters. More... | |
virtual bool | SetParametersByMesh (const SMESH_Mesh *theMesh, const TopoDS_Shape &theShape)=0 |
Initialize my parameter values by the mesh built on the geometry. More... | |
SMESH_Hypothesis (int hypId, int studyId, SMESH_Gen *gen) | |
virtual | ~SMESH_Hypothesis () |
Public Member Functions inherited from SMESHDS_Hypothesis | |
int | GetID () const |
const char * | GetName () const |
int | GetType () const |
bool | IsSameName (const SMESHDS_Hypothesis &other) const |
Compare types of hypotheses. More... | |
virtual std::istream & | LoadFrom (std::istream &load)=0 |
bool | operator!= (const SMESHDS_Hypothesis &other) const |
virtual bool | operator== (const SMESHDS_Hypothesis &other) const |
virtual std::ostream & | SaveTo (std::ostream &save)=0 |
SMESHDS_Hypothesis (int hypId) | |
virtual | ~SMESHDS_Hypothesis () |
Friends | |
std::ostream & | operator<< (std::ostream &save, StdMeshers_AutomaticLength &hyp) |
std::istream & | operator>> (std::istream &load, StdMeshers_AutomaticLength &hyp) |
Additional Inherited Members | |
Public Types inherited from SMESH_Hypothesis | |
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 , HYP_INCOMPAT_HYPS } |
Public Types inherited from SMESHDS_Hypothesis | |
enum | hypothesis_type { PARAM_ALGO , ALGO_0D , ALGO_1D , ALGO_2D , ALGO_3D } |
Static Public Member Functions inherited from SMESH_Hypothesis | |
static bool | IsStatusFatal (Hypothesis_Status theStatus) |
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) )
|
virtual |
double StdMeshers_AutomaticLength::GetFineness | ( | ) | const |
Return mesh Fineness.
double | - Fineness value [0.0-1.0] |
double StdMeshers_AutomaticLength::GetLength | ( | const SMESH_Mesh * | aMesh, |
const double | edgeLength | ||
) |
Computes segment length for an edge of given length.
double StdMeshers_AutomaticLength::GetLength | ( | const SMESH_Mesh * | aMesh, |
const TopoDS_Shape & | anEdge | ||
) |
Computes segment for a given edge.
Referenced by StdMeshers_Regular_1D::CheckHypothesis(), StdMeshers_CompositeSegment_1D::Compute(), and SetParametersByMesh().
|
virtual |
Implements SMESHDS_Hypothesis.
|
virtual |
Implements SMESHDS_Hypothesis.
References OfflineRenderingUtils::save().
void StdMeshers_AutomaticLength::SetFineness | ( | double | theFineness | ) |
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)
References SMESH_Hypothesis::NotifySubMeshesHypothesisModification().
|
virtual |
Initialize my parameter values by default parameters.
bool | - true if parameter values have been successfully defined |
Implements SMESH_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.
References SMESH_Algo::EdgeLength(), GetLength(), SMESHDS_Mesh::MeshElements(), and SMESHDS_SubMesh::NbElements().
|
friend |
|
friend |