1 // Copyright (C) 2007-2010 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
21 // File : BLSURFPlugin_Hypothesis.cxx
22 // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA)
23 // & Aurelien ALLEAUME (DISTENE)
24 // Size maps developement: Nicolas GEIMER (OCC) & Gilles DAVID (EURIWARE)
27 #include "BLSURFPlugin_Hypothesis.hxx"
28 #include <utilities.h>
33 //=============================================================================
34 BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis (int hypId, int studyId,
36 : SMESH_Hypothesis(hypId, studyId, gen),
37 _topology(GetDefaultTopology()),
38 _physicalMesh(GetDefaultPhysicalMesh()),
39 _phySize(GetDefaultPhySize()),
40 _phyMax(GetDefaultMaxSize()),
41 _phyMin(GetDefaultMinSize()),
42 _hgeoMax(GetDefaultMaxSize()),
43 _hgeoMin(GetDefaultMinSize()),
44 _geometricMesh(GetDefaultGeometricMesh()),
45 _angleMeshS(GetDefaultAngleMeshS()),
46 _angleMeshC(GetDefaultAngleMeshC()),
47 _gradation(GetDefaultGradation()),
48 _quadAllowed(GetDefaultQuadAllowed()),
49 _decimesh(GetDefaultDecimesh()),
50 _verb( GetDefaultVerbosity() ),
51 _sizeMap(GetDefaultSizeMap()),
52 _attractors(GetDefaultSizeMap()),
53 _enforcedVertices(GetDefaultEnforcedVertexMap())
55 _name = "BLSURF_Parameters";
58 // to desable writing boundaries
59 //_phyMin = _phyMax = _hgeoMin = _hgeoMax = undefinedDouble();
62 const char* intOptionNames[] = {
91 const char* doubleOptionNames[] = {
109 const char* charOptionNames[] = {
118 while ( intOptionNames[i][0] )
119 _option2value[ intOptionNames[i++] ].clear();
122 while ( doubleOptionNames[i][0] ) {
123 _doubleOptions.insert( doubleOptionNames[i] );
124 _option2value[ doubleOptionNames[i++] ].clear();
127 while ( charOptionNames[i][0] ) {
128 _charOptions.insert( charOptionNames[i] );
129 _option2value[ charOptionNames[i++] ].clear();
135 //=============================================================================
136 void BLSURFPlugin_Hypothesis::SetTopology(Topology theTopology)
138 if (theTopology != _topology) {
139 _topology = theTopology;
140 NotifySubMeshesHypothesisModification();
144 //=============================================================================
145 void BLSURFPlugin_Hypothesis::SetPhysicalMesh(PhysicalMesh thePhysicalMesh)
147 if (thePhysicalMesh != _physicalMesh) {
148 _physicalMesh = thePhysicalMesh;
149 switch( _physicalMesh ) {
152 _phySize = GetDefaultPhySize();
153 _gradation = GetDefaultGradation();
156 NotifySubMeshesHypothesisModification();
160 //=============================================================================
161 void BLSURFPlugin_Hypothesis::SetPhySize(double theVal)
163 if (theVal != _phySize) {
165 NotifySubMeshesHypothesisModification();
169 //=============================================================================
170 void BLSURFPlugin_Hypothesis::SetPhyMin(double theMinSize)
172 if (theMinSize != _phyMin) {
173 _phyMin = theMinSize;
174 NotifySubMeshesHypothesisModification();
178 //=============================================================================
179 void BLSURFPlugin_Hypothesis::SetPhyMax(double theMaxSize)
181 if (theMaxSize != _phyMax) {
182 _phyMax = theMaxSize;
183 NotifySubMeshesHypothesisModification();
188 //=============================================================================
189 void BLSURFPlugin_Hypothesis::SetGeoMin(double theMinSize)
191 if (theMinSize != _hgeoMin) {
192 _hgeoMin = theMinSize;
193 NotifySubMeshesHypothesisModification();
197 //=============================================================================
198 void BLSURFPlugin_Hypothesis::SetGeoMax(double theMaxSize)
200 if (theMaxSize != _hgeoMax) {
201 _hgeoMax = theMaxSize;
202 NotifySubMeshesHypothesisModification();
206 //=============================================================================
207 void BLSURFPlugin_Hypothesis::SetGeometricMesh(GeometricMesh theGeometricMesh)
209 if (theGeometricMesh != _geometricMesh) {
210 _geometricMesh = theGeometricMesh;
211 switch( _geometricMesh ) {
214 _angleMeshS = GetDefaultAngleMeshS();
215 _gradation = GetDefaultGradation();
218 NotifySubMeshesHypothesisModification();
222 //=============================================================================
223 void BLSURFPlugin_Hypothesis::SetAngleMeshS(double theVal)
225 if (theVal != _angleMeshS) {
226 _angleMeshS = theVal;
227 NotifySubMeshesHypothesisModification();
231 //=============================================================================
232 void BLSURFPlugin_Hypothesis::SetAngleMeshC(double theVal)
234 if (theVal != _angleMeshC) {
235 _angleMeshC = theVal;
236 NotifySubMeshesHypothesisModification();
240 //=============================================================================
241 void BLSURFPlugin_Hypothesis::SetGradation(double theVal)
243 if (theVal != _gradation) {
245 NotifySubMeshesHypothesisModification();
249 //=============================================================================
250 void BLSURFPlugin_Hypothesis::SetQuadAllowed(bool theVal)
252 if (theVal != _quadAllowed) {
253 _quadAllowed = theVal;
254 NotifySubMeshesHypothesisModification();
258 //=============================================================================
259 void BLSURFPlugin_Hypothesis::SetDecimesh(bool theVal)
261 if (theVal != _decimesh) {
263 NotifySubMeshesHypothesisModification();
267 //=============================================================================
268 void BLSURFPlugin_Hypothesis::SetVerbosity(int theVal)
270 if (theVal != _verb) {
272 NotifySubMeshesHypothesisModification();
275 //=============================================================================
276 void BLSURFPlugin_Hypothesis::SetOptionValue(const std::string& optionName,
277 const std::string& optionValue)
278 throw (std::invalid_argument)
280 TOptionValues::iterator op_val = _option2value.find( optionName );
281 if ( op_val == _option2value.end() ) {
282 std::string msg = "Unknown BLSURF option: '" + optionName + "'";
283 throw std::invalid_argument(msg);
285 if ( op_val->second != optionValue ) {
286 const char* ptr = optionValue.c_str();
287 // strip white spaces
288 while ( ptr[0] == ' ' )
290 int i = strlen( ptr );
291 while ( i != 0 && ptr[i-1] == ' ')
295 std::string typeName;
299 else if ( _charOptions.find( optionName ) != _charOptions.end() ) {
300 // do not check strings
302 else if ( _doubleOptions.find( optionName ) != _doubleOptions.end() ) {
303 // check if value is double
305 strtod(ptr, &endPtr);
306 typeOk = ( ptr != endPtr );
310 // check if value is int
312 strtol(ptr, &endPtr,10);
313 typeOk = ( ptr != endPtr );
314 typeName = "integer";
317 std::string msg = "Advanced option '" + optionName + "' = '" + optionValue +
318 "' but must be " + typeName;
319 throw std::invalid_argument(msg);
321 op_val->second = optionValue;
322 NotifySubMeshesHypothesisModification();
326 //=============================================================================
327 std::string BLSURFPlugin_Hypothesis::GetOptionValue(const std::string& optionName)
328 throw (std::invalid_argument)
330 TOptionValues::iterator op_val = _option2value.find( optionName );
331 if ( op_val == _option2value.end() ) {
332 std::string msg = "Unknown BLSURF option: <";
333 msg += optionName + ">";
334 throw std::invalid_argument(msg);
336 return op_val->second;
339 //=============================================================================
340 void BLSURFPlugin_Hypothesis::ClearOption(const std::string& optionName)
342 TOptionValues::iterator op_val = _option2value.find( optionName );
343 if ( op_val != _option2value.end() )
344 op_val->second.clear();
347 //=======================================================================
348 //function : SetSizeMapEntry
349 //=======================================================================
350 void BLSURFPlugin_Hypothesis::SetSizeMapEntry(const std::string& entry,const std::string& sizeMap)
352 if (_sizeMap[entry].compare(sizeMap) != 0) {
353 _sizeMap[entry]=sizeMap;
354 NotifySubMeshesHypothesisModification();
358 //=======================================================================
359 //function : GetSizeMapEntry
360 //=======================================================================
361 std::string BLSURFPlugin_Hypothesis::GetSizeMapEntry(const std::string& entry)
363 TSizeMap::iterator it = _sizeMap.find( entry );
364 if ( it != _sizeMap.end() )
367 return "No_Such_Entry";
371 * \brief Return the size maps
373 BLSURFPlugin_Hypothesis::TSizeMap BLSURFPlugin_Hypothesis::GetSizeMapEntries(const BLSURFPlugin_Hypothesis* hyp)
375 return hyp ? hyp->_GetSizeMapEntries():GetDefaultSizeMap();
378 //=======================================================================
379 //function : SetAttractorEntry
380 //=======================================================================
381 void BLSURFPlugin_Hypothesis::SetAttractorEntry(const std::string& entry,const std::string& attractor)
383 if (_attractors[entry].compare(attractor) != 0) {
384 _attractors[entry]=attractor;
385 NotifySubMeshesHypothesisModification();
389 //=======================================================================
390 //function : GetAttractorEntry
391 //=======================================================================
392 std::string BLSURFPlugin_Hypothesis::GetAttractorEntry(const std::string& entry)
394 TSizeMap::iterator it = _attractors.find( entry );
395 if ( it != _attractors.end() )
398 return "No_Such_Entry";
402 * \brief Return the attractors
404 BLSURFPlugin_Hypothesis::TSizeMap BLSURFPlugin_Hypothesis::GetAttractorEntries(const BLSURFPlugin_Hypothesis* hyp)
406 return hyp ? hyp->_GetAttractorEntries():GetDefaultSizeMap();
411 void BLSURFPlugin_Hypothesis::ClearEntry(const std::string& entry)
413 TSizeMap::iterator it = _sizeMap.find( entry );
414 if ( it != _sizeMap.end() ) {
416 NotifySubMeshesHypothesisModification();
419 TSizeMap::iterator itAt = _attractors.find( entry );
420 if ( itAt != _attractors.end() ) {
421 _attractors.erase(itAt);
422 NotifySubMeshesHypothesisModification();
425 std::cout<<"No_Such_Entry"<<std::endl;
430 void BLSURFPlugin_Hypothesis::ClearSizeMaps()
438 //=======================================================================
439 //function : SetEnforcedVertex
440 //=======================================================================
442 void BLSURFPlugin_Hypothesis::SetEnforcedVertex(const std::string& entry, double x, double y, double z)
444 BLSURFPlugin_Hypothesis::TEnforcedVertex coord;
448 bool toNotify = false;
449 if (_enforcedVertices.count(entry)>0)
450 if (_enforcedVertices[entry].count(coord)==0)
455 _enforcedVertices[entry].insert(coord);
457 NotifySubMeshesHypothesisModification();
461 //=======================================================================
462 //function : SetEnforcedVertexList
463 //=======================================================================
465 void BLSURFPlugin_Hypothesis::SetEnforcedVertexList(const std::string& entry, const BLSURFPlugin_Hypothesis::TEnforcedVertexList vertexList)
467 BLSURFPlugin_Hypothesis::TEnforcedVertexList::const_iterator it;
468 bool toNotify = false;
469 for(it = vertexList.begin();it!=vertexList.end();++it) {
470 if (_enforcedVertices.count(entry)>0)
471 if (_enforcedVertices[entry].count(*it)==0)
475 _enforcedVertices[entry].insert(*it);
478 NotifySubMeshesHypothesisModification();
482 //=======================================================================
483 //function : GetEnforcedVertices
484 //=======================================================================
486 BLSURFPlugin_Hypothesis::TEnforcedVertexList BLSURFPlugin_Hypothesis::GetEnforcedVertices(const std::string& entry)
487 throw (std::invalid_argument)
489 if (_enforcedVertices.count(entry)>0)
490 return _enforcedVertices[entry];
491 std::ostringstream msg ;
492 msg << "No enforced vertex for entry " << entry ;
493 throw std::invalid_argument(msg.str());
496 //=======================================================================
497 //function : ClearEnforcedVertex
498 //=======================================================================
500 void BLSURFPlugin_Hypothesis::ClearEnforcedVertex(const std::string& entry, double x, double y, double z)
501 throw (std::invalid_argument)
503 BLSURFPlugin_Hypothesis::TEnforcedVertex coord;
507 BLSURFPlugin_Hypothesis::TEnforcedVertexList::iterator it;
508 bool toNotify = false;
510 BLSURFPlugin_Hypothesis::TEnforcedVertexMap::iterator it_enf = _enforcedVertices.find(entry);
511 if (it_enf != _enforcedVertices.end()) {
512 it = _enforcedVertices[entry].find(coord);
513 if (it != _enforcedVertices[entry].end()) {
515 _enforcedVertices[entry].erase(it);
516 if (_enforcedVertices[entry].size() == 0)
517 _enforcedVertices.erase(it_enf);
520 NotifySubMeshesHypothesisModification();
524 std::ostringstream msg ;
525 msg << "No enforced vertex for " << entry;
526 throw std::invalid_argument(msg.str());
529 //=======================================================================
530 //function : ClearEnforcedVertexList
531 //=======================================================================
533 void BLSURFPlugin_Hypothesis::ClearEnforcedVertexList(const std::string& entry, BLSURFPlugin_Hypothesis::TEnforcedVertexList vertexList)
534 throw (std::invalid_argument)
536 BLSURFPlugin_Hypothesis::TEnforcedVertex coord;
537 BLSURFPlugin_Hypothesis::TEnforcedVertexList::const_iterator it_toRemove;
538 BLSURFPlugin_Hypothesis::TEnforcedVertexList::iterator it;
539 bool toNotify = false;
541 BLSURFPlugin_Hypothesis::TEnforcedVertexMap::iterator it_enf = _enforcedVertices.find(entry);
542 if (it_enf != _enforcedVertices.end()) {
543 for (it_toRemove = vertexList.begin() ; it_toRemove != vertexList.end() ; ++it_toRemove) {
544 coord = *it_toRemove;
545 it = _enforcedVertices[entry].find(coord);
546 if (it != _enforcedVertices[entry].end()) {
548 _enforcedVertices[entry].erase(it);
551 if (_enforcedVertices[entry].size() == 0) {
553 _enforcedVertices.erase(it_enf);
556 NotifySubMeshesHypothesisModification();
560 std::ostringstream msg ;
561 msg << "No enforced vertex for " << entry;
562 throw std::invalid_argument(msg.str());
565 //=======================================================================
566 //function : ClearEnforcedVertices
567 //=======================================================================
569 void BLSURFPlugin_Hypothesis::ClearEnforcedVertices(const std::string& entry)
570 throw (std::invalid_argument)
572 BLSURFPlugin_Hypothesis::TEnforcedVertexMap::iterator it_enf = _enforcedVertices.find(entry);
573 if (it_enf != _enforcedVertices.end()) {
574 _enforcedVertices.erase(it_enf);
575 NotifySubMeshesHypothesisModification();
579 std::ostringstream msg ;
580 msg << "No enforced vertex for " << entry;
581 throw std::invalid_argument(msg.str());
584 //=======================================================================
585 //function : ClearAllEnforcedVertices
586 //=======================================================================
587 void BLSURFPlugin_Hypothesis::ClearAllEnforcedVertices()
589 _enforcedVertices.clear();
590 NotifySubMeshesHypothesisModification();
593 //================================================================================
595 * \brief Return the enforced vertices
597 //================================================================================
599 BLSURFPlugin_Hypothesis::TEnforcedVertexMap BLSURFPlugin_Hypothesis::GetAllEnforcedVertices(const BLSURFPlugin_Hypothesis* hyp)
601 return hyp ? hyp->_GetAllEnforcedVertices():GetDefaultEnforcedVertexMap();
606 //=============================================================================
607 std::ostream & BLSURFPlugin_Hypothesis::SaveTo(std::ostream & save)
609 save << " " << (int)_topology
610 << " " << (int)_physicalMesh
611 << " " << (int)_geometricMesh
613 << " " << _angleMeshS
615 << " " << (int)_quadAllowed
616 << " " << (int)_decimesh;
617 save << " " << _phyMin
619 << " " << _angleMeshC
624 TOptionValues::iterator op_val = _option2value.begin();
625 if (op_val != _option2value.end()) {
626 save << " " << "__OPTIONS_BEGIN__";
627 for ( ; op_val != _option2value.end(); ++op_val ) {
628 if ( !op_val->second.empty() )
629 save << " " << op_val->first
630 << " " << op_val->second << "%#"; // "%#" is a mark of value end
632 save << " " << "__OPTIONS_END__";
635 TSizeMap::iterator it_sm = _sizeMap.begin();
636 if (it_sm != _sizeMap.end()) {
637 save << " " << "__SIZEMAP_BEGIN__";
638 for ( ; it_sm != _sizeMap.end(); ++it_sm ) {
639 save << " " << it_sm->first
640 << " " << it_sm->second << "%#"; // "%#" is a mark of value end
642 save << " " << "__SIZEMAP_END__";
645 TSizeMap::iterator it_at = _attractors.begin();
646 if (it_at != _attractors.end()) {
647 save << " " << "__ATTRACTORS_BEGIN__";
648 for ( ; it_at != _attractors.end(); ++it_at ) {
649 save << " " << it_at->first
650 << " " << it_at->second << "%#"; // "%#" is a mark of value end
652 save << " " << "__ATTRACTORS_END__";
655 TEnforcedVertexMap::const_iterator it_enf = _enforcedVertices.begin();
656 if (it_enf != _enforcedVertices.end()) {
657 save << " " << "__ENFORCED_VERTICES_BEGIN__";
658 for ( ; it_enf != _enforcedVertices.end(); ++it_enf ) {
659 save << " " << it_enf->first;
660 TEnforcedVertexList evl = it_enf->second;
661 TEnforcedVertexList::const_iterator it_evl = evl.begin();
662 if (it_evl != evl.end()) {
663 for ( ; it_evl != evl.end() ; ++it_evl) {
664 save << " " << (*it_evl)[0];
665 save << " " << (*it_evl)[1];
666 save << " " << (*it_evl)[2];
667 save << "$"; // "$" is a mark of enforced vertex end
670 save << "#"; // "#" is a mark of enforced shape end
672 save << " " << "__ENFORCED_VERTICES_END__";
678 //=============================================================================
679 std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load)
687 _topology = (Topology) i;
689 load.clear(std::ios::badbit | load.rdstate());
693 _physicalMesh = (PhysicalMesh) i;
695 load.clear(std::ios::badbit | load.rdstate());
699 _geometricMesh = (GeometricMesh) i;
701 load.clear(std::ios::badbit | load.rdstate());
703 isOK = (load >> val);
707 load.clear(std::ios::badbit | load.rdstate());
709 isOK = (load >> val);
713 load.clear(std::ios::badbit | load.rdstate());
715 isOK = (load >> val);
719 load.clear(std::ios::badbit | load.rdstate());
723 _quadAllowed = (bool) i;
725 load.clear(std::ios::badbit | load.rdstate());
729 _decimesh = (bool) i;
731 load.clear(std::ios::badbit | load.rdstate());
733 isOK = (load >> val);
737 load.clear(std::ios::badbit | load.rdstate());
739 isOK = (load >> val);
743 load.clear(std::ios::badbit | load.rdstate());
745 isOK = (load >> val);
749 load.clear(std::ios::badbit | load.rdstate());
751 isOK = (load >> val);
755 load.clear(std::ios::badbit | load.rdstate());
757 isOK = (load >> val);
761 load.clear(std::ios::badbit | load.rdstate());
767 load.clear(std::ios::badbit | load.rdstate());
769 std::string option_or_sm;
770 bool hasOptions = false;
771 bool hasSizeMap = false;
772 bool hasAttractor = false;
773 bool hasEnforcedVertex = false;
775 isOK = (load >> option_or_sm);
777 if (option_or_sm == "__OPTIONS_BEGIN__")
779 else if (option_or_sm == "__SIZEMAP_BEGIN__")
781 else if (option_or_sm == "__ATTRACTORS_BEGIN__")
783 else if (option_or_sm == "__ENFORCED_VERTICES_BEGIN__")
784 hasEnforcedVertex = true;
786 std::string optName, optValue;
787 while (isOK && hasOptions) {
788 isOK = (load >> optName);
790 if (optName == "__OPTIONS_END__")
792 isOK = (load >> optValue);
795 std::string & value = _option2value[ optName ];
797 int len = value.size();
798 // continue reading until "%#" encountered
799 while ( value[len-1] != '#' || value[len-2] != '%' )
801 isOK = (load >> optValue);
811 value[ len-2 ] = '\0'; //cut off "%#"
816 isOK = (load >> option_or_sm);
818 if (option_or_sm == "__SIZEMAP_BEGIN__")
820 else if (option_or_sm == "__ATTRACTORS_BEGIN__")
822 else if (option_or_sm == "__ENFORCED_VERTICES_BEGIN__")
823 hasEnforcedVertex = true;
826 std::string smEntry, smValue;
827 while (isOK && hasSizeMap) {
828 isOK = (load >> smEntry);
830 if (smEntry == "__SIZEMAP_END__")
832 isOK = (load >> smValue);
835 std::string & value2 = _sizeMap[ smEntry ];
837 int len2= value2.size();
838 // continue reading until "%#" encountered
839 while ( value2[len2-1] != '#' || value2[len2-2] != '%' )
841 isOK = (load >> smValue);
845 len2 = value2.size();
851 value2[ len2-2 ] = '\0'; //cut off "%#"
856 isOK = (load >> option_or_sm);
858 if (option_or_sm == "__ATTRACTORS_BEGIN__")
860 else if (option_or_sm == "__ENFORCED_VERTICES_BEGIN__")
861 hasEnforcedVertex = true;
864 std::string atEntry, atValue;
865 while (isOK && hasAttractor) {
866 isOK = (load >> atEntry);
868 if (atEntry == "__ATTRACTORS_END__")
870 isOK = (load >> atValue);
873 std::string & value3 = _attractors[ atEntry ];
875 int len3= value3.size();
876 // continue reading until "%#" encountered
877 while ( value3[len3-1] != '#' || value3[len3-2] != '%' )
879 isOK = (load >> atValue);
883 len3 = value3.size();
889 value3[ len3-2 ] = '\0'; //cut off "%#"
894 isOK = (load >> option_or_sm);
896 if (option_or_sm == "__ENFORCED_VERTICES_BEGIN__")
897 hasEnforcedVertex = true;
900 std::string enfEntry, enfValue, trace;
901 std::ostringstream oss;
902 while (isOK && hasEnforcedVertex) {
903 isOK = (load >> enfEntry);
905 if (enfEntry == "__ENFORCED_VERTICES_END__")
909 int len4 = enfValue.size();
911 TEnforcedVertexList & evl = _enforcedVertices[enfEntry];
913 TEnforcedVertex enfVertex;
915 // continue reading until "#" encountered
916 while ( enfValue[len4-1] != '#') {
919 while ( enfValue[len4-1] != '$') {
920 isOK = (load >> enfValue);
922 len4 = enfValue.size();
923 // End of vertex list
924 if (enfValue[len4-1] == '#')
926 if (enfValue[len4-1] != '$') {
928 enfVertex.push_back(atof(enfValue.c_str()));
934 if (enfValue[len4-1] == '$') {
935 // Remove '$' and add to vertex
936 enfValue[len4-1] = '\0'; //cut off "$#"
937 enfVertex.push_back(atof(enfValue.c_str()));
938 // Add vertex to list of vertex
939 evl.insert(enfVertex);
942 if (enfValue[len4-1] == '#') {
943 // Remove '$#' and add to vertex
944 enfValue[len4-2] = '\0'; //cut off "$#"
945 enfVertex.push_back(atof(enfValue.c_str()));
946 // Add vertex to list of vertex
947 evl.insert(enfVertex);
957 //=============================================================================
958 std::ostream & operator <<(std::ostream & save, BLSURFPlugin_Hypothesis & hyp)
960 return hyp.SaveTo( save );
963 //=============================================================================
964 std::istream & operator >>(std::istream & load, BLSURFPlugin_Hypothesis & hyp)
966 return hyp.LoadFrom( load );
969 //================================================================================
971 * \brief Does nothing
973 //================================================================================
975 bool BLSURFPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* theMesh,
976 const TopoDS_Shape& theShape)
981 //=============================================================================
983 * \brief Initialize my parameter values by default parameters.
984 * \retval bool - true if parameter values have been successfully defined
986 //=============================================================================
988 bool BLSURFPlugin_Hypothesis::SetParametersByDefaults(const TDefaults& dflts,
989 const SMESH_Mesh* theMesh)
991 return bool( _phySize = dflts._elemLength );
994 //=============================================================================
995 BLSURFPlugin_Hypothesis::Topology BLSURFPlugin_Hypothesis::GetDefaultTopology()
1000 //=============================================================================
1001 BLSURFPlugin_Hypothesis::PhysicalMesh BLSURFPlugin_Hypothesis::GetDefaultPhysicalMesh()
1003 return PhysicalUserDefined;
1006 //=============================================================================
1007 double BLSURFPlugin_Hypothesis::GetDefaultPhySize()
1012 //======================================================================
1013 double BLSURFPlugin_Hypothesis::GetDefaultMaxSize()
1015 return undefinedDouble(); // 1e+4;
1018 //======================================================================
1019 double BLSURFPlugin_Hypothesis::GetDefaultMinSize()
1021 return undefinedDouble(); //1e-4;
1024 //======================================================================
1025 BLSURFPlugin_Hypothesis::GeometricMesh BLSURFPlugin_Hypothesis::GetDefaultGeometricMesh()
1030 //=============================================================================
1031 double BLSURFPlugin_Hypothesis::GetDefaultAngleMeshS()
1036 //=============================================================================
1037 double BLSURFPlugin_Hypothesis::GetDefaultGradation()
1042 //=============================================================================
1043 bool BLSURFPlugin_Hypothesis::GetDefaultQuadAllowed()
1048 //=============================================================================
1049 bool BLSURFPlugin_Hypothesis::GetDefaultDecimesh()