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