File indexing completed on 2026-09-17 09:20:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter_HeaderFile
0018 #define _Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <gp_Pnt2d.hxx>
0025 #include <NCollection_Array1.hxx>
0026 #include <Standard_Integer.hxx>
0027 #include <Standard_Boolean.hxx>
0028 #include <Intf_Polygon2d.hxx>
0029 class Standard_OutOfRange;
0030 class Adaptor2d_Curve2d;
0031 class Geom2dInt_Geom2dCurveTool;
0032 class IntRes2d_Domain;
0033 class Bnd_Box2d;
0034 class gp_Pnt2d;
0035
0036 class Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter : public Intf_Polygon2d
0037 {
0038 public:
0039 DEFINE_STANDARD_ALLOC
0040
0041
0042 Standard_EXPORT Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter(const Adaptor2d_Curve2d& Curve,
0043 const int NbPnt,
0044 const IntRes2d_Domain& Domain,
0045 const double Tol);
0046
0047
0048
0049
0050
0051
0052 Standard_EXPORT void ComputeWithBox(const Adaptor2d_Curve2d& Curve, const Bnd_Box2d& OtherBox);
0053
0054 double DeflectionOverEstimation() const override;
0055
0056 void SetDeflectionOverEstimation(const double x);
0057
0058 void Closed(const bool clos);
0059
0060
0061 bool Closed() const override { return ClosedPolygon; }
0062
0063
0064 int NbSegments() const override;
0065
0066
0067 Standard_EXPORT void Segment(const int theIndex,
0068 gp_Pnt2d& theBegin,
0069 gp_Pnt2d& theEnd) const override;
0070
0071
0072
0073 double InfParameter() const;
0074
0075
0076
0077 double SupParameter() const;
0078
0079 Standard_EXPORT bool AutoIntersectionIsPossible() const;
0080
0081
0082
0083 Standard_EXPORT double ApproxParamOnCurve(const int Index, const double ParamOnLine) const;
0084
0085 int CalculRegion(const double x,
0086 const double y,
0087 const double x1,
0088 const double x2,
0089 const double y1,
0090 const double y2) const;
0091
0092 Standard_EXPORT void Dump() const;
0093
0094 private:
0095 double TheDeflection;
0096 int NbPntIn;
0097 int TheMaxNbPoints;
0098 NCollection_Array1<gp_Pnt2d> ThePnts;
0099 NCollection_Array1<double> TheParams;
0100 NCollection_Array1<int> TheIndex;
0101 bool ClosedPolygon;
0102 double Binf;
0103 double Bsup;
0104 };
0105
0106 #define TheCurve Adaptor2d_Curve2d
0107 #define TheCurve_hxx <Adaptor2d_Curve2d.hxx>
0108 #define TheCurveTool Geom2dInt_Geom2dCurveTool
0109 #define TheCurveTool_hxx <Geom2dInt_Geom2dCurveTool.hxx>
0110 #define IntCurve_Polygon2dGen Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter
0111 #define IntCurve_Polygon2dGen_hxx <Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter.hxx>
0112
0113 #include <IntCurve_Polygon2dGen.lxx>
0114
0115 #undef TheCurve
0116 #undef TheCurve_hxx
0117 #undef TheCurveTool
0118 #undef TheCurveTool_hxx
0119 #undef IntCurve_Polygon2dGen
0120 #undef IntCurve_Polygon2dGen_hxx
0121
0122 #endif