#include <StdMeshers_CartesianParameters3D.hxx>
Public Member Functions | |
const double * | GetAxisDirs () const |
void | GetCoordinates (std::vector< double > &xNodes, std::vector< double > &yNodes, std::vector< double > &zNodes, const Bnd_Box &bndBox) const |
bool | GetFixedPoint (double p[3]) const |
void | GetGrid (std::vector< double > &xNodes, int axis) const |
void | GetGridSpacing (std::vector< std::string > &spaceFunctions, std::vector< double > &internalPoints, const int axis) const |
double | GetSizeThreshold () const |
Return size threshold. More... | |
bool | GetToAddEdges () const |
bool | IsDefined () const |
Return true if parameters are well defined. More... | |
bool | IsGridBySpacing (const int axis) const |
virtual std::istream & | LoadFrom (std::istream &load) |
virtual std::ostream & | SaveTo (std::ostream &save) |
Persistence methods. More... | |
void | SetAxisDirs (const double *the9DirComps) |
Set custom direction of axes. More... | |
void | SetFixedPoint (const double p[3], bool toUnset) |
void | SetGrid (std::vector< double > &xNodes, int axis) |
void | SetGridSpacing (std::vector< std::string > &spaceFunctions, std::vector< double > &internalPoints, const int axis) |
Set grid spacing along the three axes. 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 my parameter values by the mesh built on the geometry. More... | |
void | SetSizeThreshold (const double threshold) |
void | SetToAddEdges (bool toAdd) |
Enables implementation of geometrical edges into the mesh. If this feature is disabled, sharp edges of the shape are lost ("smoothed") in the mesh if they don't coincide with the grid lines. More... | |
StdMeshers_CartesianParameters3D (int hypId, int studyId, SMESH_Gen *gen) | |
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 () |
Static Public Member Functions | |
static void | ComputeCoordinates (const double x0, const double x1, std::vector< std::string > &spaceFuns, std::vector< double > &points, std::vector< double > &coords, const std::string &axis, const double *xForced=0) |
Computes node coordinates by spacing functions. More... | |
static void | ComputeOptimalAxesDirs (const TopoDS_Shape &shape, const bool isOrthogonal, double dirCoords[9]) |
Returns axes at which number of hexahedra is maximal. More... | |
Static Public Member Functions inherited from SMESH_Hypothesis | |
static bool | IsStatusFatal (Hypothesis_Status theStatus) |
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 } |
This hypothesis specifies
StdMeshers_CartesianParameters3D::StdMeshers_CartesianParameters3D | ( | int | hypId, |
int | studyId, | ||
SMESH_Gen * | gen | ||
) |
References SetFixedPoint().
|
static |
Computes node coordinates by spacing functions.
x0 | - lower coordinate |
x1 | - upper coordinate |
spaceFuns | - space functions |
points | - internal points |
coords | - the computed coordinates |
References StdMeshers::FunctionExpr::value().
Referenced by GetCoordinates().
|
static |
Returns axes at which number of hexahedra is maximal.
const double * StdMeshers_CartesianParameters3D::GetAxisDirs | ( | ) | const |
void StdMeshers_CartesianParameters3D::GetCoordinates | ( | std::vector< double > & | xNodes, |
std::vector< double > & | yNodes, | ||
std::vector< double > & | zNodes, | ||
const Bnd_Box & | bndBox | ||
) | const |
Return coordinates of node positions along the three axes. If the grid is defined by spacing functions, the coordinates are computed
References ComputeCoordinates(), GetFixedPoint(), and IsGridBySpacing().
bool StdMeshers_CartesianParameters3D::GetFixedPoint | ( | double | p[3] | ) | const |
Referenced by GetCoordinates().
void StdMeshers_CartesianParameters3D::GetGrid | ( | std::vector< double > & | xNodes, |
int | axis | ||
) | const |
Return coordinates of node positions along the three axes
References IsGridBySpacing().
void StdMeshers_CartesianParameters3D::GetGridSpacing | ( | std::vector< std::string > & | spaceFunctions, |
std::vector< double > & | internalPoints, | ||
const int | axis | ||
) | const |
References IsGridBySpacing().
double StdMeshers_CartesianParameters3D::GetSizeThreshold | ( | ) | const |
Return size threshold.
bool StdMeshers_CartesianParameters3D::GetToAddEdges | ( | ) | const |
bool StdMeshers_CartesianParameters3D::IsDefined | ( | ) | const |
Return true if parameters are well defined.
Referenced by GetCoordinates(), GetGrid(), and GetGridSpacing().
|
virtual |
Implements SMESHDS_Hypothesis.
|
virtual |
void StdMeshers_CartesianParameters3D::SetAxisDirs | ( | const double * | the9DirComps | ) |
Set custom direction of axes.
References SMESH_Hypothesis::NotifySubMeshesHypothesisModification().
void StdMeshers_CartesianParameters3D::SetFixedPoint | ( | const double | p[3], |
bool | toUnset | ||
) |
Set/unset a fixed point, at which a node will be created provided that grid is defined by spacing in all directions
References SMESH_Hypothesis::NotifySubMeshesHypothesisModification().
Referenced by StdMeshers_CartesianParameters3D().
void StdMeshers_CartesianParameters3D::SetGrid | ( | std::vector< double > & | xNodes, |
int | axis | ||
) |
Sets coordinates of node positions along an axis (countered from 0)
References SMESH_Hypothesis::NotifySubMeshesHypothesisModification().
void StdMeshers_CartesianParameters3D::SetGridSpacing | ( | std::vector< std::string > & | spaceFunctions, |
std::vector< double > & | internalPoints, | ||
const int | axis | ||
) |
Set grid spacing along the three axes.
spaceFunctions | - functions defining spacing values at given point on axis |
internalPoints | - points dividing a grid into parts along each direction |
Parameter t of spaceFunction f(t) is a position [0,1] withing bounding box of the shape to mesh
References SMESH_Hypothesis::NotifySubMeshesHypothesisModification().
Referenced by SetParametersByDefaults().
|
virtual |
Initialize my parameter values by default parameters.
Implements SMESH_Hypothesis.
References SetGridSpacing().
|
virtual |
Initialize my parameter values by the mesh built on the geometry.
Implements SMESH_Hypothesis.
void StdMeshers_CartesianParameters3D::SetSizeThreshold | ( | const double | threshold | ) |
Set size threshold. A polyhedral cell got by cutting an initial hexahedron by geometry boundary is considered small and is removed if it's size is \athreshold times less than the size of the initial hexahedron.
References SMESH_Hypothesis::NotifySubMeshesHypothesisModification().
void StdMeshers_CartesianParameters3D::SetToAddEdges | ( | bool | toAdd | ) |
Enables implementation of geometrical edges into the mesh. If this feature is disabled, sharp edges of the shape are lost ("smoothed") in the mesh if they don't coincide with the grid lines.
References SMESH_Hypothesis::NotifySubMeshesHypothesisModification().