Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-20 09:53:22

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_InterCSurf_HeaderFile
0018 #define _HLRBRep_InterCSurf_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <IntCurveSurface_Intersection.hxx>
0024 #include <gp_Pnt.hxx>
0025 #include <NCollection_Array2.hxx>
0026 #include <NCollection_Array1.hxx>
0027 
0028 class Bnd_BoundSortBox;
0029 class Bnd_Box;
0030 class gp_Circ;
0031 class gp_Elips;
0032 class gp_Hypr;
0033 class gp_Lin;
0034 class gp_Parab;
0035 class HLRBRep_LineTool;
0036 class HLRBRep_Surface;
0037 class HLRBRep_SurfaceTool;
0038 class HLRBRep_TheCSFunctionOfInterCSurf;
0039 class HLRBRep_TheExactInterCSurf;
0040 class HLRBRep_TheInterferenceOfInterCSurf;
0041 class HLRBRep_ThePolygonOfInterCSurf;
0042 class HLRBRep_ThePolygonToolOfInterCSurf;
0043 class HLRBRep_ThePolyhedronOfInterCSurf;
0044 class HLRBRep_ThePolyhedronToolOfInterCSurf;
0045 class HLRBRep_TheQuadCurvExactInterCSurf;
0046 class HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf;
0047 class IntAna_IntConicQuad;
0048 
0049 class HLRBRep_InterCSurf : public IntCurveSurface_Intersection
0050 {
0051 public:
0052   DEFINE_STANDARD_ALLOC
0053 
0054   //! Empty Constructor
0055   Standard_EXPORT HLRBRep_InterCSurf();
0056 
0057   //! Compute the Intersection between the curve and the
0058   //! surface
0059   Standard_EXPORT void Perform(const gp_Lin& theCurve, HLRBRep_Surface* theSurface);
0060 
0061   //! Compute the Intersection between the curve and
0062   //! the surface. The Curve is already sampled and
0063   //! its polygon : <thePolygon> is given.
0064   Standard_EXPORT void Perform(const gp_Lin&                         theCurve,
0065                                const HLRBRep_ThePolygonOfInterCSurf& thePolygon,
0066                                HLRBRep_Surface*                      theSurface);
0067 
0068   //! Compute the Intersection between the curve and
0069   //! the surface. The Curve is already sampled and
0070   //! its polygon : <thePolygon> is given. The Surface is
0071   //! also sampled and <thePolyhedron> is given.
0072   Standard_EXPORT void Perform(const gp_Lin&                            theCurve,
0073                                const HLRBRep_ThePolygonOfInterCSurf&    thePolygon,
0074                                HLRBRep_Surface*                         theSurface,
0075                                const HLRBRep_ThePolyhedronOfInterCSurf& thePolyhedron);
0076 
0077   //! Compute the Intersection between the curve and
0078   //! the surface. The Curve is already sampled and
0079   //! its polygon : <thePolygon> is given. The Surface is
0080   //! also sampled and <thePolyhedron> is given.
0081   Standard_EXPORT void Perform(const gp_Lin&                            theCurve,
0082                                const HLRBRep_ThePolygonOfInterCSurf&    thePolygon,
0083                                HLRBRep_Surface*                         theSurface,
0084                                const HLRBRep_ThePolyhedronOfInterCSurf& thePolyhedron,
0085                                Bnd_BoundSortBox&                        theBndBSB);
0086 
0087   //! Compute the Intersection between the curve and
0088   //! the surface. The Surface is already sampled and
0089   //! its polyhedron : <thePolyhedron> is given.
0090   Standard_EXPORT void Perform(const gp_Lin&                            theCurve,
0091                                HLRBRep_Surface*                         theSurface,
0092                                const HLRBRep_ThePolyhedronOfInterCSurf& thePolyhedron);
0093 
0094 protected:
0095   //! Compute the Intersection between the curve and the
0096   //! surface
0097   Standard_EXPORT void Perform(const gp_Lin&    theCurve,
0098                                HLRBRep_Surface* theSurface,
0099                                const double     theU0,
0100                                const double     theV0,
0101                                const double     theU1,
0102                                const double     theV1);
0103 
0104   Standard_EXPORT void InternalPerformCurveQuadric(const gp_Lin&    theCurve,
0105                                                    HLRBRep_Surface* theSurface);
0106 
0107   Standard_EXPORT void InternalPerform(const gp_Lin&                            theCurve,
0108                                        const HLRBRep_ThePolygonOfInterCSurf&    thePolygon,
0109                                        HLRBRep_Surface*                         theSurface,
0110                                        const HLRBRep_ThePolyhedronOfInterCSurf& thePolyhedron,
0111                                        const double                             theU1,
0112                                        const double                             theV1,
0113                                        const double                             theU2,
0114                                        const double                             theV2);
0115 
0116   Standard_EXPORT void InternalPerform(const gp_Lin&                            theCurve,
0117                                        const HLRBRep_ThePolygonOfInterCSurf&    thePolygon,
0118                                        HLRBRep_Surface*                         theSurface,
0119                                        const HLRBRep_ThePolyhedronOfInterCSurf& thePolyhedron,
0120                                        const double                             theU1,
0121                                        const double                             theV1,
0122                                        const double                             theU2,
0123                                        const double                             theV2,
0124                                        Bnd_BoundSortBox&                        theBSB);
0125 
0126   Standard_EXPORT void InternalPerform(const gp_Lin&                         theCurve,
0127                                        const HLRBRep_ThePolygonOfInterCSurf& thePolygon,
0128                                        HLRBRep_Surface*                      theSurface,
0129                                        const double                          theU1,
0130                                        const double                          theV1,
0131                                        const double                          theU2,
0132                                        const double                          theV2);
0133 
0134   Standard_EXPORT void PerformConicSurf(const gp_Lin&    theLine,
0135                                         const gp_Lin&    theCurve,
0136                                         HLRBRep_Surface* theSurface,
0137                                         const double     theU1,
0138                                         const double     theV1,
0139                                         const double     theU2,
0140                                         const double     theV2);
0141 
0142   Standard_EXPORT void PerformConicSurf(const gp_Circ&   theCircle,
0143                                         const gp_Lin&    theCurve,
0144                                         HLRBRep_Surface* theSurface,
0145                                         const double     theU1,
0146                                         const double     theV1,
0147                                         const double     theU2,
0148                                         const double     theV2);
0149 
0150   Standard_EXPORT void PerformConicSurf(const gp_Elips&  theEllipse,
0151                                         const gp_Lin&    theCurve,
0152                                         HLRBRep_Surface* theSurface,
0153                                         const double     theU1,
0154                                         const double     theV1,
0155                                         const double     theU2,
0156                                         const double     theV2);
0157 
0158   Standard_EXPORT void PerformConicSurf(const gp_Parab&  theParab,
0159                                         const gp_Lin&    theCurve,
0160                                         HLRBRep_Surface* theSurface,
0161                                         const double     theU1,
0162                                         const double     theV1,
0163                                         const double     theU2,
0164                                         const double     theV2);
0165 
0166   Standard_EXPORT void PerformConicSurf(const gp_Hypr&   theHyper,
0167                                         const gp_Lin&    theCurve,
0168                                         HLRBRep_Surface* theSurface,
0169                                         const double     theU1,
0170                                         const double     theV1,
0171                                         const double     theU2,
0172                                         const double     theV2);
0173 
0174   Standard_EXPORT void AppendIntAna(const gp_Lin&              theCurve,
0175                                     HLRBRep_Surface*           theSurface,
0176                                     const IntAna_IntConicQuad& theInterAna);
0177 
0178   Standard_EXPORT void AppendPoint(const gp_Lin&    theCurve,
0179                                    const double     theW,
0180                                    HLRBRep_Surface* theSurface,
0181                                    const double     theU,
0182                                    const double     theV);
0183 
0184   Standard_EXPORT void AppendSegment(const gp_Lin&    theCurve,
0185                                      const double     theU0,
0186                                      const double     theU1,
0187                                      HLRBRep_Surface* theSurface);
0188 
0189 private:
0190   Standard_EXPORT void DoSurface(HLRBRep_Surface*            theSurface,
0191                                  const double                theU0,
0192                                  const double                theU1,
0193                                  const double                theV0,
0194                                  const double                theV1,
0195                                  NCollection_Array2<gp_Pnt>& thePntsOnSurface,
0196                                  Bnd_Box&                    theBoxSurface,
0197                                  double&                     theGap);
0198 
0199   Standard_EXPORT void DoNewBounds(HLRBRep_Surface*                  theSurface,
0200                                    const double                      theU0,
0201                                    const double                      theU1,
0202                                    const double                      theV0,
0203                                    const double                      theV1,
0204                                    const NCollection_Array2<gp_Pnt>& thePntsOnSurface,
0205                                    const NCollection_Array1<double>& theX,
0206                                    const NCollection_Array1<double>& theY,
0207                                    const NCollection_Array1<double>& theZ,
0208                                    NCollection_Array1<double>&       theBounds);
0209 };
0210 
0211 #endif // _HLRBRep_InterCSurf_HeaderFile