File indexing completed on 2026-09-23 09:18:05
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _IntPolyh_Point_HeaderFile
0018 #define _IntPolyh_Point_HeaderFile
0019
0020 #include <Adaptor3d_Surface.hxx>
0021
0022
0023
0024 class IntPolyh_Point
0025 {
0026 public:
0027 DEFINE_STANDARD_ALLOC
0028
0029
0030 IntPolyh_Point()
0031 : myX(0.),
0032 myY(0.),
0033 myZ(0.),
0034 myU(0.),
0035 myV(0.),
0036 myPOC(1),
0037 myDegenerated(false)
0038 {
0039 }
0040
0041
0042 IntPolyh_Point(const double x, const double y, const double z, const double u, const double v)
0043 : myX(x),
0044 myY(y),
0045 myZ(z),
0046 myU(u),
0047 myV(v),
0048 myPOC(1),
0049 myDegenerated(false)
0050 {
0051 }
0052
0053
0054 double X() const { return myX; }
0055
0056
0057 double Y() const { return myY; }
0058
0059
0060 double Z() const { return myZ; }
0061
0062
0063 double U() const { return myU; }
0064
0065
0066 double V() const { return myV; }
0067
0068
0069 int PartOfCommon() const { return myPOC; }
0070
0071
0072 void Set(const double x,
0073 const double y,
0074 const double z,
0075 const double u,
0076 const double v,
0077 const int II = 1)
0078 {
0079 myX = x;
0080 myY = y;
0081 myZ = z;
0082 myU = u;
0083 myV = v;
0084 myPOC = II;
0085 }
0086
0087
0088 void SetX(const double x) { myX = x; }
0089
0090
0091 void SetY(const double y) { myY = y; }
0092
0093
0094 void SetZ(const double z) { myZ = z; }
0095
0096
0097 void SetU(const double u) { myU = u; }
0098
0099
0100 void SetV(const double v) { myV = v; }
0101
0102
0103 void SetPartOfCommon(const int ii) { myPOC = ii; }
0104
0105
0106 Standard_EXPORT void Middle(const occ::handle<Adaptor3d_Surface>& MySurface,
0107 const IntPolyh_Point& P1,
0108 const IntPolyh_Point& P2);
0109
0110 Standard_EXPORT IntPolyh_Point Add(const IntPolyh_Point& P1) const;
0111
0112 IntPolyh_Point operator+(const IntPolyh_Point& P1) const { return Add(P1); }
0113
0114
0115 Standard_EXPORT IntPolyh_Point Sub(const IntPolyh_Point& P1) const;
0116
0117 IntPolyh_Point operator-(const IntPolyh_Point& P1) const { return Sub(P1); }
0118
0119
0120 Standard_EXPORT IntPolyh_Point Divide(const double rr) const;
0121
0122 IntPolyh_Point operator/(const double rr) const { return Divide(rr); }
0123
0124
0125 Standard_EXPORT IntPolyh_Point Multiplication(const double rr) const;
0126
0127 IntPolyh_Point operator*(const double rr) const { return Multiplication(rr); }
0128
0129
0130 Standard_EXPORT double SquareModulus() const;
0131
0132 Standard_EXPORT double SquareDistance(const IntPolyh_Point& P2) const;
0133
0134 Standard_EXPORT double Dot(const IntPolyh_Point& P2) const;
0135
0136 Standard_EXPORT void Cross(const IntPolyh_Point& P1, const IntPolyh_Point& P2);
0137
0138 Standard_EXPORT void Dump() const;
0139
0140 Standard_EXPORT void Dump(const int i) const;
0141
0142
0143 void SetDegenerated(const bool theFlag) { myDegenerated = theFlag; }
0144
0145
0146 bool Degenerated() const { return myDegenerated; }
0147
0148 private:
0149 double myX;
0150 double myY;
0151 double myZ;
0152 double myU;
0153 double myV;
0154 int myPOC;
0155 bool myDegenerated;
0156 };
0157
0158 #endif