File indexing completed on 2026-09-25 09:19:01
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Bisector_BisecPC_HeaderFile
0018 #define _Bisector_BisecPC_HeaderFile
0019
0020 #include <Standard.hxx>
0021
0022 #include <gp_Pnt2d.hxx>
0023 #include <NCollection_Sequence.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <Bisector_Curve.hxx>
0026 #include <GeomAbs_Shape.hxx>
0027 class Geom2d_Curve;
0028 class Geom2d_Geometry;
0029 class gp_Trsf2d;
0030 class gp_Vec2d;
0031
0032
0033
0034
0035 class Bisector_BisecPC : public Bisector_Curve
0036 {
0037
0038 public:
0039 Standard_EXPORT Bisector_BisecPC();
0040
0041
0042
0043
0044
0045
0046
0047
0048 Standard_EXPORT Bisector_BisecPC(const occ::handle<Geom2d_Curve>& Cu,
0049 const gp_Pnt2d& P,
0050 const double Side,
0051 const double DistMax = 500);
0052
0053
0054
0055
0056
0057
0058
0059 Standard_EXPORT Bisector_BisecPC(const occ::handle<Geom2d_Curve>& Cu,
0060 const gp_Pnt2d& P,
0061 const double Side,
0062 const double UMin,
0063 const double UMax);
0064
0065
0066
0067
0068
0069
0070
0071
0072 Standard_EXPORT void Perform(const occ::handle<Geom2d_Curve>& Cu,
0073 const gp_Pnt2d& P,
0074 const double Side,
0075 const double DistMax = 500);
0076
0077
0078 Standard_EXPORT bool IsExtendAtStart() const override;
0079
0080
0081 Standard_EXPORT bool IsExtendAtEnd() const override;
0082
0083
0084
0085
0086
0087
0088 Standard_EXPORT void Reverse() override;
0089
0090
0091
0092 Standard_EXPORT double ReversedParameter(const double U) const override;
0093
0094 Standard_EXPORT occ::handle<Geom2d_Geometry> Copy() const override;
0095
0096
0097
0098
0099
0100 Standard_EXPORT void Transform(const gp_Trsf2d& T) override;
0101
0102
0103
0104 Standard_EXPORT bool IsCN(const int N) const override;
0105
0106
0107 Standard_EXPORT double FirstParameter() const override;
0108
0109
0110 Standard_EXPORT double LastParameter() const override;
0111
0112 Standard_EXPORT GeomAbs_Shape Continuity() const override;
0113
0114
0115
0116
0117 Standard_EXPORT int NbIntervals() const override;
0118
0119
0120
0121 Standard_EXPORT double IntervalFirst(const int Index) const override;
0122
0123
0124
0125 Standard_EXPORT double IntervalLast(const int Index) const override;
0126
0127 Standard_EXPORT GeomAbs_Shape IntervalContinuity() const;
0128
0129 Standard_EXPORT bool IsClosed() const override;
0130
0131 Standard_EXPORT bool IsPeriodic() const override;
0132
0133
0134
0135 Standard_EXPORT double Distance(const double U) const;
0136
0137 Standard_EXPORT gp_Pnt2d EvalD0(const double U) const override;
0138
0139 Standard_EXPORT Geom2d_Curve::ResD1 EvalD1(const double U) const override;
0140
0141 Standard_EXPORT Geom2d_Curve::ResD2 EvalD2(const double U) const override;
0142
0143 Standard_EXPORT Geom2d_Curve::ResD3 EvalD3(const double U) const override;
0144
0145 Standard_EXPORT gp_Vec2d EvalDN(const double U, const int N) const override;
0146
0147 Standard_EXPORT void Dump(const int Deep = 0, const int Offset = 0) const;
0148
0149
0150
0151 Standard_EXPORT double LinkBisCurve(const double U) const;
0152
0153
0154 Standard_EXPORT double LinkCurveBis(const double U) const;
0155
0156
0157 Standard_EXPORT double Parameter(const gp_Pnt2d& P) const override;
0158
0159
0160 Standard_EXPORT bool IsEmpty() const;
0161
0162 DEFINE_STANDARD_RTTIEXT(Bisector_BisecPC, Bisector_Curve)
0163
0164 private:
0165 Standard_EXPORT void Values(const double U,
0166 const int N,
0167 gp_Pnt2d& P,
0168 gp_Vec2d& V1,
0169 gp_Vec2d& V2,
0170 gp_Vec2d& V3) const;
0171
0172 Standard_EXPORT void Extension(const double U,
0173 gp_Pnt2d& P,
0174 gp_Vec2d& V1,
0175 gp_Vec2d& V2,
0176 gp_Vec2d& V3) const;
0177
0178
0179 Standard_EXPORT void ComputeIntervals();
0180
0181 Standard_EXPORT void CuspFilter();
0182
0183 Standard_EXPORT double SearchBound(const double U1, const double U2) const;
0184
0185 Standard_EXPORT void Init(const occ::handle<Geom2d_Curve>& Curve,
0186 const gp_Pnt2d& Point,
0187 const double Sign,
0188 const NCollection_Sequence<double>& StartIntervals,
0189 const NCollection_Sequence<double>& EndIntervals,
0190 const int BisInterval,
0191 const int CurrentInterval,
0192 const double ShiftParameter,
0193 const double DistMax,
0194 const bool IsEmpty,
0195 const bool IsConvex,
0196 const bool ExtensionStart,
0197 const bool ExtensionEnd,
0198 const gp_Pnt2d& PointStartBis,
0199 const gp_Pnt2d& PointEndBis);
0200
0201 occ::handle<Geom2d_Curve> curve;
0202 gp_Pnt2d point;
0203 double sign;
0204 NCollection_Sequence<double> startIntervals;
0205 NCollection_Sequence<double> endIntervals;
0206 int bisInterval;
0207 int currentInterval;
0208 double shiftParameter;
0209 double distMax;
0210 bool isEmpty;
0211 bool isConvex;
0212 bool extensionStart;
0213 bool extensionEnd;
0214 gp_Pnt2d pointStartBis;
0215 gp_Pnt2d pointEndBis;
0216 };
0217
0218 #endif