From: eap Date: Tue, 9 Aug 2016 16:30:07 +0000 (+0300) Subject: 23307: [EDF 7315] Improvement of DISTENE meshing plugins X-Git-Tag: V8_1_0b1~4^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Feap%2F23307;p=plugins%2Fblsurfplugin.git 23307: [EDF 7315] Improvement of DISTENE meshing plugins --- diff --git a/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters.png b/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters.png index fb2365c..8b743fa 100644 Binary files a/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters.png and b/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters.png differ diff --git a/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters_advanced.png b/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters_advanced.png index 7f5757c..cb8d657 100644 Binary files a/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters_advanced.png and b/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters_advanced.png differ diff --git a/doc/salome/gui/BLSURFPLUGIN/input/blsurf_hypo.doc b/doc/salome/gui/BLSURFPLUGIN/input/blsurf_hypo.doc index aa88bed..55ab057 100644 --- a/doc/salome/gui/BLSURFPLUGIN/input/blsurf_hypo.doc +++ b/doc/salome/gui/BLSURFPLUGIN/input/blsurf_hypo.doc @@ -13,7 +13,9 @@ - Name - allows defining the name of the hypothesis (MG-CADSurf Parameters_n by default). -- Physical Mesh - can be set to None, Global size +- Physical Size group defines a \a physical sizemap. + +- \b Type of the physical sizemap can be set to None, Global size or Local size - if set to Global size, only the User size, @@ -23,7 +25,9 @@ Parameters_n by default). account the "Gradation" parameter and the custom elements sizes given in the "Local size" tab. -- Geometrical mesh - can be set to None, Global size +- Geometrical Size group defines a \a geometrical sizemap. + +- \b Type of the geometrical sizemap can be set to None, Global size - if set to Global size, allows user input in Mesh angle, Mesh distance and Gradation fields. These fields control @@ -41,28 +45,39 @@ is checked, the value is relative to the diagonal of the shape. - Min Size - defines the lower limit of mesh element size. If "Relative value" is checked, the value is relative to the diagonal of the shape. -- Gradation - maximum ratio between the lengths of two adjacent edges. - -- Quadratic mesh - if checked, quadratic elements will be generated. - - Mesh angle - Limiting angle (in degree) between the plane of a triangle of the mesh and each of the tangent planes at the three vertices. The smaller this angle is, the closer the mesh is to the exact surface, and the denser the resulting mesh is. - Mesh distance - Maximum desired distance between a triangle and its supporting CAD surface. The smaller this distance is, the closer the mesh is to the exact surface (only available in isotropic meshing). +- Quadratic mesh - if checked, quadratic elements will be generated. + +- Gradation - maximum ratio between the lengths of two adjacent edges. + +- Mesh optimisation - if checked, the mesh will be optimized in order to get better shaped elements. + +- Allow Quadrangles - if checked, allows the creation of quadrilateral elements. + - Anisotropic - 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. +- Optimize tiny edges - if checked, the tiny (nano) edges are removed from the generated mesh during local mesh optimization. +The tiny edge value defines the minimal length under which an edge is considered to be a tiny one. + - Remove tiny edges - if checked, the tiny (nano) edges are removed from the generated mesh. The tiny edge value defines the minimal length under which an edge is considered to be a tiny one. - Remove bad elements - if checked, the bad elements (slivers) are removed from the generated mesh. The bad element value defines the aspect ratio triggering the "bad element” classification. -- Mesh optimisation - if checked, the mesh will be optimized in order to get better shaped elements. +- Correct surface intersections - if checked, the mesher will try to prevent all surface intersections, which is useful for future volume mesh generation. The value defines the time that will be spent in the intersection prevention process. For example, the value 3 means that the time of the intersection removal process won't be more than 3 times the time required to mesh without processing the intersections. + +- Volume Gradation - maximum ratio between the lengths of two adjacent edges affecting quality of a future volume mesh, specially in thin volume areas. The volume gradation parameter must be greater than 1, and should be greater or equal to the value of the classic +surface gradation (at the risk of increasing the time of convergence of the gradation process). +The closer it is to 1, the smoother the final volume mesh you will build should be. + -- Allow Quadrangles - if checked, allows the creation of quadrilateral elements. \ref blsurf_top "Back to top" @@ -72,206 +87,100 @@ The notion of diag used in the descriptions means the diagonal of the bou \image html blsurf_parameters_advanced.png -- CAD preprocessor options. The CAD preprocessor (formerly known as PreCAD) has two main goals: - - - Complete missing or inadequate CAD descriptions. - - - Perform topology reconstruction and specific geometry - enhancement for mesh generation. - - \n The following preprocessor options are the most significant and important ones. - 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. - - - Merge Edges - optimize the geometry by merging some - edges. This option is unchecked by default. - - - Remove tiny UV edges - optimize the geometry by removing small - tiny edges on the UV face. This option is unchecked by default. - - - Process 3D topology - perform the cleanup processing. - This option is unchecked by default. - - - Discard input topology - compute the CAD topology from scratch, - without considering the topological information contained in the original CAD - (useful for iges files). This option is unchecked by default. - - - Remove duplicate CAD faces - optimize the geometry by merging the - duplicate CAD faces. This option is unchecked by default. - -- Verbosity level - defines the percentage of "verbosity" of -MeshGems-CADSurf [0-10]. - -- ExportGMF - saves the computed mesh into a GMF file (.mesh or .meshb). - -- Add option - provides the choice of multiple PreCAD and MG-CADSurf -advanced options, which appear, if selected, in a table where it is -possible to input the value of the option and edit it later. - -- Clear option - removes the option selected in the table. - -The following advanced MG-CADSurf options can be used: - -- \b volume_gradation (real) - Controls the mesh volume gradation, which can improve the shape quality of a -volume mesh built afterward, specially in thin volume areas. -The volume gradation parameter must be greater than 1, and should be greater or equal to the value of the classic -surface gradation (at the risk of increasing the time of convergence of the gradation process). -The closer it is to 1, the smoother the final volume mesh you will build should be. - -- \b correct_surface_intersections (bool) - If this option is deactivated, MeshGems-CADSurf will not correct -surface intersections. This particularly useful if you don't want volume filling in a later stage, or if you want to fix the -intersections in an other way (using MeshGems Cleaner for instance). -By default this option is 1. +\b Advanced page tab expose mostly useful advanced options. Initially, default values of the options are displayed and they are not modifiable. If an option is activated using a check-box, its value becomes modifiable. -- \b surface_intersections_processing_max_cost (real) - If correct_surface_intersections = 1, this -parameter gives the time the user is ready to spend in the intersection prevention process. For example, -if set to 3, MeshGems-CADSurf will not spend more time in the intersection removal process than -3 times the time required to mesh without processing the intersections. +- \b Meshing options -- \b create_tag_on_collision (bool) - If this option is activated, MeshGems-CADSurf will create new tags to -describe tag collisions (when it locally changes the topology, depending on the patch independent -options). When this option is not activated, only one tag is preserved while the other one is dropped. -By default this option is 1. + - Enforce CAD edge sizes - 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. -- \b debug (bool) - If debug = 1, MeshGems-CADSurf will be very verbose and will output some intermediate files -in the working directory. This option is meant to communicate with Distene support mainly. -By default this option is 0. + - Priority of geometry over Jacobian - This parameter determines whether or not the geometry accuracy +is more important than the negative Jacobian correction. When this parameter is set to 0, +MeshGems-CADSurf is allowed to lose the CAD-mesh associativity in order to correct the last negative Jacobians. -- \b enforce_cad_edge_sizes (bool) - 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. -By default this option is 0. + - Maximal number of points per patch - This parameter controls the maximum amount of points MeshGems-CADSurf +is allowed to generate on a single CAD patch. For an automatic gestion of the memory, you can set this parameter to ”0”. -- \b rectify_jacobian (bool) - The quadratic elements generation is a processing of the MeshGems-CADSurf + - Rectify Jacobian - The quadratic elements generation is a processing of the MeshGems-CADSurf meshing process which inserts the extra nodes on the CAD. This parameter determines whether MeshGems-CADSurf will try to correct or not all the elements of the surface mesh with negative Jacobians by moving the internal nodes of the mesh. -By default this option is 1. -- \b jacobian_rectification_respect_geometry (bool) - This parameter determines whether or not the geometry accuracy -is more important than the negative Jacobian correction. When this parameter is set to 0, -MeshGems-CADSurf is allowed to lose the CAD-mesh associativity in order to correct the last negative Jacobians. -By default this option is 1. - -- \b respect_geometry (bool) - This patch independent option can be deactivated to allow MeshGems-CADSurf + - Respect geometry - This patch independent option can be deactivated to allow MeshGems-CADSurf to lower the geometry accuracy in its patch independent process. -By default this option is 1. -- \b optimise_tiny_edges (bool) - This patch-independent correction option can be activated to remove the tiny -edges (defined by the option tiny edge optimisation length) from the generated mesh when it improves -the local mesh quality, without taking into account the tags (attributes) specifications. -By default this option is 0. - -- \b tiny_edge_avoid_surface_intersections (bool) - This option defines the priority between the tiny feature + - Tiny edges avoid surface intersections - This option defines the priority between the tiny feature suppression and the surface intersection prevention. By default, MeshGems-CADSurf gives the priority to the surface intersection prevention rather than to tiny edge or bad surface element removal. These mesh features are then removed only if it does not lead to surface intersections. This behaviour can be deactivated by setting this parameter to 0, giving priority to the tiny edge or bad surface element removal. -By default this option is 1. - -- \b tiny_edge_optimisation_length (double) - This parameter defines the minimal length under which an edge is -considered to be a tiny one to be optimised out by the optimise tiny edges option. -By default this option is \f$\mathrm{diag} \times 10^{-6}\f$. -- \b tiny_edge_respect_geometry (bool) - This option defines the behaviour of the tiny edge removal algorithm -regarding volume collapse. By default, all tiny edges will be removed, regardless of any potential -volume collapse. When this option is activated, it will prevent volume from being collapsed during the -tiny edge removal process. -By default this option is 0. -- \b max_number_of_points_per_patch (int) - This parameter controls the maximum amount of points MeshGems-CADSurf -is allowed to generate on a single CAD patch. For an automatic gestion of the memory, one can set this parameter to ”0”. -By default this option is 100000. +- CAD preprocessor options. The CAD preprocessor (formerly known as PreCAD) has two main goals: -- \b periodic_tolerance (double) - This parameter defines the maximum size difference between two periodic edges -and also the maximum distance error between two periodic entities. -By default this option is diag/100. - -- \b required_entities (char) - The required entities control the correction operations. Accepted values for this parameter are: - - - respect : MeshGems-CADSurf is not allowed to alter any required entity, even for correction purposes, - - ignore : MeshGems-CADSurf will ignore the required entities in its processing, - - clear : MeshGems-CADSurf will clear any required status for the entities. There will not be any entity marked as required in the generated mesh. - - \n By default this option is "respect". - -- \b tags (char) - The tag (attribute) system controls the optimisation process. Accepted values for this parameter are: - - - respect : the CAD tags will be preserved and unaltered by the optimisation operations, - - ignore : the CAD tags will be ignored by the optimisation operations but they will still be present inthe output mesh, - - clear : MeshGems-CADSurf will clear any tag on any entity and optimise accordingly. There will not be any tag in the generated mesh. - - \n By default this option is "respect". - - -\b Remark: To set boolean options, you have to type 0 or 1. - - - -The following MG-CADSurf options are deprecated (since MeshGems 1.3) and will be removed in the next version of Salome: + - Complete missing or inadequate CAD descriptions. -- frontal -- hinterpol_flag -- hmean_flag -- prox_nb_layer -- prox_ratio -- proximity. + - Perform topology reconstruction and specific geometry + enhancement for mesh generation. + \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. -The following PreCAD options are commonly usable. + - Closed geometry - describes whether the working geometry should be closed or not. + When activated, this option helps PreCAD to process the dirtiest geometries. -- \b closed_geometry (boolean) - describes whether the working geometry -should be closed or not. When activated, this option helps PreCAD to process -the dirtiest geometries. By default this option is 0. + - \b Debug - If debug = yes PreCAD will be very verbose and will output some intermediate files in the working directory. -- \b create_tag_collision (boolean) - creates new tags from original ones in case -of collision (entity merge or association for example). By default -this option is 1. + - Discard input topology - compute the CAD topology from scratch, + without considering the topological information contained in the original CAD + (useful for iges files). This option is unchecked by default. -- \b debug (bool) - If debug = 1 PreCAD will be very verbose and will output -some intermediate files in the working directory. By default this -option is 0. + - Merge Edges - optimize the geometry by merging some + edges. -- \b manifold_geometry (int) - describes whether the working geometry should be manifold or not. -When activated, this option helps PreCAD to process the dirtiest -geometries. By default this option is 0. + - Periodic tolerance - This parameter defines the maximum size difference between two periodic edges and also the maximum distance error between two periodic entities. -- \b periodic_tolerance (real) - defines the maximum distance error accepted between -two sets of periodic entities. By default this option is \f$\mathrm{diag} \times 10^{-5}\f$. + - Remove duplicate CAD faces - optimize the geometry by merging the + duplicate CAD faces. This option is unchecked by default. -- \b remove_tiny_edges (boolean) -optimize the geometry by removing the nano edges whenever possible. -By default this option is 0. + - Required entities - The required entities control the correction operations. Accepted values for this parameter are: + - respect : MeshGems-CADSurf is not allowed to alter any required entity, even for correction purposes, + - ignore : MeshGems-CADSurf will ignore the required entities in its processing, + - clear : MeshGems-CADSurf will clear any required status for the entities. There will not be any entity marked as required in the generated mesh. -- \b required_entities (char) -controls the correction operations. Possible values are: + - Sewing tolerance - tolerance of the assembly. It rarely requires to be tuned. - - "respect" - PreCAD is not allowed to correct or optimize a required edge. + - \b Tags - controls the optimisation process. Possible values are: + - "respect" - PreCAD is not allowed to cross the CAD attributes boundaries for optimisation purpose. + - "ignore" - PreCAD is allowed to cross the CAD attributes boundaries for optimisation. + - "clear" - PreCAD will erase each tgas of each entities, and will thus be allowed to cross the CAD attributes boundaries in its optimisation purpose. - - "ignore" - PreCAD is allowed to correct a required edge. - - "clear" - PreCAD will erase "required" status of each required entities, and will thus - be allowed to correct a required edge. +- Add option - adds a new line in Other options section where you can type an option name and value. The following advanced MG-CADSurf options can be used: - \n By default this option is "respect". + - \b create_tag_on_collision (bool) - If this option is activated, MeshGems-CADSurf will create new tags to + describe tag collisions (when it locally changes the topology, depending on the patch independent + options). When this option is not activated, only one tag is preserved while the other one is dropped. + By default this option is 1. -- \b sewing_tolerance (real) - tolerance of the assembly. It rarely requires to be tuned. -By default this option is \f$\mathrm{diag} \times 5 \cdot 10^{-4}\f$. + - \b tiny_edge_respect_geometry (bool) - This option defines the behaviour of the tiny edge removal algorithm + regarding volume collapse. By default, all tiny edges will be removed, regardless of any potential + volume collapse. When this option is activated, it will prevent volume from being collapsed during the tiny edge removal process. + By default this option is 0. -- \b tags (char) -controls the optimisation process. Possible values are: + - \b manifold_geometry (int) - describes whether the working geometry should be manifold or not. + When activated, this option helps PreCAD to process the dirtiest + geometries. By default this option is 0. - - "respect" - PreCAD is not allowed to cross the CAD attributes boundaries for optimisation purpose. - - "ignore" - PreCAD is allowed to cross the CAD attributes boundaries for optimisation. - - "clear" - PreCAD will erase each tgas of each entities, and will thus - be allowed to cross the CAD attributes boundaries in its optimisation purpose. +- Verbosity level - defines the percentage of "verbosity" of +MeshGems-CADSurf [0-10]. - \n By default this option is "respect". +- ExportGMF - saves the computed mesh into a GMF file (.mesh or .meshb). -- \b tiny_edge_length (real) - the length below which en edge is considered as nano for the topology processing. -By default this option is \f$10^{-5}\f$. -\note Moreover, user can choose "" item in these two pop-up menus -(MG-CADSurf and PreCAD) to be able to specify both the option name and the option value. \ref blsurf_top "Back to top" diff --git a/idl/BLSURFPlugin_Algorithm.idl b/idl/BLSURFPlugin_Algorithm.idl index e865c2f..d7f9c11 100644 --- a/idl/BLSURFPlugin_Algorithm.idl +++ b/idl/BLSURFPlugin_Algorithm.idl @@ -178,9 +178,19 @@ module BLSURFPlugin /*! * Sets maximal allowed ratio between the lengths of two adjacent edges */ + void SetUseGradation(in boolean toUse); + boolean GetUseGradation(); void SetGradation(in double ratio); double GetGradation(); + /*! + * Sets maximal allowed ratio between the lengths of two adjacent edges in 3D mesh + */ + void SetUseVolumeGradation(in boolean toUse); + boolean GetUseVolumeGradation(); + void SetVolumeGradation(in double ratio); + double GetVolumeGradation(); + /*! * Sets to create quadrilateral elements or not */ @@ -227,6 +237,37 @@ module BLSURFPlugin void SetTinyEdgeLength(in double length); double GetTinyEdgeLength(); + /*! + * This patch-independent correction option can be activated to remove the tiny + * edges (defined by the option tiny edge optimisation length) from the generated + * mesh when it improves the local mesh quality, without taking into account the + * tags (attributes) specifications. + */ + void SetOptimiseTinyEdges(in boolean toOptimise); + boolean GetOptimiseTinyEdges(); + + /*! + * Defines the minimal length under which an edge is considered to be a tiny one + * to be optimised out by the optimise tiny edges option + */ + void SetTinyEdgeOptimisationLength(in double length); + double GetTinyEdgeOptimisationLength(); + + /*! + * Activate correction of all surface intersections + */ + void SetCorrectSurfaceIntersection(in boolean toCorrect); + boolean GetCorrectSurfaceIntersection(); + + /*! + * Defines the time the user is ready to spend in the intersection prevention process. + * For example, maxCost = 3 means that MeshGems-CADSurf will not spend more time + * in the intersection removal process than 3 times the time required to mesh + * without processing the intersections. + */ + void SetCorrectSurfaceIntersectionMaxCost(in double maxCost); + double GetCorrectSurfaceIntersectionMaxCost(); + /*! * This patch independent correction option can be activated to remove the bad * elements (often called slivers) from the generated mesh, without taking into account @@ -271,6 +312,124 @@ module BLSURFPlugin void SetVerbosity(in short theVal) raises (SALOME::SALOME_Exception); short GetVerbosity(); + /*! + * Set enforce_cad_edge_sizes parameter + * + * 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. + */ + void SetEnforceCadEdgesSize( in boolean toEnforce ); + boolean GetEnforceCadEdgesSize(); + + /*! + * Set jacobian_rectification_respect_geometry parameter + * + * While making the mesh quadratic, allows to lose the CAD-mesh associativity in order + * to correct elements with nagative Jacobian + */ + void SetJacobianRectificationRespectGeometry( in boolean allowRectification ); + boolean GetJacobianRectificationRespectGeometry(); + + /*! + * Set rectify_jacobian parameter + * + * While making the mesh quadratic, allow to fix nagative Jacobian surface elements + */ + void SetJacobianRectification( in boolean allowRectification ); + boolean GetJacobianRectification(); + + /*! + * Set max_number_of_points_per_patch parameter + * + * This parameter controls the maximum amount of points MeshGems-CADSurf is allowed + * to generate on a single CAD patch. For an automatic gestion of the memory, one + * can set this parameter to 0 + */ + void SetMaxNumberOfPointsPerPatch( in long nb ) raises (SALOME::SALOME_Exception); + long GetMaxNumberOfPointsPerPatch(); + + /*! + * Set respect_geometry parameter + * + * This patch independent option can be deactivated to allow MeshGems-CADSurf + * to lower the geometry accuracy in its patch independent process. + */ + void SetRespectGeometry( in boolean toRespect ); + boolean GetRespectGeometry(); + + /*! + * Set tiny_edges_avoid_surface_intersections parameter + * + * This option defines the priority between the tiny feature + * suppression and the surface intersection prevention. + */ + void SetTinyEdgesAvoidSurfaceIntersections( in boolean toAvoidIntersection ); + boolean GetTinyEdgesAvoidSurfaceIntersections(); + + /*! + * Set closed_geometry parameter parameter + * + * Describes whether the geometry is expected to be closed or not. + * When activated, this option helps MeshGems-PreCAD to treat the dirtiest geometries. + */ + void SetClosedGeometry( in boolean isClosed ); + boolean GetClosedGeometry(); + + /*! + * Set debug parameter + * + * Make MeshGems-CADSurf will be very verbose and will output some intermediate + * files in the working directory. This option is mainly meant for Distene support issues. + */ + void SetDebug( in boolean isDebug ); + boolean GetDebug(); + + /*! + * Set periodic_tolerance parameter + * + * This parameter defines the maximum size difference between two periodic edges + * and also the maximum distance error between two periodic entities. + */ + void SetPeriodicTolerance( in double tol ) raises (SALOME::SALOME_Exception); + double GetPeriodicTolerance() raises (SALOME::SALOME_Exception); + + /*! + * Set required_entities parameter + * + * The required entities control the correction operations. + * Accepted values for this parameter are : + * - "respect" : MeshGems-CADSurf is not allowed to alter any required entity, + * even for correction purposes, + * - "ignore" : MeshGems-CADSurf will ignore the required entities in its processing, + * - "clear" : MeshGems-CADSurf will clear any required status for the entities. + * There will not be any entity marked as required in the generated mesh. + */ + void SetRequiredEntities( in string howToTreat ) raises (SALOME::SALOME_Exception); + string GetRequiredEntities(); + + /*! + * Set sewing_tolerance parameter + * + * This parameter is the tolerance of the assembly. + */ + void SetSewingTolerance( in double tol ) raises (SALOME::SALOME_Exception); + double GetSewingTolerance() raises (SALOME::SALOME_Exception); + + /*! + * Set tags parameter + * + * The tag (attribute) system controls the optimisation process. + * Accepted values for this parameter are : + * - "respect" : the CAD tags will be preserved and unaltered by the optimisation operations, + * - "ignore" : the CAD tags will be ignored by the optimisation operations + * but they will still be present in the output mesh, + * - "clear" : MeshGems-CADSurf will clear any tag on any entity and optimise accordingly. + * There will not be any tag in the generated mesh. + */ + void SetTags( in string howToTreat ) raises (SALOME::SALOME_Exception); + string GetTags(); + /*! * To merges edges. */ @@ -320,6 +479,8 @@ module BLSURFPlugin /*! * Adds custom advanced option and its value */ + void SetAdvancedOption(in string optionsAndValues) // in a form "option_1 v1 option_2 v2'" + raises (SALOME::SALOME_Exception); void AddOption(in string optionName, in string optionValue); void AddPreCADOption(in string optionName, in string optionValue); string GetOption(in string optionName); @@ -329,10 +490,12 @@ module BLSURFPlugin * Return array of strings each of which is option name concatenated * with option value devided by semicolon - "option_name:option_value:option_type". * Option value is empty if an option is not set. + * option_type: 1 if user-define, 0 if default * Note: the method is mostly for interaction with GUI. */ string_array GetOptionValues(); string_array GetPreCADOptionValues(); + string_array GetAdvancedOptionValues(); /*! * Set option values each in the form "option_name[:option_value][:option_type]". @@ -340,6 +503,7 @@ module BLSURFPlugin */ void SetOptionValues(in string_array options) raises (SALOME::SALOME_Exception); void SetPreCADOptionValues(in string_array options) raises (SALOME::SALOME_Exception); + void SetAdvancedOptionValues(in string_array options); /*! * SizeMap diff --git a/src/BLSURFPlugin/BLSURFPluginBuilder.py b/src/BLSURFPlugin/BLSURFPluginBuilder.py index 3b443a9..084b8c7 100644 --- a/src/BLSURFPlugin/BLSURFPluginBuilder.py +++ b/src/BLSURFPlugin/BLSURFPluginBuilder.py @@ -74,6 +74,7 @@ class BLSURF_Algorithm(Mesh_Algorithm): _bad_surface_element_aspect_ratio = 1000 _geometric_approximation = 22 _gradation = 1.3 + _volume_gradation = 2 _metric = "isotropic" _remove_tiny_edges = 0 @@ -159,11 +160,22 @@ class BLSURF_Algorithm(Mesh_Algorithm): ## Sets maximal allowed ratio between the lengths of two adjacent edges. # @param theVal value of maximal length ratio - def SetGradation(self, theVal=_gradation): + def SetGradation(self, toUseGradation=True, theVal=_gradation): + if isinstance( toUseGradation, float ): ## backward compatibility + toUseGradation, theVal = True, toUseGradation if self.Parameters().GetGeometricMesh() == 0: theVal = self._gradation + self.Parameters().SetUseGradation(toUseGradation) self.Parameters().SetGradation(theVal) pass + ## Sets maximal allowed ratio between the lengths of two adjacent edges in 3D mesh. + # @param theVal value of maximal length ratio + def SetVolumeGradation(self, toUseGradation=True, theVal=_gradation): + if self.Parameters().GetGeometricMesh() == 0: theVal = self._volume_gradation + self.Parameters().SetUseVolumeGradation(toUseGradation) + self.Parameters().SetVolumeGradation(theVal) + pass + ## Sets topology usage way. # @param way defines how mesh conformity is assured