0030940: BRepFilletAPI_MakeFillet algorithm fails on closed shell
[occt.git] / src / ChFi3d / ChFi3d.hxx
1 // Created on: 1993-11-09
2 // Created by: Laurent BOURESCHE
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _ChFi3d_HeaderFile
18 #define _ChFi3d_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Integer.hxx>
25 #include <TopAbs_Orientation.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <ChFiDS_TypeOfConcavity.hxx>
28 class BRepAdaptor_Surface;
29 class TopoDS_Edge;
30 class TopoDS_Face;
31 class ChFi3d_Builder;
32 class ChFi3d_ChBuilder;
33 class ChFi3d_FilBuilder;
34 class ChFi3d_SearchSing;
35
36
37 //! creation of spatial fillets on a solid.
38 class ChFi3d 
39 {
40 public:
41
42   DEFINE_STANDARD_ALLOC
43
44   //! Defines the type of concavity in the edge of connection of two faces
45   Standard_EXPORT static ChFiDS_TypeOfConcavity DefineConnectType (const TopoDS_Edge&     E,
46                                                                    const TopoDS_Face&     F1,
47                                                                    const TopoDS_Face&     F2,
48                                                                    const Standard_Real    SinTol,
49                                                                    const Standard_Boolean CorrectPoint);
50   
51   //! Returns  Reversed  in  Or1  and(or)  Or2  if
52   //! the  concave edge  defined by the  interior of faces F1 and F2,
53   //! in  the  neighbourhood of  their boundary E is of the edge opposite to  the
54   //! normal  of their surface  support.  The  orientation of
55   //! faces is  not  taken  into  consideration in  the calculation. The
56   //! function  returns  0 if  the calculation fails (tangence),
57   //! if  not, it  returns the  number of  choice of  the fillet
58   //! or chamfer corresponding to  the orientations  calculated
59   //! and  to  the tangent to  the  guide line read in  E.
60   Standard_EXPORT static Standard_Integer ConcaveSide (const BRepAdaptor_Surface& S1, const BRepAdaptor_Surface& S2, const TopoDS_Edge& E, TopAbs_Orientation& Or1, TopAbs_Orientation& Or2);
61   
62   //! Same  as ConcaveSide, but the orientations are
63   //! logically  deduced from  the result of  the call of
64   //! ConcaveSide on  the  first pair of faces of  the fillet or
65   //! chamnfer.
66   Standard_EXPORT static Standard_Integer NextSide (TopAbs_Orientation& Or1, TopAbs_Orientation& Or2, const TopAbs_Orientation OrSave1, const TopAbs_Orientation OrSave2, const Standard_Integer ChoixSauv);
67   
68   //! Same  as  the  other NextSide, but the calculation is  done
69   //! on an edge  only.
70   Standard_EXPORT static void NextSide (TopAbs_Orientation& Or, const TopAbs_Orientation OrSave, const TopAbs_Orientation OrFace);
71   
72   //! Enables  to  determine while  processing  an  angle, if
73   //! two fillets or chamfers constituting a face have
74   //! identic or opposed  concave  edges.
75   Standard_EXPORT static Standard_Boolean SameSide (const TopAbs_Orientation Or, const TopAbs_Orientation OrSave1, const TopAbs_Orientation OrSave2, const TopAbs_Orientation OrFace1, const TopAbs_Orientation OrFace2);
76
77
78
79
80 protected:
81
82
83
84
85
86 private:
87
88
89
90
91 friend class ChFi3d_Builder;
92 friend class ChFi3d_ChBuilder;
93 friend class ChFi3d_FilBuilder;
94 friend class ChFi3d_SearchSing;
95
96 };
97
98
99
100
101
102
103
104 #endif // _ChFi3d_HeaderFile