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