- virtual bool SetParametersByElementSize(double elemLenght, const SMESH_Mesh* theMesh=0)=0;
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0)=0;
{
return false;
}
-bool SMESH_Algo::SetParametersByElementSize(double, const SMESH_Mesh*)
+bool SMESH_Algo::SetParametersByDefaults(const TDefaults& , const SMESH_Mesh*)
{
return false;
}
* \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 SetParametersByElementSize(double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
/*!
* \brief return compute error
*/
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape)=0;
+ struct TDefaults
+ {
+ double _elemLength;
+ int _nbSegments;
+ };
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize(double elemLenght, const SMESH_Mesh* theMesh=0)=0;
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0)=0;
/*!
* \brief Return true if me is an auxiliary hypothesis
}
}
- if ( (!isSubMesh || !aMeshVar->_is_nil()) && !aGeomVar->_is_nil() )
- return SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(),
- aServerLib.toLatin1().data(),
- aMeshVar,
- aGeomVar,
- /*byMesh = */isSubMesh);
-
- return SMESH::SMESH_Hypothesis::_nil();
+ return SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(),
+ aServerLib.toLatin1().data(),
+ aMeshVar,
+ aGeomVar,
+ /*byMesh = */isSubMesh);
+
}
//================================================================================
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_Arithmetic1D::SetParametersByElementSize(double elemLenght,
- const SMESH_Mesh* /*mesh*/)
+bool StdMeshers_Arithmetic1D::SetParametersByDefaults(const TDefaults& dflts,
+ const SMESH_Mesh* /*mesh*/)
{
- return bool( _begLength = _endLength = elemLenght );
+ return bool( _begLength = _endLength = dflts._elemLength );
}
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
protected:
double _begLength, _endLength;
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_AutomaticLength::SetParametersByElementSize(double elemLenght,
- const SMESH_Mesh* theMesh)
+bool StdMeshers_AutomaticLength::SetParametersByDefaults(const TDefaults& /*theDflts*/,
+ 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.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
protected:
std::map<const TopoDS_TShape*, double> _TShapeToLength;
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_Deflection1D::SetParametersByElementSize(double /*elemLenght*/,
- const SMESH_Mesh* /*theMesh*/)
+bool StdMeshers_Deflection1D::SetParametersByDefaults(const TDefaults& /*dflts*/,
+ 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.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
protected:
double _value;
}
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_LayerDistribution::SetParametersByElementSize(double elemLenght,
- const SMESH_Mesh* theMesh)
+bool StdMeshers_LayerDistribution::SetParametersByDefaults(const TDefaults& dflts,
+ const SMESH_Mesh* theMesh)
{
- return myHyp ? myHyp->SetParametersByElementSize(elemLenght,theMesh) : false;
+ return myHyp ? myHyp->SetParametersByDefaults(dflts,theMesh) : false;
}
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
protected:
SMESH_Hypothesis* myHyp;
}
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_LengthFromEdges::SetParametersByElementSize(double /*elemLenght*/,
- const SMESH_Mesh* /*theMesh*/)
+bool StdMeshers_LengthFromEdges::SetParametersByDefaults(const TDefaults& /*dflts*/,
+ 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.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
protected:
int _mode;
}
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_LocalLength::SetParametersByElementSize(double elemLenght,
- const SMESH_Mesh* /*theMesh*/)
+bool StdMeshers_LocalLength::SetParametersByDefaults(const TDefaults& dflts,
+ const SMESH_Mesh* /*theMesh*/)
{
- return bool( _length = elemLenght );
+ return bool( _length = dflts._elemLength );
}
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
protected:
double _length;
}
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_MaxElementArea::SetParametersByElementSize(double elemLenght,
- const SMESH_Mesh* /*theMesh*/)
+bool StdMeshers_MaxElementArea::SetParametersByDefaults(const TDefaults& dflts,
+ const SMESH_Mesh* /*theMesh*/)
{
- return bool( _maxArea = elemLenght*elemLenght );
+ return bool( _maxArea = dflts._elemLength*dflts._elemLength );
}
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
protected:
double _maxArea;
}
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_MaxElementVolume::SetParametersByElementSize(double elemLenght,
- const SMESH_Mesh* /*theMesh*/)
+bool StdMeshers_MaxElementVolume::SetParametersByDefaults(const TDefaults& dflts,
+ const SMESH_Mesh* /*theMesh*/)
{
- return bool( _maxVolume = elemLenght*elemLenght*elemLenght );
+ return bool( _maxVolume = dflts._elemLength*dflts._elemLength*dflts._elemLength );
}
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
protected:
double _maxVolume;
}
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_MaxLength::SetParametersByElementSize(double elemLenght,
- const SMESH_Mesh* /*theMesh*/)
+bool StdMeshers_MaxLength::SetParametersByDefaults(const TDefaults& dflts,
+ const SMESH_Mesh* /*theMesh*/)
{
- _preestimation = ( elemLenght > 0.);
- if ( _preestimation )
- _preestimated = elemLenght;
- return bool( _length = elemLenght );
+ //_preestimation = ( dflts._elemLength > 0.);
+ if ( dflts._elemLength > 0. )
+ _preestimated = dflts._elemLength;
+ return bool( _length = dflts._elemLength );
}
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
protected:
double _length, _preestimated;
}
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_NotConformAllowed::SetParametersByElementSize(double /*elemLenght*/,
- const SMESH_Mesh* /*theMesh*/)
+bool StdMeshers_NotConformAllowed::SetParametersByDefaults(const TDefaults& /*dflts*/,
+ 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.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
};
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_NumberOfLayers::SetParametersByElementSize(double elemLenght,
- const SMESH_Mesh* theMesh)
+bool StdMeshers_NumberOfLayers::SetParametersByDefaults(const TDefaults& dflts,
+ const SMESH_Mesh* theMesh)
{
- return bool( theMesh ? _nbLayers = int( theMesh->GetShapeDiagonalSize() / elemLenght/ 2.) : 0);
+ if ( dflts._elemLength )
+ return bool( theMesh ? _nbLayers = int( theMesh->GetShapeDiagonalSize() / dflts._elemLength/ 2.) : 0);
+ return false;
}
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
protected:
int _nbLayers;
}
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_NumberOfSegments::SetParametersByElementSize(double elemLenght,
- const SMESH_Mesh* /*theMesh*/)
+bool StdMeshers_NumberOfSegments::SetParametersByDefaults(const TDefaults& dflts,
+ const SMESH_Mesh* /*theMesh*/)
{
- return false;
+ return bool(_numberOfSegments = dflts._nbSegments );
}
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
virtual std::ostream & SaveTo(std::ostream & save);
virtual std::istream & LoadFrom(std::istream & load);
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_ProjectionSource1D::SetParametersByElementSize(double /*elemLenght*/,
- const SMESH_Mesh* /*theMesh*/)
+bool StdMeshers_ProjectionSource1D::SetParametersByDefaults(const TDefaults& /*dflts*/,
+ 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.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
protected:
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_ProjectionSource2D::SetParametersByElementSize(double /*elemLenght*/,
- const SMESH_Mesh* /*theMesh*/)
+bool StdMeshers_ProjectionSource2D::SetParametersByDefaults(const TDefaults& /*dflts*/,
+ 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.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
protected:
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_ProjectionSource3D::SetParametersByElementSize(double /*elemLenght*/,
- const SMESH_Mesh* /*theMesh*/)
+bool StdMeshers_ProjectionSource3D::SetParametersByDefaults(const TDefaults& /*dflts*/,
+ 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.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
protected:
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; }
+bool StdMeshers_Propagation::SetParametersByDefaults(const TDefaults&,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
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
};
#endif
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_QuadranglePreference::SetParametersByElementSize(double /*elemLenght*/,
- const SMESH_Mesh* /*theMesh*/)
+bool StdMeshers_QuadranglePreference::SetParametersByDefaults(const TDefaults& /*dflts*/,
+ 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.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
};
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_QuadraticMesh::SetParametersByElementSize(double /*elemLenght*/,
- const SMESH_Mesh* /*theMesh*/)
+bool StdMeshers_QuadraticMesh::SetParametersByDefaults(const TDefaults& /*dflts*/,
+ 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.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
};
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_SegmentLengthAroundVertex::SetParametersByElementSize(double,
- const SMESH_Mesh*)
+bool StdMeshers_SegmentLengthAroundVertex::SetParametersByDefaults(const TDefaults&,
+ 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.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
protected:
double _length;
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_StartEndLength::SetParametersByElementSize(double elemLenght,
- const SMESH_Mesh* /*theMesh*/)
+bool StdMeshers_StartEndLength::SetParametersByDefaults(const TDefaults& dflts,
+ const SMESH_Mesh* /*theMesh*/)
{
- return bool(_begLength = _endLength = elemLenght );
+ return bool(_begLength = _endLength = dflts._elemLength );
}
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
protected:
double _begLength, _endLength;
//================================================================================
/*!
- * \brief Initialize my parameter values by linear size of mesh element.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_TrianglePreference::SetParametersByElementSize(double /*elemLenght*/,
- const SMESH_Mesh* /*theMesh*/)
+bool StdMeshers_TrianglePreference::SetParametersByDefaults(const TDefaults& /*dflts*/,
+ 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.
+ * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
+ virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
};