1 // Created on: 2016-04-07 2 // Copyright (c) 2016 OPEN CASCADE SAS 3 // Created by: Oleg AGASHIN 4 // 5 // This file is part of Open CASCADE Technology software library. 6 // 7 // This library is free software; you can redistribute it and/or modify it under 8 // the terms of the GNU Lesser General Public License version 2.1 as published 9 // by the Free Software Foundation, with special exception defined in the file 10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 11 // distribution for complete text of the license and disclaimer of any warranty. 12 // 13 // Alternatively, this file may be used under the terms of Open CASCADE 14 // commercial license or contractual agreement. 15 16 #ifndef _IMeshTools_Parameters_HeaderFile 17 #define _IMeshTools_Parameters_HeaderFile 18 19 #include <IMeshTools_MeshAlgoType.hxx> 20 #include <Precision.hxx> 21 22 //! Structure storing meshing parameters 23 struct IMeshTools_Parameters { 24 25 //! Default constructor IMeshTools_ParametersIMeshTools_Parameters26 IMeshTools_Parameters () 27 : 28 MeshAlgo (IMeshTools_MeshAlgoType_DEFAULT), 29 Angle(0.5), 30 Deflection(0.001), 31 AngleInterior(-1.0), 32 DeflectionInterior(-1.0), 33 MinSize (-1.0), 34 InParallel (Standard_False), 35 Relative (Standard_False), 36 InternalVerticesMode (Standard_True), 37 ControlSurfaceDeflection (Standard_True), 38 CleanModel (Standard_True), 39 AdjustMinSize (Standard_False), 40 ForceFaceDeflection (Standard_False), 41 AllowQualityDecrease (Standard_False) 42 { 43 } 44 45 //! Returns factor used to compute default value of MinSize 46 //! (minimum mesh edge length) from deflection RelMinSizeIMeshTools_Parameters47 static Standard_Real RelMinSize() 48 { 49 return 0.1; 50 } 51 52 //! 2D Delaunay triangulation algorithm factory to use 53 IMeshTools_MeshAlgoType MeshAlgo; 54 55 //! Angular deflection used to tessellate the boundary edges 56 Standard_Real Angle; 57 58 //!Linear deflection used to tessellate the boundary edges 59 Standard_Real Deflection; 60 61 //! Angular deflection used to tessellate the face interior 62 Standard_Real AngleInterior; 63 64 //! Linear deflection used to tessellate the face interior 65 Standard_Real DeflectionInterior; 66 67 //! Minimum size parameter limiting size of triangle's edges to prevent 68 //! sinking into amplification in case of distorted curves and surfaces. 69 Standard_Real MinSize; 70 71 //! Switches on/off multi-thread computation 72 Standard_Boolean InParallel; 73 74 //! Switches on/off relative computation of edge tolerance<br> 75 //! If true, deflection used for the polygonalisation of each edge will be 76 //! <defle> * Size of Edge. The deflection used for the faces will be the 77 //! maximum deflection of their edges. 78 Standard_Boolean Relative; 79 80 //! Mode to take or not to take internal face vertices into account 81 //! in triangulation process 82 Standard_Boolean InternalVerticesMode; 83 84 //! Parameter to check the deviation of triangulation and interior of 85 //! the face 86 Standard_Boolean ControlSurfaceDeflection; 87 88 //! Cleans temporary data model when algorithm is finished. 89 Standard_Boolean CleanModel; 90 91 //! Enables/disables local adjustment of min size depending on edge size. 92 //! Disabled by default. 93 Standard_Boolean AdjustMinSize; 94 95 //! Enables/disables usage of shape tolerances for computing face deflection. 96 //! Disabled by default. 97 Standard_Boolean ForceFaceDeflection; 98 99 //! Allows/forbids the decrease of the quality of the generated mesh 100 //! over the existing one. 101 Standard_Boolean AllowQualityDecrease; 102 }; 103 104 #endif 105