File indexing completed on 2025-01-18 10:03:21
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _ChFiDS_Spine_HeaderFile
0018 #define _ChFiDS_Spine_HeaderFile
0019
0020 #include <BRepAdaptor_Curve.hxx>
0021 #include <gp_Pnt.hxx>
0022 #include <gp_Vec.hxx>
0023 #include <GeomAbs_CurveType.hxx>
0024 #include <ChFiDS_ChamfMode.hxx>
0025 #include <ChFiDS_ErrorStatus.hxx>
0026 #include <ChFiDS_ListOfHElSpine.hxx>
0027 #include <ChFiDS_State.hxx>
0028 #include <ChFiDS_TypeOfConcavity.hxx>
0029 #include <ChFiDS_ElSpine.hxx>
0030 #include <TColStd_HArray1OfReal.hxx>
0031 #include <TopTools_SequenceOfShape.hxx>
0032
0033 class TopoDS_Edge;
0034 class gp_Lin;
0035 class gp_Circ;
0036 class TopoDS_Vertex;
0037
0038
0039 #ifdef Status
0040 #undef Status
0041 #endif
0042
0043 class ChFiDS_Spine;
0044 DEFINE_STANDARD_HANDLE(ChFiDS_Spine, Standard_Transient)
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069 class ChFiDS_Spine : public Standard_Transient
0070 {
0071
0072 public:
0073
0074
0075 Standard_EXPORT ChFiDS_Spine();
0076
0077 Standard_EXPORT ChFiDS_Spine(const Standard_Real Tol);
0078
0079
0080 void SetEdges (const TopoDS_Edge& E);
0081
0082
0083 void SetOffsetEdges (const TopoDS_Edge& E);
0084
0085
0086 void PutInFirst (const TopoDS_Edge& E);
0087
0088
0089 void PutInFirstOffset (const TopoDS_Edge& E);
0090
0091 Standard_Integer NbEdges() const;
0092
0093 const TopoDS_Edge& Edges (const Standard_Integer I) const;
0094
0095 const TopoDS_Edge& OffsetEdges (const Standard_Integer I) const;
0096
0097
0098
0099 void SetFirstStatus (const ChFiDS_State S);
0100
0101
0102
0103 void SetLastStatus (const ChFiDS_State S);
0104
0105 Standard_EXPORT virtual void AppendElSpine (const Handle(ChFiDS_ElSpine)& Els);
0106
0107 Standard_EXPORT virtual void AppendOffsetElSpine (const Handle(ChFiDS_ElSpine)& Els);
0108
0109 Standard_EXPORT Handle(ChFiDS_ElSpine) ElSpine (const Standard_Integer IE) const;
0110
0111 Standard_EXPORT Handle(ChFiDS_ElSpine) ElSpine (const TopoDS_Edge& E) const;
0112
0113 Standard_EXPORT Handle(ChFiDS_ElSpine) ElSpine (const Standard_Real W) const;
0114
0115 Standard_EXPORT ChFiDS_ListOfHElSpine& ChangeElSpines();
0116
0117 Standard_EXPORT ChFiDS_ListOfHElSpine& ChangeOffsetElSpines();
0118
0119 Standard_EXPORT virtual void Reset (const Standard_Boolean AllData = Standard_False);
0120
0121 Standard_EXPORT Standard_Boolean SplitDone() const;
0122
0123 Standard_EXPORT void SplitDone (const Standard_Boolean B);
0124
0125
0126
0127
0128
0129
0130
0131 Standard_EXPORT void Load();
0132
0133 Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const;
0134
0135 Standard_EXPORT Standard_Boolean IsClosed() const;
0136
0137 Standard_EXPORT Standard_Real FirstParameter() const;
0138
0139 Standard_EXPORT Standard_Real LastParameter() const;
0140
0141 Standard_EXPORT void SetFirstParameter (const Standard_Real Par);
0142
0143 Standard_EXPORT void SetLastParameter (const Standard_Real Par);
0144
0145
0146
0147 Standard_EXPORT Standard_Real FirstParameter (const Standard_Integer IndexSpine) const;
0148
0149
0150
0151 Standard_EXPORT Standard_Real LastParameter (const Standard_Integer IndexSpine) const;
0152
0153
0154 Standard_EXPORT Standard_Real Length (const Standard_Integer IndexSpine) const;
0155
0156 Standard_EXPORT Standard_Boolean IsPeriodic() const;
0157
0158 Standard_EXPORT Standard_Real Period() const;
0159
0160 Standard_EXPORT Standard_Real Absc (const Standard_Real U);
0161
0162 Standard_EXPORT Standard_Real Absc (const Standard_Real U, const Standard_Integer I);
0163
0164 Standard_EXPORT void Parameter (const Standard_Real AbsC, Standard_Real& U, const Standard_Boolean Oriented = Standard_True);
0165
0166 Standard_EXPORT void Parameter (const Standard_Integer Index, const Standard_Real AbsC, Standard_Real& U, const Standard_Boolean Oriented = Standard_True);
0167
0168 Standard_EXPORT gp_Pnt Value (const Standard_Real AbsC);
0169
0170 Standard_EXPORT void D0 (const Standard_Real AbsC, gp_Pnt& P);
0171
0172 Standard_EXPORT void D1 (const Standard_Real AbsC, gp_Pnt& P, gp_Vec& V1);
0173
0174 Standard_EXPORT void D2 (const Standard_Real AbsC, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
0175
0176 Standard_EXPORT void SetCurrent (const Standard_Integer Index);
0177
0178
0179 Standard_EXPORT const BRepAdaptor_Curve& CurrentElementarySpine (const Standard_Integer Index);
0180
0181 Standard_Integer CurrentIndexOfElementarySpine() const;
0182
0183 Standard_EXPORT GeomAbs_CurveType GetType() const;
0184
0185 Standard_EXPORT gp_Lin Line() const;
0186
0187 Standard_EXPORT gp_Circ Circle() const;
0188
0189
0190
0191
0192 ChFiDS_State FirstStatus() const;
0193
0194
0195 ChFiDS_State LastStatus() const;
0196
0197 ChFiDS_State Status (const Standard_Boolean IsFirst) const;
0198
0199
0200 ChFiDS_TypeOfConcavity GetTypeOfConcavity() const;
0201
0202 void SetStatus (const ChFiDS_State S, const Standard_Boolean IsFirst);
0203
0204
0205 void SetTypeOfConcavity (const ChFiDS_TypeOfConcavity theType);
0206
0207
0208
0209 Standard_Boolean IsTangencyExtremity (const Standard_Boolean IsFirst) const;
0210
0211 void SetTangencyExtremity (const Standard_Boolean IsTangency, const Standard_Boolean IsFirst);
0212
0213 Standard_EXPORT Standard_Real Absc (const TopoDS_Vertex& V) const;
0214
0215 Standard_EXPORT TopoDS_Vertex FirstVertex() const;
0216
0217 Standard_EXPORT TopoDS_Vertex LastVertex() const;
0218
0219 Standard_EXPORT void SetFirstTgt (const Standard_Real W);
0220
0221 Standard_EXPORT void SetLastTgt (const Standard_Real W);
0222
0223 Standard_EXPORT Standard_Boolean HasFirstTgt() const;
0224
0225 Standard_EXPORT Standard_Boolean HasLastTgt() const;
0226
0227
0228 Standard_EXPORT void SetReference (const Standard_Real W);
0229
0230
0231
0232 Standard_EXPORT void SetReference (const Standard_Integer I);
0233
0234 Standard_EXPORT Standard_Integer Index (const Standard_Real W, const Standard_Boolean Forward = Standard_True) const;
0235
0236 Standard_EXPORT Standard_Integer Index (const TopoDS_Edge& E) const;
0237
0238 Standard_EXPORT void UnsetReference();
0239
0240 Standard_EXPORT void SetErrorStatus (const ChFiDS_ErrorStatus state);
0241
0242 Standard_EXPORT ChFiDS_ErrorStatus ErrorStatus() const;
0243
0244
0245 Standard_EXPORT ChFiDS_ChamfMode Mode() const;
0246
0247
0248 Standard_EXPORT Standard_Real GetTolesp() const;
0249
0250
0251
0252 DEFINE_STANDARD_RTTIEXT(ChFiDS_Spine,Standard_Transient)
0253
0254 protected:
0255
0256
0257 Standard_Boolean splitdone;
0258 ChFiDS_ListOfHElSpine elspines;
0259 ChFiDS_ListOfHElSpine offset_elspines;
0260 ChFiDS_ChamfMode myMode;
0261
0262
0263 private:
0264
0265
0266 Standard_EXPORT void Prepare (Standard_Real& L, Standard_Integer& Index) const;
0267
0268 BRepAdaptor_Curve myCurve;
0269 BRepAdaptor_Curve myOffsetCurve;
0270 Standard_Integer indexofcurve;
0271 ChFiDS_TypeOfConcavity myTypeOfConcavity;
0272 ChFiDS_State firstState;
0273 ChFiDS_State lastState;
0274 TopTools_SequenceOfShape spine;
0275 TopTools_SequenceOfShape offsetspine;
0276 Handle(TColStd_HArray1OfReal) abscissa;
0277 Handle(TColStd_HArray1OfReal) offset_abscissa;
0278 Standard_Real tolesp;
0279 Standard_Real firstparam;
0280 Standard_Real lastparam;
0281 Standard_Boolean firstprolon;
0282 Standard_Boolean lastprolon;
0283 Standard_Boolean firstistgt;
0284 Standard_Boolean lastistgt;
0285 Standard_Real firsttgtpar;
0286 Standard_Real lasttgtpar;
0287 Standard_Boolean hasfirsttgt;
0288 Standard_Boolean haslasttgt;
0289 gp_Pnt firstori;
0290 gp_Pnt lastori;
0291 gp_Vec firsttgt;
0292 gp_Vec lasttgt;
0293 Standard_Real valref;
0294 Standard_Boolean hasref;
0295 ChFiDS_ErrorStatus errorstate;
0296
0297
0298 };
0299
0300
0301 #include <ChFiDS_Spine.lxx>
0302
0303
0304
0305
0306
0307 #endif