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 class BRepAdaptor_Surface; 28 class TopoDS_Edge; 29 class ChFi3d_Builder; 30 class ChFi3d_ChBuilder; 31 class ChFi3d_FilBuilder; 32 class ChFi3d_SearchSing; 33 34 35 //! creation of spatial fillets on a solid. 36 class ChFi3d 37 { 38 public: 39 40 DEFINE_STANDARD_ALLOC 41 42 43 //! Returns Reversed in Or1 and(or) Or2 if 44 //! the concave edge defined by the interior of faces F1 and F2, 45 //! in the neighbourhood of their boundary E is of the edge opposite to the 46 //! normal of their surface support. The orientation of 47 //! faces is not taken into consideration in the calculation. The 48 //! function returns 0 if the calculation fails (tangence), 49 //! if not, it returns the number of choice of the fillet 50 //! or chamfer corresponding to the orientations calculated 51 //! and to the tangent to the guide line read in E. 52 Standard_EXPORT static Standard_Integer ConcaveSide (const BRepAdaptor_Surface& S1, const BRepAdaptor_Surface& S2, const TopoDS_Edge& E, TopAbs_Orientation& Or1, TopAbs_Orientation& Or2); 53 54 //! Same as ConcaveSide, but the orientations are 55 //! logically deduced from the result of the call of 56 //! ConcaveSide on the first pair of faces of the fillet or 57 //! chamnfer. 58 Standard_EXPORT static Standard_Integer NextSide (TopAbs_Orientation& Or1, TopAbs_Orientation& Or2, const TopAbs_Orientation OrSave1, const TopAbs_Orientation OrSave2, const Standard_Integer ChoixSauv); 59 60 //! Same as the other NextSide, but the calculation is done 61 //! on an edge only. 62 Standard_EXPORT static void NextSide (TopAbs_Orientation& Or, const TopAbs_Orientation OrSave, const TopAbs_Orientation OrFace); 63 64 //! Enables to determine while processing an angle, if 65 //! two fillets or chamfers constituting a face have 66 //! identic or opposed concave edges. 67 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); 68 69 70 71 72 protected: 73 74 75 76 77 78 private: 79 80 81 82 83 friend class ChFi3d_Builder; 84 friend class ChFi3d_ChBuilder; 85 friend class ChFi3d_FilBuilder; 86 friend class ChFi3d_SearchSing; 87 88 }; 89 90 91 92 93 94 95 96 #endif // _ChFi3d_HeaderFile 97