File indexing completed on 2026-10-02 09:12:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _IntPatch_RLine_HeaderFile
0018 #define _IntPatch_RLine_HeaderFile
0019
0020 #include <Standard.hxx>
0021
0022 #include <Standard_Real.hxx>
0023 #include <Standard_Integer.hxx>
0024 #include <IntPatch_Point.hxx>
0025 #include <NCollection_Sequence.hxx>
0026 #include <IntPatch_PointLine.hxx>
0027 #include <IntSurf_LineOn2S.hxx>
0028 #include <IntSurf_Situation.hxx>
0029 #include <IntSurf_TypeTrans.hxx>
0030
0031 class IntPatch_Point;
0032 class IntSurf_PntOn2S;
0033
0034
0035
0036 class IntPatch_RLine : public IntPatch_PointLine
0037 {
0038
0039 public:
0040
0041
0042 Standard_EXPORT IntPatch_RLine(const bool Tang,
0043 const IntSurf_TypeTrans Trans1,
0044 const IntSurf_TypeTrans Trans2);
0045
0046
0047
0048 Standard_EXPORT IntPatch_RLine(const bool Tang,
0049 const IntSurf_Situation Situ1,
0050 const IntSurf_Situation Situ2);
0051
0052
0053
0054 Standard_EXPORT IntPatch_RLine(const bool Tang);
0055
0056
0057
0058
0059 void AddVertex(const IntPatch_Point& Pnt, const bool theIsPrepend = false) override;
0060
0061
0062
0063 void Replace(const int Index, const IntPatch_Point& Pnt);
0064
0065 void SetFirstPoint(const int IndFirst);
0066
0067 void SetLastPoint(const int IndLast);
0068
0069 void Add(const occ::handle<IntSurf_LineOn2S>& L);
0070
0071
0072
0073
0074
0075 bool IsArcOnS1() const;
0076
0077
0078
0079
0080
0081 bool IsArcOnS2() const;
0082
0083 Standard_EXPORT void SetArcOnS1(const occ::handle<Adaptor2d_Curve2d>& A);
0084
0085 Standard_EXPORT void SetArcOnS2(const occ::handle<Adaptor2d_Curve2d>& A);
0086
0087 Standard_EXPORT void SetParamOnS1(const double p1, const double p2);
0088
0089 Standard_EXPORT void SetParamOnS2(double& p1, double& p2);
0090
0091
0092 const occ::handle<Adaptor2d_Curve2d>& ArcOnS1() const;
0093
0094
0095 const occ::handle<Adaptor2d_Curve2d>& ArcOnS2() const;
0096
0097 Standard_EXPORT void ParamOnS1(double& p1, double& p2) const;
0098
0099 Standard_EXPORT void ParamOnS2(double& p1, double& p2) const;
0100
0101
0102
0103 bool HasFirstPoint() const;
0104
0105
0106
0107 bool HasLastPoint() const;
0108
0109
0110
0111 const IntPatch_Point& FirstPoint() const;
0112
0113
0114
0115 const IntPatch_Point& LastPoint() const;
0116
0117
0118 int NbVertex() const override;
0119
0120
0121 const IntPatch_Point& Vertex(const int Index) const override;
0122
0123
0124 IntPatch_Point& ChangeVertex(const int Index) override;
0125
0126
0127 void RemoveVertex(const int theIndex) override;
0128
0129 bool HasPolygon() const;
0130
0131
0132 int NbPnts() const override;
0133
0134
0135 const IntSurf_PntOn2S& Point(const int Index) const override;
0136
0137
0138 Standard_EXPORT void SetPoint(const int Index, const IntPatch_Point& Pnt);
0139
0140
0141
0142
0143
0144 Standard_EXPORT void ComputeVertexParameters(const double Tol);
0145
0146
0147 occ::handle<IntSurf_LineOn2S> Curve() const override;
0148
0149
0150
0151 bool IsOutSurf1Box(const gp_Pnt2d& theP) const override { return curv->IsOutSurf1Box(theP); }
0152
0153
0154
0155 bool IsOutSurf2Box(const gp_Pnt2d& theP) const override { return curv->IsOutSurf2Box(theP); }
0156
0157
0158 bool IsOutBox(const gp_Pnt& theP) const override { return curv->IsOutBox(theP); }
0159
0160
0161 void ClearVertexes() override { svtx.Clear(); }
0162
0163 void SetCurve(const occ::handle<IntSurf_LineOn2S>& theNewCurve) { curv = theNewCurve; }
0164
0165
0166
0167
0168
0169 Standard_EXPORT void Dump(const int theMode) const;
0170
0171 DEFINE_STANDARD_RTTIEXT(IntPatch_RLine, IntPatch_PointLine)
0172
0173 private:
0174 occ::handle<Adaptor2d_Curve2d> theArcOnS1;
0175 occ::handle<Adaptor2d_Curve2d> theArcOnS2;
0176 bool onS1;
0177 bool onS2;
0178 double ParamInf1;
0179 double ParamSup1;
0180 double ParamInf2;
0181 double ParamSup2;
0182 occ::handle<IntSurf_LineOn2S> curv;
0183 bool fipt;
0184 bool lapt;
0185 int indf;
0186 int indl;
0187 NCollection_Sequence<IntPatch_Point> svtx;
0188 };
0189
0190 #include <IntPatch_RLine.lxx>
0191
0192 #endif