Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-29 09:19:27

0001 // Created on: 1992-09-29
0002 // Created by: Didier PIFFAULT
0003 // Copyright (c) 1992-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IntPatch_InterferencePolyhedron_HeaderFile
0018 #define _IntPatch_InterferencePolyhedron_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <gp_XYZ.hxx>
0025 #include <Intf_Interference.hxx>
0026 class IntPatch_Polyhedron;
0027 class Intf_TangentZone;
0028 
0029 //! Computes the interference between two polyhedra or the
0030 //! self interference of a polyhedron. Points of intersection,
0031 //! polylines of intersection and zones of tangence.
0032 class IntPatch_InterferencePolyhedron : public Intf_Interference
0033 {
0034 public:
0035   DEFINE_STANDARD_ALLOC
0036 
0037   //! Constructs an empty interference of Polyhedron.
0038   Standard_EXPORT IntPatch_InterferencePolyhedron();
0039 
0040   //! Constructs and computes an interference between the two
0041   //! Polyhedra.
0042   Standard_EXPORT IntPatch_InterferencePolyhedron(const IntPatch_Polyhedron& Obje1,
0043                                                   const IntPatch_Polyhedron& Obje2);
0044 
0045   //! Constructs and computes the self interference of a
0046   //! Polyhedron.
0047   Standard_EXPORT IntPatch_InterferencePolyhedron(const IntPatch_Polyhedron& Obje);
0048 
0049   //! Computes the interference between the two Polyhedra.
0050   Standard_EXPORT void Perform(const IntPatch_Polyhedron& Obje1, const IntPatch_Polyhedron& Obje2);
0051 
0052   //! Computes the self interference of a Polyhedron.
0053   Standard_EXPORT void Perform(const IntPatch_Polyhedron& Obje);
0054 
0055 private:
0056   Standard_EXPORT void Interference(const IntPatch_Polyhedron& Obje1);
0057 
0058   //! Compares the bounding volumes between the facets of <Obje1>
0059   //! and the facets of <Obje2> and intersects the facets when the
0060   //! bounding volumes have a common part.
0061   Standard_EXPORT void Interference(const IntPatch_Polyhedron& Obje1,
0062                                     const IntPatch_Polyhedron& Obje2);
0063 
0064   //! Computes the intersection between the facet <Tri1> of
0065   //! <FirstPol> and the facet <Tri2> of <SecondPol>.
0066   Standard_EXPORT void Intersect(const int                  TriF,
0067                                  const IntPatch_Polyhedron& Obje1,
0068                                  const int                  TriS,
0069                                  const IntPatch_Polyhedron& Obje2);
0070 
0071   //! Computes the zone of tangence between the facet <Tri1> of
0072   //! <FirstPol> and the facet <Tri2> of <SecondPol>.
0073   Standard_EXPORT bool TangentZoneValue(Intf_TangentZone&          TheTZ,
0074                                         const IntPatch_Polyhedron& Obje1,
0075                                         const int                  Tri1,
0076                                         const IntPatch_Polyhedron& Obje2,
0077                                         const int                  Tri2) const;
0078 
0079   Standard_EXPORT void CoupleCharacteristics(const IntPatch_Polyhedron& FirstPol,
0080                                              const IntPatch_Polyhedron& SeconPol);
0081 
0082   int    OI[3];
0083   int    TI[3];
0084   double dpOpT[3][3];
0085   double dpOeT[3][3];
0086   double deOpT[3][3];
0087   gp_XYZ voo[3];
0088   gp_XYZ vtt[3];
0089   double Incidence;
0090 };
0091 
0092 #endif // _IntPatch_InterferencePolyhedron_HeaderFile