File indexing completed on 2025-01-18 10:04:15
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef MeshTest_CheckTopology_HeaderFile
0017 #define MeshTest_CheckTopology_HeaderFile
0018
0019 #include <TopoDS_Shape.hxx>
0020 #include <NCollection_IndexedDataMap.hxx>
0021 #include <TColStd_HSequenceOfInteger.hxx>
0022 #include <TColStd_SequenceOfReal.hxx>
0023 #include <Draw_Interpretor.hxx>
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040 class MeshTest_CheckTopology
0041 {
0042 public:
0043
0044 MeshTest_CheckTopology(const TopoDS_Shape& theShape)
0045 : myShape(theShape) {}
0046
0047
0048 Standard_EXPORT void Perform(Draw_Interpretor& di);
0049
0050
0051 Standard_Integer NbFacesWithFL() const
0052 { return myMapFaceLinks.Extent(); }
0053
0054
0055
0056 Standard_Integer GetFaceNumWithFL(const Standard_Integer theIndex) const
0057 { return myMapFaceLinks.FindKey(theIndex); }
0058
0059
0060 Standard_Integer NbFreeLinks(const Standard_Integer theIndex) const
0061 { return myMapFaceLinks(theIndex)->Length() / 2; }
0062
0063
0064
0065 Standard_EXPORT void GetFreeLink(const Standard_Integer theFaceIndex,
0066 const Standard_Integer theLinkIndex,
0067 Standard_Integer& theNode1,
0068 Standard_Integer& theNode2) const;
0069
0070
0071 Standard_Integer NbCrossFaceErrors() const
0072 { return myErrorsVal.Length(); }
0073
0074
0075 Standard_EXPORT void GetCrossFaceError(const Standard_Integer theIndex,
0076 Standard_Integer& theFace1,
0077 Standard_Integer& theNode1,
0078 Standard_Integer& theFace2,
0079 Standard_Integer& theNode2,
0080 Standard_Real& theValue) const;
0081
0082
0083 Standard_Integer NbAsyncEdges() const
0084 { return myAsyncEdges.Length(); }
0085
0086
0087 Standard_Integer GetAsyncEdgeNum(const Standard_Integer theIndex) const
0088 { return myAsyncEdges(theIndex); }
0089
0090
0091 Standard_Integer NbFreeNodes() const
0092 { return myFreeNodeFaces.Length(); }
0093
0094
0095
0096 void GetFreeNodeNum (const Standard_Integer theIndex,
0097 Standard_Integer& theFaceNum,
0098 Standard_Integer& theNodeNum) const
0099 {
0100 theFaceNum = myFreeNodeFaces(theIndex);
0101 theNodeNum = myFreeNodeNums(theIndex);
0102 }
0103
0104
0105 Standard_Integer NbSmallTriangles() const
0106 {
0107 return mySmallTrianglesFaces.Length();
0108 }
0109
0110
0111
0112
0113 void GetSmallTriangle(const Standard_Integer theIndex,
0114 Standard_Integer& theFaceNum,
0115 Standard_Integer& theNodeNum) const
0116 {
0117 theFaceNum = mySmallTrianglesFaces(theIndex);
0118 theNodeNum = mySmallTrianglesTriangles(theIndex);
0119 }
0120
0121 private:
0122 TopoDS_Shape myShape;
0123 NCollection_IndexedDataMap<Standard_Integer,Handle(TColStd_HSequenceOfInteger)>
0124 myMapFaceLinks;
0125
0126 TColStd_SequenceOfInteger myErrors;
0127 TColStd_SequenceOfReal myErrorsVal;
0128
0129 TColStd_SequenceOfInteger myAsyncEdges;
0130 TColStd_SequenceOfInteger myFreeNodeFaces;
0131 TColStd_SequenceOfInteger myFreeNodeNums;
0132 TColStd_SequenceOfInteger mySmallTrianglesFaces;
0133 TColStd_SequenceOfInteger mySmallTrianglesTriangles;
0134
0135 };
0136
0137 #endif