Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-23 08:17:09

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 <TColgp_Array2OfPnt.hxx>
0025 #include <TColStd_Array1OfReal.hxx>
0026 class gp_Lin;
0027 class HLRBRep_LineTool;
0028 class HLRBRep_SurfaceTool;
0029 class HLRBRep_ThePolygonOfInterCSurf;
0030 class HLRBRep_ThePolygonToolOfInterCSurf;
0031 class HLRBRep_ThePolyhedronOfInterCSurf;
0032 class HLRBRep_ThePolyhedronToolOfInterCSurf;
0033 class HLRBRep_TheInterferenceOfInterCSurf;
0034 class HLRBRep_TheCSFunctionOfInterCSurf;
0035 class HLRBRep_TheExactInterCSurf;
0036 class HLRBRep_TheQuadCurvExactInterCSurf;
0037 class HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf;
0038 class Bnd_BoundSortBox;
0039 class gp_Circ;
0040 class gp_Elips;
0041 class gp_Parab;
0042 class gp_Hypr;
0043 class IntAna_IntConicQuad;
0044 class Bnd_Box;
0045 
0046 class HLRBRep_InterCSurf : public IntCurveSurface_Intersection
0047 {
0048 public:
0049   DEFINE_STANDARD_ALLOC
0050 
0051   //! Empty Constructor
0052   Standard_EXPORT HLRBRep_InterCSurf();
0053 
0054   //! Compute the Intersection between the curve and the
0055   //! surface
0056   Standard_EXPORT void Perform(const gp_Lin& Curve, const Standard_Address& Surface);
0057 
0058   //! Compute the Intersection  between the curve  and
0059   //! the surface. The   Curve is already  sampled and
0060   //! its polygon : <Polygon> is given.
0061   Standard_EXPORT void Perform(const gp_Lin&                         Curve,
0062                                const HLRBRep_ThePolygonOfInterCSurf& Polygon,
0063                                const Standard_Address&               Surface);
0064 
0065   //! Compute the Intersection  between the curve  and
0066   //! the surface. The   Curve is already  sampled and
0067   //! its polygon : <Polygon> is given. The Surface is
0068   //! also sampled and <Polyhedron> is given.
0069   Standard_EXPORT void Perform(const gp_Lin&                            Curve,
0070                                const HLRBRep_ThePolygonOfInterCSurf&    ThePolygon,
0071                                const Standard_Address&                  Surface,
0072                                const HLRBRep_ThePolyhedronOfInterCSurf& Polyhedron);
0073 
0074   //! Compute the Intersection  between the curve  and
0075   //! the surface. The   Curve is already  sampled and
0076   //! its polygon : <Polygon> is given. The Surface is
0077   //! also sampled and <Polyhedron> is given.
0078   Standard_EXPORT void Perform(const gp_Lin&                            Curve,
0079                                const HLRBRep_ThePolygonOfInterCSurf&    ThePolygon,
0080                                const Standard_Address&                  Surface,
0081                                const HLRBRep_ThePolyhedronOfInterCSurf& Polyhedron,
0082                                Bnd_BoundSortBox&                        BndBSB);
0083 
0084   //! Compute the Intersection  between the curve  and
0085   //! the surface. The Surface is already  sampled and
0086   //! its polyhedron : <Polyhedron> is given.
0087   Standard_EXPORT void Perform(const gp_Lin&                            Curve,
0088                                const Standard_Address&                  Surface,
0089                                const HLRBRep_ThePolyhedronOfInterCSurf& Polyhedron);
0090 
0091 protected:
0092   //! Compute the Intersection between the curve and the
0093   //! surface
0094   Standard_EXPORT void Perform(const gp_Lin&           Curve,
0095                                const Standard_Address& Surface,
0096                                const Standard_Real     U0,
0097                                const Standard_Real     V0,
0098                                const Standard_Real     U1,
0099                                const Standard_Real     V1);
0100 
0101   Standard_EXPORT void InternalPerformCurveQuadric(const gp_Lin&           Curve,
0102                                                    const Standard_Address& Surface);
0103 
0104   Standard_EXPORT void InternalPerform(const gp_Lin&                            Curve,
0105                                        const HLRBRep_ThePolygonOfInterCSurf&    Polygon,
0106                                        const Standard_Address&                  Surface,
0107                                        const HLRBRep_ThePolyhedronOfInterCSurf& Polyhedron,
0108                                        const Standard_Real                      U1,
0109                                        const Standard_Real                      V1,
0110                                        const Standard_Real                      U2,
0111                                        const Standard_Real                      V2);
0112 
0113   Standard_EXPORT void InternalPerform(const gp_Lin&                            Curve,
0114                                        const HLRBRep_ThePolygonOfInterCSurf&    Polygon,
0115                                        const Standard_Address&                  Surface,
0116                                        const HLRBRep_ThePolyhedronOfInterCSurf& Polyhedron,
0117                                        const Standard_Real                      U1,
0118                                        const Standard_Real                      V1,
0119                                        const Standard_Real                      U2,
0120                                        const Standard_Real                      V2,
0121                                        Bnd_BoundSortBox&                        BSB);
0122 
0123   Standard_EXPORT void InternalPerform(const gp_Lin&                         Curve,
0124                                        const HLRBRep_ThePolygonOfInterCSurf& Polygon,
0125                                        const Standard_Address&               Surface,
0126                                        const Standard_Real                   U1,
0127                                        const Standard_Real                   V1,
0128                                        const Standard_Real                   U2,
0129                                        const Standard_Real                   V2);
0130 
0131   Standard_EXPORT void PerformConicSurf(const gp_Lin&           Line,
0132                                         const gp_Lin&           Curve,
0133                                         const Standard_Address& Surface,
0134                                         const Standard_Real     U1,
0135                                         const Standard_Real     V1,
0136                                         const Standard_Real     U2,
0137                                         const Standard_Real     V2);
0138 
0139   Standard_EXPORT void PerformConicSurf(const gp_Circ&          Circle,
0140                                         const gp_Lin&           Curve,
0141                                         const Standard_Address& Surface,
0142                                         const Standard_Real     U1,
0143                                         const Standard_Real     V1,
0144                                         const Standard_Real     U2,
0145                                         const Standard_Real     V2);
0146 
0147   Standard_EXPORT void PerformConicSurf(const gp_Elips&         Ellipse,
0148                                         const gp_Lin&           Curve,
0149                                         const Standard_Address& Surface,
0150                                         const Standard_Real     U1,
0151                                         const Standard_Real     V1,
0152                                         const Standard_Real     U2,
0153                                         const Standard_Real     V2);
0154 
0155   Standard_EXPORT void PerformConicSurf(const gp_Parab&         Parab,
0156                                         const gp_Lin&           Curve,
0157                                         const Standard_Address& Surface,
0158                                         const Standard_Real     U1,
0159                                         const Standard_Real     V1,
0160                                         const Standard_Real     U2,
0161                                         const Standard_Real     V2);
0162 
0163   Standard_EXPORT void PerformConicSurf(const gp_Hypr&          Hyper,
0164                                         const gp_Lin&           Curve,
0165                                         const Standard_Address& Surface,
0166                                         const Standard_Real     U1,
0167                                         const Standard_Real     V1,
0168                                         const Standard_Real     U2,
0169                                         const Standard_Real     V2);
0170 
0171   Standard_EXPORT void AppendIntAna(const gp_Lin&              Curve,
0172                                     const Standard_Address&    Surface,
0173                                     const IntAna_IntConicQuad& InterAna);
0174 
0175   Standard_EXPORT void AppendPoint(const gp_Lin&           Curve,
0176                                    const Standard_Real     w,
0177                                    const Standard_Address& Surface,
0178                                    const Standard_Real     u,
0179                                    const Standard_Real     v);
0180 
0181   Standard_EXPORT void AppendSegment(const gp_Lin&           Curve,
0182                                      const Standard_Real     u0,
0183                                      const Standard_Real     u1,
0184                                      const Standard_Address& Surface);
0185 
0186 private:
0187   Standard_EXPORT void DoSurface(const Standard_Address& surface,
0188                                  const Standard_Real     u0,
0189                                  const Standard_Real     u1,
0190                                  const Standard_Real     v0,
0191                                  const Standard_Real     v1,
0192                                  TColgp_Array2OfPnt&     pntsOnSurface,
0193                                  Bnd_Box&                boxSurface,
0194                                  Standard_Real&          gap);
0195 
0196   Standard_EXPORT void DoNewBounds(const Standard_Address&     surface,
0197                                    const Standard_Real         u0,
0198                                    const Standard_Real         u1,
0199                                    const Standard_Real         v0,
0200                                    const Standard_Real         v1,
0201                                    const TColgp_Array2OfPnt&   pntsOnSurface,
0202                                    const TColStd_Array1OfReal& X,
0203                                    const TColStd_Array1OfReal& Y,
0204                                    const TColStd_Array1OfReal& Z,
0205                                    TColStd_Array1OfReal&       Bounds);
0206 };
0207 
0208 #endif // _HLRBRep_InterCSurf_HeaderFile