File indexing completed on 2025-01-18 10:05:24
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _TopOpeBRep_FacesIntersector_HeaderFile
0018 #define _TopOpeBRep_FacesIntersector_HeaderFile
0019
0020 #include <BRepAdaptor_Surface.hxx>
0021 #include <GeomAbs_SurfaceType.hxx>
0022 #include <IntPatch_Intersection.hxx>
0023 #include <TopAbs_ShapeEnum.hxx>
0024 #include <TopOpeBRep_HArray1OfLineInter.hxx>
0025 #include <TopoDS_Face.hxx>
0026 #include <TopTools_IndexedMapOfShape.hxx>
0027
0028 class BRepTopAdaptor_TopolTool;
0029 class Bnd_Box;
0030
0031
0032 class TopOpeBRep_FacesIntersector
0033 {
0034 public:
0035
0036 DEFINE_STANDARD_ALLOC
0037
0038
0039 Standard_EXPORT TopOpeBRep_FacesIntersector();
0040
0041
0042 Standard_EXPORT void Perform (const TopoDS_Shape& S1, const TopoDS_Shape& S2);
0043
0044
0045 Standard_EXPORT void Perform (const TopoDS_Shape& S1, const TopoDS_Shape& S2, const Bnd_Box& B1, const Bnd_Box& B2);
0046
0047 Standard_EXPORT Standard_Boolean IsEmpty();
0048
0049 Standard_EXPORT Standard_Boolean IsDone() const;
0050
0051
0052
0053 Standard_EXPORT Standard_Boolean SameDomain() const;
0054
0055
0056 Standard_EXPORT const TopoDS_Shape& Face (const Standard_Integer Index) const;
0057
0058
0059
0060
0061 Standard_EXPORT Standard_Boolean SurfacesSameOriented() const;
0062
0063
0064
0065 Standard_EXPORT Standard_Boolean IsRestriction (const TopoDS_Shape& E) const;
0066
0067
0068 Standard_EXPORT const TopTools_IndexedMapOfShape& Restrictions() const;
0069
0070 Standard_EXPORT void PrepareLines();
0071
0072 Standard_EXPORT Handle(TopOpeBRep_HArray1OfLineInter) Lines();
0073
0074 Standard_EXPORT Standard_Integer NbLines() const;
0075
0076 Standard_EXPORT void InitLine();
0077
0078 Standard_EXPORT Standard_Boolean MoreLine() const;
0079
0080 Standard_EXPORT void NextLine();
0081
0082 Standard_EXPORT TopOpeBRep_LineInter& CurrentLine();
0083
0084 Standard_EXPORT Standard_Integer CurrentLineIndex() const;
0085
0086 Standard_EXPORT TopOpeBRep_LineInter& ChangeLine (const Standard_Integer IL);
0087
0088
0089
0090 Standard_EXPORT void ForceTolerances (const Standard_Real tolarc, const Standard_Real toltang);
0091
0092
0093
0094
0095
0096 Standard_EXPORT void GetTolerances (Standard_Real& tolarc, Standard_Real& toltang) const;
0097
0098
0099
0100
0101 protected:
0102
0103
0104
0105
0106
0107 private:
0108
0109
0110 Standard_EXPORT void FindLine();
0111
0112 Standard_EXPORT void ResetIntersection();
0113
0114
0115
0116
0117
0118
0119 Standard_EXPORT void ShapeTolerances (const TopoDS_Shape& S1, const TopoDS_Shape& S2);
0120
0121
0122
0123
0124
0125 Standard_EXPORT Standard_Real ToleranceMax (const TopoDS_Shape& S, const TopAbs_ShapeEnum T) const;
0126
0127
0128 IntPatch_Intersection myIntersector;
0129 Standard_Boolean myIntersectionDone;
0130 Standard_Real myTol1;
0131 Standard_Real myTol2;
0132 Standard_Boolean myForceTolerances;
0133 Handle(TopOpeBRep_HArray1OfLineInter) myHAL;
0134 TopOpeBRep_LineInter myLine;
0135 Standard_Integer myLineIndex;
0136 Standard_Boolean myLineFound;
0137 Standard_Integer myLineNb;
0138 TopoDS_Face myFace1;
0139 TopoDS_Face myFace2;
0140 Handle(BRepAdaptor_Surface) mySurface1;
0141 Handle(BRepAdaptor_Surface) mySurface2;
0142 GeomAbs_SurfaceType mySurfaceType1;
0143 GeomAbs_SurfaceType mySurfaceType2;
0144 Standard_Boolean mySurfacesSameOriented;
0145 Handle(BRepTopAdaptor_TopolTool) myDomain1;
0146 Handle(BRepTopAdaptor_TopolTool) myDomain2;
0147 TopTools_IndexedMapOfShape myEdgeRestrictionMap;
0148 TopoDS_Shape myNullShape;
0149
0150
0151 };
0152
0153
0154
0155
0156
0157
0158
0159 #endif