File indexing completed on 2025-01-18 10:03:10
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _BRepExtrema_SelfIntersection_HeaderFile
0017 #define _BRepExtrema_SelfIntersection_HeaderFile
0018
0019 #include <BRepExtrema_OverlapTool.hxx>
0020
0021 #include <TopoDS.hxx>
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 class BRepExtrema_SelfIntersection : public BRepExtrema_ElementFilter
0035 {
0036 friend class BRepExtrema_OverlapTool;
0037
0038 public:
0039
0040
0041 Standard_EXPORT BRepExtrema_SelfIntersection (const Standard_Real theTolerance = 0.0);
0042
0043
0044 Standard_EXPORT BRepExtrema_SelfIntersection (const TopoDS_Shape& theShape, const Standard_Real theTolerance = 0.0);
0045
0046 public:
0047
0048
0049 Standard_Real Tolerance() const
0050 {
0051 return myTolerance;
0052 }
0053
0054
0055 void SetTolerance (const Standard_Real theTolerance)
0056 {
0057 myTolerance = theTolerance;
0058 }
0059
0060
0061 Standard_EXPORT Standard_Boolean LoadShape (const TopoDS_Shape& theShape);
0062
0063
0064 Standard_EXPORT void Perform();
0065
0066
0067 Standard_Boolean IsDone() const
0068 {
0069 return myOverlapTool.IsDone();
0070 }
0071
0072
0073 const BRepExtrema_MapOfIntegerPackedMapOfInteger& OverlapElements() const
0074 {
0075 return myOverlapTool.OverlapSubShapes1();
0076 }
0077
0078
0079 const TopoDS_Face& GetSubShape (const Standard_Integer theID) const
0080 {
0081 return TopoDS::Face(myFaceList.Value(theID));
0082 }
0083
0084
0085 const Handle(BRepExtrema_TriangleSet)& ElementSet() const
0086 {
0087 return myElementSet;
0088 }
0089
0090 #ifdef OVERLAP_TOOL_OUTPUT_TRIANGLES
0091
0092 const TColStd_PackedMapOfInteger& OverlapTriangles() const
0093 {
0094 return myOverlapTool.OverlapTriangles1();
0095 }
0096 #endif
0097
0098 protected:
0099
0100
0101 Standard_EXPORT virtual BRepExtrema_ElementFilter::FilterResult PreCheckElements (const Standard_Integer theIndex1,
0102 const Standard_Integer theIndex2);
0103
0104
0105 Standard_EXPORT BRepExtrema_ElementFilter::FilterResult isRegularSharedVertex (const BVH_Vec3d& theSharedVert,
0106 const BVH_Vec3d& theTrng1Vtxs1,
0107 const BVH_Vec3d& theTrng1Vtxs2,
0108 const BVH_Vec3d& theTrng2Vtxs1,
0109 const BVH_Vec3d& theTrng2Vtxs2);
0110
0111
0112 Standard_EXPORT BRepExtrema_ElementFilter::FilterResult isRegularSharedEdge (const BVH_Vec3d& theTrng1Vtxs0,
0113 const BVH_Vec3d& theTrng1Vtxs1,
0114 const BVH_Vec3d& theTrng1Vtxs2,
0115 const BVH_Vec3d& theTrng2Vtxs2);
0116
0117 private:
0118
0119
0120 Standard_Real myTolerance;
0121
0122
0123 Standard_Boolean myIsInit;
0124
0125
0126 BRepExtrema_ShapeList myFaceList;
0127
0128
0129 Handle(BRepExtrema_TriangleSet) myElementSet;
0130
0131
0132 BRepExtrema_OverlapTool myOverlapTool;
0133
0134 };
0135
0136 #endif