0030008: BRepMesh does not respect angular deflection in internal area of bspline...
[occt.git] / src / BRepMesh / BRepMesh_Deflection.hxx
1 // Created on: 2016-04-19
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 _BRepMesh_Deflection_HeaderFile
17 #define _BRepMesh_Deflection_HeaderFile
18
19 #include <Standard_Type.hxx>
20 #include <Standard_Handle.hxx>
21 #include <Standard_Transient.hxx>
22 #include <IMeshData_Types.hxx>
23
24 class Bnd_Box;
25 class TopoDS_Face;
26 class TopoDS_Edge;
27 struct IMeshTools_Parameters;
28
29 //! Auxiliary tool encompassing methods to compute deflection of shapes.
30 class BRepMesh_Deflection : public Standard_Transient
31 {
32 public:
33
34   //! Returns absolute deflection for theShape with respect to the 
35   //! relative deflection and theMaxShapeSize.
36   //! @param theShape shape for that the deflection should be computed.
37   //! @param theRelativeDeflection relative deflection.
38   //! @param theMaxShapeSize maximum size of the whole shape.
39   //! @param theAdjustmentCoefficient coefficient of adjustment between maximum 
40   //! size of shape and calculated relative deflection.
41   //! @return absolute deflection for the shape.
42   Standard_EXPORT static Standard_Real ComputeAbsoluteDeflection (
43     const TopoDS_Shape& theShape,
44     const Standard_Real theRelativeDeflection,
45     const Standard_Real theMaxShapeSize,
46     Standard_Real&      theAdjustmentCoefficient);
47
48   //! Computes and updates deflection of the given discrete edge.
49   Standard_EXPORT static void ComputeDeflection (
50     const IMeshData::IEdgeHandle& theDEdge,
51     const Standard_Real           theMaxShapeSize,
52     const IMeshTools_Parameters&  theParameters);
53
54   //! Computes and updates deflection of the given discrete wire.
55   Standard_EXPORT static void ComputeDeflection (
56     const IMeshData::IWireHandle& theDWire,
57     const IMeshTools_Parameters&  theParameters);
58
59   //! Computes and updates deflection of the given discrete face.
60   Standard_EXPORT static void ComputeDeflection (
61     const IMeshData::IFaceHandle& theDFace,
62     const IMeshTools_Parameters&  theParameters);
63
64   DEFINE_STANDARD_RTTI_INLINE(BRepMesh_Deflection, Standard_Transient)
65 };
66
67 #endif