1 // SMESH SMESH : implementaion of SMESH idl descriptions
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : StdMeshers_Regular_1D.cxx
25 // Moved here from SMESH_Regular_1D.cxx
26 // Author : Paul RASCLE, EDF
32 #include "StdMeshers_Regular_1D.hxx"
33 #include "SMESH_Gen.hxx"
34 #include "SMESH_Mesh.hxx"
36 #include "StdMeshers_LocalLength.hxx"
37 #include "StdMeshers_NumberOfSegments.hxx"
38 #include "StdMeshers_Arithmetic1D.hxx"
39 #include "StdMeshers_StartEndLength.hxx"
40 #include "StdMeshers_Deflection1D.hxx"
42 #include "SMDS_MeshElement.hxx"
43 #include "SMDS_MeshNode.hxx"
44 #include "SMDS_EdgePosition.hxx"
45 #include "SMESH_subMesh.hxx"
47 #include "Utils_SALOME_Exception.hxx"
48 #include "utilities.h"
50 #include <BRep_Tool.hxx>
51 #include <TopoDS_Edge.hxx>
52 #include <TopoDS_Shape.hxx>
53 #include <TopTools_ListIteratorOfListOfShape.hxx>
54 #include <GeomAdaptor_Curve.hxx>
55 #include <GCPnts_AbscissaPoint.hxx>
56 #include <GCPnts_UniformAbscissa.hxx>
57 #include <GCPnts_UniformDeflection.hxx>
58 #include <Standard_ErrorHandler.hxx>
59 #include <Precision.hxx>
60 #include <Expr_GeneralExpression.hxx>
61 #include <Expr_NamedUnknown.hxx>
62 #include <Expr_Array1OfNamedUnknown.hxx>
63 #include <TColStd_Array1OfReal.hxx>
64 #include <ExprIntrp_GenExp.hxx>
69 //=============================================================================
73 //=============================================================================
75 StdMeshers_Regular_1D::StdMeshers_Regular_1D(int hypId, int studyId,
76 SMESH_Gen * gen):SMESH_1D_Algo(hypId, studyId, gen)
78 MESSAGE("StdMeshers_Regular_1D::StdMeshers_Regular_1D");
80 _shapeType = (1 << TopAbs_EDGE);
82 _compatibleHypothesis.push_back("LocalLength");
83 _compatibleHypothesis.push_back("NumberOfSegments");
84 _compatibleHypothesis.push_back("StartEndLength");
85 _compatibleHypothesis.push_back("Deflection1D");
86 _compatibleHypothesis.push_back("Arithmetic1D");
89 //=============================================================================
93 //=============================================================================
95 StdMeshers_Regular_1D::~StdMeshers_Regular_1D()
99 //=============================================================================
103 //=============================================================================
105 bool StdMeshers_Regular_1D::CheckHypothesis
107 const TopoDS_Shape& aShape,
108 SMESH_Hypothesis::Hypothesis_Status& aStatus)
112 const list <const SMESHDS_Hypothesis * >&hyps = GetUsedHypothesis(aMesh, aShape);
113 if (hyps.size() == 0)
115 aStatus = SMESH_Hypothesis::HYP_MISSING;
116 return false; // can't work without a hypothesis
119 // use only the first hypothesis
120 const SMESHDS_Hypothesis *theHyp = hyps.front();
122 string hypName = theHyp->GetName();
124 if (hypName == "LocalLength")
126 const StdMeshers_LocalLength * hyp =
127 dynamic_cast <const StdMeshers_LocalLength * >(theHyp);
129 _value[ BEG_LENGTH_IND ] = _value[ END_LENGTH_IND ] = hyp->GetLength();
130 ASSERT( _value[ BEG_LENGTH_IND ] > 0 );
131 _hypType = LOCAL_LENGTH;
132 aStatus = SMESH_Hypothesis::HYP_OK;
135 else if (hypName == "NumberOfSegments")
137 const StdMeshers_NumberOfSegments * hyp =
138 dynamic_cast <const StdMeshers_NumberOfSegments * >(theHyp);
140 _ivalue[ NB_SEGMENTS_IND ] = hyp->GetNumberOfSegments();
141 ASSERT( _ivalue[ NB_SEGMENTS_IND ] > 0 );
142 _ivalue[ DISTR_TYPE_IND ] = (int) hyp->GetDistrType();
143 switch (_ivalue[ DISTR_TYPE_IND ])
145 case StdMeshers_NumberOfSegments::DT_Scale:
146 _value[ SCALE_FACTOR_IND ] = hyp->GetScaleFactor();
148 case StdMeshers_NumberOfSegments::DT_TabFunc:
149 _vvalue[ TAB_FUNC_IND ] = hyp->GetTableFunction();
151 case StdMeshers_NumberOfSegments::DT_ExprFunc:
152 _svalue[ EXPR_FUNC_IND ] = hyp->GetExpressionFunction();
154 case StdMeshers_NumberOfSegments::DT_Regular:
160 if (_ivalue[ DISTR_TYPE_IND ] == StdMeshers_NumberOfSegments::DT_TabFunc ||
161 _ivalue[ DISTR_TYPE_IND ] == StdMeshers_NumberOfSegments::DT_ExprFunc)
162 _ivalue[ EXP_MODE_IND ] = (int) hyp->IsExponentMode();
163 _hypType = NB_SEGMENTS;
164 aStatus = SMESH_Hypothesis::HYP_OK;
167 else if (hypName == "Arithmetic1D")
169 const StdMeshers_Arithmetic1D * hyp =
170 dynamic_cast <const StdMeshers_Arithmetic1D * >(theHyp);
172 _value[ BEG_LENGTH_IND ] = hyp->GetLength( true );
173 _value[ END_LENGTH_IND ] = hyp->GetLength( false );
174 ASSERT( _value[ BEG_LENGTH_IND ] > 0 && _value[ END_LENGTH_IND ] > 0 );
175 _hypType = ARITHMETIC_1D;
176 aStatus = SMESH_Hypothesis::HYP_OK;
179 else if (hypName == "StartEndLength")
181 const StdMeshers_StartEndLength * hyp =
182 dynamic_cast <const StdMeshers_StartEndLength * >(theHyp);
184 _value[ BEG_LENGTH_IND ] = hyp->GetLength( true );
185 _value[ END_LENGTH_IND ] = hyp->GetLength( false );
186 ASSERT( _value[ BEG_LENGTH_IND ] > 0 && _value[ END_LENGTH_IND ] > 0 );
187 _hypType = BEG_END_LENGTH;
188 aStatus = SMESH_Hypothesis::HYP_OK;
191 else if (hypName == "Deflection1D")
193 const StdMeshers_Deflection1D * hyp =
194 dynamic_cast <const StdMeshers_Deflection1D * >(theHyp);
196 _value[ DEFLECTION_IND ] = hyp->GetDeflection();
197 ASSERT( _value[ DEFLECTION_IND ] > 0 );
198 _hypType = DEFLECTION;
199 aStatus = SMESH_Hypothesis::HYP_OK;
202 aStatus = SMESH_Hypothesis::HYP_INCOMPATIBLE;
204 return ( _hypType != NONE );
207 //=======================================================================
208 //function : compensateError
209 //purpose : adjust theParams so that the last segment length == an
210 //=======================================================================
212 static void compensateError(double a1, double an,
213 double U1, double Un,
215 GeomAdaptor_Curve& C3d,
216 list<double> & theParams)
218 int i, nPar = theParams.size();
219 if ( a1 + an < length && nPar > 1 )
221 list<double>::reverse_iterator itU = theParams.rbegin();
223 // dist from the last point to the edge end <Un>, it should be equal <an>
224 double Ln = GCPnts_AbscissaPoint::Length( C3d, Ul, Un );
225 double dLn = an - Ln; // error of <an>
226 if ( Abs( dLn ) <= Precision::Confusion() )
228 double dU = Abs( Ul - *itU ); // parametric length of the last but one segment
229 double dUn = dLn * Abs( Un - U1 ) / length; // parametric error of <an>
230 if ( dUn < 0.5 * dU ) { // last segment is a bit shorter than it should
231 dUn = -dUn; // move the last parameter to the edge beginning
233 else { // last segment is much shorter than it should -> remove the last param and
234 theParams.pop_back(); nPar--; // move the rest points toward the edge end
235 Ln = GCPnts_AbscissaPoint::Length( C3d, theParams.back(), Un );
236 dUn = ( an - Ln ) * Abs( Un - U1 ) / length;
237 if ( dUn < 0.5 * dU )
242 double q = dUn / ( nPar - 1 );
243 for ( itU = theParams.rbegin(), i = 1; i < nPar; itU++, i++ ) {
251 * \brief This class provides interface for a density function
256 Function(bool expMode) : _expMode(expMode) {}
257 double operator() (double t) const;
258 virtual bool IsReady() const = 0;
260 virtual double compute(double t) const = 0;
266 * \brief This class provides computation of density function given by a table
268 class TabFunction: public Function
271 TabFunction(const vector<double>& table, bool expMode);
272 virtual bool IsReady() const;
274 virtual double compute(double t) const;
276 const vector<double>& _table;
280 * \brief This class provides computation of density function given by an expression
282 class ExprFunction: public Function
285 ExprFunction(const char* expr, bool expMode);
286 virtual bool IsReady() const;
288 virtual double compute(double t) const;
290 Handle(Expr_GeneralExpression) _expression;
291 Expr_Array1OfNamedUnknown _var;
292 mutable TColStd_Array1OfReal _val;
295 double Function::operator() (double t) const
297 double res = compute(t);
303 TabFunction::TabFunction(const vector<double>& table, bool expMode)
309 bool TabFunction::IsReady() const
314 double TabFunction::compute (double t) const
316 //find place of <t> in table
318 for (i=0; i < _table.size()/2; i++)
321 if (i >= _table.size()/2)
322 i = _table.size()/2 - 1;
327 // interpolate function value on found interval
328 // (t - x[i-1]) / (x[i] - x[i-1]) = (y - f[i-1]) / (f[i] - f[i-1])
329 // => y = f[i-1] + (f[i] - f[i-1]) * (t - x[i-1]) / (x[i] - x[i-1])
330 double x1 = _table[(i-1)*2];
331 double x2 = _table[i*2];
332 double y1 = _table[(i-1)*2+1];
333 double y2 = _table[i*2+1];
334 if (x2 - x1 < Precision::Confusion())
335 throw SALOME_Exception("TabFunction::compute : confused points");
336 return y1 + (y2 - y1) * ((t - x1) / (x2 - x1));
339 ExprFunction::ExprFunction(const char* expr, bool expMode)
344 Handle( ExprIntrp_GenExp ) gen = ExprIntrp_GenExp::Create();
345 gen->Process(TCollection_AsciiString((char*)expr));
348 _expression = gen->Expression();
349 _var(1) = new Expr_NamedUnknown("t");
353 bool ExprFunction::IsReady() const
355 return !_expression.IsNull();
358 double ExprFunction::compute (double t) const
360 ASSERT(!_expression.IsNull());
362 return _expression->Evaluate(_var, _val);
365 //================================================================================
367 * \brief Compute next abscissa when two previous ones are given
368 * \param sm2 - before previous abscissa
369 * \param sm1 - previous abscissa
370 * \param func - function of density
371 * \param reverse - the direction of next abscissa, increase (0) or decrease (1)
372 * \retval double - the new abscissa
374 * The abscissa s is given by the formulae
376 * ....|--------|----------------|.....
379 * func(sm2) / func(sm1) = (sm1-sm2) / (s-sm1)
380 * => (s-sm1) * func(sm2) = (sm1-sm2) * func(sm1)
381 * => s = sm1 + (sm1-sm2) * func(sm1) / func(sm2)
383 //================================================================================
385 static double nextAbscissa(double sm2, double sm1, const Function& func, int reverse)
392 return sm1 + (sm1-sm2) * func(sm1) / func(sm2);
395 //================================================================================
397 * \brief Compute distribution of points on a curve following the law of a function
398 * \param C3d - the curve to discretize
399 * \param first - the first parameter on the curve
400 * \param last - the last parameter on the curve
401 * \param theReverse - flag indicating that the curve must be reversed
402 * \param nbSeg - number of output segments
403 * \param func - the function f(t)
404 * \param theParams - output points
405 * \retval bool - true if success
407 //================================================================================
409 static bool computeParamByFunc(Adaptor3d_Curve& C3d, double first, double last,
410 double length, bool theReverse,
411 int nbSeg, const Function& func,
412 list<double>& theParams)
416 vector<double> xxx[2];
417 int nbPnt = 1 + nbSeg;
419 for (rev=0; rev < 2; rev++)
421 // curv abscisses initialisation
422 vector<double> x(nbPnt, 0.);
423 // the first abscissa is 0.0
425 // The aim of the algorithm is to find a second abscisse x[1] such as the last
426 // one x[nbSeg] is very close to 1.0 with the epsilon precision
428 double x1_too_small = 0.0;
429 double x1_too_large = RealLast();
430 double x1 = 1.0/nbSeg;
435 // Check if the abscissa of the point 2 to N-1
436 // are in the segment ...
439 for (i=2; i <= nbSeg; i++)
441 x[i] = nextAbscissa(x[i-2], x[i-1], func, rev);
442 if (x[i] - 1.0 > Precision::Confusion())
451 // The segments are to large
454 x1 = (x1_too_small+x1_too_large)/2;
458 // Look at the abscissa of the point N
459 // which is to be close to 1.0
461 // break condition --> algo converged !!
463 if (1.0 - x[nbSeg] < Precision::Confusion())
472 if (x1_too_large > 1e100)
475 x1 = (x1_too_small+x1_too_large)/2;
481 vector<double> x(nbPnt, 0.);
482 for (i=0; i < nbPnt; i++)
483 x[i] = (xxx[0][i] + (1.0 - xxx[1][nbPnt-i])) / 2;
485 // apply parameters in range [0,1] to the space of the curve
486 double prevU = first;
493 for (i = 1; i < nbSeg; i++)
495 double curvLength = length * (x[i] - x[i-1]) * sign;
496 GCPnts_AbscissaPoint Discret( C3d, curvLength, prevU );
497 if ( !Discret.IsDone() )
499 double U = Discret.Parameter();
500 if ( U > first && U < last )
501 theParams.push_back( U );
509 //=============================================================================
513 //=============================================================================
514 bool StdMeshers_Regular_1D::computeInternalParameters(const TopoDS_Edge& theEdge,
515 list<double> & theParams,
516 const bool theReverse) const
521 Handle(Geom_Curve) Curve = BRep_Tool::Curve(theEdge, f, l);
522 GeomAdaptor_Curve C3d(Curve);
524 double length = EdgeLength(theEdge);
532 if ( _hypType == LOCAL_LENGTH )
534 // Local Length hypothesis
535 double nbseg = ceil(length / _value[ BEG_LENGTH_IND ]); // integer sup
537 nbseg = 1; // degenerated edge
538 eltSize = length / nbseg;
542 // Number Of Segments hypothesis
543 switch (_ivalue[ DISTR_TYPE_IND ])
545 case StdMeshers_NumberOfSegments::DT_Scale:
547 double scale = _value[ SCALE_FACTOR_IND ];
550 double alpha = pow( scale , 1.0 / (_ivalue[ NB_SEGMENTS_IND ] - 1));
551 double factor = (l - f) / (1 - pow( alpha,_ivalue[ NB_SEGMENTS_IND ]));
553 int i, NbPoints = 1 + _ivalue[ NB_SEGMENTS_IND ];
554 for ( i = 2; i < NbPoints; i++ )
556 double param = f + factor * (1 - pow(alpha, i - 1));
557 theParams.push_back( param );
562 case StdMeshers_NumberOfSegments::DT_TabFunc:
564 TabFunction func(_vvalue[ TAB_FUNC_IND ], (bool)_ivalue[ EXP_MODE_IND ]);
565 return computeParamByFunc(C3d, f, l, length, theReverse,
566 _ivalue[ NB_SEGMENTS_IND ], func,
570 case StdMeshers_NumberOfSegments::DT_ExprFunc:
572 ExprFunction func(_svalue[ EXPR_FUNC_IND ].c_str(), (bool)_ivalue[ EXP_MODE_IND ]);
573 return computeParamByFunc(C3d, f, l, length, theReverse,
574 _ivalue[ NB_SEGMENTS_IND ], func,
578 case StdMeshers_NumberOfSegments::DT_Regular:
579 eltSize = length / _ivalue[ NB_SEGMENTS_IND ];
586 GCPnts_UniformAbscissa Discret(C3d, eltSize, f, l);
587 if ( !Discret.IsDone() )
590 int NbPoints = Discret.NbPoints();
591 for ( int i = 2; i < NbPoints; i++ )
593 double param = Discret.Parameter(i);
594 theParams.push_back( param );
599 case BEG_END_LENGTH: {
601 // geometric progression: SUM(n) = ( a1 - an * q ) / ( 1 - q ) = length
603 double a1 = _value[ BEG_LENGTH_IND ];
604 double an = _value[ END_LENGTH_IND ];
605 double q = ( length - a1 ) / ( length - an );
607 double U1 = theReverse ? l : f;
608 double Un = theReverse ? f : l;
610 double eltSize = theReverse ? -a1 : a1;
612 // computes a point on a curve <C3d> at the distance <eltSize>
613 // from the point of parameter <param>.
614 GCPnts_AbscissaPoint Discret( C3d, eltSize, param );
615 if ( !Discret.IsDone() ) break;
616 param = Discret.Parameter();
617 if ( param > f && param < l )
618 theParams.push_back( param );
623 compensateError( a1, an, U1, Un, length, C3d, theParams );
627 case ARITHMETIC_1D: {
629 // arithmetic progression: SUM(n) = ( an - a1 + q ) * ( a1 + an ) / ( 2 * q ) = length
631 double a1 = _value[ BEG_LENGTH_IND ];
632 double an = _value[ END_LENGTH_IND ];
634 double q = ( an - a1 ) / ( 2 *length/( a1 + an ) - 1 );
635 int n = int( 1 + ( an - a1 ) / q );
637 double U1 = theReverse ? l : f;
638 double Un = theReverse ? f : l;
645 while ( n-- > 0 && eltSize * ( Un - U1 ) > 0 ) {
646 // computes a point on a curve <C3d> at the distance <eltSize>
647 // from the point of parameter <param>.
648 GCPnts_AbscissaPoint Discret( C3d, eltSize, param );
649 if ( !Discret.IsDone() ) break;
650 param = Discret.Parameter();
651 if ( param > f && param < l )
652 theParams.push_back( param );
657 compensateError( a1, an, U1, Un, length, C3d, theParams );
664 GCPnts_UniformDeflection Discret(C3d, _value[ DEFLECTION_IND ], true);
665 if ( !Discret.IsDone() )
668 int NbPoints = Discret.NbPoints();
669 for ( int i = 2; i < NbPoints; i++ )
671 double param = Discret.Parameter(i);
672 theParams.push_back( param );
684 //=============================================================================
688 //=============================================================================
690 bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape)
692 MESSAGE("StdMeshers_Regular_1D::Compute");
694 if ( _hypType == NONE )
697 SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
698 aMesh.GetSubMesh(aShape);
700 const TopoDS_Edge & EE = TopoDS::Edge(aShape);
701 TopoDS_Edge E = TopoDS::Edge(EE.Oriented(TopAbs_FORWARD));
704 Handle(Geom_Curve) Curve = BRep_Tool::Curve(E, f, l);
706 TopoDS_Vertex VFirst, VLast;
707 TopExp::Vertices(E, VFirst, VLast); // Vfirst corresponds to f and Vlast to l
709 ASSERT(!VFirst.IsNull());
710 SMDS_NodeIteratorPtr lid= aMesh.GetSubMesh(VFirst)->GetSubMeshDS()->GetNodes();
713 MESSAGE (" NO NODE BUILT ON VERTEX ");
716 const SMDS_MeshNode * idFirst = lid->next();
718 ASSERT(!VLast.IsNull());
719 lid=aMesh.GetSubMesh(VLast)->GetSubMeshDS()->GetNodes();
722 MESSAGE (" NO NODE BUILT ON VERTEX ");
725 const SMDS_MeshNode * idLast = lid->next();
729 list< double > params;
730 bool reversed = false;
731 if ( !_mainEdge.IsNull() )
732 reversed = aMesh.IsReversedInChain( EE, _mainEdge );
734 if ( ! computeInternalParameters( E, params, reversed ))
737 catch ( Standard_Failure ) {
741 // edge extrema (indexes : 1 & NbPoints) already in SMDS (TopoDS_Vertex)
742 // only internal nodes receive an edge position with param on curve
744 const SMDS_MeshNode * idPrev = idFirst;
746 for (list<double>::iterator itU = params.begin(); itU != params.end(); itU++)
749 gp_Pnt P = Curve->Value(param);
751 //Add the Node in the DataStructure
752 SMDS_MeshNode * node = meshDS->AddNode(P.X(), P.Y(), P.Z());
753 meshDS->SetNodeOnEdge(node, E);
755 // **** edgePosition associe au point = param.
756 SMDS_EdgePosition* epos =
757 dynamic_cast<SMDS_EdgePosition *>(node->GetPosition().get());
758 epos->SetUParameter(param);
760 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, node);
761 meshDS->SetMeshElementOnShape(edge, E);
764 SMDS_MeshEdge* edge = meshDS->AddEdge(idPrev, idLast);
765 meshDS->SetMeshElementOnShape(edge, E);
769 // Edge is a degenerated Edge : We put n = 5 points on the edge.
771 BRep_Tool::Range(E, f, l);
772 double du = (l - f) / (NbPoints - 1);
773 //MESSAGE("************* Degenerated edge! *****************");
775 TopoDS_Vertex V1, V2;
776 TopExp::Vertices(E, V1, V2);
777 gp_Pnt P = BRep_Tool::Pnt(V1);
779 const SMDS_MeshNode * idPrev = idFirst;
780 for (int i = 2; i < NbPoints; i++)
782 double param = f + (i - 1) * du;
783 SMDS_MeshNode * node = meshDS->AddNode(P.X(), P.Y(), P.Z());
784 meshDS->SetNodeOnEdge(node, E);
786 SMDS_EdgePosition* epos =
787 dynamic_cast<SMDS_EdgePosition*>(node->GetPosition().get());
788 epos->SetUParameter(param);
790 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, node);
791 meshDS->SetMeshElementOnShape(edge, E);
794 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, idLast);
795 meshDS->SetMeshElementOnShape(edge, E);
800 //=============================================================================
802 * See comments in SMESH_Algo.cxx
804 //=============================================================================
806 const list <const SMESHDS_Hypothesis *> & StdMeshers_Regular_1D::GetUsedHypothesis(
807 SMESH_Mesh & aMesh, const TopoDS_Shape & aShape)
809 _usedHypList.clear();
810 _usedHypList = GetAppliedHypothesis(aMesh, aShape); // copy
811 int nbHyp = _usedHypList.size();
815 // Check, if propagated from some other edge
816 if (aShape.ShapeType() == TopAbs_EDGE &&
817 aMesh.IsPropagatedHypothesis(aShape, _mainEdge))
819 // Propagation of 1D hypothesis from <aMainEdge> on this edge
820 //_usedHypList = GetAppliedHypothesis(aMesh, _mainEdge); // copy
821 // use a general method in order not to nullify _mainEdge
822 _usedHypList = SMESH_Algo::GetUsedHypothesis(aMesh, _mainEdge); // copy
823 nbHyp = _usedHypList.size();
828 TopTools_ListIteratorOfListOfShape ancIt( aMesh.GetAncestors( aShape ));
829 for (; ancIt.More(); ancIt.Next())
831 const TopoDS_Shape& ancestor = ancIt.Value();
832 _usedHypList = GetAppliedHypothesis(aMesh, ancestor); // copy
833 nbHyp = _usedHypList.size();
839 _usedHypList.clear(); //only one compatible hypothesis allowed
843 //=============================================================================
847 //=============================================================================
849 ostream & StdMeshers_Regular_1D::SaveTo(ostream & save)
854 //=============================================================================
858 //=============================================================================
860 istream & StdMeshers_Regular_1D::LoadFrom(istream & load)
865 //=============================================================================
869 //=============================================================================
871 ostream & operator <<(ostream & save, StdMeshers_Regular_1D & hyp)
873 return hyp.SaveTo( save );
876 //=============================================================================
880 //=============================================================================
882 istream & operator >>(istream & load, StdMeshers_Regular_1D & hyp)
884 return hyp.LoadFrom( load );