File indexing completed on 2025-01-18 10:03:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Contap_TheIWalking_HeaderFile
0018 #define _Contap_TheIWalking_HeaderFile
0019
0020 #include <Adaptor3d_Surface.hxx>
0021 #include <IntSurf_SequenceOfPathPoint.hxx>
0022 #include <math_Vector.hxx>
0023 #include <IntWalk_VectorOfWalkingData.hxx>
0024 #include <IntWalk_VectorOfInteger.hxx>
0025 #include <IntSurf_PntOn2S.hxx>
0026 #include <gp_Vec.hxx>
0027 #include <gp_Dir2d.hxx>
0028 #include <TColStd_SequenceOfInteger.hxx>
0029 #include <TColStd_DataMapOfIntegerListOfInteger.hxx>
0030 #include <Contap_SequenceOfIWLineOfTheIWalking.hxx>
0031 #include <IntSurf_SequenceOfInteriorPoint.hxx>
0032 #include <TColStd_SequenceOfReal.hxx>
0033 #include <IntWalk_StatusDeflection.hxx>
0034 #include <Bnd_Range.hxx>
0035
0036 class IntSurf_PathPoint;
0037 class IntSurf_PathPointTool;
0038 class IntSurf_InteriorPoint;
0039 class IntSurf_InteriorPointTool;
0040 class Adaptor3d_HSurfaceTool;
0041 class Contap_SurfFunction;
0042 class Contap_TheIWLineOfTheIWalking;
0043 class math_FunctionSetRoot;
0044
0045 class Contap_TheIWalking
0046 {
0047 public:
0048
0049 DEFINE_STANDARD_ALLOC
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061 Standard_EXPORT Contap_TheIWalking(const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Step,
0062 const Standard_Boolean theToFillHoles = Standard_False);
0063
0064
0065
0066
0067
0068
0069
0070 void SetTolerance (const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Step);
0071
0072
0073
0074
0075 Standard_EXPORT void Perform (const IntSurf_SequenceOfPathPoint& Pnts1, const IntSurf_SequenceOfInteriorPoint& Pnts2, Contap_SurfFunction& Func, const Handle(Adaptor3d_Surface)& S, const Standard_Boolean Reversed = Standard_False);
0076
0077
0078
0079 Standard_EXPORT void Perform (const IntSurf_SequenceOfPathPoint& Pnts1, Contap_SurfFunction& Func, const Handle(Adaptor3d_Surface)& S, const Standard_Boolean Reversed = Standard_False);
0080
0081
0082 Standard_Boolean IsDone() const;
0083
0084
0085
0086 Standard_Integer NbLines() const;
0087
0088
0089
0090
0091 const Handle(Contap_TheIWLineOfTheIWalking)& Value (const Standard_Integer Index) const;
0092
0093
0094
0095
0096 Standard_Integer NbSinglePnts() const;
0097
0098
0099
0100
0101
0102 const IntSurf_PathPoint& SinglePnt (const Standard_Integer Index) const;
0103
0104
0105
0106
0107 protected:
0108
0109
0110 Standard_EXPORT Standard_Boolean Cadrage (math_Vector& BornInf, math_Vector& BornSup, math_Vector& UVap, Standard_Real& Step, const Standard_Integer StepSign) const;
0111
0112 Standard_EXPORT Standard_Boolean TestArretPassage (const TColStd_SequenceOfReal& Umult, const TColStd_SequenceOfReal& Vmult, Contap_SurfFunction& Section, math_Vector& UV, Standard_Integer& Irang);
0113
0114 Standard_EXPORT Standard_Boolean TestArretPassage (const TColStd_SequenceOfReal& Umult, const TColStd_SequenceOfReal& Vmult, const math_Vector& UV, const Standard_Integer Index, Standard_Integer& Irang);
0115
0116 Standard_EXPORT Standard_Boolean TestArretAjout (Contap_SurfFunction& Section, math_Vector& UV, Standard_Integer& Irang, IntSurf_PntOn2S& PSol);
0117
0118 Standard_EXPORT void FillPntsInHoles (Contap_SurfFunction& Section,
0119 TColStd_SequenceOfInteger& CopySeqAlone,
0120 IntSurf_SequenceOfInteriorPoint& PntsInHoles);
0121
0122 Standard_EXPORT void TestArretCadre (const TColStd_SequenceOfReal& Umult, const TColStd_SequenceOfReal& Vmult, const Handle(Contap_TheIWLineOfTheIWalking)& Line, Contap_SurfFunction& Section, math_Vector& UV, Standard_Integer& Irang);
0123
0124 Standard_EXPORT IntWalk_StatusDeflection TestDeflection (Contap_SurfFunction& Section, const Standard_Boolean Finished, const math_Vector& UV, const IntWalk_StatusDeflection StatusPrecedent, Standard_Integer& NbDivision, Standard_Real& Step, const Standard_Integer StepSign);
0125
0126 Standard_EXPORT void ComputeOpenLine (const TColStd_SequenceOfReal& Umult, const TColStd_SequenceOfReal& Vmult, const IntSurf_SequenceOfPathPoint& Pnts1, Contap_SurfFunction& Section, Standard_Boolean& Rajout);
0127
0128 Standard_EXPORT void OpenLine (const Standard_Integer N, const IntSurf_PntOn2S& Psol, const IntSurf_SequenceOfPathPoint& Pnts1, Contap_SurfFunction& Section, const Handle(Contap_TheIWLineOfTheIWalking)& Line);
0129
0130 Standard_EXPORT Standard_Boolean IsValidEndPoint (const Standard_Integer IndOfPoint, const Standard_Integer IndOfLine);
0131
0132 Standard_EXPORT void RemoveTwoEndPoints (const Standard_Integer IndOfPoint);
0133
0134 Standard_EXPORT Standard_Boolean IsPointOnLine (const gp_Pnt2d& theP2d, const Standard_Integer Irang);
0135
0136 Standard_EXPORT void ComputeCloseLine (const TColStd_SequenceOfReal& Umult, const TColStd_SequenceOfReal& Vmult, const IntSurf_SequenceOfPathPoint& Pnts1, const IntSurf_SequenceOfInteriorPoint& Pnts2, Contap_SurfFunction& Section, Standard_Boolean& Rajout);
0137
0138 Standard_EXPORT void AddPointInCurrentLine (const Standard_Integer N, const IntSurf_PathPoint& PathPnt, const Handle(Contap_TheIWLineOfTheIWalking)& CurrentLine) const;
0139
0140 Standard_EXPORT void MakeWalkingPoint (const Standard_Integer Case, const Standard_Real U, const Standard_Real V, Contap_SurfFunction& Section, IntSurf_PntOn2S& Psol);
0141
0142
0143 Standard_EXPORT void Clear();
0144
0145
0146 Standard_EXPORT Standard_Boolean IsPointOnLine(const IntSurf_PntOn2S& thePOn2S,
0147 const math_Vector& theInfBounds,
0148 const math_Vector& theSupBounds,
0149 math_FunctionSetRoot& theSolver,
0150 Contap_SurfFunction& theFunc);
0151
0152
0153 private:
0154
0155
0156
0157 Standard_Boolean done;
0158 IntSurf_SequenceOfPathPoint seqSingle;
0159 Standard_Real fleche;
0160 Standard_Real pas;
0161 math_Vector tolerance;
0162 Standard_Real epsilon;
0163 Standard_Boolean reversed;
0164 IntWalk_VectorOfWalkingData wd1;
0165 IntWalk_VectorOfWalkingData wd2;
0166 IntWalk_VectorOfInteger nbMultiplicities;
0167 Bnd_Range mySRangeU;
0168 Bnd_Range mySRangeV;
0169 Standard_Real Um;
0170 Standard_Real UM;
0171 Standard_Real Vm;
0172 Standard_Real VM;
0173 IntSurf_PntOn2S previousPoint;
0174 gp_Vec previousd3d;
0175 gp_Dir2d previousd2d;
0176 TColStd_SequenceOfInteger seqAjout;
0177 TColStd_SequenceOfInteger seqAlone;
0178 TColStd_DataMapOfIntegerListOfInteger PointLineLine;
0179 Contap_SequenceOfIWLineOfTheIWalking lines;
0180 Standard_Boolean ToFillHoles;
0181
0182
0183 };
0184
0185 #define ThePointOfPath IntSurf_PathPoint
0186 #define ThePointOfPath_hxx <IntSurf_PathPoint.hxx>
0187 #define ThePointOfPathTool IntSurf_PathPointTool
0188 #define ThePointOfPathTool_hxx <IntSurf_PathPointTool.hxx>
0189 #define ThePOPIterator IntSurf_SequenceOfPathPoint
0190 #define ThePOPIterator_hxx <IntSurf_SequenceOfPathPoint.hxx>
0191 #define ThePointOfLoop IntSurf_InteriorPoint
0192 #define ThePointOfLoop_hxx <IntSurf_InteriorPoint.hxx>
0193 #define ThePointOfLoopTool IntSurf_InteriorPointTool
0194 #define ThePointOfLoopTool_hxx <IntSurf_InteriorPointTool.hxx>
0195 #define ThePOLIterator IntSurf_SequenceOfInteriorPoint
0196 #define ThePOLIterator_hxx <IntSurf_SequenceOfInteriorPoint.hxx>
0197 #define ThePSurface Handle(Adaptor3d_Surface)
0198 #define ThePSurface_hxx <Adaptor3d_Surface.hxx>
0199 #define ThePSurfaceTool Adaptor3d_HSurfaceTool
0200 #define ThePSurfaceTool_hxx <Adaptor3d_HSurfaceTool.hxx>
0201 #define TheIWFunction Contap_SurfFunction
0202 #define TheIWFunction_hxx <Contap_SurfFunction.hxx>
0203 #define IntWalk_TheIWLine Contap_TheIWLineOfTheIWalking
0204 #define IntWalk_TheIWLine_hxx <Contap_TheIWLineOfTheIWalking.hxx>
0205 #define IntWalk_SequenceOfIWLine Contap_SequenceOfIWLineOfTheIWalking
0206 #define IntWalk_SequenceOfIWLine_hxx <Contap_SequenceOfIWLineOfTheIWalking.hxx>
0207 #define Handle_IntWalk_TheIWLine Handle(Contap_TheIWLineOfTheIWalking)
0208 #define IntWalk_IWalking Contap_TheIWalking
0209 #define IntWalk_IWalking_hxx <Contap_TheIWalking.hxx>
0210
0211 #include <IntWalk_IWalking.lxx>
0212
0213 #undef ThePointOfPath
0214 #undef ThePointOfPath_hxx
0215 #undef ThePointOfPathTool
0216 #undef ThePointOfPathTool_hxx
0217 #undef ThePOPIterator
0218 #undef ThePOPIterator_hxx
0219 #undef ThePointOfLoop
0220 #undef ThePointOfLoop_hxx
0221 #undef ThePointOfLoopTool
0222 #undef ThePointOfLoopTool_hxx
0223 #undef ThePOLIterator
0224 #undef ThePOLIterator_hxx
0225 #undef ThePSurface
0226 #undef ThePSurface_hxx
0227 #undef ThePSurfaceTool
0228 #undef ThePSurfaceTool_hxx
0229 #undef TheIWFunction
0230 #undef TheIWFunction_hxx
0231 #undef IntWalk_TheIWLine
0232 #undef IntWalk_TheIWLine_hxx
0233 #undef IntWalk_SequenceOfIWLine
0234 #undef IntWalk_SequenceOfIWLine_hxx
0235 #undef Handle_IntWalk_TheIWLine
0236 #undef IntWalk_IWalking
0237 #undef IntWalk_IWalking_hxx
0238
0239
0240
0241
0242 #endif