0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / IMeshTools / IMeshTools_Parameters.hxx
CommitLineData
7bd071ed 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 <Precision.hxx>
20
21//! Structure storing meshing parameters
22struct IMeshTools_Parameters {
23
24 //! Default constructor
25 IMeshTools_Parameters ()
26 :
27 Angle(0.5),
28 Deflection(0.001),
46478ffe 29 AngleInterior(-1.0),
30 DeflectionInterior(-1.0),
7bd071ed 31 MinSize (-1.0),
32 InParallel (Standard_False),
33 Relative (Standard_False),
34 InternalVerticesMode (Standard_True),
35 ControlSurfaceDeflection (Standard_True),
3c1b7084 36 CleanModel (Standard_True),
0da2ecac 37 AdjustMinSize (Standard_False),
128654b6 38 ForceFaceDeflection (Standard_False),
39 AllowQualityDecrease (Standard_False)
7bd071ed 40 {
41 }
42
43 //! Returns factor used to compute default value of MinSize
44 //! (minimum mesh edge length) from deflection
45 static Standard_Real RelMinSize()
46 {
47 return 0.1;
48 }
49
46478ffe 50 //! Angular deflection used to tessellate the boundary edges
7bd071ed 51 Standard_Real Angle;
52
46478ffe 53 //!Linear deflection used to tessellate the boundary edges
7bd071ed 54 Standard_Real Deflection;
46478ffe 55
56 //! Angular deflection used to tessellate the face interior
57 Standard_Real AngleInterior;
7bd071ed 58
46478ffe 59 //! Linear deflection used to tessellate the face interior
60 Standard_Real DeflectionInterior;
61
5e06dfcb 62 //! Minimum size parameter limiting size of triangle's edges to prevent
63 //! sinking into amplification in case of distorted curves and surfaces.
7bd071ed 64 Standard_Real MinSize;
65
66 //! Switches on/off multi-thread computation
67 Standard_Boolean InParallel;
68
69 //! Switches on/off relative computation of edge tolerance<br>
70 //! If true, deflection used for the polygonalisation of each edge will be
71 //! <defle> * Size of Edge. The deflection used for the faces will be the
72 //! maximum deflection of their edges.
73 Standard_Boolean Relative;
74
75 //! Mode to take or not to take internal face vertices into account
76 //! in triangulation process
77 Standard_Boolean InternalVerticesMode;
78
79 //! Parameter to check the deviation of triangulation and interior of
80 //! the face
81 Standard_Boolean ControlSurfaceDeflection;
82
83 //! Cleans temporary data model when algorithm is finished.
84 Standard_Boolean CleanModel;
3c1b7084 85
86 //! Enables/disables local adjustment of min size depending on edge size.
87 //! Disabled by default.
88 Standard_Boolean AdjustMinSize;
0da2ecac 89
90 //! Enables/disables usage of shape tolerances for computing face deflection.
91 //! Disabled by default.
92 Standard_Boolean ForceFaceDeflection;
128654b6 93
94 //! Allows/forbids the decrease of the quality of the generated mesh
95 //! over the existing one.
96 Standard_Boolean AllowQualityDecrease;
7bd071ed 97};
98
99#endif