File indexing completed on 2025-01-18 10:04:10
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_SequenceOfPoint.hxx>
0024 #include <Standard_Real.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 class gp_Pnt2d;
0033 class gp_Pnt;
0034
0035
0036 class IntPatch_WLine;
0037 DEFINE_STANDARD_HANDLE(IntPatch_WLine, IntPatch_PointLine)
0038
0039
0040
0041 class IntPatch_WLine : public IntPatch_PointLine
0042 {
0043
0044 public:
0045
0046
0047 enum IntPatch_WLType
0048 {
0049 IntPatch_WLUnknown,
0050 IntPatch_WLImpImp,
0051 IntPatch_WLImpPrm,
0052 IntPatch_WLPrmPrm
0053 };
0054
0055
0056
0057 Standard_EXPORT IntPatch_WLine(const Handle(IntSurf_LineOn2S)& Line, const Standard_Boolean Tang, const IntSurf_TypeTrans Trans1, const IntSurf_TypeTrans Trans2);
0058
0059
0060
0061 Standard_EXPORT IntPatch_WLine(const Handle(IntSurf_LineOn2S)& Line, const Standard_Boolean Tang, const IntSurf_Situation Situ1, const IntSurf_Situation Situ2);
0062
0063
0064
0065 Standard_EXPORT IntPatch_WLine(const Handle(IntSurf_LineOn2S)& Line, const Standard_Boolean Tang);
0066
0067
0068
0069
0070 virtual void AddVertex (const IntPatch_Point& Pnt,
0071 const Standard_Boolean theIsPrepend = Standard_False) Standard_OVERRIDE;
0072
0073
0074 Standard_EXPORT void SetPoint (const Standard_Integer Index, const IntPatch_Point& Pnt);
0075
0076
0077
0078
0079
0080 void Replace (const Standard_Integer Index, const IntPatch_Point& Pnt);
0081
0082 void SetFirstPoint (const Standard_Integer IndFirst);
0083
0084 void SetLastPoint (const Standard_Integer IndLast);
0085
0086
0087 virtual Standard_Integer NbPnts() const Standard_OVERRIDE;
0088
0089
0090 virtual const IntSurf_PntOn2S& Point (const Standard_Integer Index) const Standard_OVERRIDE;
0091
0092
0093
0094 Standard_Boolean HasFirstPoint() const;
0095
0096
0097
0098 Standard_Boolean HasLastPoint() const;
0099
0100
0101 const IntPatch_Point& FirstPoint() const;
0102
0103
0104 const IntPatch_Point& LastPoint() const;
0105
0106
0107
0108
0109 const IntPatch_Point& FirstPoint (Standard_Integer& Indfirst) const;
0110
0111
0112
0113
0114 const IntPatch_Point& LastPoint (Standard_Integer& Indlast) const;
0115
0116
0117 virtual Standard_Integer NbVertex() const Standard_OVERRIDE;
0118
0119
0120 virtual const IntPatch_Point& Vertex (const Standard_Integer Index) const Standard_OVERRIDE;
0121
0122
0123 virtual IntPatch_Point& ChangeVertex (const Standard_Integer Index) Standard_OVERRIDE;
0124
0125
0126
0127
0128
0129 Standard_EXPORT void ComputeVertexParameters (const Standard_Real Tol);
0130
0131
0132 Standard_EXPORT virtual Handle(IntSurf_LineOn2S) Curve() const Standard_OVERRIDE;
0133
0134
0135
0136 Standard_Boolean IsOutSurf1Box (const gp_Pnt2d& theP) const Standard_OVERRIDE
0137 {
0138 return curv->IsOutSurf1Box(theP);
0139 }
0140
0141
0142
0143 Standard_Boolean IsOutSurf2Box(const gp_Pnt2d& theP) const Standard_OVERRIDE
0144 {
0145 return curv->IsOutSurf2Box(theP);
0146 }
0147
0148
0149 Standard_Boolean IsOutBox(const gp_Pnt& theP) const Standard_OVERRIDE
0150 {
0151 return curv->IsOutBox(theP);
0152 }
0153
0154 Standard_EXPORT void SetPeriod (const Standard_Real pu1, const Standard_Real pv1, const Standard_Real pu2, const Standard_Real pv2);
0155
0156 Standard_EXPORT Standard_Real U1Period() const;
0157
0158 Standard_EXPORT Standard_Real V1Period() const;
0159
0160 Standard_EXPORT Standard_Real U2Period() const;
0161
0162 Standard_EXPORT Standard_Real V2Period() const;
0163
0164 Standard_EXPORT void SetArcOnS1 (const Handle(Adaptor2d_Curve2d)& A);
0165
0166 Standard_EXPORT Standard_Boolean HasArcOnS1() const;
0167
0168 Standard_EXPORT const Handle(Adaptor2d_Curve2d)& GetArcOnS1() const;
0169
0170 Standard_EXPORT void SetArcOnS2 (const Handle(Adaptor2d_Curve2d)& A);
0171
0172 Standard_EXPORT Standard_Boolean HasArcOnS2() const;
0173
0174 Standard_EXPORT const Handle(Adaptor2d_Curve2d)& GetArcOnS2() const;
0175
0176
0177 virtual void ClearVertexes() Standard_OVERRIDE;
0178
0179
0180 virtual void RemoveVertex (const Standard_Integer theIndex) Standard_OVERRIDE;
0181
0182 void InsertVertexBefore (const Standard_Integer theIndex, const IntPatch_Point& thePnt);
0183
0184
0185
0186
0187
0188 Standard_EXPORT void Dump(const Standard_Integer theMode) const;
0189
0190
0191 void EnablePurging(const Standard_Boolean theIsEnabled)
0192 {
0193 myIsPurgerAllowed = theIsEnabled;
0194 }
0195
0196
0197 Standard_Boolean IsPurgingAllowed()
0198 {
0199 return myIsPurgerAllowed;
0200 }
0201
0202
0203 IntPatch_WLType GetCreatingWay() const
0204 {
0205 return myCreationWay;
0206 }
0207
0208
0209 void SetCreatingWayInfo(IntPatch_WLType theAlgo)
0210 {
0211 myCreationWay = theAlgo;
0212 }
0213
0214
0215 DEFINE_STANDARD_RTTIEXT(IntPatch_WLine,IntPatch_PointLine)
0216
0217 protected:
0218
0219
0220
0221
0222 private:
0223
0224
0225 Handle(IntSurf_LineOn2S) curv;
0226 Standard_Boolean fipt;
0227 Standard_Boolean lapt;
0228 Standard_Integer indf;
0229 Standard_Integer indl;
0230 IntPatch_SequenceOfPoint svtx;
0231 Standard_Real u1period;
0232 Standard_Real v1period;
0233 Standard_Real u2period;
0234 Standard_Real v2period;
0235 Standard_Boolean hasArcOnS1;
0236 Handle(Adaptor2d_Curve2d) theArcOnS1;
0237 Standard_Boolean hasArcOnS2;
0238 Handle(Adaptor2d_Curve2d) theArcOnS2;
0239 Standard_Boolean myIsPurgerAllowed;
0240
0241
0242 IntPatch_WLType myCreationWay;
0243
0244 };
0245
0246
0247 #include <IntPatch_WLine.lxx>
0248
0249
0250
0251
0252
0253 #endif