File indexing completed on 2026-11-27 10:38:02
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _HLRAlgo_BiPoint_HeaderFile
0018 #define _HLRAlgo_BiPoint_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <Standard_Real.hxx>
0025 #include <Standard_Boolean.hxx>
0026 #include <gp_XYZ.hxx>
0027 #include <gp_XY.hxx>
0028
0029 class HLRAlgo_BiPoint
0030 {
0031 public:
0032 struct IndicesT
0033 {
0034 IndicesT()
0035 : ShapeIndex(-1),
0036 FaceConex1(0),
0037 Face1Pt1(0),
0038 Face1Pt2(0),
0039 FaceConex2(0),
0040 Face2Pt1(0),
0041 Face2Pt2(0),
0042 MinSeg(0),
0043 MaxSeg(0),
0044 SegFlags(0)
0045 {
0046 }
0047
0048 int ShapeIndex;
0049 int FaceConex1;
0050 int Face1Pt1;
0051 int Face1Pt2;
0052 int FaceConex2;
0053 int Face2Pt1;
0054 int Face2Pt2;
0055 int MinSeg;
0056 int MaxSeg;
0057 int SegFlags;
0058 };
0059
0060 struct PointsT
0061 {
0062 gp_XYZ Pnt1;
0063 gp_XYZ Pnt2;
0064 gp_XYZ PntP1;
0065 gp_XYZ PntP2;
0066
0067 gp_XY PntP12D() const { return gp_XY(PntP1.X(), PntP1.Y()); }
0068
0069 gp_XY PntP22D() const { return gp_XY(PntP2.X(), PntP2.Y()); }
0070 };
0071
0072 DEFINE_STANDARD_ALLOC
0073
0074 HLRAlgo_BiPoint() = default;
0075
0076 Standard_EXPORT HLRAlgo_BiPoint(const double X1,
0077 const double Y1,
0078 const double Z1,
0079 const double X2,
0080 const double Y2,
0081 const double Z2,
0082 const double XT1,
0083 const double YT1,
0084 const double ZT1,
0085 const double XT2,
0086 const double YT2,
0087 const double ZT2,
0088 const int Index,
0089 const bool reg1,
0090 const bool regn,
0091 const bool outl,
0092 const bool intl);
0093
0094 Standard_EXPORT HLRAlgo_BiPoint(const double X1,
0095 const double Y1,
0096 const double Z1,
0097 const double X2,
0098 const double Y2,
0099 const double Z2,
0100 const double XT1,
0101 const double YT1,
0102 const double ZT1,
0103 const double XT2,
0104 const double YT2,
0105 const double ZT2,
0106 const int Index,
0107 const int flag);
0108
0109 Standard_EXPORT HLRAlgo_BiPoint(const double X1,
0110 const double Y1,
0111 const double Z1,
0112 const double X2,
0113 const double Y2,
0114 const double Z2,
0115 const double XT1,
0116 const double YT1,
0117 const double ZT1,
0118 const double XT2,
0119 const double YT2,
0120 const double ZT2,
0121 const int Index,
0122 const int i1,
0123 const int i1p1,
0124 const int i1p2,
0125 const bool reg1,
0126 const bool regn,
0127 const bool outl,
0128 const bool intl);
0129
0130 Standard_EXPORT HLRAlgo_BiPoint(const double X1,
0131 const double Y1,
0132 const double Z1,
0133 const double X2,
0134 const double Y2,
0135 const double Z2,
0136 const double XT1,
0137 const double YT1,
0138 const double ZT1,
0139 const double XT2,
0140 const double YT2,
0141 const double ZT2,
0142 const int Index,
0143 const int i1,
0144 const int i1p1,
0145 const int i1p2,
0146 const int flag);
0147
0148 Standard_EXPORT HLRAlgo_BiPoint(const double X1,
0149 const double Y1,
0150 const double Z1,
0151 const double X2,
0152 const double Y2,
0153 const double Z2,
0154 const double XT1,
0155 const double YT1,
0156 const double ZT1,
0157 const double XT2,
0158 const double YT2,
0159 const double ZT2,
0160 const int Index,
0161 const int i1,
0162 const int i1p1,
0163 const int i1p2,
0164 const int i2,
0165 const int i2p1,
0166 const int i2p2,
0167 const bool reg1,
0168 const bool regn,
0169 const bool outl,
0170 const bool intl);
0171
0172 Standard_EXPORT HLRAlgo_BiPoint(const double X1,
0173 const double Y1,
0174 const double Z1,
0175 const double X2,
0176 const double Y2,
0177 const double Z2,
0178 const double XT1,
0179 const double YT1,
0180 const double ZT1,
0181 const double XT2,
0182 const double YT2,
0183 const double ZT2,
0184 const int Index,
0185 const int i1,
0186 const int i1p1,
0187 const int i1p2,
0188 const int i2,
0189 const int i2p1,
0190 const int i2p2,
0191 const int flag);
0192
0193 bool Rg1Line() const { return (myIndices.SegFlags & EMskRg1Line) != 0; }
0194
0195 void Rg1Line(const bool B)
0196 {
0197 if (B)
0198 myIndices.SegFlags |= EMskRg1Line;
0199 else
0200 myIndices.SegFlags &= ~EMskRg1Line;
0201 }
0202
0203 bool RgNLine() const { return (myIndices.SegFlags & EMskRgNLine) != 0; }
0204
0205 void RgNLine(const bool B)
0206 {
0207 if (B)
0208 myIndices.SegFlags |= EMskRgNLine;
0209 else
0210 myIndices.SegFlags &= ~EMskRgNLine;
0211 }
0212
0213 bool OutLine() const { return (myIndices.SegFlags & EMskOutLine) != 0; }
0214
0215 void OutLine(const bool B)
0216 {
0217 if (B)
0218 myIndices.SegFlags |= EMskOutLine;
0219 else
0220 myIndices.SegFlags &= ~EMskOutLine;
0221 }
0222
0223 bool IntLine() const { return (myIndices.SegFlags & EMskIntLine) != 0; }
0224
0225 void IntLine(const bool B)
0226 {
0227 if (B)
0228 myIndices.SegFlags |= EMskIntLine;
0229 else
0230 myIndices.SegFlags &= ~EMskIntLine;
0231 }
0232
0233 bool Hidden() const { return (myIndices.SegFlags & EMskHidden) != 0; }
0234
0235 void Hidden(const bool B)
0236 {
0237 if (B)
0238 myIndices.SegFlags |= EMskHidden;
0239 else
0240 myIndices.SegFlags &= ~EMskHidden;
0241 }
0242
0243 IndicesT& Indices() { return myIndices; }
0244
0245 PointsT& Points() { return myPoints; }
0246
0247 protected:
0248 enum EMskFlags
0249 {
0250 EMskRg1Line = 1,
0251 EMskRgNLine = 2,
0252 EMskOutLine = 4,
0253 EMskIntLine = 8,
0254 EMskHidden = 16
0255 };
0256
0257 private:
0258 IndicesT myIndices;
0259 PointsT myPoints;
0260 };
0261
0262 #endif