Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:35

0001 // Created on: 1992-06-04
0002 // Created by: Jacques GOUSSARD
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 _Geom2dInt_GInter_HeaderFile
0018 #define _Geom2dInt_GInter_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <IntCurve_IntConicConic.hxx>
0024 #include <Geom2dInt_TheIntConicCurveOfGInter.hxx>
0025 #include <Geom2dInt_TheIntPCurvePCurveOfGInter.hxx>
0026 #include <IntRes2d_Intersection.hxx>
0027 #include <Standard_Integer.hxx>
0028 #include <TColStd_Array1OfReal.hxx>
0029 class Standard_ConstructionError;
0030 class Adaptor2d_Curve2d;
0031 class Geom2dInt_Geom2dCurveTool;
0032 class Geom2dInt_TheProjPCurOfGInter;
0033 class Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter;
0034 class Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter;
0035 class Geom2dInt_TheIntConicCurveOfGInter;
0036 class Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter;
0037 class Geom2dInt_IntConicCurveOfGInter;
0038 class Geom2dInt_TheIntPCurvePCurveOfGInter;
0039 class Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter;
0040 class Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter;
0041 class Geom2dInt_ExactIntersectionPointOfTheIntPCurvePCurveOfGInter;
0042 class IntRes2d_Domain;
0043 
0044 
0045 
0046 class Geom2dInt_GInter  : public IntRes2d_Intersection
0047 {
0048 public:
0049 
0050   DEFINE_STANDARD_ALLOC
0051 
0052   
0053   //! Empty constructor.
0054     Geom2dInt_GInter();
0055   
0056   //! Self Intersection of a curve
0057     Geom2dInt_GInter(const Adaptor2d_Curve2d& C, const Standard_Real TolConf, const Standard_Real Tol);
0058   
0059   //! Self Intersection of a curve with a domain.
0060     Geom2dInt_GInter(const Adaptor2d_Curve2d& C, const IntRes2d_Domain& D, const Standard_Real TolConf, const Standard_Real Tol);
0061   
0062   //! Intersection between 2 curves.
0063     Geom2dInt_GInter(const Adaptor2d_Curve2d& C1, const Adaptor2d_Curve2d& C2, const Standard_Real TolConf, const Standard_Real Tol);
0064   
0065   //! Intersection between 2 curves.
0066     Geom2dInt_GInter(const Adaptor2d_Curve2d& C1, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& C2, const Standard_Real TolConf, const Standard_Real Tol);
0067   
0068   //! Intersection between 2 curves.
0069     Geom2dInt_GInter(const Adaptor2d_Curve2d& C1, const Adaptor2d_Curve2d& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
0070   
0071   //! Intersection between 2 curves.
0072     Geom2dInt_GInter(const Adaptor2d_Curve2d& C1, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
0073   
0074   //! Intersection between 2 curves.
0075   Standard_EXPORT void Perform (const Adaptor2d_Curve2d& C1, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
0076   
0077   //! Intersection between 2 curves.
0078     void Perform (const Adaptor2d_Curve2d& C1, const Adaptor2d_Curve2d& C2, const Standard_Real TolConf, const Standard_Real Tol);
0079   
0080   //! Intersection between 2 curves.
0081   Standard_EXPORT void Perform (const Adaptor2d_Curve2d& C1, const IntRes2d_Domain& D1, const Standard_Real TolConf, const Standard_Real Tol);
0082   
0083   //! Intersection between 2 curves.
0084   Standard_EXPORT void Perform (const Adaptor2d_Curve2d& C1, const Standard_Real TolConf, const Standard_Real Tol);
0085   
0086   //! Intersection between 2 curves.
0087     void Perform (const Adaptor2d_Curve2d& C1, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& C2, const Standard_Real TolConf, const Standard_Real Tol);
0088   
0089   //! Intersection between 2 curves.
0090     void Perform (const Adaptor2d_Curve2d& C1, const Adaptor2d_Curve2d& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
0091   
0092   //! Create a domain from a curve
0093   Standard_EXPORT IntRes2d_Domain ComputeDomain (const Adaptor2d_Curve2d& C1, const Standard_Real TolDomain) const;
0094 
0095   //! Set / get minimum number of points in polygon intersection.
0096   Standard_EXPORT void SetMinNbSamples (const Standard_Integer theMinNbSamples);
0097   Standard_EXPORT Standard_Integer GetMinNbSamples () const;
0098 
0099 
0100 protected:
0101 
0102 
0103 
0104 
0105 
0106 private:
0107 
0108   
0109   //! Intersection between 2 curves.
0110   Standard_EXPORT void InternalPerform (const Adaptor2d_Curve2d& C1, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Boolean Composite);
0111   
0112   //! Part of InternalCompositePerform function
0113   Standard_EXPORT void InternalCompositePerform_noRecurs (const Standard_Integer NbInterC1, const Adaptor2d_Curve2d& C1, const Standard_Integer NumInterC1, const TColStd_Array1OfReal& Tab1, const IntRes2d_Domain& D1, const Standard_Integer NbInterC2, const Adaptor2d_Curve2d& C2, const Standard_Integer NumInterC2, const TColStd_Array1OfReal& Tab2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
0114   
0115   //! Intersection between 2 curves.
0116   Standard_EXPORT void InternalCompositePerform (const Adaptor2d_Curve2d& C1, const IntRes2d_Domain& D1, const Standard_Integer N1, const Standard_Integer NB1, const TColStd_Array1OfReal& Tab1, const Adaptor2d_Curve2d& C2, const IntRes2d_Domain& D2, const Standard_Integer N2, const Standard_Integer NB2, const TColStd_Array1OfReal& Tab2, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Boolean Composite);
0117 
0118 
0119   Standard_Real param1inf;
0120   Standard_Real param1sup;
0121   Standard_Real param2inf;
0122   Standard_Real param2sup;
0123   IntCurve_IntConicConic intconiconi;
0124   Geom2dInt_TheIntConicCurveOfGInter intconicurv;
0125   Geom2dInt_TheIntPCurvePCurveOfGInter intcurvcurv;
0126 
0127 
0128 };
0129 
0130 #define TheCurve Adaptor2d_Curve2d
0131 #define TheCurve_hxx <Adaptor2d_Curve2d.hxx>
0132 #define TheCurveTool Geom2dInt_Geom2dCurveTool
0133 #define TheCurveTool_hxx <Geom2dInt_Geom2dCurveTool.hxx>
0134 #define IntCurve_TheProjPCur Geom2dInt_TheProjPCurOfGInter
0135 #define IntCurve_TheProjPCur_hxx <Geom2dInt_TheProjPCurOfGInter.hxx>
0136 #define IntCurve_TheCurveLocatorOfTheProjPCur Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter
0137 #define IntCurve_TheCurveLocatorOfTheProjPCur_hxx <Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx>
0138 #define IntCurve_TheLocateExtPCOfTheProjPCur Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter
0139 #define IntCurve_TheLocateExtPCOfTheProjPCur_hxx <Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx>
0140 #define IntCurve_TheCurveLocatorOfTheProjPCur Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter
0141 #define IntCurve_TheCurveLocatorOfTheProjPCur_hxx <Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx>
0142 #define IntCurve_TheLocateExtPCOfTheProjPCur Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter
0143 #define IntCurve_TheLocateExtPCOfTheProjPCur_hxx <Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx>
0144 #define IntCurve_TheIntConicCurve Geom2dInt_TheIntConicCurveOfGInter
0145 #define IntCurve_TheIntConicCurve_hxx <Geom2dInt_TheIntConicCurveOfGInter.hxx>
0146 #define IntCurve_TheIntersectorOfTheIntConicCurve Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter
0147 #define IntCurve_TheIntersectorOfTheIntConicCurve_hxx <Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter.hxx>
0148 #define IntCurve_TheIntersectorOfTheIntConicCurve Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter
0149 #define IntCurve_TheIntersectorOfTheIntConicCurve_hxx <Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter.hxx>
0150 #define IntCurve_IntConicCurve Geom2dInt_IntConicCurveOfGInter
0151 #define IntCurve_IntConicCurve_hxx <Geom2dInt_IntConicCurveOfGInter.hxx>
0152 #define IntCurve_TheIntPCurvePCurve Geom2dInt_TheIntPCurvePCurveOfGInter
0153 #define IntCurve_TheIntPCurvePCurve_hxx <Geom2dInt_TheIntPCurvePCurveOfGInter.hxx>
0154 #define IntCurve_ThePolygon2dOfTheIntPCurvePCurve Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter
0155 #define IntCurve_ThePolygon2dOfTheIntPCurvePCurve_hxx <Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter.hxx>
0156 #define IntCurve_TheDistBetweenPCurvesOfTheIntPCurvePCurve Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter
0157 #define IntCurve_TheDistBetweenPCurvesOfTheIntPCurvePCurve_hxx <Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter.hxx>
0158 #define IntCurve_ExactIntersectionPointOfTheIntPCurvePCurve Geom2dInt_ExactIntersectionPointOfTheIntPCurvePCurveOfGInter
0159 #define IntCurve_ExactIntersectionPointOfTheIntPCurvePCurve_hxx <Geom2dInt_ExactIntersectionPointOfTheIntPCurvePCurveOfGInter.hxx>
0160 #define IntCurve_ThePolygon2dOfTheIntPCurvePCurve Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter
0161 #define IntCurve_ThePolygon2dOfTheIntPCurvePCurve_hxx <Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter.hxx>
0162 #define IntCurve_TheDistBetweenPCurvesOfTheIntPCurvePCurve Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter
0163 #define IntCurve_TheDistBetweenPCurvesOfTheIntPCurvePCurve_hxx <Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter.hxx>
0164 #define IntCurve_ExactIntersectionPointOfTheIntPCurvePCurve Geom2dInt_ExactIntersectionPointOfTheIntPCurvePCurveOfGInter
0165 #define IntCurve_ExactIntersectionPointOfTheIntPCurvePCurve_hxx <Geom2dInt_ExactIntersectionPointOfTheIntPCurvePCurveOfGInter.hxx>
0166 #define IntCurve_IntCurveCurveGen Geom2dInt_GInter
0167 #define IntCurve_IntCurveCurveGen_hxx <Geom2dInt_GInter.hxx>
0168 
0169 #include <IntCurve_IntCurveCurveGen.lxx>
0170 
0171 #undef TheCurve
0172 #undef TheCurve_hxx
0173 #undef TheCurveTool
0174 #undef TheCurveTool_hxx
0175 #undef IntCurve_TheProjPCur
0176 #undef IntCurve_TheProjPCur_hxx
0177 #undef IntCurve_TheCurveLocatorOfTheProjPCur
0178 #undef IntCurve_TheCurveLocatorOfTheProjPCur_hxx
0179 #undef IntCurve_TheLocateExtPCOfTheProjPCur
0180 #undef IntCurve_TheLocateExtPCOfTheProjPCur_hxx
0181 #undef IntCurve_TheCurveLocatorOfTheProjPCur
0182 #undef IntCurve_TheCurveLocatorOfTheProjPCur_hxx
0183 #undef IntCurve_TheLocateExtPCOfTheProjPCur
0184 #undef IntCurve_TheLocateExtPCOfTheProjPCur_hxx
0185 #undef IntCurve_TheIntConicCurve
0186 #undef IntCurve_TheIntConicCurve_hxx
0187 #undef IntCurve_TheIntersectorOfTheIntConicCurve
0188 #undef IntCurve_TheIntersectorOfTheIntConicCurve_hxx
0189 #undef IntCurve_TheIntersectorOfTheIntConicCurve
0190 #undef IntCurve_TheIntersectorOfTheIntConicCurve_hxx
0191 #undef IntCurve_IntConicCurve
0192 #undef IntCurve_IntConicCurve_hxx
0193 #undef IntCurve_TheIntPCurvePCurve
0194 #undef IntCurve_TheIntPCurvePCurve_hxx
0195 #undef IntCurve_ThePolygon2dOfTheIntPCurvePCurve
0196 #undef IntCurve_ThePolygon2dOfTheIntPCurvePCurve_hxx
0197 #undef IntCurve_TheDistBetweenPCurvesOfTheIntPCurvePCurve
0198 #undef IntCurve_TheDistBetweenPCurvesOfTheIntPCurvePCurve_hxx
0199 #undef IntCurve_ExactIntersectionPointOfTheIntPCurvePCurve
0200 #undef IntCurve_ExactIntersectionPointOfTheIntPCurvePCurve_hxx
0201 #undef IntCurve_ThePolygon2dOfTheIntPCurvePCurve
0202 #undef IntCurve_ThePolygon2dOfTheIntPCurvePCurve_hxx
0203 #undef IntCurve_TheDistBetweenPCurvesOfTheIntPCurvePCurve
0204 #undef IntCurve_TheDistBetweenPCurvesOfTheIntPCurvePCurve_hxx
0205 #undef IntCurve_ExactIntersectionPointOfTheIntPCurvePCurve
0206 #undef IntCurve_ExactIntersectionPointOfTheIntPCurvePCurve_hxx
0207 #undef IntCurve_IntCurveCurveGen
0208 #undef IntCurve_IntCurveCurveGen_hxx
0209 
0210 
0211 
0212 
0213 #endif // _Geom2dInt_GInter_HeaderFile