File indexing completed on 2026-09-25 09:20:24
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _IntPatch_WLine_HeaderFile
0018 #define _IntPatch_WLine_HeaderFile
0019
0020 #include <Standard.hxx>
0021
0022 #include <Standard_Integer.hxx>
0023 #include <IntPatch_Point.hxx>
0024 #include <NCollection_Sequence.hxx>
0025 #include <Standard_Real.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 class gp_Pnt2d;
0034 class gp_Pnt;
0035
0036
0037
0038 class IntPatch_WLine : public IntPatch_PointLine
0039 {
0040
0041 public:
0042
0043 enum IntPatch_WLType
0044 {
0045 IntPatch_WLUnknown,
0046 IntPatch_WLImpImp,
0047 IntPatch_WLImpPrm,
0048 IntPatch_WLPrmPrm
0049 };
0050
0051
0052
0053 Standard_EXPORT IntPatch_WLine(const occ::handle<IntSurf_LineOn2S>& Line,
0054 const bool Tang,
0055 const IntSurf_TypeTrans Trans1,
0056 const IntSurf_TypeTrans Trans2);
0057
0058
0059
0060 Standard_EXPORT IntPatch_WLine(const occ::handle<IntSurf_LineOn2S>& Line,
0061 const bool Tang,
0062 const IntSurf_Situation Situ1,
0063 const IntSurf_Situation Situ2);
0064
0065
0066
0067 Standard_EXPORT IntPatch_WLine(const occ::handle<IntSurf_LineOn2S>& Line, const bool Tang);
0068
0069
0070
0071
0072 void AddVertex(const IntPatch_Point& Pnt, const bool theIsPrepend = false) override;
0073
0074
0075 Standard_EXPORT void SetPoint(const int Index, const IntPatch_Point& Pnt);
0076
0077
0078
0079
0080
0081 void Replace(const int Index, const IntPatch_Point& Pnt);
0082
0083 void SetFirstPoint(const int IndFirst);
0084
0085 void SetLastPoint(const int IndLast);
0086
0087
0088 int NbPnts() const override;
0089
0090
0091 const IntSurf_PntOn2S& Point(const int Index) const override;
0092
0093
0094
0095 bool HasFirstPoint() const;
0096
0097
0098
0099 bool HasLastPoint() const;
0100
0101
0102 const IntPatch_Point& FirstPoint() const;
0103
0104
0105 const IntPatch_Point& LastPoint() const;
0106
0107
0108
0109
0110 const IntPatch_Point& FirstPoint(int& Indfirst) const;
0111
0112
0113
0114
0115 const IntPatch_Point& LastPoint(int& Indlast) 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
0128
0129
0130 Standard_EXPORT void ComputeVertexParameters(const double Tol);
0131
0132
0133 Standard_EXPORT occ::handle<IntSurf_LineOn2S> Curve() const override;
0134
0135
0136
0137 bool IsOutSurf1Box(const gp_Pnt2d& theP) const override { return curv->IsOutSurf1Box(theP); }
0138
0139
0140
0141 bool IsOutSurf2Box(const gp_Pnt2d& theP) const override { return curv->IsOutSurf2Box(theP); }
0142
0143
0144 bool IsOutBox(const gp_Pnt& theP) const override { return curv->IsOutBox(theP); }
0145
0146 Standard_EXPORT void SetPeriod(const double pu1,
0147 const double pv1,
0148 const double pu2,
0149 const double pv2);
0150
0151 Standard_EXPORT double U1Period() const;
0152
0153 Standard_EXPORT double V1Period() const;
0154
0155 Standard_EXPORT double U2Period() const;
0156
0157 Standard_EXPORT double V2Period() const;
0158
0159 Standard_EXPORT void SetArcOnS1(const occ::handle<Adaptor2d_Curve2d>& A);
0160
0161 Standard_EXPORT bool HasArcOnS1() const;
0162
0163 Standard_EXPORT const occ::handle<Adaptor2d_Curve2d>& GetArcOnS1() const;
0164
0165 Standard_EXPORT void SetArcOnS2(const occ::handle<Adaptor2d_Curve2d>& A);
0166
0167 Standard_EXPORT bool HasArcOnS2() const;
0168
0169 Standard_EXPORT const occ::handle<Adaptor2d_Curve2d>& GetArcOnS2() const;
0170
0171
0172 void ClearVertexes() override;
0173
0174
0175 void RemoveVertex(const int theIndex) override;
0176
0177 void InsertVertexBefore(const int theIndex, const IntPatch_Point& thePnt);
0178
0179
0180
0181
0182
0183 Standard_EXPORT void Dump(const int theMode) const;
0184
0185
0186 void EnablePurging(const bool theIsEnabled) { myIsPurgerAllowed = theIsEnabled; }
0187
0188
0189 bool IsPurgingAllowed() { return myIsPurgerAllowed; }
0190
0191
0192 IntPatch_WLType GetCreatingWay() const { return myCreationWay; }
0193
0194
0195 void SetCreatingWayInfo(IntPatch_WLType theAlgo) { myCreationWay = theAlgo; }
0196
0197 DEFINE_STANDARD_RTTIEXT(IntPatch_WLine, IntPatch_PointLine)
0198
0199 private:
0200 occ::handle<IntSurf_LineOn2S> curv;
0201 bool fipt;
0202 bool lapt;
0203 int indf;
0204 int indl;
0205 NCollection_Sequence<IntPatch_Point> svtx;
0206 double u1period;
0207 double v1period;
0208 double u2period;
0209 double v2period;
0210 bool hasArcOnS1;
0211 occ::handle<Adaptor2d_Curve2d> theArcOnS1;
0212 bool hasArcOnS2;
0213 occ::handle<Adaptor2d_Curve2d> theArcOnS2;
0214 bool myIsPurgerAllowed;
0215
0216
0217 IntPatch_WLType myCreationWay;
0218 };
0219
0220 #include <IntPatch_WLine.lxx>
0221
0222 #endif