1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // File : StdMeshers_CartesianParameters3D.cxx
24 // Author : Edward AGAPOV
27 #include "StdMeshers_CartesianParameters3D.hxx"
29 #include "StdMeshers_NumberOfSegments.hxx"
30 #include "StdMeshers_Distribution.hxx"
31 #include "SMESH_Gen.hxx"
33 #include "utilities.h"
38 #include <BRepGProp.hxx>
39 #include <BRep_Tool.hxx>
40 #include <Bnd_Box.hxx>
41 #include <GProp_GProps.hxx>
42 #include <GeomLib_IsPlanarSurface.hxx>
43 #include <Geom_Surface.hxx>
44 #include <Precision.hxx>
45 #include <TopExp_Explorer.hxx>
46 #include <TopLoc_Location.hxx>
47 #include <TopTools_MapIteratorOfMapOfShape.hxx>
48 #include <TopTools_MapOfShape.hxx>
50 #include <TopoDS_Face.hxx>
57 //=======================================================================
58 //function : StdMeshers_CartesianParameters3D
59 //purpose : Constructor
60 //=======================================================================
62 StdMeshers_CartesianParameters3D::StdMeshers_CartesianParameters3D(int hypId,
65 : SMESH_Hypothesis(hypId, studyId, gen),
66 _sizeThreshold( 4.0 ), // default according to the customer specification
69 _name = "CartesianParameters3D"; // used by "Cartesian_3D"
70 _param_algo_dim = 3; // 3D
87 SetFixedPoint( _fixedPoint, /*toUnset=*/true );
93 const char* axisName[3] = { "X", "Y", "Z" };
95 typedef std::pair< double, std::pair< double, double > > TCooTriple;
97 #define gpXYZ( cTriple ) gp_XYZ( (cTriple).first, (cTriple).second.first, (cTriple).second.second )
99 //================================================================================
101 * \brief Compare two normals
103 //================================================================================
105 bool sameDir( const TCooTriple& n1, const TCooTriple& n2 )
107 gp_XYZ xyz1 = gpXYZ( n1 ), xyz2 = gpXYZ( n2 );
108 return ( xyz1 - xyz2 ).Modulus() < 0.01;
111 //================================================================================
113 * \brief Checks validity of an axis index, throws in case of invalidity
115 //================================================================================
117 void checkAxis(const int axis)
119 if ( axis < 0 || axis > 2 )
120 throw SALOME_Exception(SMESH_Comment("Invalid axis index ") << axis <<
121 ". Valid axis indices are 0, 1 and 2");
124 //================================================================================
126 * \brief Checks validity of spacing data, throws in case of invalidity
128 //================================================================================
130 void checkGridSpacing(std::vector<std::string>& spaceFunctions,
131 std::vector<double>& internalPoints,
132 const std::string& axis)
133 throw ( SALOME_Exception )
135 if ( spaceFunctions.empty() )
136 throw SALOME_Exception(SMESH_Comment("Empty space function for ") << axis );
138 for ( size_t i = 1; i < internalPoints.size(); ++i )
139 if ( internalPoints[i] - internalPoints[i-1] < 0 )
140 throw SALOME_Exception(SMESH_Comment("Wrong order of internal points along ") << axis);
141 else if ( internalPoints[i] - internalPoints[i-1] < 1e-3 )
142 throw SALOME_Exception(SMESH_Comment("Too close internal points along ") << axis );
144 const double tol = Precision::Confusion();
145 if ( !internalPoints.empty() &&
146 ( internalPoints.front() < -tol || internalPoints.back() > 1 + tol ))
147 throw SALOME_Exception(SMESH_Comment("Invalid internal points along ") << axis);
149 if ( internalPoints.empty() || internalPoints.front() > tol )
150 internalPoints.insert( internalPoints.begin(), 0. );
151 if ( internalPoints.size() < 2 || internalPoints.back() < 1 - tol )
152 internalPoints.push_back( 1. );
154 if ( internalPoints.size() != spaceFunctions.size() + 1 )
155 throw SALOME_Exception
156 (SMESH_Comment("Numbre of internal points mismatch number of functions for ") << axis);
158 for ( size_t i = 0; i < spaceFunctions.size(); ++i )
160 StdMeshers_NumberOfSegments::CheckExpressionFunction( spaceFunctions[i], -1 );
164 //=======================================================================
166 //purpose : Sets coordinates of node positions along an axes
167 //=======================================================================
169 void StdMeshers_CartesianParameters3D::SetGrid(std::vector<double>& coords, int axis)
170 throw ( SALOME_Exception )
174 if ( coords.size() < 2 )
175 throw SALOME_Exception(LOCALIZED("Wrong number of grid coordinates"));
177 std::sort( coords.begin(), coords.end() );
179 bool changed = ( _coords[axis] != coords );
182 _coords[axis] = coords;
183 NotifySubMeshesHypothesisModification();
186 _spaceFunctions[axis].clear();
187 _internalPoints[axis].clear();
190 //=======================================================================
191 //function : SetGridSpacing
192 //purpose : Set grid spacing along the three axes
193 //=======================================================================
195 void StdMeshers_CartesianParameters3D::SetGridSpacing(std::vector<string>& xSpaceFuns,
196 std::vector<double>& xInternalPoints,
198 throw ( SALOME_Exception )
202 checkGridSpacing( xSpaceFuns, xInternalPoints, axisName[axis] );
204 bool changed = ( xSpaceFuns != _spaceFunctions[axis] ||
205 xInternalPoints != _internalPoints[axis] );
207 _spaceFunctions[axis] = xSpaceFuns;
208 _internalPoints[axis] = xInternalPoints;
209 _coords[axis].clear();
212 NotifySubMeshesHypothesisModification();
215 //=======================================================================
216 //function : SetFixedPoint
217 //purpose : * Set/unset a fixed point, at which a node will be created provided that grid
218 // * is defined by spacing in all directions
219 //=======================================================================
221 void StdMeshers_CartesianParameters3D::SetFixedPoint(const double p[3], bool toUnset)
223 if ( toUnset != Precision::IsInfinite( _fixedPoint[0] ))
224 NotifySubMeshesHypothesisModification();
227 _fixedPoint[0] = Precision::Infinite();
229 std::copy( &p[0], &p[0]+3, &_fixedPoint[0] );
232 //=======================================================================
233 //function : GetFixedPoint
234 //purpose : Returns either false or (true + point coordinates)
235 //=======================================================================
237 bool StdMeshers_CartesianParameters3D::GetFixedPoint(double p[3])
239 if ( Precision::IsInfinite( _fixedPoint[0] ))
241 std::copy( &_fixedPoint[0], &_fixedPoint[0]+3, &p[0] );
245 //=======================================================================
246 //function : SetSizeThreshold
247 //purpose : Set size threshold
248 //=======================================================================
250 void StdMeshers_CartesianParameters3D::SetSizeThreshold(const double threshold)
251 throw ( SALOME_Exception )
253 if ( threshold <= 1.0 )
254 throw SALOME_Exception(LOCALIZED("threshold must be > 1.0"));
256 bool changed = fabs( _sizeThreshold - threshold ) > 1e-6;
257 _sizeThreshold = threshold;
260 NotifySubMeshesHypothesisModification();
263 //=======================================================================
264 //function : GetGridSpacing
265 //purpose : return spacing
266 //=======================================================================
268 void StdMeshers_CartesianParameters3D::GetGridSpacing(std::vector<std::string>& spaceFunctions,
269 std::vector<double>& internalPoints,
270 const int axis) const
271 throw ( SALOME_Exception )
273 if ( !IsGridBySpacing(axis) )
274 throw SALOME_Exception(LOCALIZED("The grid is defined by coordinates and not by spacing"));
276 spaceFunctions = _spaceFunctions[axis];
277 internalPoints = _internalPoints[axis];
280 //=======================================================================
281 //function : IsGridBySpacing
282 //=======================================================================
284 bool StdMeshers_CartesianParameters3D::IsGridBySpacing(const int axis) const
285 throw ( SALOME_Exception )
288 return !_spaceFunctions[axis].empty();
292 //=======================================================================
293 //function : ComputeCoordinates
294 //purpose : Computes node coordinates by spacing functions
295 //=======================================================================
297 void StdMeshers_CartesianParameters3D::ComputeCoordinates(const double x0,
299 vector<std::string>& spaceFuns,
300 vector<double>& points,
301 vector<double>& coords,
302 const std::string& axis )
303 throw ( SALOME_Exception )
305 checkGridSpacing( spaceFuns, points, axis );
308 for ( size_t i = 0; i < spaceFuns.size(); ++i )
310 FunctionExpr fun( spaceFuns[i].c_str(), /*convMode=*/-1 );
312 const double p0 = x0 * ( 1. - points[i]) + x1 * points[i];
313 const double p1 = x0 * ( 1. - points[i+1]) + x1 * points[i+1];
314 const double length = p1 - p0;
316 const size_t nbSections = 1000;
317 const double sectionLen = ( p1 - p0 ) / nbSections;
318 vector< double > nbSegments( nbSections + 1 );
319 nbSegments[ 0 ] = 0.;
321 double t, spacing = 0;
322 for ( size_t i = 1; i <= nbSections; ++i )
324 t = double( i ) / nbSections;
325 if ( !fun.value( t, spacing ) || spacing < std::numeric_limits<double>::min() )
326 throw SALOME_Exception(LOCALIZED("Invalid spacing function"));
327 nbSegments[ i ] = nbSegments[ i-1 ] + std::min( 1., sectionLen / spacing );
330 const int nbCells = max (1, int(floor(nbSegments.back()+0.5)));
331 const double corr = nbCells / nbSegments.back();
333 if ( coords.empty() ) coords.push_back( p0 );
335 for ( size_t iCell = 1, i = 1; i <= nbSections; ++i )
337 if ( nbSegments[i]*corr >= iCell )
339 t = (i - ( nbSegments[i] - iCell/corr )/( nbSegments[i] - nbSegments[i-1] )) / nbSections;
340 coords.push_back( p0 + t * length );
344 const double lastCellLen = coords.back() - coords[ coords.size() - 2 ];
345 if ( fabs( coords.back() - p1 ) > 0.5 * lastCellLen )
346 coords.push_back ( p1 );
350 //=======================================================================
351 //function : GetCoordinates
352 //purpose : Return coordinates of node positions along the three axes.
353 // If the grid is defined by spacing functions, the coordinates are computed
354 //=======================================================================
356 void StdMeshers_CartesianParameters3D::GetCoordinates(std::vector<double>& xNodes,
357 std::vector<double>& yNodes,
358 std::vector<double>& zNodes,
359 const Bnd_Box& bndBox) const
360 throw ( SALOME_Exception )
362 double x0,y0,z0, x1,y1,z1;
363 if ( IsGridBySpacing(0) || IsGridBySpacing(1) || IsGridBySpacing(2))
365 if ( bndBox.IsVoid() ||
366 bndBox.IsXThin( Precision::Confusion() ) ||
367 bndBox.IsYThin( Precision::Confusion() ) ||
368 bndBox.IsZThin( Precision::Confusion() ) )
369 throw SALOME_Exception(LOCALIZED("Invalid bounding box"));
370 bndBox.Get(x0,y0,z0, x1,y1,z1);
373 StdMeshers_CartesianParameters3D* me = const_cast<StdMeshers_CartesianParameters3D*>(this);
374 if ( IsGridBySpacing(0) )
375 ComputeCoordinates( x0, x1, me->_spaceFunctions[0], me->_internalPoints[0], xNodes, "X" );
379 if ( IsGridBySpacing(1) )
380 ComputeCoordinates( y0, y1, me->_spaceFunctions[1], me->_internalPoints[1], yNodes, "Y" );
384 if ( IsGridBySpacing(2) )
385 ComputeCoordinates( z0, z1, me->_spaceFunctions[2], me->_internalPoints[2], zNodes, "Z" );
390 //=======================================================================
391 //function : ComputeOptimalAxesDirs
392 //purpose : Returns axes at which number of hexahedra is maximal
393 //=======================================================================
395 void StdMeshers_CartesianParameters3D::
396 ComputeOptimalAxesDirs(const TopoDS_Shape& shape,
397 const bool isOrthogonal,
400 for ( int i = 0; i < 9; ++i ) dirCoords[i] = 0.;
401 dirCoords[0] = dirCoords[4] = dirCoords[8] = 1.;
403 if ( shape.IsNull() ) return;
408 // get external FACEs of the shape
409 TopTools_MapOfShape faceMap;
410 for ( exp.Init( shape, TopAbs_FACE ); exp.More(); exp.Next() )
411 if ( !faceMap.Add( exp.Current() ))
412 faceMap.Remove( exp.Current() );
414 // sort areas of planar faces by normal direction
416 std::multimap< TCooTriple, double > areasByNormal;
418 TopTools_MapIteratorOfMapOfShape fIt ( faceMap );
419 for ( ; fIt.More(); fIt.Next() )
421 const TopoDS_Face& face = TopoDS::Face( fIt.Key() );
422 Handle(Geom_Surface) surf = BRep_Tool::Surface( face, loc );
423 if ( surf.IsNull() ) continue;
425 GeomLib_IsPlanarSurface check( surf, 1e-5 );
426 if ( !check.IsPlanar() ) continue;
429 BRepGProp::SurfaceProperties( face, SProps );
430 double area = SProps.Mass();
432 gp_Pln pln = check.Plan();
433 gp_Dir norm = pln.Axis().Direction().Transformed( loc );
434 if ( norm.X() < -1e-3 ) { // negative X
436 } else if ( norm.X() < 1e-3 ) { // zero X
437 if ( norm.Y() < -1e-3 ) { // negative Y
439 } else if ( norm.Y() < 1e-3 ) { // zero X && zero Y
440 if ( norm.Y() < -1e-3 ) // negative Z
444 TCooTriple coo3( norm.X(), make_pair( norm.Y(), norm.Z() ));
445 areasByNormal.insert( make_pair( coo3, area ));
448 // group coplanar normals and sort groups by sum area
450 std::multimap< double, vector< const TCooTriple* > > normsByArea;
451 std::multimap< TCooTriple, double >::iterator norm2a = areasByNormal.begin();
452 const TCooTriple* norm1 = 0;
454 vector< const TCooTriple* > norms;
455 for ( int iF = 1; norm2a != areasByNormal.end(); ++norm2a, ++iF )
458 if ( !norm1 || !sameDir( *norm1, norm2a->first ))
460 if ( !norms.empty() )
462 normsByArea.insert( make_pair( sumArea, norms ));
465 norm1 = & norm2a->first;
466 sumArea = norm2a->second;
467 norms.push_back( norm1 );
471 sumArea += norm2a->second;
472 norms.push_back( & norm2a->first );
474 if ( iF == areasByNormal.size() )
475 normsByArea.insert( make_pair( sumArea, norms ));
478 // try to set dirs by planar faces
480 gp_XYZ normDirs[3]; // normals to largest planes
482 if ( !normsByArea.empty() )
484 norm1 = normsByArea.rbegin()->second[0];
485 normDirs[0] = gpXYZ( *norm1 );
487 if ( normsByArea.size() == 1 )
489 normDirs[1] = normDirs[0];
490 if ( Abs( normDirs[0].Y() ) < 1e-100 &&
491 Abs( normDirs[0].Z() ) < 1e-100 ) // normDirs[0] || OX
492 normDirs[1].SetY( normDirs[0].Y() + 1. );
494 normDirs[1].SetX( normDirs[0].X() + 1. );
498 // look for 2 other directions
499 gp_XYZ testDir = normDirs[0], minDir, maxDir;
500 for ( int is2nd = 0; is2nd < 2; ++is2nd )
502 double maxMetric = 0, minMetric = 1e100;
503 std::multimap< double, vector< const TCooTriple* > >::iterator a2n;
504 for ( a2n = normsByArea.begin(); a2n != normsByArea.end(); ++a2n )
506 gp_XYZ n = gpXYZ( *( a2n->second[0]) );
507 double dot = Abs( n * testDir );
508 double metric = ( 1. - dot ) * ( isOrthogonal ? 1 : a2n->first );
509 if ( metric > maxMetric )
514 if ( metric < minMetric )
522 normDirs[2] = minDir;
526 normDirs[1] = maxDir;
527 normDirs[2] = normDirs[0] ^ normDirs[1];
528 if ( isOrthogonal || normsByArea.size() < 3 )
530 testDir = normDirs[2];
534 if ( isOrthogonal || normsByArea.size() == 1 )
536 normDirs[2] = normDirs[0] ^ normDirs[1];
537 normDirs[1] = normDirs[2] ^ normDirs[0];
546 dirs[0] = normDirs[0] ^ normDirs[1];
547 dirs[1] = normDirs[1] ^ normDirs[2];
548 dirs[2] = normDirs[2] ^ normDirs[0];
554 // Select dirs for X, Y and Z axes
555 int iX = ( Abs( dirs[0].X() ) > Abs( dirs[1].X() )) ? 0 : 1;
556 if ( Abs( dirs[iX].X() ) < Abs( dirs[2].X() ))
558 int iY = ( iX == 0 ) ? 1 : (( Abs( dirs[0].Y() ) > Abs( dirs[1].Y() )) ? 0 : 1 );
559 if ( Abs( dirs[iY].Y() ) < Abs( dirs[2].Y() ) && iX != 2 )
561 int iZ = 3 - iX - iY;
563 if ( dirs[iX].X() < 0 ) dirs[iX].Reverse();
564 if ( dirs[iY].Y() < 0 ) dirs[iY].Reverse();
565 gp_XYZ zDir = dirs[iX] ^ dirs[iY];
566 if ( dirs[iZ] * zDir < 0 )
569 dirCoords[0] = dirs[iX].X();
570 dirCoords[1] = dirs[iX].Y();
571 dirCoords[2] = dirs[iX].Z();
572 dirCoords[3] = dirs[iY].X();
573 dirCoords[4] = dirs[iY].Y();
574 dirCoords[5] = dirs[iY].Z();
575 dirCoords[6] = dirs[iZ].X();
576 dirCoords[7] = dirs[iZ].Y();
577 dirCoords[8] = dirs[iZ].Z();
580 //=======================================================================
581 //function : SetAxisDirs
582 //purpose : Sets custom direction of axes
583 //=======================================================================
585 void StdMeshers_CartesianParameters3D::SetAxisDirs(const double* the9DirComps)
586 throw ( SALOME_Exception )
588 gp_Vec x( the9DirComps[0],
591 gp_Vec y( the9DirComps[3],
594 gp_Vec z( the9DirComps[6],
597 if ( x.Magnitude() < RealSmall() ||
598 y.Magnitude() < RealSmall() ||
599 z.Magnitude() < RealSmall() )
600 throw SALOME_Exception("Zero magnitude of axis direction");
602 if ( x.IsParallel( y, M_PI / 180. ) ||
603 x.IsParallel( z, M_PI / 180. ) ||
604 y.IsParallel( z, M_PI / 180. ))
605 throw SALOME_Exception("Parallel axis directions");
607 gp_Vec normXY = x ^ y, normYZ = y ^ z;
608 if ( normXY.IsParallel( normYZ, M_PI / 180. ))
609 throw SALOME_Exception("Axes lie in one plane");
611 bool isChanged = false;
612 for ( int i = 0; i < 9; ++i )
614 if ( Abs( _axisDirs[i] - the9DirComps[i] ) > 1e-7 )
616 _axisDirs[i] = the9DirComps[i];
619 NotifySubMeshesHypothesisModification();
622 //=======================================================================
624 //purpose : Return coordinates of node positions along the three axes
625 //=======================================================================
627 void StdMeshers_CartesianParameters3D::GetGrid(std::vector<double>& coords, int axis) const
628 throw ( SALOME_Exception )
630 if ( IsGridBySpacing(axis) )
631 throw SALOME_Exception(LOCALIZED("The grid is defined by spacing and not by coordinates"));
633 coords = _coords[axis];
636 //=======================================================================
637 //function : GetSizeThreshold
638 //purpose : Return size threshold
639 //=======================================================================
641 double StdMeshers_CartesianParameters3D::GetSizeThreshold() const
643 return _sizeThreshold;
646 //=======================================================================
647 //function : SetToAddEdges
648 //purpose : Enables implementation of geometrical edges into the mesh. If this feature
649 // is disabled, sharp edges of the shape are lost ("smoothed") in the mesh if
650 // they don't coincide with the grid lines
651 //=======================================================================
653 void StdMeshers_CartesianParameters3D::SetToAddEdges(bool toAdd)
655 if ( _toAddEdges != toAdd )
658 NotifySubMeshesHypothesisModification();
662 //=======================================================================
663 //function : GetToAddEdges
664 //purpose : Returns true if implementation of geometrical edges into the
666 //=======================================================================
668 bool StdMeshers_CartesianParameters3D::GetToAddEdges() const
673 //=======================================================================
674 //function : IsDefined
675 //purpose : Return true if parameters are well defined
676 //=======================================================================
678 bool StdMeshers_CartesianParameters3D::IsDefined() const
680 for ( int i = 0; i < 3; ++i )
681 if (_coords[i].empty() && (_spaceFunctions[i].empty() || _internalPoints[i].empty()))
684 return ( _sizeThreshold > 1.0 );
687 //=======================================================================
689 //purpose : store my parameters into a stream
690 //=======================================================================
692 std::ostream & StdMeshers_CartesianParameters3D::SaveTo(std::ostream & save)
694 save << _sizeThreshold << " ";
696 for ( int i = 0; i < 3; ++i )
698 save << _coords[i].size() << " ";
699 for ( size_t j = 0; j < _coords[i].size(); ++j )
700 save << _coords[i][j] << " ";
702 save << _internalPoints[i].size() << " ";
703 for ( size_t j = 0; j < _internalPoints[i].size(); ++j )
704 save << _internalPoints[i][j] << " ";
706 save << _spaceFunctions[i].size() << " ";
707 for ( size_t j = 0; j < _spaceFunctions[i].size(); ++j )
708 save << _spaceFunctions[i][j] << " ";
710 save << _toAddEdges << " ";
712 save.setf( save.scientific );
713 save.precision( 12 );
714 for ( int i = 0; i < 9; ++i )
715 save << _axisDirs[i] << " ";
717 for ( int i = 0; i < 3; ++i )
718 save << _fixedPoint[i] << " ";
723 //=======================================================================
724 //function : LoadFrom
725 //purpose : resore my parameters from a stream
726 //=======================================================================
728 std::istream & StdMeshers_CartesianParameters3D::LoadFrom(std::istream & load)
732 ok = ( load >> _sizeThreshold );
733 for ( int ax = 0; ax < 3; ++ax )
741 _coords[ax].resize( i );
742 for ( i = 0; i < _coords[ax].size() && ok; ++i )
743 ok = (load >> _coords[ax][i] );
752 _internalPoints[ax].resize( i );
753 for ( i = 0; i < _internalPoints[ax].size() && ok; ++i )
754 ok = (load >> _internalPoints[ax][i] );
763 _spaceFunctions[ax].resize( i );
764 for ( i = 0; i < _spaceFunctions[ax].size() && ok; ++i )
765 ok = (load >> _spaceFunctions[ax][i] );
770 ok = ( load >> _toAddEdges );
772 for ( int i = 0; i < 9 && ok; ++i )
773 ok = ( load >> _axisDirs[i]);
775 for ( int i = 0; i < 3 && ok ; ++i )
776 ok = ( load >> _fixedPoint[i]);
781 //=======================================================================
782 //function : SetParametersByMesh
783 //=======================================================================
785 bool StdMeshers_CartesianParameters3D::SetParametersByMesh(const SMESH_Mesh* ,
786 const TopoDS_Shape& )
791 //=======================================================================
792 //function : SetParametersByDefaults
793 //=======================================================================
795 bool StdMeshers_CartesianParameters3D::SetParametersByDefaults(const TDefaults& dflts,
796 const SMESH_Mesh* /*theMesh*/)
798 if ( dflts._elemLength > 1e-100 )
800 vector<string> spacing( 1, SMESH_Comment(dflts._elemLength));
801 vector<double> intPnts;
802 SetGridSpacing( spacing, intPnts, 0 );
803 SetGridSpacing( spacing, intPnts, 1 );
804 SetGridSpacing( spacing, intPnts, 2 );