File indexing completed on 2025-01-18 10:04:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _IntTools_Context_HeaderFile
0016 #define _IntTools_Context_HeaderFile
0017
0018 #include <Standard.hxx>
0019 #include <Standard_Type.hxx>
0020
0021 #include <NCollection_BaseAllocator.hxx>
0022 #include <NCollection_DataMap.hxx>
0023 #include <TopTools_ShapeMapHasher.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <Precision.hxx>
0026 #include <Standard_Transient.hxx>
0027 #include <TopAbs_State.hxx>
0028 #include <BRepAdaptor_Surface.hxx>
0029 class IntTools_FClass2d;
0030 class TopoDS_Face;
0031 class GeomAPI_ProjectPointOnSurf;
0032 class GeomAPI_ProjectPointOnCurve;
0033 class TopoDS_Edge;
0034 class Geom_Curve;
0035 class IntTools_SurfaceRangeLocalizeData;
0036 class BRepClass3d_SolidClassifier;
0037 class TopoDS_Solid;
0038 class Geom2dHatch_Hatcher;
0039 class gp_Pnt;
0040 class TopoDS_Vertex;
0041 class gp_Pnt2d;
0042 class IntTools_Curve;
0043 class Bnd_Box;
0044 class Bnd_OBB;
0045
0046
0047
0048
0049
0050 class IntTools_Context : public Standard_Transient
0051 {
0052 public:
0053
0054
0055 Standard_EXPORT IntTools_Context();
0056 Standard_EXPORT virtual ~IntTools_Context();
0057
0058 Standard_EXPORT IntTools_Context(const Handle(NCollection_BaseAllocator)& theAllocator);
0059
0060
0061
0062
0063 Standard_EXPORT IntTools_FClass2d& FClass2d (const TopoDS_Face& aF);
0064
0065
0066
0067
0068 Standard_EXPORT GeomAPI_ProjectPointOnSurf& ProjPS (const TopoDS_Face& aF);
0069
0070
0071
0072
0073 Standard_EXPORT GeomAPI_ProjectPointOnCurve& ProjPC (const TopoDS_Edge& aE);
0074
0075
0076
0077
0078 Standard_EXPORT GeomAPI_ProjectPointOnCurve& ProjPT (const Handle(Geom_Curve)& aC);
0079
0080
0081
0082
0083 Standard_EXPORT IntTools_SurfaceRangeLocalizeData& SurfaceData (const TopoDS_Face& aF);
0084
0085
0086
0087
0088 Standard_EXPORT BRepClass3d_SolidClassifier& SolidClassifier (const TopoDS_Solid& aSolid);
0089
0090
0091
0092
0093 Standard_EXPORT Geom2dHatch_Hatcher& Hatcher (const TopoDS_Face& aF);
0094
0095
0096 Standard_EXPORT BRepAdaptor_Surface& SurfaceAdaptor (const TopoDS_Face& theFace);
0097
0098
0099
0100 Standard_EXPORT Bnd_OBB& OBB(const TopoDS_Shape& theShape,
0101 const Standard_Real theFuzzyValue = Precision::Confusion());
0102
0103
0104 Standard_EXPORT void UVBounds (const TopoDS_Face& theFace,
0105 Standard_Real& UMin,
0106 Standard_Real& UMax,
0107 Standard_Real& VMin,
0108 Standard_Real& VMax);
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119 Standard_EXPORT Standard_Integer ComputePE (const gp_Pnt& theP, const Standard_Real theTolP,
0120 const TopoDS_Edge& theE, Standard_Real& theT,
0121 Standard_Real& theDist);
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134 Standard_EXPORT Standard_Integer ComputeVE (const TopoDS_Vertex& theV,
0135 const TopoDS_Edge& theE,
0136 Standard_Real& theT,
0137 Standard_Real& theTol,
0138 const Standard_Real theFuzz = Precision::Confusion());
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150 Standard_EXPORT Standard_Integer ComputeVF (const TopoDS_Vertex& theVertex,
0151 const TopoDS_Face& theFace,
0152 Standard_Real& theU,
0153 Standard_Real& theV,
0154 Standard_Real& theTol,
0155 const Standard_Real theFuzz = Precision::Confusion());
0156
0157
0158
0159
0160 Standard_EXPORT TopAbs_State StatePointFace (const TopoDS_Face& aF, const gp_Pnt2d& aP2D);
0161
0162
0163
0164
0165
0166 Standard_EXPORT Standard_Boolean IsPointInFace (const TopoDS_Face& aF, const gp_Pnt2d& aP2D);
0167
0168
0169
0170
0171
0172 Standard_EXPORT Standard_Boolean IsPointInFace (const gp_Pnt& aP3D, const TopoDS_Face& aF, const Standard_Real aTol);
0173
0174
0175
0176
0177 Standard_EXPORT Standard_Boolean IsPointInOnFace (const TopoDS_Face& aF, const gp_Pnt2d& aP2D);
0178
0179
0180
0181
0182
0183
0184 Standard_EXPORT Standard_Boolean IsValidPointForFace (const gp_Pnt& aP3D, const TopoDS_Face& aF, const Standard_Real aTol);
0185
0186
0187
0188
0189 Standard_EXPORT Standard_Boolean IsValidPointForFaces (const gp_Pnt& aP3D, const TopoDS_Face& aF1, const TopoDS_Face& aF2, const Standard_Real aTol);
0190
0191
0192
0193
0194
0195 Standard_EXPORT Standard_Boolean IsValidBlockForFace (const Standard_Real aT1, const Standard_Real aT2, const IntTools_Curve& aIC, const TopoDS_Face& aF, const Standard_Real aTol);
0196
0197
0198
0199
0200 Standard_EXPORT Standard_Boolean IsValidBlockForFaces (const Standard_Real aT1, const Standard_Real aT2, const IntTools_Curve& aIC, const TopoDS_Face& aF1, const TopoDS_Face& aF2, const Standard_Real aTol);
0201
0202
0203
0204
0205
0206
0207
0208
0209 Standard_EXPORT Standard_Boolean IsVertexOnLine (const TopoDS_Vertex& aV, const IntTools_Curve& aIC, const Standard_Real aTolC, Standard_Real& aT);
0210
0211
0212
0213
0214
0215
0216
0217
0218 Standard_EXPORT Standard_Boolean IsVertexOnLine (const TopoDS_Vertex& aV, const Standard_Real aTolV, const IntTools_Curve& aIC, const Standard_Real aTolC, Standard_Real& aT);
0219
0220
0221
0222
0223
0224
0225 Standard_EXPORT Standard_Boolean ProjectPointOnEdge (const gp_Pnt& aP, const TopoDS_Edge& aE, Standard_Real& aT);
0226
0227 Standard_EXPORT Bnd_Box& BndBox (const TopoDS_Shape& theS);
0228
0229
0230
0231 Standard_EXPORT Standard_Boolean IsInfiniteFace (const TopoDS_Face& theFace);
0232
0233
0234
0235
0236 Standard_EXPORT void SetPOnSProjectionTolerance (const Standard_Real theValue);
0237
0238
0239
0240 DEFINE_STANDARD_RTTIEXT(IntTools_Context,Standard_Transient)
0241
0242 protected:
0243
0244 Handle(NCollection_BaseAllocator) myAllocator;
0245 NCollection_DataMap<TopoDS_Shape, IntTools_FClass2d*, TopTools_ShapeMapHasher> myFClass2dMap;
0246 NCollection_DataMap<TopoDS_Shape, GeomAPI_ProjectPointOnSurf*, TopTools_ShapeMapHasher> myProjPSMap;
0247 NCollection_DataMap<TopoDS_Shape, GeomAPI_ProjectPointOnCurve*, TopTools_ShapeMapHasher> myProjPCMap;
0248 NCollection_DataMap<TopoDS_Shape, BRepClass3d_SolidClassifier*, TopTools_ShapeMapHasher> mySClassMap;
0249 NCollection_DataMap<Handle(Geom_Curve), GeomAPI_ProjectPointOnCurve*> myProjPTMap;
0250 NCollection_DataMap<TopoDS_Shape, Geom2dHatch_Hatcher*, TopTools_ShapeMapHasher> myHatcherMap;
0251 NCollection_DataMap<TopoDS_Shape, IntTools_SurfaceRangeLocalizeData*, TopTools_ShapeMapHasher> myProjSDataMap;
0252 NCollection_DataMap<TopoDS_Shape, Bnd_Box*, TopTools_ShapeMapHasher> myBndBoxDataMap;
0253 NCollection_DataMap<TopoDS_Shape, BRepAdaptor_Surface*, TopTools_ShapeMapHasher> mySurfAdaptorMap;
0254 NCollection_DataMap<TopoDS_Shape, Bnd_OBB*, TopTools_ShapeMapHasher> myOBBMap;
0255 Standard_Integer myCreateFlag;
0256 Standard_Real myPOnSTolerance;
0257
0258 private:
0259
0260
0261
0262 Standard_EXPORT void clearCachedPOnSProjectors();
0263
0264 };
0265
0266 DEFINE_STANDARD_HANDLE(IntTools_Context, Standard_Transient)
0267
0268 #endif