Warning, file /include/opencascade/BRepExtrema_OverlapTool.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 #ifndef _BRepExtrema_OverlapTool_HeaderFile
0017 #define _BRepExtrema_OverlapTool_HeaderFile
0018
0019 #include <BRepExtrema_TriangleSet.hxx>
0020 #include <BRepExtrema_ElementFilter.hxx>
0021 #include <BRepExtrema_MapOfIntegerPackedMapOfInteger.hxx>
0022 #include <BVH_Traverse.hxx>
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 class BRepExtrema_OverlapTool : public BVH_PairTraverse <Standard_Real, 3>
0039 {
0040 public:
0041
0042
0043 BRepExtrema_OverlapTool();
0044
0045
0046 BRepExtrema_OverlapTool (const Handle(BRepExtrema_TriangleSet)& theSet1,
0047 const Handle(BRepExtrema_TriangleSet)& theSet2);
0048
0049 public:
0050
0051
0052 void LoadTriangleSets (const Handle(BRepExtrema_TriangleSet)& theSet1,
0053 const Handle(BRepExtrema_TriangleSet)& theSet2);
0054
0055
0056 void Perform (const Standard_Real theTolerance = 0.0);
0057
0058
0059 Standard_Boolean IsDone() const { return myIsDone; }
0060
0061
0062 void MarkDirty() { myIsDone = Standard_False; }
0063
0064
0065 const BRepExtrema_MapOfIntegerPackedMapOfInteger& OverlapSubShapes1() const { return myOverlapSubShapes1; }
0066
0067
0068 const BRepExtrema_MapOfIntegerPackedMapOfInteger& OverlapSubShapes2() const { return myOverlapSubShapes2; }
0069
0070 #ifdef OVERLAP_TOOL_OUTPUT_TRIANGLES
0071
0072 const TColStd_PackedMapOfInteger& OverlapTriangles1() const { return myOverlapTriangles1; }
0073
0074
0075 const TColStd_PackedMapOfInteger& OverlapTriangles2() const { return myOverlapTriangles2; }
0076 #endif
0077
0078
0079 void SetElementFilter (BRepExtrema_ElementFilter* theFilter) { myFilter = theFilter; }
0080
0081
0082 public:
0083
0084
0085 Standard_EXPORT virtual Standard_Boolean RejectNode (const BVH_Vec3d& theCornerMin1,
0086 const BVH_Vec3d& theCornerMax1,
0087 const BVH_Vec3d& theCornerMin2,
0088 const BVH_Vec3d& theCornerMax2,
0089 Standard_Real&) const Standard_OVERRIDE;
0090
0091 Standard_EXPORT virtual Standard_Boolean Accept (const Standard_Integer theLeaf1,
0092 const Standard_Integer theLeaf2) Standard_OVERRIDE;
0093
0094
0095 protected:
0096
0097
0098 void intersectTrianglesExact (const Standard_Integer theTrgIdx1,
0099 const Standard_Integer theTrgIdx2);
0100
0101
0102 void intersectTrianglesToler (const Standard_Integer theTrgIdx1,
0103 const Standard_Integer theTrgIdx2,
0104 const Standard_Real theToler);
0105
0106 private:
0107
0108
0109 Handle(BRepExtrema_TriangleSet) mySet1;
0110
0111 Handle(BRepExtrema_TriangleSet) mySet2;
0112
0113
0114 BRepExtrema_ElementFilter* myFilter;
0115
0116
0117 BRepExtrema_MapOfIntegerPackedMapOfInteger myOverlapSubShapes1;
0118
0119 BRepExtrema_MapOfIntegerPackedMapOfInteger myOverlapSubShapes2;
0120
0121 #ifdef OVERLAP_TOOL_OUTPUT_TRIANGLES
0122
0123 TColStd_PackedMapOfInteger myOverlapTriangles1;
0124
0125 TColStd_PackedMapOfInteger myOverlapTriangles2;
0126 #endif
0127
0128
0129 Standard_Boolean myIsDone;
0130
0131 Standard_Real myTolerance;
0132 };
0133
0134 #endif