File indexing completed on 2026-09-19 09:28:32
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _MAT2d_Tool2d_HeaderFile
0018 #define _MAT2d_Tool2d_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <GeomAbs_JoinType.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <Bisector_Bisec.hxx>
0027 #include <NCollection_DataMap.hxx>
0028 #include <gp_Pnt2d.hxx>
0029 #include <gp_Vec2d.hxx>
0030 #include <NCollection_Sequence.hxx>
0031 #include <MAT_Side.hxx>
0032 class MAT2d_Circuit;
0033 class MAT_Bisector;
0034 class Bisector_Bisec;
0035 class Geom2d_Geometry;
0036 class gp_Pnt2d;
0037 class gp_Vec2d;
0038
0039
0040
0041 class MAT2d_Tool2d
0042 {
0043 public:
0044 DEFINE_STANDARD_ALLOC
0045
0046
0047 Standard_EXPORT MAT2d_Tool2d();
0048
0049
0050 Standard_EXPORT void Sense(const MAT_Side aside);
0051
0052 Standard_EXPORT void SetJoinType(const GeomAbs_JoinType aJoinType);
0053
0054
0055
0056
0057 Standard_EXPORT void InitItems(const occ::handle<MAT2d_Circuit>& aCircuit);
0058
0059
0060 Standard_EXPORT int NumberOfItems() const;
0061
0062
0063 Standard_EXPORT double ToleranceOfConfusion() const;
0064
0065
0066
0067
0068
0069 Standard_EXPORT int FirstPoint(const int anitem, double& dist);
0070
0071
0072
0073
0074 Standard_EXPORT int TangentBefore(const int anitem, const bool IsOpenResult);
0075
0076
0077
0078
0079 Standard_EXPORT int TangentAfter(const int anitem, const bool IsOpenResult);
0080
0081
0082
0083
0084 Standard_EXPORT int Tangent(const int bisector);
0085
0086
0087 Standard_EXPORT void CreateBisector(const occ::handle<MAT_Bisector>& abisector);
0088
0089
0090
0091
0092
0093 Standard_EXPORT bool TrimBisector(const occ::handle<MAT_Bisector>& abisector);
0094
0095
0096
0097
0098
0099 Standard_EXPORT bool TrimBisector(const occ::handle<MAT_Bisector>& abisector, const int apoint);
0100
0101
0102
0103
0104
0105
0106
0107 Standard_EXPORT double IntersectBisector(const occ::handle<MAT_Bisector>& bisectorone,
0108 const occ::handle<MAT_Bisector>& bisectortwo,
0109 int& intpnt);
0110
0111
0112
0113 Standard_EXPORT double Distance(const occ::handle<MAT_Bisector>& abisector,
0114 const double param1,
0115 const double param2) const;
0116
0117
0118
0119 Standard_EXPORT void Dump(const int bisector, const int erease) const;
0120
0121
0122
0123 Standard_EXPORT const Bisector_Bisec& GeomBis(const int Index) const;
0124
0125
0126 Standard_EXPORT occ::handle<Geom2d_Geometry> GeomElt(const int Index) const;
0127
0128
0129 Standard_EXPORT const gp_Pnt2d& GeomPnt(const int Index) const;
0130
0131
0132
0133 Standard_EXPORT const gp_Vec2d& GeomVec(const int Index) const;
0134
0135 Standard_EXPORT occ::handle<MAT2d_Circuit> Circuit() const;
0136
0137 Standard_EXPORT void BisecFusion(const int Index1, const int Index2);
0138
0139
0140
0141 Standard_EXPORT Bisector_Bisec& ChangeGeomBis(const int Index);
0142
0143 private:
0144
0145
0146
0147
0148
0149 Standard_EXPORT bool IsSameDistance(const occ::handle<MAT_Bisector>& bisectorone,
0150 const occ::handle<MAT_Bisector>& bisectortwo,
0151 const gp_Pnt2d& apoint,
0152 double& adistance) const;
0153
0154
0155
0156
0157
0158 Standard_EXPORT bool Projection(const int IndexElt,
0159 const gp_Pnt2d& Point,
0160 double& Distance) const;
0161
0162 Standard_EXPORT void TrimBisec(Bisector_Bisec& Bis,
0163 const int IndexEdge,
0164 const bool OnLine,
0165 const int StartOrEnd) const;
0166
0167 double theDirection;
0168 GeomAbs_JoinType theJoinType;
0169 int theNumberOfBisectors;
0170 int theNumberOfPnts;
0171 int theNumberOfVecs;
0172 occ::handle<MAT2d_Circuit> theCircuit;
0173 NCollection_DataMap<int, Bisector_Bisec> theGeomBisectors;
0174 NCollection_DataMap<int, gp_Pnt2d> theGeomPnts;
0175 NCollection_DataMap<int, gp_Vec2d> theGeomVecs;
0176 NCollection_Sequence<int> theLinesLength;
0177 };
0178
0179 #endif