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