StdMeshers_CartesianParameters3D Class Reference

#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_GenGetGen () const
 
char * GetLastParameters () const
 
virtual const char * GetLibName () const
 
SMESH_MeshGetMeshByPersistentID (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
}
 

Detailed Description

This hypothesis specifies

  • Definition of the Cartesian grid
  • Size threshold

Constructor & Destructor Documentation

◆ StdMeshers_CartesianParameters3D()

StdMeshers_CartesianParameters3D::StdMeshers_CartesianParameters3D ( int  hypId,
int  studyId,
SMESH_Gen gen 
)

References SetFixedPoint().

Member Function Documentation

◆ ComputeCoordinates()

void StdMeshers_CartesianParameters3D::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 
)
static

Computes node coordinates by spacing functions.

Parameters
x0- lower coordinate
x1- upper coordinate
spaceFuns- space functions
points- internal points
coords- the computed coordinates

References StdMeshers::FunctionExpr::value().

Referenced by GetCoordinates().

◆ ComputeOptimalAxesDirs()

void StdMeshers_CartesianParameters3D::ComputeOptimalAxesDirs ( const TopoDS_Shape &  shape,
const bool  isOrthogonal,
double  dirCoords[9] 
)
static

Returns axes at which number of hexahedra is maximal.

◆ GetAxisDirs()

const double * StdMeshers_CartesianParameters3D::GetAxisDirs ( ) const

◆ GetCoordinates()

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().

◆ GetFixedPoint()

bool StdMeshers_CartesianParameters3D::GetFixedPoint ( double  p[3]) const

Referenced by GetCoordinates().

◆ GetGrid()

void StdMeshers_CartesianParameters3D::GetGrid ( std::vector< double > &  xNodes,
int  axis 
) const

Return coordinates of node positions along the three axes

References IsGridBySpacing().

◆ GetGridSpacing()

void StdMeshers_CartesianParameters3D::GetGridSpacing ( std::vector< std::string > &  spaceFunctions,
std::vector< double > &  internalPoints,
const int  axis 
) const

References IsGridBySpacing().

◆ GetSizeThreshold()

double StdMeshers_CartesianParameters3D::GetSizeThreshold ( ) const

Return size threshold.

◆ GetToAddEdges()

bool StdMeshers_CartesianParameters3D::GetToAddEdges ( ) const

◆ IsDefined()

bool StdMeshers_CartesianParameters3D::IsDefined ( ) const

Return true if parameters are well defined.

◆ IsGridBySpacing()

bool StdMeshers_CartesianParameters3D::IsGridBySpacing ( const int  axis) const

◆ LoadFrom()

std::istream & StdMeshers_CartesianParameters3D::LoadFrom ( std::istream &  load)
virtual

Implements SMESHDS_Hypothesis.

◆ SaveTo()

std::ostream & StdMeshers_CartesianParameters3D::SaveTo ( std::ostream &  save)
virtual

Persistence methods.

Implements SMESHDS_Hypothesis.

References OfflineRenderingUtils::save().

◆ SetAxisDirs()

void StdMeshers_CartesianParameters3D::SetAxisDirs ( const double *  the9DirComps)

Set custom direction of axes.

References SMESH_Hypothesis::NotifySubMeshesHypothesisModification().

◆ SetFixedPoint()

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().

◆ SetGrid()

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().

◆ SetGridSpacing()

void StdMeshers_CartesianParameters3D::SetGridSpacing ( std::vector< std::string > &  spaceFunctions,
std::vector< double > &  internalPoints,
const int  axis 
)

Set grid spacing along the three axes.

Parameters
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().

◆ SetParametersByDefaults()

bool StdMeshers_CartesianParameters3D::SetParametersByDefaults ( const TDefaults dflts,
const SMESH_Mesh theMesh = 0 
)
virtual

Initialize my parameter values by default parameters.

Implements SMESH_Hypothesis.

References SetGridSpacing().

◆ SetParametersByMesh()

bool StdMeshers_CartesianParameters3D::SetParametersByMesh ( const SMESH_Mesh theMesh,
const TopoDS_Shape &  theShape 
)
virtual

Initialize my parameter values by the mesh built on the geometry.

Implements SMESH_Hypothesis.

◆ SetSizeThreshold()

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().

◆ SetToAddEdges()

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().


The documentation for this class was generated from the following files: