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