Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-25 09:20:05

0001 // Created on: 1992-10-14
0002 // Created by: Christophe MARION
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 _HLRBRep_TheInterferenceOfInterCSurf_HeaderFile
0018 #define _HLRBRep_TheInterferenceOfInterCSurf_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Boolean.hxx>
0025 #include <Intf_Interference.hxx>
0026 #include <gp_Lin.hxx>
0027 #include <NCollection_Array1.hxx>
0028 class HLRBRep_ThePolygonOfInterCSurf;
0029 class HLRBRep_ThePolygonToolOfInterCSurf;
0030 class HLRBRep_ThePolyhedronOfInterCSurf;
0031 class HLRBRep_ThePolyhedronToolOfInterCSurf;
0032 class gp_Lin;
0033 class Bnd_BoundSortBox;
0034 class gp_Pnt;
0035 class gp_XYZ;
0036 
0037 class HLRBRep_TheInterferenceOfInterCSurf : public Intf_Interference
0038 {
0039 public:
0040   DEFINE_STANDARD_ALLOC
0041 
0042   //! Constructs an empty interference between Polygon and
0043   //! Polyhedron.
0044   Standard_EXPORT HLRBRep_TheInterferenceOfInterCSurf();
0045 
0046   //! Constructs and computes an interference between the Polygon
0047   //! and the Polyhedron.
0048   Standard_EXPORT HLRBRep_TheInterferenceOfInterCSurf(
0049     const HLRBRep_ThePolygonOfInterCSurf&    thePolyg,
0050     const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
0051 
0052   //! Constructs and computes an interference between the
0053   //! Straight Line and the Polyhedron.
0054   Standard_EXPORT HLRBRep_TheInterferenceOfInterCSurf(
0055     const gp_Lin&                            theLin,
0056     const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
0057 
0058   //! Constructs and computes an interference between the
0059   //! Straight Lines and the Polyhedron.
0060   Standard_EXPORT HLRBRep_TheInterferenceOfInterCSurf(
0061     const NCollection_Array1<gp_Lin>&        theLins,
0062     const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
0063 
0064   //! Computes an interference between the Polygon and the
0065   //! Polyhedron.
0066   Standard_EXPORT void Perform(const HLRBRep_ThePolygonOfInterCSurf&    thePolyg,
0067                                const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
0068 
0069   //! Computes an interference between the Straight Line and the
0070   //! Polyhedron.
0071   Standard_EXPORT void Perform(const gp_Lin&                            theLin,
0072                                const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
0073 
0074   //! Computes an interference between the Straight Lines and
0075   //! the Polyhedron.
0076   Standard_EXPORT void Perform(const NCollection_Array1<gp_Lin>&        theLins,
0077                                const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
0078 
0079   //! Constructs and computes an interference between the Polygon
0080   //! and the Polyhedron.
0081   Standard_EXPORT HLRBRep_TheInterferenceOfInterCSurf(
0082     const HLRBRep_ThePolygonOfInterCSurf&    thePolyg,
0083     const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh,
0084     Bnd_BoundSortBox&                        theBoundSB);
0085 
0086   //! Constructs and computes an interference between the
0087   //! Straight Line and the Polyhedron.
0088   Standard_EXPORT HLRBRep_TheInterferenceOfInterCSurf(
0089     const gp_Lin&                            theLin,
0090     const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh,
0091     Bnd_BoundSortBox&                        theBoundSB);
0092 
0093   //! Constructs and computes an interference between the
0094   //! Straight Lines and the Polyhedron.
0095   Standard_EXPORT HLRBRep_TheInterferenceOfInterCSurf(
0096     const NCollection_Array1<gp_Lin>&        theLins,
0097     const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh,
0098     Bnd_BoundSortBox&                        theBoundSB);
0099 
0100   //! Computes an interference between the Polygon and the
0101   //! Polyhedron.
0102   Standard_EXPORT void Perform(const HLRBRep_ThePolygonOfInterCSurf&    thePolyg,
0103                                const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh,
0104                                Bnd_BoundSortBox&                        theBoundSB);
0105 
0106   //! Computes an interference between the Straight Line and the
0107   //! Polyhedron.
0108   Standard_EXPORT void Perform(const gp_Lin&                            theLin,
0109                                const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh,
0110                                Bnd_BoundSortBox&                        theBoundSB);
0111 
0112   //! Computes an interference between the Straight Lines and
0113   //! the Polyhedron.
0114   Standard_EXPORT void Perform(const NCollection_Array1<gp_Lin>&        theLins,
0115                                const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh,
0116                                Bnd_BoundSortBox&                        theBoundSB);
0117 
0118   //! Compares the boundings between the segment of <thePolyg> and
0119   //! the facets of <thePolyh>.
0120   Standard_EXPORT void Interference(const HLRBRep_ThePolygonOfInterCSurf&    thePolyg,
0121                                     const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh,
0122                                     Bnd_BoundSortBox&                        theBoundSB);
0123 
0124   //! Compares the boundings between the segment of <thePolyg> and
0125   //! the facets of <thePolyh>.
0126   Standard_EXPORT void Interference(const HLRBRep_ThePolygonOfInterCSurf&    thePolyg,
0127                                     const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
0128 
0129 private:
0130   //! Computes the intersection between the segment <BegO><EndO>
0131   //! and the triangle <TTri> of <thePolyh>.
0132   Standard_EXPORT void Intersect(const gp_Pnt&                            BegO,
0133                                  const gp_Pnt&                            EndO,
0134                                  const bool                               Infinite,
0135                                  const int                                TTri,
0136                                  const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
0137 
0138   //! Computes the intersection between the segment <BegO><EndO>
0139   //! and the triangle <TTri> of <thePolyh>.
0140   Standard_EXPORT void Intersect(const gp_Pnt&                            BegO,
0141                                  const gp_Pnt&                            EndO,
0142                                  const bool                               Infinite,
0143                                  const int                                TTri,
0144                                  const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh,
0145                                  const gp_XYZ&                            TriNormal,
0146                                  const double                             TriDp,
0147                                  const double                             dBegTri,
0148                                  const double                             dEndTri);
0149 
0150   bool BeginOfClosedPolygon;
0151   int  iLin;
0152 };
0153 
0154 #endif // _HLRBRep_TheInterferenceOfInterCSurf_HeaderFile