1 // Created on: 1992-09-29 2 // Created by: Didier PIFFAULT 3 // Copyright (c) 1992-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 _IntPatch_InterferencePolyhedron_HeaderFile 18 #define _IntPatch_InterferencePolyhedron_HeaderFile 19 20 #include <Standard.hxx> 21 #include <Standard_DefineAlloc.hxx> 22 #include <Standard_Handle.hxx> 23 24 #include <Standard_Integer.hxx> 25 #include <Standard_Real.hxx> 26 #include <gp_XYZ.hxx> 27 #include <Intf_Interference.hxx> 28 #include <Standard_Boolean.hxx> 29 class IntPatch_Polyhedron; 30 class Intf_TangentZone; 31 32 33 //! Computes the interference between two polyhedra or the 34 //! self interference of a polyhedron. Points of intersection, 35 //! polylines of intersection and zones of tangence. 36 class IntPatch_InterferencePolyhedron : public Intf_Interference 37 { 38 public: 39 40 DEFINE_STANDARD_ALLOC 41 42 43 //! Constructs an empty interference of Polyhedron. 44 Standard_EXPORT IntPatch_InterferencePolyhedron(); 45 46 //! Constructs and computes an interference between the two 47 //! Polyhedra. 48 Standard_EXPORT IntPatch_InterferencePolyhedron(const IntPatch_Polyhedron& Obje1, const IntPatch_Polyhedron& Obje2); 49 50 //! Constructs and computes the self interference of a 51 //! Polyhedron. 52 Standard_EXPORT IntPatch_InterferencePolyhedron(const IntPatch_Polyhedron& Obje); 53 54 //! Computes the interference between the two Polyhedra. 55 Standard_EXPORT void Perform (const IntPatch_Polyhedron& Obje1, const IntPatch_Polyhedron& Obje2); 56 57 //! Computes the self interference of a Polyhedron. 58 Standard_EXPORT void Perform (const IntPatch_Polyhedron& Obje); 59 60 61 62 63 protected: 64 65 66 67 68 69 private: 70 71 72 Standard_EXPORT void Interference (const IntPatch_Polyhedron& Obje1); 73 74 //! Compares the bounding volumes between the facets of <Obje1> 75 //! and the facets of <Obje2> and intersects the facets when the 76 //! bounding volumes have a common part. 77 Standard_EXPORT void Interference (const IntPatch_Polyhedron& Obje1, const IntPatch_Polyhedron& Obje2); 78 79 //! Computes the intersection between the facet <Tri1> of 80 //! <FirstPol> and the facet <Tri2> of <SecondPol>. 81 Standard_EXPORT void Intersect (const Standard_Integer TriF, const IntPatch_Polyhedron& Obje1, const Standard_Integer TriS, const IntPatch_Polyhedron& Obje2); 82 83 //! Computes the zone of tangence between the facet <Tri1> of 84 //! <FirstPol> and the facet <Tri2> of <SecondPol>. 85 Standard_EXPORT Standard_Boolean TangentZoneValue (Intf_TangentZone& TheTZ, const IntPatch_Polyhedron& Obje1, const Standard_Integer Tri1, const IntPatch_Polyhedron& Obje2, const Standard_Integer Tri2) const; 86 87 Standard_EXPORT void CoupleCharacteristics (const IntPatch_Polyhedron& FirstPol, const IntPatch_Polyhedron& SeconPol); 88 89 90 Standard_Integer OI[3]; 91 Standard_Integer TI[3]; 92 Standard_Real dpOpT[3][3]; 93 Standard_Real dpOeT[3][3]; 94 Standard_Real deOpT[3][3]; 95 gp_XYZ voo[3]; 96 gp_XYZ vtt[3]; 97 Standard_Real Incidence; 98 99 100 }; 101 102 103 104 105 106 107 108 #endif // _IntPatch_InterferencePolyhedron_HeaderFile 109