1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : BLSURFPlugin_Hypothesis.cxx
21 // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA)
22 // & Aurelien ALLEAUME (DISTENE)
23 // Size maps developement: Nicolas GEIMER (OCC) & Gilles DAVID (EURIWARE)
26 #include "BLSURFPlugin_Hypothesis.hxx"
27 #include <utilities.h>
32 //=============================================================================
33 BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis (int hypId, int studyId,
35 : SMESH_Hypothesis(hypId, studyId, gen),
36 _topology(GetDefaultTopology()),
37 _physicalMesh(GetDefaultPhysicalMesh()),
38 _phySize(GetDefaultPhySize()),
39 _phyMax(GetDefaultMaxSize()),
40 _phyMin(GetDefaultMinSize()),
41 _hgeoMax(GetDefaultMaxSize()),
42 _hgeoMin(GetDefaultMinSize()),
43 _geometricMesh(GetDefaultGeometricMesh()),
44 _angleMeshS(GetDefaultAngleMeshS()),
45 _angleMeshC(GetDefaultAngleMeshC()),
46 _gradation(GetDefaultGradation()),
47 _quadAllowed(GetDefaultQuadAllowed()),
48 _decimesh(GetDefaultDecimesh()),
49 _verb( GetDefaultVerbosity() ),
50 _sizeMap(GetDefaultSizeMap()),
51 _attractors(GetDefaultSizeMap()),
52 _enforcedVertices(GetDefaultEnforcedVertexMap())
54 _name = "BLSURF_Parameters";
57 // to desable writing boundaries
58 //_phyMin = _phyMax = _hgeoMin = _hgeoMax = undefinedDouble();
61 const char* intOptionNames[] = {
90 const char* doubleOptionNames[] = {
108 const char* charOptionNames[] = {
117 while ( intOptionNames[i][0] )
118 _option2value[ intOptionNames[i++] ].clear();
121 while ( doubleOptionNames[i][0] ) {
122 _doubleOptions.insert( doubleOptionNames[i] );
123 _option2value[ doubleOptionNames[i++] ].clear();
126 while ( charOptionNames[i][0] ) {
127 _charOptions.insert( charOptionNames[i] );
128 _option2value[ charOptionNames[i++] ].clear();
134 //=============================================================================
135 void BLSURFPlugin_Hypothesis::SetTopology(Topology theTopology)
137 if (theTopology != _topology) {
138 _topology = theTopology;
139 NotifySubMeshesHypothesisModification();
143 //=============================================================================
144 void BLSURFPlugin_Hypothesis::SetPhysicalMesh(PhysicalMesh thePhysicalMesh)
146 if (thePhysicalMesh != _physicalMesh) {
147 _physicalMesh = thePhysicalMesh;
148 switch( _physicalMesh ) {
151 _phySize = GetDefaultPhySize();
152 _gradation = GetDefaultGradation();
155 NotifySubMeshesHypothesisModification();
159 //=============================================================================
160 void BLSURFPlugin_Hypothesis::SetPhySize(double theVal)
162 if (theVal != _phySize) {
164 NotifySubMeshesHypothesisModification();
168 //=============================================================================
169 void BLSURFPlugin_Hypothesis::SetPhyMin(double theMinSize)
171 if (theMinSize != _phyMin) {
172 _phyMin = theMinSize;
173 NotifySubMeshesHypothesisModification();
177 //=============================================================================
178 void BLSURFPlugin_Hypothesis::SetPhyMax(double theMaxSize)
180 if (theMaxSize != _phyMax) {
181 _phyMax = theMaxSize;
182 NotifySubMeshesHypothesisModification();
187 //=============================================================================
188 void BLSURFPlugin_Hypothesis::SetGeoMin(double theMinSize)
190 if (theMinSize != _hgeoMin) {
191 _hgeoMin = theMinSize;
192 NotifySubMeshesHypothesisModification();
196 //=============================================================================
197 void BLSURFPlugin_Hypothesis::SetGeoMax(double theMaxSize)
199 if (theMaxSize != _hgeoMax) {
200 _hgeoMax = theMaxSize;
201 NotifySubMeshesHypothesisModification();
205 //=============================================================================
206 void BLSURFPlugin_Hypothesis::SetGeometricMesh(GeometricMesh theGeometricMesh)
208 if (theGeometricMesh != _geometricMesh) {
209 _geometricMesh = theGeometricMesh;
210 switch( _geometricMesh ) {
213 _angleMeshS = GetDefaultAngleMeshS();
214 _gradation = GetDefaultGradation();
217 NotifySubMeshesHypothesisModification();
221 //=============================================================================
222 void BLSURFPlugin_Hypothesis::SetAngleMeshS(double theVal)
224 if (theVal != _angleMeshS) {
225 _angleMeshS = theVal;
226 NotifySubMeshesHypothesisModification();
230 //=============================================================================
231 void BLSURFPlugin_Hypothesis::SetAngleMeshC(double theVal)
233 if (theVal != _angleMeshC) {
234 _angleMeshC = theVal;
235 NotifySubMeshesHypothesisModification();
239 //=============================================================================
240 void BLSURFPlugin_Hypothesis::SetGradation(double theVal)
242 if (theVal != _gradation) {
244 NotifySubMeshesHypothesisModification();
248 //=============================================================================
249 void BLSURFPlugin_Hypothesis::SetQuadAllowed(bool theVal)
251 if (theVal != _quadAllowed) {
252 _quadAllowed = theVal;
253 NotifySubMeshesHypothesisModification();
257 //=============================================================================
258 void BLSURFPlugin_Hypothesis::SetDecimesh(bool theVal)
260 if (theVal != _decimesh) {
262 NotifySubMeshesHypothesisModification();
266 //=============================================================================
267 void BLSURFPlugin_Hypothesis::SetVerbosity(int theVal)
269 if (theVal != _verb) {
271 NotifySubMeshesHypothesisModification();
274 //=============================================================================
275 void BLSURFPlugin_Hypothesis::SetOptionValue(const std::string& optionName,
276 const std::string& optionValue)
277 throw (std::invalid_argument)
279 TOptionValues::iterator op_val = _option2value.find( optionName );
280 if ( op_val == _option2value.end() ) {
281 std::string msg = "Unknown BLSURF option: '" + optionName + "'";
282 throw std::invalid_argument(msg);
284 if ( op_val->second != optionValue ) {
285 const char* ptr = optionValue.c_str();
286 // strip white spaces
287 while ( ptr[0] == ' ' )
289 int i = strlen( ptr );
290 while ( i != 0 && ptr[i-1] == ' ')
294 std::string typeName;
298 else if ( _charOptions.find( optionName ) != _charOptions.end() ) {
299 // do not check strings
301 else if ( _doubleOptions.find( optionName ) != _doubleOptions.end() ) {
302 // check if value is double
304 strtod(ptr, &endPtr);
305 typeOk = ( ptr != endPtr );
309 // check if value is int
311 strtol(ptr, &endPtr,10);
312 typeOk = ( ptr != endPtr );
313 typeName = "integer";
316 std::string msg = "Advanced option '" + optionName + "' = '" + optionValue +
317 "' but must be " + typeName;
318 throw std::invalid_argument(msg);
320 op_val->second = optionValue;
321 NotifySubMeshesHypothesisModification();
325 //=============================================================================
326 std::string BLSURFPlugin_Hypothesis::GetOptionValue(const std::string& optionName)
327 throw (std::invalid_argument)
329 TOptionValues::iterator op_val = _option2value.find( optionName );
330 if ( op_val == _option2value.end() ) {
331 std::string msg = "Unknown BLSURF option: <";
332 msg += optionName + ">";
333 throw std::invalid_argument(msg);
335 return op_val->second;
338 //=============================================================================
339 void BLSURFPlugin_Hypothesis::ClearOption(const std::string& optionName)
341 TOptionValues::iterator op_val = _option2value.find( optionName );
342 if ( op_val != _option2value.end() )
343 op_val->second.clear();
346 //=======================================================================
347 //function : SetSizeMapEntry
348 //=======================================================================
349 void BLSURFPlugin_Hypothesis::SetSizeMapEntry(const std::string& entry,const std::string& sizeMap)
351 if (_sizeMap[entry].compare(sizeMap) != 0) {
352 _sizeMap[entry]=sizeMap;
353 NotifySubMeshesHypothesisModification();
357 //=======================================================================
358 //function : GetSizeMapEntry
359 //=======================================================================
360 std::string BLSURFPlugin_Hypothesis::GetSizeMapEntry(const std::string& entry)
362 TSizeMap::iterator it = _sizeMap.find( entry );
363 if ( it != _sizeMap.end() )
366 return "No_Such_Entry";
370 * \brief Return the size maps
372 BLSURFPlugin_Hypothesis::TSizeMap BLSURFPlugin_Hypothesis::GetSizeMapEntries(const BLSURFPlugin_Hypothesis* hyp)
374 return hyp ? hyp->_GetSizeMapEntries():GetDefaultSizeMap();
377 //=======================================================================
378 //function : SetAttractorEntry
379 //=======================================================================
380 void BLSURFPlugin_Hypothesis::SetAttractorEntry(const std::string& entry,const std::string& attractor)
382 if (_attractors[entry].compare(attractor) != 0) {
383 _attractors[entry]=attractor;
384 NotifySubMeshesHypothesisModification();
388 //=======================================================================
389 //function : GetAttractorEntry
390 //=======================================================================
391 std::string BLSURFPlugin_Hypothesis::GetAttractorEntry(const std::string& entry)
393 TSizeMap::iterator it = _attractors.find( entry );
394 if ( it != _attractors.end() )
397 return "No_Such_Entry";
401 * \brief Return the attractors
403 BLSURFPlugin_Hypothesis::TSizeMap BLSURFPlugin_Hypothesis::GetAttractorEntries(const BLSURFPlugin_Hypothesis* hyp)
405 return hyp ? hyp->_GetAttractorEntries():GetDefaultSizeMap();
410 void BLSURFPlugin_Hypothesis::ClearEntry(const std::string& entry)
412 TSizeMap::iterator it = _sizeMap.find( entry );
413 if ( it != _sizeMap.end() ) {
415 NotifySubMeshesHypothesisModification();
418 TSizeMap::iterator itAt = _attractors.find( entry );
419 if ( itAt != _attractors.end() ) {
420 _attractors.erase(itAt);
421 NotifySubMeshesHypothesisModification();
424 std::cout<<"No_Such_Entry"<<std::endl;
429 void BLSURFPlugin_Hypothesis::ClearSizeMaps()
437 //=======================================================================
438 //function : SetEnforcedVertex
439 //=======================================================================
441 void BLSURFPlugin_Hypothesis::SetEnforcedVertex(const std::string& entry, double x, double y, double z)
443 BLSURFPlugin_Hypothesis::TEnforcedVertex coord;
447 bool toNotify = false;
448 if (_enforcedVertices.count(entry)>0)
449 if (_enforcedVertices[entry].count(coord)==0)
454 _enforcedVertices[entry].insert(coord);
456 NotifySubMeshesHypothesisModification();
460 //=======================================================================
461 //function : SetEnforcedVertexList
462 //=======================================================================
464 void BLSURFPlugin_Hypothesis::SetEnforcedVertexList(const std::string& entry, const BLSURFPlugin_Hypothesis::TEnforcedVertexList vertexList)
466 BLSURFPlugin_Hypothesis::TEnforcedVertexList::const_iterator it;
467 bool toNotify = false;
468 for(it = vertexList.begin();it!=vertexList.end();++it) {
469 if (_enforcedVertices.count(entry)>0)
470 if (_enforcedVertices[entry].count(*it)==0)
474 _enforcedVertices[entry].insert(*it);
477 NotifySubMeshesHypothesisModification();
481 //=======================================================================
482 //function : GetEnforcedVertices
483 //=======================================================================
485 BLSURFPlugin_Hypothesis::TEnforcedVertexList BLSURFPlugin_Hypothesis::GetEnforcedVertices(const std::string& entry)
486 throw (std::invalid_argument)
488 if (_enforcedVertices.count(entry)>0)
489 return _enforcedVertices[entry];
490 std::ostringstream msg ;
491 msg << "No enforced vertex for entry " << entry ;
492 throw std::invalid_argument(msg.str());
495 //=======================================================================
496 //function : ClearEnforcedVertex
497 //=======================================================================
499 void BLSURFPlugin_Hypothesis::ClearEnforcedVertex(const std::string& entry, double x, double y, double z)
500 throw (std::invalid_argument)
502 BLSURFPlugin_Hypothesis::TEnforcedVertex coord;
506 BLSURFPlugin_Hypothesis::TEnforcedVertexList::iterator it;
507 bool toNotify = false;
509 BLSURFPlugin_Hypothesis::TEnforcedVertexMap::iterator it_enf = _enforcedVertices.find(entry);
510 if (it_enf != _enforcedVertices.end()) {
511 it = _enforcedVertices[entry].find(coord);
512 if (it != _enforcedVertices[entry].end()) {
514 _enforcedVertices[entry].erase(it);
515 if (_enforcedVertices[entry].size() == 0)
516 _enforcedVertices.erase(it_enf);
519 NotifySubMeshesHypothesisModification();
523 std::ostringstream msg ;
524 msg << "No enforced vertex for " << entry;
525 throw std::invalid_argument(msg.str());
528 //=======================================================================
529 //function : ClearEnforcedVertexList
530 //=======================================================================
532 void BLSURFPlugin_Hypothesis::ClearEnforcedVertexList(const std::string& entry, BLSURFPlugin_Hypothesis::TEnforcedVertexList vertexList)
533 throw (std::invalid_argument)
535 BLSURFPlugin_Hypothesis::TEnforcedVertex coord;
536 BLSURFPlugin_Hypothesis::TEnforcedVertexList::const_iterator it_toRemove;
537 BLSURFPlugin_Hypothesis::TEnforcedVertexList::iterator it;
538 bool toNotify = false;
540 BLSURFPlugin_Hypothesis::TEnforcedVertexMap::iterator it_enf = _enforcedVertices.find(entry);
541 if (it_enf != _enforcedVertices.end()) {
542 for (it_toRemove = vertexList.begin() ; it_toRemove != vertexList.end() ; ++it_toRemove) {
543 coord = *it_toRemove;
544 it = _enforcedVertices[entry].find(coord);
545 if (it != _enforcedVertices[entry].end()) {
547 _enforcedVertices[entry].erase(it);
550 if (_enforcedVertices[entry].size() == 0) {
552 _enforcedVertices.erase(it_enf);
555 NotifySubMeshesHypothesisModification();
559 std::ostringstream msg ;
560 msg << "No enforced vertex for " << entry;
561 throw std::invalid_argument(msg.str());
564 //=======================================================================
565 //function : ClearEnforcedVertices
566 //=======================================================================
568 void BLSURFPlugin_Hypothesis::ClearEnforcedVertices(const std::string& entry)
569 throw (std::invalid_argument)
571 BLSURFPlugin_Hypothesis::TEnforcedVertexMap::iterator it_enf = _enforcedVertices.find(entry);
572 if (it_enf != _enforcedVertices.end()) {
573 _enforcedVertices.erase(it_enf);
574 NotifySubMeshesHypothesisModification();
578 std::ostringstream msg ;
579 msg << "No enforced vertex for " << entry;
580 throw std::invalid_argument(msg.str());
583 //=======================================================================
584 //function : ClearAllEnforcedVertices
585 //=======================================================================
586 void BLSURFPlugin_Hypothesis::ClearAllEnforcedVertices()
588 _enforcedVertices.clear();
589 NotifySubMeshesHypothesisModification();
592 //================================================================================
594 * \brief Return the enforced vertices
596 //================================================================================
598 BLSURFPlugin_Hypothesis::TEnforcedVertexMap BLSURFPlugin_Hypothesis::GetAllEnforcedVertices(const BLSURFPlugin_Hypothesis* hyp)
600 return hyp ? hyp->_GetAllEnforcedVertices():GetDefaultEnforcedVertexMap();
605 //=============================================================================
606 std::ostream & BLSURFPlugin_Hypothesis::SaveTo(std::ostream & save)
608 save << " " << (int)_topology
609 << " " << (int)_physicalMesh
610 << " " << (int)_geometricMesh
612 << " " << _angleMeshS
614 << " " << (int)_quadAllowed
615 << " " << (int)_decimesh;
616 save << " " << _phyMin
618 << " " << _angleMeshC
623 TOptionValues::iterator op_val = _option2value.begin();
624 if (op_val != _option2value.end()) {
625 save << " " << "__OPTIONS_BEGIN__";
626 for ( ; op_val != _option2value.end(); ++op_val ) {
627 if ( !op_val->second.empty() )
628 save << " " << op_val->first
629 << " " << op_val->second << "%#"; // "%#" is a mark of value end
631 save << " " << "__OPTIONS_END__";
634 TSizeMap::iterator it_sm = _sizeMap.begin();
635 if (it_sm != _sizeMap.end()) {
636 save << " " << "__SIZEMAP_BEGIN__";
637 for ( ; it_sm != _sizeMap.end(); ++it_sm ) {
638 save << " " << it_sm->first
639 << " " << it_sm->second << "%#"; // "%#" is a mark of value end
641 save << " " << "__SIZEMAP_END__";
644 TSizeMap::iterator it_at = _attractors.begin();
645 if (it_at != _attractors.end()) {
646 save << " " << "__ATTRACTORS_BEGIN__";
647 for ( ; it_at != _attractors.end(); ++it_at ) {
648 save << " " << it_at->first
649 << " " << it_at->second << "%#"; // "%#" is a mark of value end
651 save << " " << "__ATTRACTORS_END__";
654 TEnforcedVertexMap::const_iterator it_enf = _enforcedVertices.begin();
655 if (it_enf != _enforcedVertices.end()) {
656 save << " " << "__ENFORCED_VERTICES_BEGIN__";
657 for ( ; it_enf != _enforcedVertices.end(); ++it_enf ) {
658 save << " " << it_enf->first;
659 TEnforcedVertexList evl = it_enf->second;
660 TEnforcedVertexList::const_iterator it_evl = evl.begin();
661 if (it_evl != evl.end()) {
662 for ( ; it_evl != evl.end() ; ++it_evl) {
663 save << " " << (*it_evl)[0];
664 save << " " << (*it_evl)[1];
665 save << " " << (*it_evl)[2];
666 save << "$"; // "$" is a mark of enforced vertex end
669 save << "#"; // "#" is a mark of enforced shape end
671 save << " " << "__ENFORCED_VERTICES_END__";
677 //=============================================================================
678 std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load)
686 _topology = (Topology) i;
688 load.clear(std::ios::badbit | load.rdstate());
692 _physicalMesh = (PhysicalMesh) i;
694 load.clear(std::ios::badbit | load.rdstate());
698 _geometricMesh = (GeometricMesh) i;
700 load.clear(std::ios::badbit | load.rdstate());
702 isOK = (load >> val);
706 load.clear(std::ios::badbit | load.rdstate());
708 isOK = (load >> val);
712 load.clear(std::ios::badbit | load.rdstate());
714 isOK = (load >> val);
718 load.clear(std::ios::badbit | load.rdstate());
722 _quadAllowed = (bool) i;
724 load.clear(std::ios::badbit | load.rdstate());
728 _decimesh = (bool) i;
730 load.clear(std::ios::badbit | load.rdstate());
732 isOK = (load >> val);
736 load.clear(std::ios::badbit | load.rdstate());
738 isOK = (load >> val);
742 load.clear(std::ios::badbit | load.rdstate());
744 isOK = (load >> val);
748 load.clear(std::ios::badbit | load.rdstate());
750 isOK = (load >> val);
754 load.clear(std::ios::badbit | load.rdstate());
756 isOK = (load >> val);
760 load.clear(std::ios::badbit | load.rdstate());
766 load.clear(std::ios::badbit | load.rdstate());
768 std::string option_or_sm;
769 bool hasOptions = false;
770 bool hasSizeMap = false;
771 bool hasAttractor = false;
772 bool hasEnforcedVertex = false;
774 isOK = (load >> option_or_sm);
776 if (option_or_sm == "__OPTIONS_BEGIN__")
778 else if (option_or_sm == "__SIZEMAP_BEGIN__")
780 else if (option_or_sm == "__ATTRACTORS_BEGIN__")
782 else if (option_or_sm == "__ENFORCED_VERTICES_BEGIN__")
783 hasEnforcedVertex = true;
785 std::string optName, optValue;
786 while (isOK && hasOptions) {
787 isOK = (load >> optName);
789 if (optName == "__OPTIONS_END__")
791 isOK = (load >> optValue);
794 std::string & value = _option2value[ optName ];
796 int len = value.size();
797 // continue reading until "%#" encountered
798 while ( value[len-1] != '#' || value[len-2] != '%' )
800 isOK = (load >> optValue);
810 value[ len-2 ] = '\0'; //cut off "%#"
815 isOK = (load >> option_or_sm);
817 if (option_or_sm == "__SIZEMAP_BEGIN__")
819 else if (option_or_sm == "__ATTRACTORS_BEGIN__")
821 else if (option_or_sm == "__ENFORCED_VERTICES_BEGIN__")
822 hasEnforcedVertex = true;
825 std::string smEntry, smValue;
826 while (isOK && hasSizeMap) {
827 isOK = (load >> smEntry);
829 if (smEntry == "__SIZEMAP_END__")
831 isOK = (load >> smValue);
834 std::string & value2 = _sizeMap[ smEntry ];
836 int len2= value2.size();
837 // continue reading until "%#" encountered
838 while ( value2[len2-1] != '#' || value2[len2-2] != '%' )
840 isOK = (load >> smValue);
844 len2 = value2.size();
850 value2[ len2-2 ] = '\0'; //cut off "%#"
855 isOK = (load >> option_or_sm);
857 if (option_or_sm == "__ATTRACTORS_BEGIN__")
859 else if (option_or_sm == "__ENFORCED_VERTICES_BEGIN__")
860 hasEnforcedVertex = true;
863 std::string atEntry, atValue;
864 while (isOK && hasAttractor) {
865 isOK = (load >> atEntry);
867 if (atEntry == "__ATTRACTORS_END__")
869 isOK = (load >> atValue);
872 std::string & value3 = _attractors[ atEntry ];
874 int len3= value3.size();
875 // continue reading until "%#" encountered
876 while ( value3[len3-1] != '#' || value3[len3-2] != '%' )
878 isOK = (load >> atValue);
882 len3 = value3.size();
888 value3[ len3-2 ] = '\0'; //cut off "%#"
893 isOK = (load >> option_or_sm);
895 if (option_or_sm == "__ENFORCED_VERTICES_BEGIN__")
896 hasEnforcedVertex = true;
899 std::string enfEntry, enfValue, trace;
900 std::ostringstream oss;
901 while (isOK && hasEnforcedVertex) {
902 isOK = (load >> enfEntry);
904 if (enfEntry == "__ENFORCED_VERTICES_END__")
908 int len4 = enfValue.size();
910 TEnforcedVertexList & evl = _enforcedVertices[enfEntry];
912 TEnforcedVertex enfVertex;
914 // continue reading until "#" encountered
915 while ( enfValue[len4-1] != '#') {
918 while ( enfValue[len4-1] != '$') {
919 isOK = (load >> enfValue);
921 len4 = enfValue.size();
922 // End of vertex list
923 if (enfValue[len4-1] == '#')
925 if (enfValue[len4-1] != '$') {
927 enfVertex.push_back(atof(enfValue.c_str()));
933 if (enfValue[len4-1] == '$') {
934 // Remove '$' and add to vertex
935 enfValue[len4-1] = '\0'; //cut off "$#"
936 enfVertex.push_back(atof(enfValue.c_str()));
937 // Add vertex to list of vertex
938 evl.insert(enfVertex);
941 if (enfValue[len4-1] == '#') {
942 // Remove '$#' and add to vertex
943 enfValue[len4-2] = '\0'; //cut off "$#"
944 enfVertex.push_back(atof(enfValue.c_str()));
945 // Add vertex to list of vertex
946 evl.insert(enfVertex);
956 //=============================================================================
957 std::ostream & operator <<(std::ostream & save, BLSURFPlugin_Hypothesis & hyp)
959 return hyp.SaveTo( save );
962 //=============================================================================
963 std::istream & operator >>(std::istream & load, BLSURFPlugin_Hypothesis & hyp)
965 return hyp.LoadFrom( load );
968 //================================================================================
970 * \brief Does nothing
972 //================================================================================
974 bool BLSURFPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* theMesh,
975 const TopoDS_Shape& theShape)
980 //=============================================================================
982 * \brief Initialize my parameter values by default parameters.
983 * \retval bool - true if parameter values have been successfully defined
985 //=============================================================================
987 bool BLSURFPlugin_Hypothesis::SetParametersByDefaults(const TDefaults& dflts,
988 const SMESH_Mesh* theMesh)
990 return bool( _phySize = dflts._elemLength );
993 //=============================================================================
994 BLSURFPlugin_Hypothesis::Topology BLSURFPlugin_Hypothesis::GetDefaultTopology()
999 //=============================================================================
1000 BLSURFPlugin_Hypothesis::PhysicalMesh BLSURFPlugin_Hypothesis::GetDefaultPhysicalMesh()
1002 return PhysicalUserDefined;
1005 //=============================================================================
1006 double BLSURFPlugin_Hypothesis::GetDefaultPhySize()
1011 //======================================================================
1012 double BLSURFPlugin_Hypothesis::GetDefaultMaxSize()
1014 return undefinedDouble(); // 1e+4;
1017 //======================================================================
1018 double BLSURFPlugin_Hypothesis::GetDefaultMinSize()
1020 return undefinedDouble(); //1e-4;
1023 //======================================================================
1024 BLSURFPlugin_Hypothesis::GeometricMesh BLSURFPlugin_Hypothesis::GetDefaultGeometricMesh()
1029 //=============================================================================
1030 double BLSURFPlugin_Hypothesis::GetDefaultAngleMeshS()
1035 //=============================================================================
1036 double BLSURFPlugin_Hypothesis::GetDefaultGradation()
1041 //=============================================================================
1042 bool BLSURFPlugin_Hypothesis::GetDefaultQuadAllowed()
1047 //=============================================================================
1048 bool BLSURFPlugin_Hypothesis::GetDefaultDecimesh()