]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
#17784 [EDF] MESH-GEMS-2.9.6 Meshers options
authoreap <eap@opencascade.com>
Tue, 1 Oct 2019 11:04:51 +0000 (14:04 +0300)
committereap <eap@opencascade.com>
Tue, 1 Oct 2019 11:04:51 +0000 (14:04 +0300)
 Add all options available by MG-2.9.6 version.

15 files changed:
doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters.png
doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters_advanced.png
doc/salome/gui/BLSURFPLUGIN/input/blsurf_hypo.doc
idl/BLSURFPlugin_Algorithm.idl
src/BLSURFPlugin/BLSURFPluginBuilder.py
src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx
src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx
src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx
src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx
src/GUI/BLSURFPluginGUI_HypothesisCreator.h
src/GUI/BLSURFPluginGUI_StdWidget.cxx
src/GUI/BLSURFPluginGUI_StdWidget_QTD.ui
src/GUI/BLSURFPlugin_msg_en.ts

index 884b4112e0cf275ae196a582bdc04b32879288fc..5f67d49f6b6ff3dbb3caf1e8ecc5220f74312b33 100644 (file)
Binary files a/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters.png and b/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters.png differ
index 9c966797338639be4acdf6567b80698390449059..ca5696898c7c96f3f9be268195784af5ec18e197 100644 (file)
Binary files a/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters_advanced.png and b/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters_advanced.png differ
index 228022bf97e9275847de5f75237860a7c9f11aeb..1b1c1d546cba441a069f3898f5eb41fc87cb82fe 100644 (file)
@@ -65,6 +65,20 @@ The smaller this distance is, the closer the mesh is to the exact surface (only
 
   - Quadrangles: generate a mesh with only quadrangles.
 
+- <b>Surface proximity</b> - activates surface proximity based refinement.
+
+  - <b>Number of layers</b> - number of surface element layers to be generated.
+
+  - <b>Ratio</b> -  a multiplicative coefficient which will be used to scale the size computed by
+the surface proximity detection.
+
+- <b>Volume proximity</b> - activates volume proximity based refinement.
+
+  - <b>Number of layers</b> - number of surface element layers to be generated.
+
+  - <b>Ratio</b> -  a multiplicative coefficient which will be used to scale the size computed by
+the volume proximity detection.
+
 - <b>Anisotropic</b> - if checked, this parameter defines the maximum anisotropic ratio of the metric governing the anisotropic meshing process.
 The default value (0) means that the metric (and thus the generated elements) can be arbitrarily stretched.
 
@@ -102,6 +116,8 @@ The notion of <i>diag</i> used in the descriptions means the diagonal of the bou
 
 - \b Meshing options
 
+  - <b>Independent patches</b> - This parameter can be used to activate the more complete patch independent meshing, by generating the mesh on global user-defined hyperpatches.
+
   - <b>Enforce CAD edge sizes</b> - Relaxes the given sizemap constraint around CAD edges to allow a better
 element quality and a better geometric approximation. It is only useful in combination with the
 gradation option.
@@ -141,6 +157,12 @@ local size on a vertex situated on a border curve.
 
   \n All options are unchecked by default. No cleanup is made by default so that the mesh matches the shape. If the user has a bad shape (e.g. imported shape), he can activate some options to improve the mesh.
 
+  - <b>Compute ridges</b> -  If this option is deactivated,
+  MeshGems-CADSurf will not try to preserve lines defined by a sharp
+  angle in the input discrete geometry. Only input ridges, free edges,
+  non manifold edges and separation betwen zones with different
+  attributes will be respected (if tags is set to respect).
+
   - <b>Closed geometry</b> - describes whether the working geometry should be closed or not. 
   When activated, this option helps PreCAD to process the dirtiest geometries.
 
index 27b80df1c0031727e13640f90c129335190ab0d2..07af2be5d4a9383453e560e82d69eba87b1d7945 100644 (file)
@@ -138,7 +138,7 @@ module BLSURFPlugin
   {
 
     /*!
-     * Sets a way to define size of mesh elements to generate
+     *Set a way to define size of mesh elements to generate
      * 0 - size is defined automatically
      * 1 - size is set by SetPhySize() method
      * 2 - size is set by SetPhySize() method. A sizemap is defined.
@@ -147,7 +147,7 @@ module BLSURFPlugin
     long GetPhysicalMesh();
 
     /*!
-     * Sets a way to define maximum angular deflection of mesh from CAD model
+     *Set a way to define maximum angular deflection of mesh from CAD model
      * 0 - deflection is defined automatically
      * 1 - deflection is set by SetAngleMesh() method
      * 2 - deflection is set by SetAngleMesh() method. A sizemap is defined (TODO).
@@ -156,7 +156,7 @@ module BLSURFPlugin
     long GetGeometricMesh();
 
     /*!
-     * Sets size of mesh elements to generate
+     *Set size of mesh elements to generate
      */
     void SetPhySize(in double size);
     void SetPhySizeRel(in double size);
@@ -164,7 +164,7 @@ module BLSURFPlugin
     boolean IsPhySizeRel();
 
     /*!
-     * Sets lower boundary of mesh element size
+     *Set lower boundary of mesh element size
      */
     void SetMinSize(in double theMinSize);
     void SetMinSizeRel(in double theMinSize);
@@ -172,7 +172,7 @@ module BLSURFPlugin
     boolean IsMinSizeRel();
 
     /*!
-     * Sets upper boundary of mesh element size
+     *Set upper boundary of mesh element size
      */
     void SetMaxSize(in double theMaxSize);
     void SetMaxSizeRel(in double theMaxSize);
@@ -180,7 +180,7 @@ module BLSURFPlugin
     boolean IsMaxSizeRel();
 
     /*!
-     * Sets maximal allowed ratio between the lengths of two adjacent edges
+     *Set maximal allowed ratio between the lengths of two adjacent edges
      */
     void SetUseGradation(in boolean toUse);
     boolean GetUseGradation();
@@ -188,7 +188,7 @@ module BLSURFPlugin
     double GetGradation();
 
     /*!
-     * Sets maximal allowed ratio between the lengths of two adjacent edges in 3D mesh
+     *Set maximal allowed ratio between the lengths of two adjacent edges in 3D mesh
      */
     void SetUseVolumeGradation(in boolean toUse);
     boolean GetUseVolumeGradation();
@@ -196,20 +196,20 @@ module BLSURFPlugin
     double GetVolumeGradation();
 
     /*!
-     * Sets to create quadrilateral elements or not
+     *Set to create quadrilateral elements or not
      */
     void SetQuadAllowed(in boolean allowed);
     void SetElementType(in long elementType);
     long GetElementType();
 
     /*!
-     * Sets angular deflection (in degrees) of a mesh face and edge from CAD surface
+     *Set angular deflection (in degrees) of a mesh face and edge from CAD surface
      */
     void SetAngleMesh(in double angle);
     double GetAngleMesh();
 
     /*!
-     * Sets the maximum desired distance between a triangle and its supporting CAD surface
+     *Set the maximum desired distance between a triangle and its supporting CAD surface
      */
     void SetChordalError(in double distance);
     double GetChordalError();
@@ -274,7 +274,7 @@ module BLSURFPlugin
     double GetCorrectSurfaceIntersectionMaxCost();
 
     /*!
-     * This patch independent correction option can be activated to remove the bad 
+     * This patch independent correction option can be activated to remove the bad
      * elements (often called slivers) from the generated mesh, without taking into account
      * the tags (attributes) specification.
      */
@@ -283,7 +283,7 @@ module BLSURFPlugin
 
     /*!
      * This parameter defines the aspect ratio triggering the "bad element"
-     * classification for the force bad surface element removal option. 
+     * classification for the force bad surface element removal option.
      */
     void SetBadElementAspectRatio(in double ratio);
     double GetBadElementAspectRatio();
@@ -303,7 +303,7 @@ module BLSURFPlugin
     boolean GetQuadraticMesh();
 
     /*!
-     * Sets topology usage way defining how mesh conformity is assured
+     *Set topology usage way defining how mesh conformity is assured
      * value=0 - mesh conformity is assured by conformity of a shape
      * value=1,2 - mesh conformity is assured by pre-processing a CAD model (OBSOLETE)
      * value=3 - mesh conformity is assured by pre-processing a CAD model with Pre-CAD
@@ -311,8 +311,45 @@ module BLSURFPlugin
     void SetTopology(in long way);
     long GetTopology();
 
+    
+    /*!
+     *  Activate/deactivate surface proximity computation
+     */
+    void SetUseSurfaceProximity( in boolean toUse );
+    boolean GetUseSurfaceProximity();
+
+    /*!
+     * Set number of surface element layers to be generated due to surface proximity
+     */
+    void SetNbSurfaceProximityLayers( in short nbLayers );
+    short GetNbSurfaceProximityLayers();
+
+    /*!
+     * Set coefficient by which size of element refined due to surface proximity is increased
+     */
+    void SetSurfaceProximityRatio( in double ratio );
+    double GetSurfaceProximityRatio();
+
+    /*!
+     *  Activate/deactivate volume proximity computation
+     */
+    void SetUseVolumeProximity( in boolean toUse );
+    boolean GetUseVolumeProximity();
+
+    /*!
+     * Set number of surface element layers to be generated due to volume proximity
+     */
+    void SetNbVolumeProximityLayers( in short nbLayers );
+    short GetNbVolumeProximityLayers();
+
+    /*!
+     * Set coefficient by which size of element refined due to volume proximity is increased
+     */
+    void SetVolumeProximityRatio( in double ratio );
+    double GetVolumeProximityRatio();
+
     /*!
-     * Sets verbosity level in the range 0 to 100.
+     *Set verbosity level in the range 0 to 100.
      */
     void SetVerbosity(in short theVal) raises (SALOME::SALOME_Exception);
     short GetVerbosity();
@@ -485,7 +522,7 @@ module BLSURFPlugin
     boolean GetPreCADDiscardInput();
 
     /*!
-     * Sets advanced option value
+     *Set advanced option value
      */
     void SetOptionValue(in string optionName,
                         in string optionValue) raises (SALOME::SALOME_Exception);
@@ -672,7 +709,7 @@ module BLSURFPlugin
     ///////////////////////
 
     /*!
-     * Sets the file for export resulting mesh in GMF format
+     *Set the file for export resulting mesh in GMF format
      */
     void SetGMFFile(in string theFileName);
     string GetGMFFile();
index df59b33fa50d94a9dfc81500ade1edf4bab83a6a..d934e5511af9c85c19edf9afafff3930c484a411 100644 (file)
@@ -198,6 +198,49 @@ class BLSURF_Algorithm(Mesh_Algorithm):
     self.Parameters().SetTopology(way)
     pass
 
+  ## Activate/deactivate surface proximity computation
+  # @param toUse boolean flag
+  #
+  def SetSurfaceProximity(self, toUse ):
+    self.Parameters().SetUseSurfaceProximity(toUse)
+    return
+
+  ## Set number of surface element layers to be generated due to surface proximity
+  # @param nbLayers number of layers
+  #
+  def SetNbSurfaceProximityLayers(self, nbLayers ):
+    self.Parameters().SetNbSurfaceProximityLayers( nbLayers )
+    return
+
+  ## Set coefficient by which size of element refined due to surface proximity is increased
+  # @param ratio proximity coefficient
+  #
+  def SetSurfaceProximityRatio(self, ratio ):
+    self.Parameters().SetSurfaceProximityRatio(ratio)
+    return
+  
+  ## Activate/deactivate volume proximity computation
+  # @param toUse boolean flag
+  #
+  def SetVolumeProximity(self, toUse ):
+    self.Parameters().SetUseVolumeProximity(toUse)
+    return
+  
+  ## Set number of surface element layers to be generated due to volume proximity
+  # @param nbLayers number of layers
+  #
+  def SetNbVolumeProximityLayers(self, nbLayers ):
+    self.Parameters().SetNbVolumeProximityLayers(nbLayers)
+    return
+
+  ## Set coefficient by which size of element refined due to volume proximity is increased
+  # @param ratio proximity coefficient
+  #
+  def SetVolumeProximityRatio(self, ratio ):
+    self.Parameters().SetVolumeProximityRatio(ratio)
+    return
+
+
   ## Sets verbosity level in the range 0 to 100.
   #  @param level verbosity level
   def SetVerbosity(self, level):
@@ -333,6 +376,28 @@ class BLSURF_Algorithm(Mesh_Algorithm):
   def SetTags( self, howToTreat ):
     self.Parameters().SetTags( howToTreat )
 
+  ## Activate/deactivate fully patch independent meshing
+  #   @param isIndependent boolean flag
+  #
+  # This feature can only be used if the @a tags parameter is set to "respect".
+  # By default this option deactivated.
+  #
+  def SetPatchIndependent( self, isIndependent ):
+    self.SetOptionValue( "allow_patch_independent", "yes" if isIndependent else "no" )
+
+  ## Set to preserve lines defined by a sharp angle in the input discrete geometry
+  #   @param toCompute boolean flag
+  #
+  # If this option is deactivated, MeshGems-CADSurf will not try to preserve lines
+  # defined by a sharp angle in the input discrete geometry. Only input ridges, free
+  # edges, non manifold edges and separation betwen zones with different attributes
+  # will be respected (if tags is set to respect).
+  # By default this option activated.
+  #
+  def SetComputeRidges( self, toCompute ):
+    self.SetOptionValue( "compute_ridges", "yes" if toCompute else "no" )
+
+
   ## Activate removal of the tiny edges from the generated
   # mesh when it improves the local mesh quality, without taking into account the
   # tags (attributes) specifications.
index 9ee847f0c82b731012fc4b87e5d1d43d0cd455b7..828b1392a2da7be22ef26346175e00daa21f78d3 100644 (file)
@@ -879,6 +879,12 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp,
   bool   _quadraticMesh         = BLSURFPlugin_Hypothesis::GetDefaultQuadraticMesh();
   int    _verb                  = BLSURFPlugin_Hypothesis::GetDefaultVerbosity();
   //int    _topology              = BLSURFPlugin_Hypothesis::GetDefaultTopology();
+  bool   _useSurfaceProximity      = BLSURFPlugin_Hypothesis::GetDefaultUseSurfaceProximity     ();
+  int    _nbSurfaceProximityLayers = BLSURFPlugin_Hypothesis::GetDefaultNbSurfaceProximityLayers();
+  double _surfaceProximityRatio    = BLSURFPlugin_Hypothesis::GetDefaultSurfaceProximityRatio   ();
+  bool   _useVolumeProximity       = BLSURFPlugin_Hypothesis::GetDefaultUseVolumeProximity      ();
+  int    _nbVolumeProximityLayers  = BLSURFPlugin_Hypothesis::GetDefaultNbVolumeProximityLayers ();
+  double _volumeProximityRatio     = BLSURFPlugin_Hypothesis::GetDefaultVolumeProximityRatio    ();
 
   // PreCAD
   //int _precadMergeEdges         = BLSURFPlugin_Hypothesis::GetDefaultPreCADMergeEdges();
@@ -941,6 +947,13 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp,
     //_precadRemoveDuplicateCADFaces = hyp->GetPreCADRemoveDuplicateCADFaces();
     //_precadProcess3DTopology = hyp->GetPreCADProcess3DTopology();
     //_precadDiscardInput      = hyp->GetPreCADDiscardInput();
+    _useSurfaceProximity      = hyp->GetUseSurfaceProximity     ();
+    _nbSurfaceProximityLayers = hyp->GetNbSurfaceProximityLayers();
+    _surfaceProximityRatio    = hyp->GetSurfaceProximityRatio   ();
+    _useVolumeProximity       = hyp->GetUseVolumeProximity      ();
+    _nbVolumeProximityLayers  = hyp->GetNbVolumeProximityLayers ();
+    _volumeProximityRatio     = hyp->GetVolumeProximityRatio    ();
+
 
     const BLSURFPlugin_Hypothesis::TOptionValues& opts = hyp->GetOptionValues();
     BLSURFPlugin_Hypothesis::TOptionValues::const_iterator opIt;
@@ -1086,6 +1099,19 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp,
    set_param(css, "element_order",                     _quadraticMesh ? "quadratic" : "linear");
    set_param(css, "verbose",                           val_to_string(_verb).c_str());
 
+   set_param(css, "use_surface_proximity",             _useSurfaceProximity ? "yes" : "no" );
+   if ( _useSurfaceProximity )
+   {
+     set_param(css, "surface_proximity_layers",        SMESH_Comment( _nbSurfaceProximityLayers ));
+     set_param(css, "surface_proximity_ratio",         SMESH_Comment( _surfaceProximityRatio ));
+   }
+   set_param(css, "use_volume_proximity",             _useVolumeProximity ? "yes" : "no" );
+   if ( _useVolumeProximity )
+   {
+     set_param(css, "volume_proximity_layers",        SMESH_Comment( _nbVolumeProximityLayers ));
+     set_param(css, "volume_proximity_ratio",         SMESH_Comment( _volumeProximityRatio ));
+   }
+
    _smp_phy_size = _phySizeRel ? _phySize*diagonal : _phySize;
    if ( _verb > 0 )
      std::cout << "_smp_phy_size = " << _smp_phy_size << std::endl;
index f57f5ab0893f874375861507dc05c25dc1cfa4c6..50ff614c433c04ab139d5f388e1fd68540bac184 100644 (file)
@@ -50,7 +50,7 @@ namespace
 
 //=============================================================================
 BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, SMESH_Gen * gen, bool hasgeom) :
-  SMESH_Hypothesis(hypId, gen), 
+  SMESH_Hypothesis(hypId, gen),
   _physicalMesh(GetDefaultPhysicalMesh()),
   _geometricMesh(GetDefaultGeometricMesh()),
   _phySize(GetDefaultPhySize()),
@@ -65,7 +65,7 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, SMESH_Gen * gen, boo
   _volumeGradation(GetDefaultVolumeGradation()),
   _elementType(GetDefaultElementType()),
   _angleMesh(GetDefaultAngleMesh()),
-  _chordalError(GetDefaultChordalError()), 
+  _chordalError(GetDefaultChordalError()),
   _anisotropic(GetDefaultAnisotropic()),
   _anisotropicRatio(GetDefaultAnisotropicRatio()),
   _removeTinyEdges(GetDefaultRemoveTinyEdges()),
@@ -80,6 +80,12 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, SMESH_Gen * gen, boo
   _quadraticMesh(GetDefaultQuadraticMesh()),
   _verb(GetDefaultVerbosity()),
   _topology(GetDefaultTopology()),
+  _useSurfaceProximity(GetDefaultUseSurfaceProximity()),
+  _nbSurfaceProximityLayers(GetDefaultNbSurfaceProximityLayers()),
+  _surfaceProximityRatio(GetDefaultSurfaceProximityRatio()),
+  _useVolumeProximity(GetDefaultUseVolumeProximity()),
+  _nbVolumeProximityLayers(GetDefaultNbVolumeProximityLayers()),
+  _volumeProximityRatio(GetDefaultVolumeProximityRatio()),
   _preCADMergeEdges(GetDefaultPreCADMergeEdges()),
   _preCADRemoveDuplicateCADFaces(GetDefaultPreCADRemoveDuplicateCADFaces()),
   _preCADProcess3DTopology(GetDefaultPreCADProcess3DTopology()),
@@ -101,8 +107,6 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, SMESH_Gen * gen, boo
 {
   _name = GetHypType(hasgeom);
   _param_algo_dim = 2;
-  
-//   _GMFFileMode = false; // GMF ascii mode
 
   // Advanced options with their defaults according to MG User Manual
 
@@ -115,8 +119,10 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, SMESH_Gen * gen, boo
                                             // "optimise_tiny_edges",                      // default = 0
                                             // "remove_duplicate_cad_faces",               // default = 1
                                             "tiny_edge_avoid_surface_intersections",    // default = 1
-                                            "debug",                                    // default = 0 
-                                            "use_deprecated_patch_mesher",              // default 0
+                                            "debug",                                    // default = 0
+                                            "allow_patch_independent",                   // false
+
+                                            //"use_deprecated_patch_mesher",              // default 0
                                             // "tiny_edge_respect_geometry",               // default = 0
                                             "" // mark of end
       };
@@ -147,6 +153,7 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, SMESH_Gen * gen, boo
                                             // remove_tiny_uv_edges option is not documented
                                             // but it is useful that the user can change it to disable all preprocessing options
                                             "remove_tiny_uv_edges",                        // default = 1
+                                            "compute_ridges",                             // true
                                             "" // mark of end
       };
   const char* preCADintOptionNames[] = {    // "manifold_geometry",                        // default = 0
@@ -210,11 +217,11 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, SMESH_Gen * gen, boo
   _defaultOptionValues["max_number_of_points_per_patch"         ] = "0";
   _defaultOptionValues["max_number_of_threads"                  ] = "4";
   _defaultOptionValues["rectify_jacobian"                       ] = "yes";
-  _defaultOptionValues["use_deprecated_patch_mesher"            ] = "yes";
   _defaultOptionValues["respect_geometry"                       ] = "yes";
   _defaultOptionValues["tiny_edge_avoid_surface_intersections"  ] = "yes";
-  _defaultOptionValues["use_deprecated_patch_mesher"            ] = "no";
+  //_defaultOptionValues["use_deprecated_patch_mesher"          ] = "no";
   _defaultOptionValues["debug"                                  ] = "no";
+  _defaultOptionValues["allow_patch_independent"                ] = "no";
   if ( hasgeom )
   {
     _defaultOptionValues["closed_geometry"                        ] = "no";
@@ -227,6 +234,7 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, SMESH_Gen * gen, boo
     _defaultOptionValues["required_entities"                      ] = "respect";
     _defaultOptionValues["sewing_tolerance"                       ] = "5e-4*D";
     _defaultOptionValues["tags"                                   ] = "respect";
+    _defaultOptionValues["compute_ridges"                         ] = "yes";
   }
 
 #ifdef _DEBUG_
@@ -237,20 +245,6 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, SMESH_Gen * gen, boo
   ASSERT( _option2value.size() + _preCADoption2value.size() == _defaultOptionValues.size() );
 #endif
 
-  _sizeMap.clear();
-  _attractors.clear();
-  _faceEntryEnfVertexListMap.clear();
-  _enfVertexList.clear();
-  _faceEntryCoordsListMap.clear();
-  _coordsEnfVertexMap.clear();
-  _faceEntryEnfVertexEntryListMap.clear();
-  _enfVertexEntryEnfVertexMap.clear();
-  _groupNameNodeIDMap.clear();
-
-  /* TODO GROUPS
-   _groupNameEnfVertexListMap.clear();
-   _enfVertexGroupNameMap.clear();
-   */
 }
 
 TopoDS_Shape BLSURFPlugin_Hypothesis::entryToShape(std::string entry)
@@ -485,6 +479,66 @@ void BLSURFPlugin_Hypothesis::SetTopology(Topology theTopology) {
   }
 }
 
+//=============================================================================
+void BLSURFPlugin_Hypothesis::SetUseSurfaceProximity( bool toUse )
+{
+  if ( _useSurfaceProximity != toUse )
+  {
+    _useSurfaceProximity = toUse;
+    NotifySubMeshesHypothesisModification();
+  }
+}
+
+//=============================================================================
+void BLSURFPlugin_Hypothesis::SetNbSurfaceProximityLayers( int nbLayers )
+{
+  if ( _nbSurfaceProximityLayers != nbLayers )
+  {
+    _nbSurfaceProximityLayers = nbLayers;
+    NotifySubMeshesHypothesisModification();
+  }
+}
+
+//=============================================================================
+void BLSURFPlugin_Hypothesis::SetSurfaceProximityRatio( double ratio )
+{
+  if ( _surfaceProximityRatio != ratio )
+  {
+    _surfaceProximityRatio = ratio;
+    NotifySubMeshesHypothesisModification();
+  }
+}
+
+//=============================================================================
+void BLSURFPlugin_Hypothesis::SetUseVolumeProximity( bool toUse )
+{
+  if ( _useVolumeProximity != toUse )
+  {
+    _useVolumeProximity = toUse;
+    NotifySubMeshesHypothesisModification();
+  }
+}
+
+//=============================================================================
+void BLSURFPlugin_Hypothesis::SetNbVolumeProximityLayers( int nbLayers )
+{
+  if ( _nbVolumeProximityLayers != nbLayers )
+  {
+    _nbVolumeProximityLayers = nbLayers;
+    NotifySubMeshesHypothesisModification();
+  }
+}
+
+//=============================================================================
+void BLSURFPlugin_Hypothesis::SetVolumeProximityRatio( double ratio )
+{
+  if ( _volumeProximityRatio != ratio )
+  {
+    _volumeProximityRatio = ratio;
+    NotifySubMeshesHypothesisModification();
+  }
+}
+
 //=============================================================================
 void BLSURFPlugin_Hypothesis::SetVerbosity(int theVal) {
   if (theVal != _verb) {
@@ -541,16 +595,16 @@ bool BLSURFPlugin_Hypothesis::GetJacobianRectification()
 
 void BLSURFPlugin_Hypothesis::SetUseDeprecatedPatchMesher( bool useDeprecatedPatchMesher )
 {
-  if ( GetUseDeprecatedPatchMesher() != useDeprecatedPatchMesher )
-  {
-    SetOptionValue( "use_deprecated_patch_mesher", useDeprecatedPatchMesher ? "yes" : "no" );
-    NotifySubMeshesHypothesisModification();
-  }
+  // if ( GetUseDeprecatedPatchMesher() != useDeprecatedPatchMesher )
+  // {
+  //   SetOptionValue( "use_deprecated_patch_mesher", useDeprecatedPatchMesher ? "yes" : "no" );
+  //   NotifySubMeshesHypothesisModification();
+  // }
 }
 //=============================================================================
 bool BLSURFPlugin_Hypothesis::GetUseDeprecatedPatchMesher()
 {
-  return ToBool( GetOptionValue("use_deprecated_patch_mesher", GET_DEFAULT()));
+  return false;//ToBool( GetOptionValue("use_deprecated_patch_mesher", GET_DEFAULT()));
 }
 //=============================================================================
 
@@ -2097,6 +2151,14 @@ std::ostream & BLSURFPlugin_Hypothesis::SaveTo(std::ostream & save)
       save << *tag << " ";
   }
 
+  // New options in 2.9.6 (issue #17784)
+  save << " " << _useSurfaceProximity;
+  save << " " << _nbSurfaceProximityLayers;
+  save << " " << _surfaceProximityRatio;
+  save << " " << _useVolumeProximity;
+  save << " " << _nbVolumeProximityLayers;
+  save << " " << _volumeProximityRatio;
+
   return save;
 }
 
@@ -3110,6 +3172,16 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load)
     }
   }
 
+  // New options in 2.9.6 (issue #17784)
+  if ( static_cast<bool>( load >> _useSurfaceProximity ));
+  {
+    load >> _nbSurfaceProximityLayers;
+    load >> _surfaceProximityRatio;
+    load >> _useVolumeProximity;
+    load >> _nbVolumeProximityLayers;
+    isOK = static_cast<bool>( load >> _volumeProximityRatio );
+  }
+
   return load;
 }
 
index 08ac943ba4c24b779af861a7c4d9dd47ff394bcc..fcff08a66935db1736f6891a4f2c0983aa308e56 100644 (file)
@@ -151,9 +151,27 @@ public:
   void SetTopology(Topology theTopology);
   Topology GetTopology() const { return _topology; }
 
+  bool GetUseSurfaceProximity() const { return _useSurfaceProximity; }
+  void SetUseSurfaceProximity( bool toUse );
+
+  int GetNbSurfaceProximityLayers() const { return _nbSurfaceProximityLayers; }
+  void SetNbSurfaceProximityLayers( int nbLayers );
+
+  double GetSurfaceProximityRatio() const { return _surfaceProximityRatio; }
+  void SetSurfaceProximityRatio( double ratio );
+
+  bool GetUseVolumeProximity() const { return _useVolumeProximity; }
+  void SetUseVolumeProximity( bool toUse );
+
+  int GetNbVolumeProximityLayers() const { return _nbVolumeProximityLayers; }
+  void SetNbVolumeProximityLayers( int nbLayers );
+
+  double GetVolumeProximityRatio() const { return _volumeProximityRatio; }
+  void SetVolumeProximityRatio( double ratio );
+
   void SetVerbosity(int theVal);
   int GetVerbosity() const { return _verb; }
-  
+
   void ClearEntry(const std::string& entry, const char * attEntry = 0);
   void ClearSizeMaps();
 
@@ -162,7 +180,7 @@ public:
 
   void SetJacobianRectificationRespectGeometry( bool allowRectification );
   bool GetJacobianRectificationRespectGeometry();
-    
+
   void SetUseDeprecatedPatchMesher( bool useDeprecatedPatchMesher );
   bool GetUseDeprecatedPatchMesher();
 
@@ -434,7 +452,13 @@ public:
   static double          GetDefaultVolumeGradation() { return 2; }
   static ElementType     GetDefaultElementType() { return Triangles; }
   static double          GetDefaultAngleMesh() { return 8.0; }
-  
+  static bool            GetDefaultUseSurfaceProximity() { return false; }
+  static int             GetDefaultNbSurfaceProximityLayers() { return 1; }
+  static double          GetDefaultSurfaceProximityRatio() { return 1.; }
+  static bool            GetDefaultUseVolumeProximity() { return false; }
+  static int             GetDefaultNbVolumeProximityLayers() { return 1; }
+  static double          GetDefaultVolumeProximityRatio() { return 1.; }
+
   static double          GetDefaultChordalError(double diagonal);
   static double          GetDefaultChordalError() { return undefinedDouble(); }
   static bool            GetDefaultAnisotropic() { return false; }
@@ -448,10 +472,10 @@ public:
   static bool            GetDefaultCorrectSurfaceIntersection() { return true; }
   static double          GetDefaultCorrectSurfaceIntersectionMaxCost() { return 15.; }
   static bool            GetDefaultBadElementRemoval() { return false; }
-  static double          GetDefaultBadElementAspectRatio() {return 1000.0; } 
+  static double          GetDefaultBadElementAspectRatio() {return 1000.0; }
   static bool            GetDefaultOptimizeMesh() { return true; }
   static bool            GetDefaultQuadraticMesh() { return false; }
-  
+
   static int             GetDefaultVerbosity() { return 3; }
   static Topology        GetDefaultTopology() { return FromCAD; }
   // PreCAD
@@ -459,7 +483,7 @@ public:
   static bool            GetDefaultPreCADRemoveDuplicateCADFaces() { return false; }
   static bool            GetDefaultPreCADProcess3DTopology() { return false; }
   static bool            GetDefaultPreCADDiscardInput() { return false; }
-  
+
   static TSizeMap        GetDefaultSizeMap() { return TSizeMap();}
   static TAttractorMap   GetDefaultAttractorMap() { return TAttractorMap(); }
 
@@ -591,13 +615,19 @@ private:
   bool            _quadraticMesh;
   int             _verb;
   Topology        _topology;
-  
+  bool            _useSurfaceProximity;
+  int             _nbSurfaceProximityLayers;
+  double          _surfaceProximityRatio;
+  bool            _useVolumeProximity;
+  int             _nbVolumeProximityLayers;
+  double          _volumeProximityRatio;
+
   bool            _preCADMergeEdges;
   bool            _preCADRemoveDuplicateCADFaces;
   bool            _preCADProcess3DTopology;
   bool            _preCADDiscardInput;
   double          _preCADEpsNano;
-  
+
   TOptionValues   _option2value, _preCADoption2value, _customOption2value; // user defined values
   TOptionValues   _defaultOptionValues;               // default values
   TOptionNames    _doubleOptions, _charOptions, _boolOptions; // to find a type of option
index dfeaf5011ffeffabf5b0030823f3afd76bc80e87..d1b530a8b5d356826b1a501d4449154045eadc93 100644 (file)
@@ -786,6 +786,115 @@ CORBA::Long BLSURFPlugin_Hypothesis_i::GetTopology() {
   return this->GetImpl()->GetTopology();
 }
 
+//=============================================================================
+/*!
+ *  Activate/deactivate surface proximity computation
+ */
+void BLSURFPlugin_Hypothesis_i::SetUseSurfaceProximity( CORBA::Boolean toUse )
+{
+  if ( GetUseSurfaceProximity() != toUse )
+  {
+    this->GetImpl()->SetUseSurfaceProximity( toUse );
+    SMESH::TPythonDump() << _this() << ".SetUseSurfaceProximity( " << toUse << " )";
+  }
+}
+
+CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetUseSurfaceProximity()
+{
+  return this->GetImpl()->GetUseSurfaceProximity();
+}
+
+//=============================================================================
+/*!
+ * Set number of surface element layers to be generated due to surface proximity
+ */
+void BLSURFPlugin_Hypothesis_i::SetNbSurfaceProximityLayers( CORBA::Short nbLayers )
+{
+  if ( GetNbSurfaceProximityLayers() != nbLayers )
+  {
+    this->GetImpl()->SetNbSurfaceProximityLayers( nbLayers );
+    SMESH::TPythonDump() << _this() << ".SetNbSurfaceProximityLayers( " << nbLayers << " )";
+  }
+}
+
+CORBA::Short BLSURFPlugin_Hypothesis_i::GetNbSurfaceProximityLayers()
+{
+  return this->GetImpl()->GetNbSurfaceProximityLayers();
+}
+
+//=============================================================================
+/*!
+ * Set coefficient by which size of element refined due to surface proximity is increased
+ */
+void BLSURFPlugin_Hypothesis_i::SetSurfaceProximityRatio( CORBA::Double ratio )
+{
+  if ( GetSurfaceProximityRatio() != ratio )
+  {
+    this->GetImpl()->SetSurfaceProximityRatio( ratio );
+    SMESH::TPythonDump() << _this() << ".SetSurfaceProximityRatio( " << ratio << " )";
+  }
+}
+
+CORBA::Double BLSURFPlugin_Hypothesis_i::GetSurfaceProximityRatio()
+{
+  return this->GetImpl()->GetSurfaceProximityRatio();
+}
+
+//=============================================================================
+/*!
+ *  Activate/deactivate volume proximity computation
+ */
+void BLSURFPlugin_Hypothesis_i::SetUseVolumeProximity( CORBA::Boolean toUse )
+{
+  if ( GetUseVolumeProximity() != toUse )
+  {
+    this->GetImpl()->SetUseVolumeProximity( toUse );
+    SMESH::TPythonDump() << _this() << ".SetUseVolumeProximity( " << toUse << " )";
+  }
+}
+
+CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetUseVolumeProximity()
+{
+  return this->GetImpl()->GetUseVolumeProximity();
+}
+
+
+//=============================================================================
+/*!
+ * Set number of surface element layers to be generated due to volume proximity
+ */
+void BLSURFPlugin_Hypothesis_i::SetNbVolumeProximityLayers( CORBA::Short nbLayers )
+{
+  if ( GetNbVolumeProximityLayers() != nbLayers )
+  {
+    this->GetImpl()->SetNbVolumeProximityLayers( nbLayers );
+    SMESH::TPythonDump() << _this() << ".SetNbVolumeProximityLayers( " << nbLayers << " )";
+  }
+}
+
+CORBA::Short BLSURFPlugin_Hypothesis_i::GetNbVolumeProximityLayers()
+{
+  return this->GetImpl()->GetNbVolumeProximityLayers();
+}
+
+//=============================================================================
+  /*!
+   * Set coefficient by which size of element refined due to volume proximity is increased
+   */
+void BLSURFPlugin_Hypothesis_i::SetVolumeProximityRatio( CORBA::Double ratio )
+{
+  if ( GetVolumeProximityRatio() != ratio )
+  {
+    this->GetImpl()->SetVolumeProximityRatio( ratio );
+    SMESH::TPythonDump() << _this() << ".SetVolumeProximityRatio( " << ratio << " )";
+  }
+}
+
+CORBA::Double BLSURFPlugin_Hypothesis_i::GetVolumeProximityRatio()
+{
+  return this->GetImpl()->GetVolumeProximityRatio();
+}
+
 //=============================================================================
 void BLSURFPlugin_Hypothesis_i::SetVerbosity(CORBA::Short theVal) throw (SALOME::SALOME_Exception) {
   ASSERT(myBaseImpl);
index f555f0d3ba1618a00314cc1a64b5dc84a357f134..9d180f433a6d2c6689e3a774b54b9842528d3d08 100644 (file)
@@ -130,6 +130,44 @@ public:
   void SetTopology(CORBA::Long theValue);
   CORBA::Long GetTopology();
 
+
+  /*!
+   *  Activate/deactivate surface proximity computation
+   */
+  void SetUseSurfaceProximity( CORBA::Boolean toUse );
+  CORBA::Boolean GetUseSurfaceProximity();
+
+  /*!
+   * Set number of surface element layers to be generated due to surface proximity
+   */
+  void SetNbSurfaceProximityLayers( CORBA::Short nbLayers );
+  CORBA::Short GetNbSurfaceProximityLayers();
+
+  /*!
+   * Set coefficient by which size of element refined due to surface proximity is increased
+   */
+  void SetSurfaceProximityRatio( CORBA::Double ratio );
+  CORBA::Double GetSurfaceProximityRatio();
+
+  /*!
+   *  Activate/deactivate volume proximity computation
+   */
+  void SetUseVolumeProximity( CORBA::Boolean toUse );
+  CORBA::Boolean GetUseVolumeProximity();
+
+  /*!
+   * Set number of surface element layers to be generated due to volume proximity
+   */
+  void SetNbVolumeProximityLayers( CORBA::Short nbLayers );
+  CORBA::Short GetNbVolumeProximityLayers();
+
+  /*!
+   * Set coefficient by which size of element refined due to volume proximity is increased
+   */
+  void SetVolumeProximityRatio( CORBA::Double ratio );
+  CORBA::Double GetVolumeProximityRatio();
+
+
   void SetVerbosity(CORBA::Short theVal) throw (SALOME::SALOME_Exception);
   CORBA::Short GetVerbosity();
 
index 196fcc1c17c99c5c6c3f82d51319fa289f40716f..79a0f23cabf88cbffaccfc6060c160fa8ea97a40 100644 (file)
@@ -1793,7 +1793,7 @@ void BLSURFPluginGUI_HypothesisCreator::onPeriodicityContentModified()
 
 
 /** BLSURFPluginGUI_HypothesisCreator::retrieveParams()
-This method updates the GUI widgets with the hypothesis data
+    This method updates the GUI widgets with the hypothesis data
 */
 void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const
 {
@@ -1834,7 +1834,7 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const
     myStdWidget->myVolumeGradation->setText("");
   else
     myStdWidget->myVolumeGradation->SetValue( data.myVolumeGradation );
-  
+
   foreach (QAbstractButton* button, myStdWidget->myButtonGroupElementType->buttons()) {
     if (myStdWidget->myButtonGroupElementType->id(button) == data.myElementType) {
       button->setChecked(true);
@@ -1842,6 +1842,23 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const
     }
   }
 
+  myStdWidget->myUseSurfaceProximity->setChecked( data.myUseSurfaceProximity );
+  myStdWidget->myNbSurfaceProximityLayers->setValue( data.myNbSurfaceProximityLayers );
+  myStdWidget->mySurfaceProximityRatio->SetValue( data.mySurfaceProximityRatio );
+  myStdWidget->myUseVolumeProximity->setChecked( data.myUseVolumeProximity );
+  myStdWidget->myNbVolumeProximityLayers->setValue( data.myNbVolumeProximityLayers );
+  myStdWidget->myVolumeProximityRatio->SetValue( data.myVolumeProximityRatio );
+  if ( !data.myUseSurfaceProximity )
+  {
+    //myStdWidget->myNbSurfaceProximityLayers->setText("");
+    myStdWidget->mySurfaceProximityRatio->setText("");
+  }
+  if ( !data.myUseVolumeProximity )
+  {
+    //myStdWidget->myNbVolumeProximityLayers->setText("");
+    myStdWidget->myVolumeProximityRatio->setText("");
+  }
+
   if (data.myAngleMesh < 0)
     myStdWidget->myAngleMesh->setText("");
   else
@@ -2056,7 +2073,7 @@ bool BLSURFPluginGUI_HypothesisCreator::readParamsFromHypo( BlsurfHypothesisData
   h_data.myTinyEdgeOptimisLength  = myTinyEdgeOptimisLength > 0 ? myTinyEdgeOptimisLength : -1.0;
   h_data.myCorrectSurfaceIntersection = h->GetCorrectSurfaceIntersection();
   double corrSurfaceIntersMaxCost = h->GetCorrectSurfaceIntersectionMaxCost();
-  h_data.myCorrectSurfaceIntersectionMaxCost  = corrSurfaceIntersMaxCost > 0 ? corrSurfaceIntersMaxCost : -1.0;
+  h_data.myCorrectSurfaceIntersectionMaxCost = corrSurfaceIntersMaxCost > 0 ? corrSurfaceIntersMaxCost : -1.0;
   h_data.myForceBadElementRemoval = h->GetBadElementRemoval();
   double myBadElementAspectRatio  = h->GetBadElementAspectRatio();
   h_data.myBadElementAspectRatio  = myBadElementAspectRatio > 0 ? myBadElementAspectRatio : -1.0;
@@ -2067,7 +2084,12 @@ bool BLSURFPluginGUI_HypothesisCreator::readParamsFromHypo( BlsurfHypothesisData
   //h_data.myPreCADMergeEdges       = h->GetPreCADMergeEdges();
   // h_data.myPreCADProcess3DTopology  = h->GetPreCADProcess3DTopology();
   // h_data.myPreCADDiscardInput     = h->GetPreCADDiscardInput();
-
+  h_data.myUseSurfaceProximity      = h->GetUseSurfaceProximity     ();
+  h_data.myNbSurfaceProximityLayers = h->GetNbSurfaceProximityLayers();
+  h_data.mySurfaceProximityRatio    = h->GetSurfaceProximityRatio   ();
+  h_data.myUseVolumeProximity       = h->GetUseVolumeProximity      ();
+  h_data.myNbVolumeProximityLayers  = h->GetNbVolumeProximityLayers ();
+  h_data.myVolumeProximityRatio     = h->GetVolumeProximityRatio    ();
 
   BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
   that->myOptions       = h->GetOptionValues();
@@ -2301,26 +2323,33 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi
     if ( h->GetVolumeGradation() !=  h_data.myVolumeGradation )
       h->SetVolumeGradation( h_data.myVolumeGradation <= 0 ? -1 : h_data.myVolumeGradation );
 
+    h->SetUseSurfaceProximity     ( h_data.myUseSurfaceProximity      );
+    h->SetNbSurfaceProximityLayers( h_data.myNbSurfaceProximityLayers );
+    h->SetSurfaceProximityRatio   ( h_data.mySurfaceProximityRatio    );
+    h->SetUseVolumeProximity      ( h_data.myUseVolumeProximity       );
+    h->SetNbVolumeProximityLayers ( h_data.myNbVolumeProximityLayers  );
+    h->SetVolumeProximityRatio    ( h_data.myVolumeProximityRatio     );
+
     if ( h->GetElementType() != h_data.myElementType )
       h->SetElementType( h_data.myElementType );
-    
+
     if ( (int) h_data.myGeometricMesh != DefaultGeom ) {
       if ( h->GetAngleMesh() != h_data.myAngleMesh )
         h->SetAngleMesh( h_data.myAngleMesh <= 0 ? -1 :h_data.myAngleMesh );
       if ( h->GetChordalError() != h_data.myChordalError )
         h->SetChordalError( h_data.myChordalError <= 0 ? -1 :h_data.myChordalError );
     }
-    
+
     if ( h->GetAnisotropic() != h_data.myAnisotropic )
       h->SetAnisotropic( h_data.myAnisotropic );
     if ( h_data.myAnisotropic && ( h->GetAnisotropicRatio() != h_data.myAnisotropicRatio ) )
       h->SetAnisotropicRatio( h_data.myAnisotropicRatio <= 0 ? -1 :h_data.myAnisotropicRatio );
-    
+
     if ( h->GetRemoveTinyEdges() != h_data.myRemoveTinyEdges )
       h->SetRemoveTinyEdges( h_data.myRemoveTinyEdges );
     if ( h_data.myRemoveTinyEdges && ( h->GetTinyEdgeLength() != h_data.myTinyEdgeLength ) )
       h->SetTinyEdgeLength( h_data.myTinyEdgeLength <= 0 ? -1 :h_data.myTinyEdgeLength );
-    
+
     if ( h->GetOptimiseTinyEdges() != h_data.myOptimiseTinyEdges )
       h->SetOptimiseTinyEdges( h_data.myOptimiseTinyEdges );
     if ( h_data.myOptimiseTinyEdges && ( h->GetTinyEdgeOptimisationLength() != h_data.myTinyEdgeOptimisLength ) )
@@ -2553,6 +2582,12 @@ QString BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets( BlsurfHypothes
   //h_data.myPreCADMergeEdges      = myAdvWidget->myPreCADMergeEdges->isChecked();
   //h_data.myPreCADProcess3DTopology = myAdvWidget->myPreCADProcess3DTopology->isChecked();
   //h_data.myPreCADDiscardInput    = myAdvWidget->myPreCADDiscardInput->isChecked();
+  h_data.myUseSurfaceProximity      = myStdWidget->myUseSurfaceProximity     ->isChecked();
+  h_data.myNbSurfaceProximityLayers = myStdWidget->myNbSurfaceProximityLayers->value();
+  h_data.mySurfaceProximityRatio    = myStdWidget->mySurfaceProximityRatio   ->value();
+  h_data.myUseVolumeProximity       = myStdWidget->myUseVolumeProximity      ->isChecked();
+  h_data.myNbVolumeProximityLayers  = myStdWidget->myNbVolumeProximityLayers ->value();
+  h_data.myVolumeProximityRatio     = myStdWidget->myVolumeProximityRatio    ->value();
 
   QString guiHyp;
   guiHyp += tr("BLSURF_PHY_MESH") + " = " + QString::number( h_data.myPhysicalMesh ) + "; ";
index 5d609bb1ae48e1094396e42c735cff52f549fb3e..a1f5f99fad9996446a38c4b5c821e7f15c507db6 100644 (file)
@@ -171,6 +171,12 @@ typedef struct
   bool    myOptimizeMesh, myQuadraticMesh;
   bool    mySmpsurface,mySmpedge,mySmppoint,myEnforcedVertex,myInternalEnforcedVerticesAllFaces;
   long    myElementType;
+  bool    myUseSurfaceProximity;
+  int     myNbSurfaceProximityLayers;
+  double  mySurfaceProximityRatio;
+  bool    myUseVolumeProximity;
+  int     myNbVolumeProximityLayers;
+  double  myVolumeProximityRatio;
   // bool    myPreCADMergeEdges, myPreCADProcess3DTopology, myPreCADDiscardInput;
 //   bool    myGMFFileMode;
   std::string myGMFFileName, myInternalEnforcedVerticesAllFacesGroup;
index 845791f318d197f9d6300c9b6dc85bcc2cea5618..0996dcfbed2b01f9059133bba0e42437fbdf9f7d 100644 (file)
@@ -52,6 +52,8 @@ BLSURFPluginGUI_StdWidget::BLSURFPluginGUI_StdWidget( QWidget* parent, Qt::Windo
   myTinyEdgeOptimisLength->RangeStepAndValidator(0, COORD_MAX, 0.1, "length_precision");
   myCorrectSurfaceIntersectionMaxCost->RangeStepAndValidator(0, COORD_MAX, 1);
   myBadElementAspectRatio->RangeStepAndValidator(0, COORD_MAX, 1000, "length_precision");
+  mySurfaceProximityRatio->RangeStepAndValidator(1, COORD_MAX, 1, "length_precision");
+  myVolumeProximityRatio->RangeStepAndValidator(1, COORD_MAX, 1, "length_precision");
   myMinSize->setText("");
   myMaxSize->setText("");
   myAngleMesh->setText("");
@@ -131,25 +133,3 @@ void BLSURFPluginGUI_StdWidget::onEditingFinished() {
     spinBox->setText("");
   }
 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
index 608fe0d8352bbfa375ffe6b02a33568d86a42697..7780a04b1a1b88afcf5d74ec23c0d621770aede2 100644 (file)
@@ -7,11 +7,11 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>723</width>
-    <height>399</height>
+    <width>899</width>
+    <height>532</height>
    </rect>
   </property>
-  <layout class="QGridLayout" name="gridLayout_5">
+  <layout class="QGridLayout" name="gridLayout_8">
    <item row="0" column="0">
     <widget class="QGroupBox" name="groupBox">
      <property name="title">
     </widget>
    </item>
    <item row="1" column="0">
+    <widget class="QGroupBox" name="groupBox_4">
+     <property name="title">
+      <string>BLSURF_ELEMENT_TYPE</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QRadioButton" name="myRadioButtonTriangles">
+        <property name="toolTip">
+         <string>BLSURF_TRIANGLES_TOOLTIP</string>
+        </property>
+        <property name="text">
+         <string>BLSURF_TRIANGLES</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+        <attribute name="buttonGroup">
+         <string notr="true">myButtonGroupElementType</string>
+        </attribute>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="myRadioButtonQuadrangleDominant">
+        <property name="toolTip">
+         <string>BLSURF_ALLOW_QUADRANGLES_TOOLTIP</string>
+        </property>
+        <property name="text">
+         <string>BLSURF_QUADRANGLE_DOMINANT</string>
+        </property>
+        <attribute name="buttonGroup">
+         <string notr="true">myButtonGroupElementType</string>
+        </attribute>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="myRadioButtonQuadrangles">
+        <property name="toolTip">
+         <string>BLSURF_QUADRANGLES_TOOLTIP</string>
+        </property>
+        <property name="text">
+         <string>BLSURF_QUADRANGLES</string>
+        </property>
+        <attribute name="buttonGroup">
+         <string notr="true">myButtonGroupElementType</string>
+        </attribute>
+       </widget>
+      </item>
+      <item>
+       <spacer name="verticalSpacer_6">
+        <property name="orientation">
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>20</width>
+          <height>3</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="1" column="1">
     <widget class="QGroupBox" name="groupBox_2">
      <property name="title">
       <string>BLSURF_MAIN_PARAMETERS</string>
      </layout>
     </widget>
    </item>
-   <item row="1" column="1" rowspan="2">
+   <item row="2" column="0">
+    <widget class="QGroupBox" name="groupBox_5">
+     <property name="toolTip">
+      <string/>
+     </property>
+     <property name="title">
+      <string>BLSURF_PROXIMITY</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_7">
+      <item row="0" column="0">
+       <widget class="QCheckBox" name="myUseVolumeGradation">
+        <property name="toolTip">
+         <string>BLSURF_VOLUME_GRADATION_TOOLTIP</string>
+        </property>
+        <property name="text">
+         <string>BLSURF_VOLUME_GRADATION</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="SMESHGUI_SpinBox" name="myVolumeGradation">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0" colspan="2">
+       <widget class="QGroupBox" name="myUseSurfaceProximity">
+        <property name="toolTip">
+         <string>BLSURF_SURFACE_PROXIMITY_TOOLTIP</string>
+        </property>
+        <property name="title">
+         <string>BLSURF_SURFACE_PROXIMITY</string>
+        </property>
+        <property name="checkable">
+         <bool>true</bool>
+        </property>
+        <layout class="QGridLayout" name="gridLayout_6">
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_9">
+           <property name="toolTip">
+            <string>BLSURF_SURF_RATIO_TOOLTIP</string>
+           </property>
+           <property name="text">
+            <string>BLSURF_SURF_RATIO</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="SMESHGUI_SpinBox" name="mySurfaceProximityRatio">
+           <property name="enabled">
+            <bool>true</bool>
+           </property>
+           <property name="toolTip">
+            <string>BLSURF_SURF_RATIO_TOOLTIP</string>
+           </property>
+           <property name="value">
+            <double>1.000000000000000</double>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QSpinBox" name="myNbSurfaceProximityLayers">
+           <property name="toolTip">
+            <string>BLSURF_SURF_NB_LAYRES_TOOLTIP</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_7">
+           <property name="toolTip">
+            <string>BLSURF_SURF_NB_LAYRES_TOOLTIP</string>
+           </property>
+           <property name="text">
+            <string>BLSURF_SURF_NB_LAYRES</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+        <zorder>label_7</zorder>
+        <zorder>myVolumeGradation_2</zorder>
+        <zorder>myNbSurfaceProximityLayers</zorder>
+        <zorder>label_9</zorder>
+        <zorder>mySurfaceProximityRatio</zorder>
+       </widget>
+      </item>
+      <item row="2" column="0" colspan="2">
+       <widget class="QGroupBox" name="myUseVolumeProximity">
+        <property name="toolTip">
+         <string>BLSURF_VOLUME_PROXIMITY_TOOLTIP</string>
+        </property>
+        <property name="title">
+         <string>BLSURF_VOLUME_PROXIMITY</string>
+        </property>
+        <property name="checkable">
+         <bool>true</bool>
+        </property>
+        <layout class="QGridLayout" name="gridLayout_5">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_10">
+           <property name="toolTip">
+            <string>BLSURF_VOL_NB_LAYERS_TOOLTIP</string>
+           </property>
+           <property name="text">
+            <string>BLSURF_VOL_NB_LAYERS</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QSpinBox" name="myNbVolumeProximityLayers">
+           <property name="toolTip">
+            <string>BLSURF_VOL_NB_LAYERS_TOOLTIP</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_11">
+           <property name="toolTip">
+            <string>BLSURF_VOL_RATIO_TOOLTIP</string>
+           </property>
+           <property name="text">
+            <string>BLSURF_VOL_RATIO</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="SMESHGUI_SpinBox" name="myVolumeProximityRatio">
+           <property name="enabled">
+            <bool>true</bool>
+           </property>
+           <property name="toolTip">
+            <string>BLSURF_VOL_RATIO_TOOLTIP</string>
+           </property>
+           <property name="value">
+            <double>1.000000000000000</double>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <spacer name="verticalSpacer_7">
+        <property name="orientation">
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>20</width>
+          <height>15</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="1">
     <widget class="QGroupBox" name="groupBox_3">
      <property name="title">
       <string>BLSURF_OTHER_PARAMETERS</string>
        </widget>
       </item>
       <item row="5" column="0">
-       <widget class="QCheckBox" name="myUseVolumeGradation">
-        <property name="toolTip">
-         <string>BLSURF_VOLUME_GRADATION_TOOLTIP</string>
-        </property>
-        <property name="text">
-         <string>BLSURF_VOLUME_GRADATION</string>
-        </property>
-       </widget>
-      </item>
-      <item row="5" column="1">
-       <widget class="SMESHGUI_SpinBox" name="myVolumeGradation">
-        <property name="enabled">
-         <bool>false</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="6" column="0">
        <spacer name="verticalSpacer_5">
         <property name="orientation">
          <enum>Qt::Vertical</enum>
      </layout>
     </widget>
    </item>
-   <item row="2" column="0">
-    <widget class="QGroupBox" name="groupBox_4">
-     <property name="title">
-      <string>BLSURF_ELEMENT_TYPE</string>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout">
-      <item>
-       <widget class="QRadioButton" name="myRadioButtonTriangles">
-        <property name="toolTip">
-         <string>BLSURF_TRIANGLES_TOOLTIP</string>
-        </property>
-        <property name="text">
-         <string>BLSURF_TRIANGLES</string>
-        </property>
-        <property name="checked">
-         <bool>true</bool>
-        </property>
-        <attribute name="buttonGroup">
-         <string notr="true">myButtonGroupElementType</string>
-        </attribute>
-       </widget>
-      </item>
-      <item>
-       <widget class="QRadioButton" name="myRadioButtonQuadrangleDominant">
-        <property name="toolTip">
-         <string>BLSURF_ALLOW_QUADRANGLES_TOOLTIP</string>
-        </property>
-        <property name="text">
-         <string>BLSURF_QUADRANGLE_DOMINANT</string>
-        </property>
-        <attribute name="buttonGroup">
-         <string notr="true">myButtonGroupElementType</string>
-        </attribute>
-       </widget>
-      </item>
-      <item>
-       <widget class="QRadioButton" name="myRadioButtonQuadrangles">
-        <property name="toolTip">
-         <string>BLSURF_QUADRANGLES_TOOLTIP</string>
-        </property>
-        <property name="text">
-         <string>BLSURF_QUADRANGLES</string>
-        </property>
-        <attribute name="buttonGroup">
-         <string notr="true">myButtonGroupElementType</string>
-        </attribute>
-       </widget>
-      </item>
-      <item>
-       <spacer name="verticalSpacer_6">
-        <property name="orientation">
-         <enum>Qt::Vertical</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>20</width>
-          <height>3</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-     </layout>
-    </widget>
-   </item>
   </layout>
  </widget>
  <customwidgets>
   <tabstop>myBadElementAspectRatio</tabstop>
   <tabstop>myCorrectSurfaceIntersection</tabstop>
   <tabstop>myCorrectSurfaceIntersectionMaxCost</tabstop>
-  <tabstop>myUseVolumeGradation</tabstop>
-  <tabstop>myVolumeGradation</tabstop>
  </tabstops>
  <resources/>
  <connections>
    <slot>onGeometricMeshChanged()</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>495</x>
-     <y>48</y>
+     <x>775</x>
+     <y>57</y>
     </hint>
     <hint type="destinationlabel">
      <x>281</x>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>488</x>
-     <y>176</y>
+     <x>641</x>
+     <y>466</y>
     </hint>
     <hint type="destinationlabel">
-     <x>655</x>
-     <y>175</y>
+     <x>787</x>
+     <y>467</y>
     </hint>
    </hints>
   </connection>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>488</x>
-     <y>228</y>
+     <x>641</x>
+     <y>518</y>
     </hint>
     <hint type="destinationlabel">
-     <x>655</x>
-     <y>227</y>
+     <x>787</x>
+     <y>519</y>
     </hint>
    </hints>
   </connection>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>488</x>
-     <y>254</y>
+     <x>641</x>
+     <y>544</y>
     </hint>
     <hint type="destinationlabel">
-     <x>655</x>
-     <y>253</y>
+     <x>787</x>
+     <y>545</y>
     </hint>
    </hints>
   </connection>
    <slot>setDisabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>488</x>
-     <y>176</y>
+     <x>641</x>
+     <y>466</y>
     </hint>
     <hint type="destinationlabel">
-     <x>495</x>
-     <y>100</y>
+     <x>775</x>
+     <y>109</y>
     </hint>
    </hints>
   </connection>
    <slot>setDisabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>488</x>
-     <y>176</y>
+     <x>641</x>
+     <y>466</y>
     </hint>
     <hint type="destinationlabel">
-     <x>446</x>
+     <x>576</x>
      <y>100</y>
     </hint>
    </hints>
    <slot>onEditingFinished()</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>159</x>
+     <x>197</x>
      <y>74</y>
     </hint>
     <hint type="destinationlabel">
    <slot>onEditingFinished()</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>159</x>
+     <x>197</x>
      <y>100</y>
     </hint>
     <hint type="destinationlabel">
    <slot>onEditingFinished()</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>159</x>
+     <x>197</x>
      <y>126</y>
     </hint>
     <hint type="destinationlabel">
    <slot>onEditingFinished()</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>316</x>
-     <y>199</y>
+     <x>780</x>
+     <y>287</y>
     </hint>
     <hint type="destinationlabel">
      <x>315</x>
    <slot>onEditingFinished()</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>495</x>
-     <y>74</y>
+     <x>775</x>
+     <y>83</y>
     </hint>
     <hint type="destinationlabel">
      <x>566</x>
    <slot>onEditingFinished()</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>495</x>
-     <y>100</y>
+     <x>775</x>
+     <y>109</y>
     </hint>
     <hint type="destinationlabel">
      <x>537</x>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>438</x>
-     <y>202</y>
+     <x>641</x>
+     <y>492</y>
     </hint>
     <hint type="destinationlabel">
-     <x>655</x>
-     <y>201</y>
+     <x>787</x>
+     <y>493</y>
     </hint>
    </hints>
   </connection>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>450</x>
-     <y>280</y>
+     <x>641</x>
+     <y>570</y>
     </hint>
     <hint type="destinationlabel">
-     <x>655</x>
-     <y>279</y>
+     <x>787</x>
+     <y>571</y>
     </hint>
    </hints>
   </connection>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>449</x>
-     <y>306</y>
+     <x>210</x>
+     <y>466</y>
     </hint>
     <hint type="destinationlabel">
-     <x>655</x>
-     <y>305</y>
+     <x>383</x>
+     <y>467</y>
     </hint>
    </hints>
   </connection>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>115</x>
-     <y>206</y>
+     <x>593</x>
+     <y>286</y>
     </hint>
     <hint type="destinationlabel">
-     <x>249</x>
-     <y>211</y>
+     <x>780</x>
+     <y>287</y>
     </hint>
    </hints>
   </connection>
index 41a84a879a1a8091da1be9696373fd51381eb2a5..9016435f197c45583ec62c7ef0b265680e1df1d5 100644 (file)
@@ -99,6 +99,58 @@ The default computed value is &lt;em&gt;diag&lt;/em&gt;/5.</translation>
         <source>BLSURF_VOLUME_GRADATION_TOOLTIP</source>
         <translation>Maximum ratio between the lengths of two adjacent edges in 3D mesh.</translation>
     </message>
+    <message>
+        <source>BLSURF_PROXIMITY</source>
+        <translation>Proximity</translation>
+    </message>
+    <message>
+        <source>BLSURF_SURFACE_PROXIMITY</source>
+        <translation>Surface proximity</translation>
+    </message>
+    <message>
+        <source>BLSURF_SURFACE_PROXIMITY_TOOLTIP</source>
+        <translation>Detection of proximities onto the surface.</translation>
+    </message>
+    <message>
+        <source>BLSURF_SURF_NB_LAYRES</source>
+        <translation>Number of layers</translation>
+    </message>
+    <message>
+        <source>BLSURF_SURF_NB_LAYRES_TOOLTIP</source>
+        <translation>Number of surface element layers.</translation>
+    </message>
+    <message>
+        <source>BLSURF_VOLUME_PROXIMITY</source>
+        <translation>Volume proximity</translation>
+    </message>
+    <message>
+        <source>BLSURF_VOLUME_PROXIMITY_TOOLTIP</source>
+        <translation>Detection of proximities into the volume.</translation>
+    </message>
+    <message>
+        <source>BLSURF_SURF_RATIO</source>
+        <translation>Ratio</translation>
+    </message>
+    <message>
+        <source>BLSURF_SURF_RATIO_TOOLTIP</source>
+        <translation>Ratio between layers.</translation>
+    </message>
+    <message>
+        <source>BLSURF_VOL_NB_LAYERS</source>
+        <translation>Number of layers</translation>
+    </message>
+    <message>
+        <source>BLSURF_VOL_NB_LAYERS_TOOLTIP</source>
+        <translation>Number of surface element layers.</translation>
+    </message>
+    <message>
+        <source>BLSURF_VOL_RATIO</source>
+        <translation>Ratio</translation>
+    </message>
+    <message>
+        <source>BLSURF_VOL_RATIO_TOOLTIP</source>
+        <translation>Ratio between layers.</translation>
+    </message>
     <message>
         <source>BLSURF_ELEMENT_TYPE</source>
         <translation>Elements type</translation>
@@ -677,6 +729,14 @@ The smaller this distance is, the closer the mesh is to the exact surface (only
         <source>tiny_edge_avoid_surface_intersections</source>
         <translation>Tiny edges avoid surface intersections</translation>
     </message>
+    <message>
+        <source>allow_patch_independent</source>
+        <translation>Independent patches</translation>
+    </message>
+    <message>
+        <source>compute_ridges</source>
+        <translation>Compute ridges</translation>
+    </message>
     <message>
         <source>closed_geometry</source>
         <translation>Closed geometry</translation>