+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize(double elemLenght, const SMESH_Mesh* theMesh=0)=0;
//================================================================================
/*!
- * \brief Initialize my parameter values by the mesh built on the geometry
- * \param theMesh - the built mesh
- * \param theShape - the geometry of interest
- * \retval bool - true if parameter values have been successfully defined
- *
- * Just return false as the algorithm does not hold parameters values
+ * \brief Just return false as the algorithm does not hold parameters values
*/
//================================================================================
{
return false;
}
-
+bool SMESH_Algo::SetParametersByElementSize(double, const SMESH_Mesh*)
+{
+ return false;
+}
//================================================================================
/*!
* \brief Fill vector of node parameters on geometrical edge, including vertex nodes
bool InitCompatibleHypoFilter( SMESH_HypoFilter & theFilter,
const bool ignoreAuxiliary) const;
/*!
- * \brief Initialize my parameter values by the mesh built on the geometry
- *
- * Just return false as the algorithm does not hold parameters values
+ * \brief Just return false as the algorithm does not hold parameters values
*/
- virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh,
- const TopoDS_Shape& theShape);
+ virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ virtual bool SetParametersByElementSize(double elemLenght, const SMESH_Mesh* theMesh=0);
/*!
* \brief return compute error
*/
/*!
* \brief Initialize my parameter values by the mesh built on the geometry
- * \param theMesh - the built mesh
- * \param theShape - the geometry of interest
- * \retval bool - true if parameter values have been successfully defined
+ * \param theMesh - the built mesh
+ * \param theShape - the geometry of interest
+ * \retval bool - true if parameter values have been successfully defined
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape)=0;
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize(double elemLenght, const SMESH_Mesh* theMesh=0)=0;
+
/*!
* \brief Return true if me is an auxiliary hypothesis
* \retval bool - auxiliary or not
}
return nbEdges;
}
+
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_Arithmetic1D::SetParametersByElementSize(double elemLenght,
+ const SMESH_Mesh* /*mesh*/)
+{
+ return bool( _begLength = _endLength = elemLenght );
+}
+
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
protected:
double _begLength, _endLength;
};
return nbEdges;
}
+
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_AutomaticLength::SetParametersByElementSize(double elemLenght,
+ const SMESH_Mesh* theMesh)
+{
+ return false;
+
+ // assure the base automatic length is stored in _TShapeToLength
+// GetLength( theMesh, elemLenght );
+
+// // find maximal edge length
+// double maxLen = 0;
+// map<const TopoDS_TShape*, double>::iterator
+// tshape_length = _TShapeToLength.begin(), slEnd = _TShapeToLength.end();
+// for ( ; tshape_length != slEnd; ++tshape_length )
+// if ( tshape_length->second > maxLen )
+// maxLen = tshape_length->second;
+
+// // automatic length for longest element
+// double autoLen = GetLength( theMesh, maxLen );
+
+// // elemLenght = autoLen / (theCoarseConst + theFineConst * _fineness) -->
+// _fineness = ( autoLen / elemLenght - theCoarseConst ) / theFineConst;
+
+// return true;
+}
+
+
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
protected:
std::map<const TopoDS_TShape*, double> _TShapeToLength;
const SMESH_Mesh* _mesh;
}
return nbEdges;
}
+
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_Deflection1D::SetParametersByElementSize(double /*elemLenght*/,
+ const SMESH_Mesh* /*theMesh*/)
+{
+ return false;
+}
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
- protected:
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
+protected:
double _value;
};
{
return false;
}
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_LayerDistribution::SetParametersByElementSize(double elemLenght,
+ const SMESH_Mesh* theMesh)
+{
+ return myHyp ? myHyp->SetParametersByElementSize(elemLenght,theMesh) : false;
+}
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
protected:
SMESH_Hypothesis* myHyp;
std::string mySavedHyp;
{
return false;
}
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_LengthFromEdges::SetParametersByElementSize(double /*elemLenght*/,
+ const SMESH_Mesh* /*theMesh*/)
+{
+ return true;
+}
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
protected:
int _mode;
};
return nbEdges;
}
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_LocalLength::SetParametersByElementSize(double elemLenght,
+ const SMESH_Mesh* /*theMesh*/)
+{
+ return bool( _length = elemLenght );
+}
+
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
protected:
double _length;
double _precision;
}
return _maxArea > 0;
}
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_MaxElementArea::SetParametersByElementSize(double elemLenght,
+ const SMESH_Mesh* /*theMesh*/)
+{
+ return bool( _maxArea = elemLenght*elemLenght );
+}
+
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
protected:
double _maxArea;
};
}
return _maxVolume > 0;
}
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_MaxElementVolume::SetParametersByElementSize(double elemLenght,
+ const SMESH_Mesh* /*theMesh*/)
+{
+ return bool( _maxVolume = elemLenght*elemLenght*elemLenght );
+}
+
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
protected:
double _maxVolume;
};
bool StdMeshers_NotConformAllowed::SetParametersByMesh(const SMESH_Mesh* /*theMesh*/,
const TopoDS_Shape& /*theShape*/)
{
- return false;
+ return true;
}
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_NotConformAllowed::SetParametersByElementSize(double /*elemLenght*/,
+ const SMESH_Mesh* /*theMesh*/)
+{
+ return true;
+}
+
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
};
#endif
#include "StdMeshers_NumberOfLayers.hxx"
+#include "SMESH_Mesh.hxx"
#include "utilities.h"
using namespace std;
{
return false;
}
+
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_NumberOfLayers::SetParametersByElementSize(double elemLenght,
+ const SMESH_Mesh* theMesh)
+{
+ return bool( theMesh ? _nbLayers = int( theMesh->GetShapeDiagonalSize() / elemLenght/ 2.) : 0);
+}
+
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
protected:
int _nbLayers;
};
int studyId,
SMESH_Gen * gen)
: SMESH_Hypothesis(hypId, studyId, gen),
- _numberOfSegments(1),
+ _numberOfSegments(15),//issue 19923
_distrType(DT_Regular),
_scaleFactor(1.),
_convMode(1) //cut negative by default
return nbEdges;
}
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_NumberOfSegments::SetParametersByElementSize(double elemLenght,
+ const SMESH_Mesh* /*theMesh*/)
+{
+ return false;
+}
+
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
virtual std::ostream & SaveTo(std::ostream & save);
virtual std::istream & LoadFrom(std::istream & load);
friend std::ostream& operator << (std::ostream & save, StdMeshers_NumberOfSegments & hyp);
_sourceMesh = mesh;
}
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_ProjectionSource1D::SetParametersByElementSize(double /*elemLenght*/,
+ const SMESH_Mesh* /*theMesh*/)
+{
+ return false;
+}
+
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
protected:
TopoDS_Shape _sourceEdge;
_targetVertex2 = TopoDS::Vertex( s5 );
_sourceMesh = mesh;
}
+
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_ProjectionSource2D::SetParametersByElementSize(double /*elemLenght*/,
+ const SMESH_Mesh* /*theMesh*/)
+{
+ return false;
+}
+
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
protected:
TopoDS_Shape _sourceFace;
_targetVertex2 = TopoDS::Vertex( s5 );
_sourceMesh = mesh;
}
+
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_ProjectionSource3D::SetParametersByElementSize(double /*elemLenght*/,
+ const SMESH_Mesh* /*theMesh*/)
+{
+ return false;
+}
+
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
protected:
TopoDS_Shape _sourceShape;
istream & operator >> (istream & load, StdMeshers_Propagation & hyp) { return hyp.LoadFrom(load); }
bool StdMeshers_Propagation::SetParametersByMesh(const SMESH_Mesh*,
const TopoDS_Shape& ) { return false; }
+bool StdMeshers_Propagation::SetParametersByElementSize(double,const SMESH_Mesh*) { return false; }
void StdMeshers_Propagation::SetPropagationMgr(SMESH_subMesh* subMesh) { PropagationMgr::Set( subMesh ); }
/*!
* \brief Return an edge from which hypotheses are propagated from
* Just return false as this hypothesis does not have parameters values
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
};
#endif
{
return false;
}
+
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_QuadranglePreference::SetParametersByElementSize(double /*elemLenght*/,
+ const SMESH_Mesh* /*theMesh*/)
+{
+ return false;
+}
+
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
};
#endif
{
return false;
}
+
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_QuadraticMesh::SetParametersByElementSize(double /*elemLenght*/,
+ const SMESH_Mesh* /*theMesh*/)
+{
+ return false;
+}
+
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
};
#endif
#include "StdMeshers_Regular_1D.hxx"
#include "StdMeshers_Distribution.hxx"
-#include "StdMeshers_LocalLength.hxx"
-#include "StdMeshers_NumberOfSegments.hxx"
#include "StdMeshers_Arithmetic1D.hxx"
-#include "StdMeshers_StartEndLength.hxx"
-#include "StdMeshers_Deflection1D.hxx"
#include "StdMeshers_AutomaticLength.hxx"
-#include "StdMeshers_SegmentLengthAroundVertex.hxx"
+#include "StdMeshers_Deflection1D.hxx"
+#include "StdMeshers_LocalLength.hxx"
+#include "StdMeshers_MaxLength.hxx"
+#include "StdMeshers_NumberOfSegments.hxx"
#include "StdMeshers_Propagation.hxx"
+#include "StdMeshers_SegmentLengthAroundVertex.hxx"
+#include "StdMeshers_StartEndLength.hxx"
#include "SMESH_Gen.hxx"
#include "SMESH_Mesh.hxx"
_shapeType = (1 << TopAbs_EDGE);
_compatibleHypothesis.push_back("LocalLength");
+ _compatibleHypothesis.push_back("MaxLength");
_compatibleHypothesis.push_back("NumberOfSegments");
_compatibleHypothesis.push_back("StartEndLength");
_compatibleHypothesis.push_back("Deflection1D");
const StdMeshers_LocalLength * hyp =
dynamic_cast <const StdMeshers_LocalLength * >(theHyp);
ASSERT(hyp);
- //_value[ BEG_LENGTH_IND ] = _value[ END_LENGTH_IND ] = hyp->GetLength();
_value[ BEG_LENGTH_IND ] = hyp->GetLength();
- _value[ END_LENGTH_IND ] = hyp->GetPrecision();
+ _value[ PRECISION_IND ] = hyp->GetPrecision();
ASSERT( _value[ BEG_LENGTH_IND ] > 0 );
_hypType = LOCAL_LENGTH;
aStatus = SMESH_Hypothesis::HYP_OK;
}
+ else if (hypName == "MaxLength")
+ {
+ const StdMeshers_MaxLength * hyp =
+ dynamic_cast <const StdMeshers_MaxLength * >(theHyp);
+ ASSERT(hyp);
+ _value[ BEG_LENGTH_IND ] = hyp->GetLength();
+ if ( hyp->GetUsePreestimatedLength() ) {
+ if ( int nbSeg = aMesh.GetNbElementsPerDiagonal() )
+ _value[ BEG_LENGTH_IND ] = aMesh.GetShapeDiagonalSize() / nbSeg;
+ }
+ ASSERT( _value[ BEG_LENGTH_IND ] > 0 );
+ _hypType = MAX_LENGTH;
+ aStatus = SMESH_Hypothesis::HYP_OK;
+ }
+
else if (hypName == "NumberOfSegments")
{
const StdMeshers_NumberOfSegments * hyp =
StdMeshers_AutomaticLength * hyp = const_cast<StdMeshers_AutomaticLength *>
(dynamic_cast <const StdMeshers_AutomaticLength * >(theHyp));
ASSERT(hyp);
- //_value[ BEG_LENGTH_IND ] = _value[ END_LENGTH_IND ] = hyp->GetLength( &aMesh, aShape );
- _value[ BEG_LENGTH_IND ] = hyp->GetLength( &aMesh, aShape );
- _value[ END_LENGTH_IND ] = Precision::Confusion(); // ?? or set to zero?
+ _value[ BEG_LENGTH_IND ] = _value[ END_LENGTH_IND ] = hyp->GetLength( &aMesh, aShape );
+// _value[ BEG_LENGTH_IND ] = hyp->GetLength( &aMesh, aShape );
+// _value[ END_LENGTH_IND ] = Precision::Confusion(); // ?? or set to zero?
ASSERT( _value[ BEG_LENGTH_IND ] > 0 );
- _hypType = LOCAL_LENGTH;
+ _hypType = MAX_LENGTH;
aStatus = SMESH_Hypothesis::HYP_OK;
}
else
void StdMeshers_Regular_1D::SetEventListener(SMESH_subMesh* subMesh)
{
-// static VertexEventListener listener;
-// SMESH_subMeshIteratorPtr smIt = subMesh->getDependsOnIterator(false,false);
-// while (smIt->more()) {
-// subMesh->SetEventListener( &listener, 0, smIt->next() );
-// }
StdMeshers_Propagation::SetPropagationMgr( subMesh );
}
switch( _hypType )
{
case LOCAL_LENGTH:
+ case MAX_LENGTH:
case NB_SEGMENTS: {
double eltSize = 1;
- if ( _hypType == LOCAL_LENGTH )
+ if ( _hypType == MAX_LENGTH )
+ {
+ double nbseg = ceil(theLength / _value[ BEG_LENGTH_IND ]); // integer sup
+ if (nbseg <= 0)
+ nbseg = 1; // degenerated edge
+ eltSize = theLength / nbseg;
+ }
+ else if ( _hypType == LOCAL_LENGTH )
{
// Local Length hypothesis
double nbseg = ceil(theLength / _value[ BEG_LENGTH_IND ]); // integer sup
}
if (!isFound) // not found by meshed edge in the propagation chain, use precision
{
- double aPrecision = _value[ END_LENGTH_IND ];
+ double aPrecision = _value[ PRECISION_IND ];
double nbseg_prec = ceil((theLength / _value[ BEG_LENGTH_IND ]) - aPrecision);
if (nbseg_prec == (nbseg - 1)) nbseg--;
}
StdMeshers_SegmentLengthAroundVertex* getVertexHyp(SMESH_Mesh & theMesh,
const TopoDS_Vertex & theV);
- enum HypothesisType { LOCAL_LENGTH, NB_SEGMENTS, BEG_END_LENGTH, DEFLECTION, ARITHMETIC_1D, NONE };
+ enum HypothesisType { LOCAL_LENGTH, MAX_LENGTH, NB_SEGMENTS, BEG_END_LENGTH, DEFLECTION, ARITHMETIC_1D, NONE };
enum ValueIndex {
SCALE_FACTOR_IND = 0,
BEG_LENGTH_IND = 0,
END_LENGTH_IND = 1,
- DEFLECTION_IND = 0
+ DEFLECTION_IND = 0,
+ PRECISION_IND = 0
};
enum IValueIndex {
return nbSegs;
}
+
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_SegmentLengthAroundVertex::SetParametersByElementSize(double,
+ const SMESH_Mesh*)
+{
+ return false;
+}
+
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
protected:
double _length;
};
}
return nbEdges;
}
+
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_StartEndLength::SetParametersByElementSize(double elemLenght,
+ const SMESH_Mesh* /*theMesh*/)
+{
+ return bool(_begLength = _endLength = elemLenght );
+}
+
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
protected:
double _begLength, _endLength;
};
{
return false;
}
+
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_TrianglePreference::SetParametersByElementSize(double /*elemLenght*/,
+ const SMESH_Mesh* /*theMesh*/)
+{
+ return false;
+}
+
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+ /*!
+ * \brief Initialize my parameter values by linear size of mesh element.
+ * \retval bool - true if parameter values have been successfully defined
+ */
+ virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+
};
#endif