File indexing completed on 2026-12-03 10:54:49
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Geom2dHatch_Hatcher_HeaderFile
0018 #define _Geom2dHatch_Hatcher_HeaderFile
0019
0020 #include <Standard.hxx>
0021
0022 #include <Geom2dAdaptor_Curve.hxx>
0023 #include <Geom2dHatch_Intersector.hxx>
0024 #include <Geom2dHatch_Elements.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <Geom2dHatch_Hatching.hxx>
0027 #include <NCollection_DataMap.hxx>
0028 #include <TopAbs_Orientation.hxx>
0029 #include <HatchGen_ErrorStatus.hxx>
0030
0031 class HatchGen_PointOnHatching;
0032 class HatchGen_Domain;
0033
0034
0035 #ifdef Status
0036 #undef Status
0037 #endif
0038
0039 class Geom2dHatch_Hatcher
0040 {
0041 public:
0042 DEFINE_STANDARD_ALLOC
0043
0044
0045 Standard_EXPORT Geom2dHatch_Hatcher(const Geom2dHatch_Intersector& Intersector,
0046 const double Confusion2d,
0047 const double Confusion3d,
0048 const bool KeepPnt = false,
0049 const bool KeepSeg = false);
0050
0051
0052 Standard_EXPORT void Intersector(const Geom2dHatch_Intersector& Intersector);
0053
0054
0055 const Geom2dHatch_Intersector& Intersector();
0056
0057
0058 Geom2dHatch_Intersector& ChangeIntersector();
0059
0060
0061 Standard_EXPORT void Confusion2d(const double Confusion);
0062
0063
0064
0065
0066 double Confusion2d() const;
0067
0068
0069 Standard_EXPORT void Confusion3d(const double Confusion);
0070
0071
0072
0073
0074 double Confusion3d() const;
0075
0076
0077 Standard_EXPORT void KeepPoints(const bool Keep);
0078
0079
0080 bool KeepPoints() const;
0081
0082
0083 Standard_EXPORT void KeepSegments(const bool Keep);
0084
0085
0086 bool KeepSegments() const;
0087
0088
0089 void Clear();
0090
0091
0092 const Geom2dAdaptor_Curve& ElementCurve(const int IndE) const;
0093
0094
0095 Standard_EXPORT int AddElement(const Geom2dAdaptor_Curve& Curve,
0096 const TopAbs_Orientation Orientation = TopAbs_FORWARD);
0097
0098
0099 int AddElement(const occ::handle<Geom2d_Curve>& Curve,
0100 const TopAbs_Orientation Orientation = TopAbs_FORWARD)
0101 {
0102 Geom2dAdaptor_Curve aGAC(Curve);
0103 return AddElement(aGAC, Orientation);
0104 }
0105
0106
0107 Standard_EXPORT void RemElement(const int IndE);
0108
0109
0110 Standard_EXPORT void ClrElements();
0111
0112
0113 const Geom2dAdaptor_Curve& HatchingCurve(const int IndH) const;
0114
0115
0116 Standard_EXPORT int AddHatching(const Geom2dAdaptor_Curve& Curve);
0117
0118
0119 Standard_EXPORT void RemHatching(const int IndH);
0120
0121
0122 Standard_EXPORT void ClrHatchings();
0123
0124
0125
0126 int NbPoints(const int IndH) const;
0127
0128
0129
0130 const HatchGen_PointOnHatching& Point(const int IndH, const int IndP) const;
0131
0132
0133
0134 Standard_EXPORT void Trim();
0135
0136
0137
0138 Standard_EXPORT int Trim(const Geom2dAdaptor_Curve& Curve);
0139
0140
0141
0142 Standard_EXPORT void Trim(const int IndH);
0143
0144
0145 Standard_EXPORT void ComputeDomains();
0146
0147
0148 Standard_EXPORT void ComputeDomains(const int IndH);
0149
0150
0151
0152 bool TrimDone(const int IndH) const;
0153
0154
0155
0156 bool TrimFailed(const int IndH) const;
0157
0158
0159
0160 bool IsDone() const;
0161
0162
0163
0164 bool IsDone(const int IndH) const;
0165
0166
0167 HatchGen_ErrorStatus Status(const int IndH) const;
0168
0169
0170
0171
0172 int NbDomains(const int IndH) const;
0173
0174
0175 Standard_EXPORT const HatchGen_Domain& Domain(const int IndH, const int IDom) const;
0176
0177
0178 Standard_EXPORT void Dump() const;
0179
0180 protected:
0181
0182 Geom2dHatch_Element& Element(const int IndE);
0183
0184
0185 Geom2dHatch_Hatching& Hatching(const int IndH);
0186
0187 private:
0188
0189
0190 Standard_EXPORT bool Trim(const int IndH, const int IndE);
0191
0192
0193
0194 Standard_EXPORT bool GlobalTransition(HatchGen_PointOnHatching& Point);
0195
0196 Geom2dHatch_Intersector myIntersector;
0197 double myConfusion2d;
0198 double myConfusion3d;
0199 bool myKeepPoints;
0200 bool myKeepSegments;
0201 int myNbElements;
0202 Geom2dHatch_Elements myElements;
0203 int myNbHatchings;
0204 NCollection_DataMap<int, Geom2dHatch_Hatching> myHatchings;
0205 };
0206
0207 #include <Geom2dHatch_Hatcher.lxx>
0208
0209 #endif