1 // Created on: 1991-06-24 2 // Created by: Didier PIFFAULT 3 // Copyright (c) 1991-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 _Intf_Interference_HeaderFile 18 #define _Intf_Interference_HeaderFile 19 20 #include <Standard.hxx> 21 #include <Standard_DefineAlloc.hxx> 22 #include <Standard_Handle.hxx> 23 24 #include <Intf_SeqOfSectionPoint.hxx> 25 #include <Intf_SeqOfSectionLine.hxx> 26 #include <Intf_SeqOfTangentZone.hxx> 27 #include <Standard_Boolean.hxx> 28 #include <Standard_Real.hxx> 29 #include <Standard_Integer.hxx> 30 class Standard_OutOfRange; 31 class Intf_SectionPoint; 32 class Intf_SectionLine; 33 class Intf_TangentZone; 34 35 36 //! Describes the Interference computation result 37 //! between polygon2d or polygon3d or polyhedron 38 //! (as three sequences of points of intersection, 39 //! polylines of intersection and zones de tangence). 40 class Intf_Interference 41 { 42 public: 43 44 DEFINE_STANDARD_ALLOC 45 46 47 //! Gives the number of points of intersection in the 48 //! interference. 49 Standard_Integer NbSectionPoints() const; 50 51 //! Gives the point of intersection of address Index in 52 //! the interference. 53 const Intf_SectionPoint& PntValue (const Standard_Integer Index) const; 54 55 //! Gives the number of polylines of intersection in the 56 //! interference. 57 Standard_Integer NbSectionLines() const; 58 59 //! Gives the polyline of intersection at address <Index> in 60 //! the interference. 61 const Intf_SectionLine& LineValue (const Standard_Integer Index) const; 62 63 //! Gives the number of zones of tangence in the interference. 64 Standard_Integer NbTangentZones() const; 65 66 //! Gives the zone of tangence at address Index in the 67 //! interference. 68 const Intf_TangentZone& ZoneValue (const Standard_Integer Index) const; 69 70 //! Gives the tolerance used for the calculation. 71 Standard_Real GetTolerance() const; 72 73 //! Tests if the polylines of intersection or the zones of 74 //! tangence contain the point of intersection <ThePnt>. 75 Standard_EXPORT Standard_Boolean Contains (const Intf_SectionPoint& ThePnt) const; 76 77 //! Inserts a new zone of tangence in the current list of 78 //! tangent zones of the interference and returns True 79 //! when done. 80 Standard_EXPORT Standard_Boolean Insert (const Intf_TangentZone& TheZone); 81 82 //! Insert a new segment of intersection in the current list of 83 //! polylines of intersection of the interference. 84 Standard_EXPORT void Insert (const Intf_SectionPoint& pdeb, const Intf_SectionPoint& pfin); 85 86 Standard_EXPORT void Dump() const; 87 88 89 90 91 protected: 92 93 //! Empty constructor 94 Standard_EXPORT Intf_Interference(const Standard_Boolean Self); 95 96 //! Destructor is protected, for safer inheritance ~Intf_Interference()97 ~Intf_Interference () {} 98 99 //! Only one argument for the intersection. 100 Standard_EXPORT void SelfInterference (const Standard_Boolean Self); 101 102 103 Intf_SeqOfSectionPoint mySPoins; 104 Intf_SeqOfSectionLine mySLines; 105 Intf_SeqOfTangentZone myTZones; 106 Standard_Boolean SelfIntf; 107 Standard_Real Tolerance; 108 109 110 private: 111 112 113 114 115 116 }; 117 118 119 #include <Intf_Interference.lxx> 120 121 122 123 124 125 #endif // _Intf_Interference_HeaderFile 126