File indexing completed on 2025-01-18 10:04:09
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_SequenceOfPoint.hxx>
0025 #include <IntPatch_PointLine.hxx>
0026 #include <IntSurf_LineOn2S.hxx>
0027 #include <IntSurf_Situation.hxx>
0028 #include <IntSurf_TypeTrans.hxx>
0029
0030 class IntPatch_Point;
0031 class IntSurf_PntOn2S;
0032
0033
0034 class IntPatch_RLine;
0035 DEFINE_STANDARD_HANDLE(IntPatch_RLine, IntPatch_PointLine)
0036
0037
0038
0039 class IntPatch_RLine : public IntPatch_PointLine
0040 {
0041
0042 public:
0043
0044
0045
0046
0047 Standard_EXPORT IntPatch_RLine(const Standard_Boolean Tang, const IntSurf_TypeTrans Trans1, const IntSurf_TypeTrans Trans2);
0048
0049
0050
0051 Standard_EXPORT IntPatch_RLine(const Standard_Boolean Tang, const IntSurf_Situation Situ1, const IntSurf_Situation Situ2);
0052
0053
0054
0055 Standard_EXPORT IntPatch_RLine(const Standard_Boolean Tang);
0056
0057
0058
0059
0060 virtual void AddVertex (const IntPatch_Point& Pnt,
0061 const Standard_Boolean theIsPrepend = Standard_False) Standard_OVERRIDE;
0062
0063
0064
0065 void Replace (const Standard_Integer Index, const IntPatch_Point& Pnt);
0066
0067 void SetFirstPoint (const Standard_Integer IndFirst);
0068
0069 void SetLastPoint (const Standard_Integer IndLast);
0070
0071 void Add (const Handle(IntSurf_LineOn2S)& L);
0072
0073
0074
0075
0076
0077 Standard_Boolean IsArcOnS1() const;
0078
0079
0080
0081
0082
0083 Standard_Boolean IsArcOnS2() const;
0084
0085 Standard_EXPORT void SetArcOnS1 (const Handle(Adaptor2d_Curve2d)& A);
0086
0087 Standard_EXPORT void SetArcOnS2 (const Handle(Adaptor2d_Curve2d)& A);
0088
0089 Standard_EXPORT void SetParamOnS1 (const Standard_Real p1, const Standard_Real p2);
0090
0091 Standard_EXPORT void SetParamOnS2 (Standard_Real& p1, Standard_Real& p2);
0092
0093
0094 const Handle(Adaptor2d_Curve2d)& ArcOnS1() const;
0095
0096
0097 const Handle(Adaptor2d_Curve2d)& ArcOnS2() const;
0098
0099 Standard_EXPORT void ParamOnS1 (Standard_Real& p1, Standard_Real& p2) const;
0100
0101 Standard_EXPORT void ParamOnS2 (Standard_Real& p1, Standard_Real& p2) const;
0102
0103
0104
0105 Standard_Boolean HasFirstPoint() const;
0106
0107
0108
0109 Standard_Boolean HasLastPoint() const;
0110
0111
0112
0113 const IntPatch_Point& FirstPoint() const;
0114
0115
0116
0117 const IntPatch_Point& LastPoint() const;
0118
0119
0120 virtual Standard_Integer NbVertex() const Standard_OVERRIDE;
0121
0122
0123 virtual const IntPatch_Point& Vertex (const Standard_Integer Index) const Standard_OVERRIDE;
0124
0125
0126 virtual IntPatch_Point& ChangeVertex (const Standard_Integer Index) Standard_OVERRIDE;
0127
0128
0129 virtual void RemoveVertex (const Standard_Integer theIndex) Standard_OVERRIDE;
0130
0131 Standard_Boolean HasPolygon() const;
0132
0133
0134 virtual Standard_Integer NbPnts() const Standard_OVERRIDE;
0135
0136
0137 virtual const IntSurf_PntOn2S& Point (const Standard_Integer Index) const Standard_OVERRIDE;
0138
0139
0140 Standard_EXPORT void SetPoint (const Standard_Integer Index, const IntPatch_Point& Pnt);
0141
0142
0143
0144
0145
0146 Standard_EXPORT void ComputeVertexParameters (const Standard_Real Tol);
0147
0148
0149 virtual Handle(IntSurf_LineOn2S) Curve() const Standard_OVERRIDE;
0150
0151
0152
0153 virtual Standard_Boolean IsOutSurf1Box(const gp_Pnt2d& theP) const Standard_OVERRIDE
0154 {
0155 return curv->IsOutSurf1Box(theP);
0156 }
0157
0158
0159
0160 virtual Standard_Boolean IsOutSurf2Box(const gp_Pnt2d& theP) const Standard_OVERRIDE
0161 {
0162 return curv->IsOutSurf2Box(theP);
0163 }
0164
0165
0166 virtual Standard_Boolean IsOutBox(const gp_Pnt& theP) const Standard_OVERRIDE
0167 {
0168 return curv->IsOutBox(theP);
0169 }
0170
0171
0172 virtual void ClearVertexes() Standard_OVERRIDE
0173 {
0174 svtx.Clear();
0175 }
0176
0177 void SetCurve(const Handle(IntSurf_LineOn2S)& theNewCurve)
0178 {
0179 curv = theNewCurve;
0180 }
0181
0182
0183
0184
0185
0186 Standard_EXPORT void Dump(const Standard_Integer theMode) const;
0187
0188 DEFINE_STANDARD_RTTIEXT(IntPatch_RLine,IntPatch_PointLine)
0189
0190 protected:
0191
0192
0193
0194
0195 private:
0196
0197
0198 Handle(Adaptor2d_Curve2d) theArcOnS1;
0199 Handle(Adaptor2d_Curve2d) theArcOnS2;
0200 Standard_Boolean onS1;
0201 Standard_Boolean onS2;
0202 Standard_Real ParamInf1;
0203 Standard_Real ParamSup1;
0204 Standard_Real ParamInf2;
0205 Standard_Real ParamSup2;
0206 Handle(IntSurf_LineOn2S) curv;
0207 Standard_Boolean fipt;
0208 Standard_Boolean lapt;
0209 Standard_Integer indf;
0210 Standard_Integer indl;
0211 IntPatch_SequenceOfPoint svtx;
0212
0213
0214 };
0215
0216
0217 #include <IntPatch_RLine.lxx>
0218
0219
0220
0221
0222
0223 #endif