File indexing completed on 2026-09-14 09:14:13
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _ElCLib_HeaderFile
0018 #define _ElCLib_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <gp_Pnt.hxx>
0025 #include <gp_Vec.hxx>
0026 #include <gp_Pnt2d.hxx>
0027 #include <gp_Vec2d.hxx>
0028 class gp_Pnt;
0029 class gp_Lin;
0030 class gp_Circ;
0031 class gp_Elips;
0032 class gp_Hypr;
0033 class gp_Parab;
0034 class gp_Vec;
0035 class gp_Lin2d;
0036 class gp_Circ2d;
0037 class gp_Elips2d;
0038 class gp_Hypr2d;
0039 class gp_Parab2d;
0040 class gp_Pnt2d;
0041 class gp_Vec2d;
0042 class gp_Ax1;
0043 class gp_Ax2;
0044 class gp_Ax2d;
0045 class gp_Ax22d;
0046 class gp_Dir;
0047 class gp_Dir2d;
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068 class ElCLib
0069 {
0070 public:
0071 DEFINE_STANDARD_ALLOC
0072
0073
0074
0075
0076
0077
0078 Standard_EXPORT static double InPeriod(const double U, const double UFirst, const double ULast);
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088 Standard_EXPORT static void AdjustPeriodic(const double UFirst,
0089 const double ULast,
0090 const double Precision,
0091 double& U1,
0092 double& U2);
0093
0094
0095
0096
0097
0098
0099 static gp_Pnt Value(const double U, const gp_Lin& L);
0100
0101 static gp_Pnt Value(const double U, const gp_Circ& C);
0102
0103 static gp_Pnt Value(const double U, const gp_Elips& E);
0104
0105 static gp_Pnt Value(const double U, const gp_Hypr& H);
0106
0107 static gp_Pnt Value(const double U, const gp_Parab& Prb);
0108
0109
0110
0111
0112
0113
0114
0115
0116 static void D1(const double U, const gp_Lin& L, gp_Pnt& P, gp_Vec& V1);
0117
0118 static void D1(const double U, const gp_Circ& C, gp_Pnt& P, gp_Vec& V1);
0119
0120 static void D1(const double U, const gp_Elips& E, gp_Pnt& P, gp_Vec& V1);
0121
0122 static void D1(const double U, const gp_Hypr& H, gp_Pnt& P, gp_Vec& V1);
0123
0124 static void D1(const double U, const gp_Parab& Prb, gp_Pnt& P, gp_Vec& V1);
0125
0126
0127
0128
0129
0130
0131
0132
0133 static void D2(const double U, const gp_Circ& C, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
0134
0135 static void D2(const double U, const gp_Elips& E, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
0136
0137 static void D2(const double U, const gp_Hypr& H, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
0138
0139 static void D2(const double U, const gp_Parab& Prb, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149 static void D3(const double U, const gp_Circ& C, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
0150
0151 static void D3(const double U, const gp_Elips& E, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
0152
0153 static void D3(const double U, const gp_Hypr& H, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
0154
0155
0156
0157
0158
0159
0160
0161
0162 static gp_Vec DN(const double U, const gp_Lin& L, const int N);
0163
0164 static gp_Vec DN(const double U, const gp_Circ& C, const int N);
0165
0166 static gp_Vec DN(const double U, const gp_Elips& E, const int N);
0167
0168 static gp_Vec DN(const double U, const gp_Hypr& H, const int N);
0169
0170 static gp_Vec DN(const double U, const gp_Parab& Prb, const int N);
0171
0172 static gp_Pnt2d Value(const double U, const gp_Lin2d& L);
0173
0174 static gp_Pnt2d Value(const double U, const gp_Circ2d& C);
0175
0176 static gp_Pnt2d Value(const double U, const gp_Elips2d& E);
0177
0178 static gp_Pnt2d Value(const double U, const gp_Hypr2d& H);
0179
0180 static gp_Pnt2d Value(const double U, const gp_Parab2d& Prb);
0181
0182 static void D1(const double U, const gp_Lin2d& L, gp_Pnt2d& P, gp_Vec2d& V1);
0183
0184 static void D1(const double U, const gp_Circ2d& C, gp_Pnt2d& P, gp_Vec2d& V1);
0185
0186 static void D1(const double U, const gp_Elips2d& E, gp_Pnt2d& P, gp_Vec2d& V1);
0187
0188 static void D1(const double U, const gp_Hypr2d& H, gp_Pnt2d& P, gp_Vec2d& V1);
0189
0190 static void D1(const double U, const gp_Parab2d& Prb, gp_Pnt2d& P, gp_Vec2d& V1);
0191
0192 static void D2(const double U, const gp_Circ2d& C, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
0193
0194 static void D2(const double U, const gp_Elips2d& E, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
0195
0196 static void D2(const double U, const gp_Hypr2d& H, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
0197
0198 static void D2(const double U, const gp_Parab2d& Prb, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
0199
0200 static void D3(const double U,
0201 const gp_Circ2d& C,
0202 gp_Pnt2d& P,
0203 gp_Vec2d& V1,
0204 gp_Vec2d& V2,
0205 gp_Vec2d& V3);
0206
0207 static void D3(const double U,
0208 const gp_Elips2d& E,
0209 gp_Pnt2d& P,
0210 gp_Vec2d& V1,
0211 gp_Vec2d& V2,
0212 gp_Vec2d& V3);
0213
0214
0215
0216 static void D3(const double U,
0217 const gp_Hypr2d& H,
0218 gp_Pnt2d& P,
0219 gp_Vec2d& V1,
0220 gp_Vec2d& V2,
0221 gp_Vec2d& V3);
0222
0223 static gp_Vec2d DN(const double U, const gp_Lin2d& L, const int N);
0224
0225 static gp_Vec2d DN(const double U, const gp_Circ2d& C, const int N);
0226
0227 static gp_Vec2d DN(const double U, const gp_Elips2d& E, const int N);
0228
0229 static gp_Vec2d DN(const double U, const gp_Hypr2d& H, const int N);
0230
0231 static gp_Vec2d DN(const double U, const gp_Parab2d& Prb, const int N);
0232
0233
0234
0235
0236
0237
0238
0239
0240 Standard_EXPORT static gp_Pnt LineValue(const double U, const gp_Ax1& Pos);
0241
0242 Standard_EXPORT static gp_Pnt CircleValue(const double U, const gp_Ax2& Pos, const double Radius);
0243
0244 Standard_EXPORT static gp_Pnt EllipseValue(const double U,
0245 const gp_Ax2& Pos,
0246 const double MajorRadius,
0247 const double MinorRadius);
0248
0249 Standard_EXPORT static gp_Pnt HyperbolaValue(const double U,
0250 const gp_Ax2& Pos,
0251 const double MajorRadius,
0252 const double MinorRadius);
0253
0254 Standard_EXPORT static gp_Pnt ParabolaValue(const double U,
0255 const gp_Ax2& Pos,
0256 const double Focal);
0257
0258 Standard_EXPORT static void LineD1(const double U, const gp_Ax1& Pos, gp_Pnt& P, gp_Vec& V1);
0259
0260 Standard_EXPORT static void CircleD1(const double U,
0261 const gp_Ax2& Pos,
0262 const double Radius,
0263 gp_Pnt& P,
0264 gp_Vec& V1);
0265
0266 Standard_EXPORT static void EllipseD1(const double U,
0267 const gp_Ax2& Pos,
0268 const double MajorRadius,
0269 const double MinorRadius,
0270 gp_Pnt& P,
0271 gp_Vec& V1);
0272
0273 Standard_EXPORT static void HyperbolaD1(const double U,
0274 const gp_Ax2& Pos,
0275 const double MajorRadius,
0276 const double MinorRadius,
0277 gp_Pnt& P,
0278 gp_Vec& V1);
0279
0280 Standard_EXPORT static void ParabolaD1(const double U,
0281 const gp_Ax2& Pos,
0282 const double Focal,
0283 gp_Pnt& P,
0284 gp_Vec& V1);
0285
0286 Standard_EXPORT static void CircleD2(const double U,
0287 const gp_Ax2& Pos,
0288 const double Radius,
0289 gp_Pnt& P,
0290 gp_Vec& V1,
0291 gp_Vec& V2);
0292
0293 Standard_EXPORT static void EllipseD2(const double U,
0294 const gp_Ax2& Pos,
0295 const double MajorRadius,
0296 const double MinorRadius,
0297 gp_Pnt& P,
0298 gp_Vec& V1,
0299 gp_Vec& V2);
0300
0301 Standard_EXPORT static void HyperbolaD2(const double U,
0302 const gp_Ax2& Pos,
0303 const double MajorRadius,
0304 const double MinorRadius,
0305 gp_Pnt& P,
0306 gp_Vec& V1,
0307 gp_Vec& V2);
0308
0309 Standard_EXPORT static void ParabolaD2(const double U,
0310 const gp_Ax2& Pos,
0311 const double Focal,
0312 gp_Pnt& P,
0313 gp_Vec& V1,
0314 gp_Vec& V2);
0315
0316 Standard_EXPORT static void CircleD3(const double U,
0317 const gp_Ax2& Pos,
0318 const double Radius,
0319 gp_Pnt& P,
0320 gp_Vec& V1,
0321 gp_Vec& V2,
0322 gp_Vec& V3);
0323
0324 Standard_EXPORT static void EllipseD3(const double U,
0325 const gp_Ax2& Pos,
0326 const double MajorRadius,
0327 const double MinorRadius,
0328 gp_Pnt& P,
0329 gp_Vec& V1,
0330 gp_Vec& V2,
0331 gp_Vec& V3);
0332
0333 Standard_EXPORT static void HyperbolaD3(const double U,
0334 const gp_Ax2& Pos,
0335 const double MajorRadius,
0336 const double MinorRadius,
0337 gp_Pnt& P,
0338 gp_Vec& V1,
0339 gp_Vec& V2,
0340 gp_Vec& V3);
0341
0342
0343
0344 Standard_EXPORT static gp_Vec LineDN(const double U, const gp_Ax1& Pos, const int N);
0345
0346 Standard_EXPORT static gp_Vec CircleDN(const double U,
0347 const gp_Ax2& Pos,
0348 const double Radius,
0349 const int N);
0350
0351 Standard_EXPORT static gp_Vec EllipseDN(const double U,
0352 const gp_Ax2& Pos,
0353 const double MajorRadius,
0354 const double MinorRadius,
0355 const int N);
0356
0357 Standard_EXPORT static gp_Vec HyperbolaDN(const double U,
0358 const gp_Ax2& Pos,
0359 const double MajorRadius,
0360 const double MinorRadius,
0361 const int N);
0362
0363 Standard_EXPORT static gp_Vec ParabolaDN(const double U,
0364 const gp_Ax2& Pos,
0365 const double Focal,
0366 const int N);
0367
0368 Standard_EXPORT static gp_Pnt2d LineValue(const double U, const gp_Ax2d& Pos);
0369
0370 Standard_EXPORT static gp_Pnt2d CircleValue(const double U,
0371 const gp_Ax22d& Pos,
0372 const double Radius);
0373
0374 Standard_EXPORT static gp_Pnt2d EllipseValue(const double U,
0375 const gp_Ax22d& Pos,
0376 const double MajorRadius,
0377 const double MinorRadius);
0378
0379 Standard_EXPORT static gp_Pnt2d HyperbolaValue(const double U,
0380 const gp_Ax22d& Pos,
0381 const double MajorRadius,
0382 const double MinorRadius);
0383
0384 Standard_EXPORT static gp_Pnt2d ParabolaValue(const double U,
0385 const gp_Ax22d& Pos,
0386 const double Focal);
0387
0388 Standard_EXPORT static void LineD1(const double U, const gp_Ax2d& Pos, gp_Pnt2d& P, gp_Vec2d& V1);
0389
0390 Standard_EXPORT static void CircleD1(const double U,
0391 const gp_Ax22d& Pos,
0392 const double Radius,
0393 gp_Pnt2d& P,
0394 gp_Vec2d& V1);
0395
0396 Standard_EXPORT static void EllipseD1(const double U,
0397 const gp_Ax22d& Pos,
0398 const double MajorRadius,
0399 const double MinorRadius,
0400 gp_Pnt2d& P,
0401 gp_Vec2d& V1);
0402
0403 Standard_EXPORT static void HyperbolaD1(const double U,
0404 const gp_Ax22d& Pos,
0405 const double MajorRadius,
0406 const double MinorRadius,
0407 gp_Pnt2d& P,
0408 gp_Vec2d& V1);
0409
0410 Standard_EXPORT static void ParabolaD1(const double U,
0411 const gp_Ax22d& Pos,
0412 const double Focal,
0413 gp_Pnt2d& P,
0414 gp_Vec2d& V1);
0415
0416 Standard_EXPORT static void CircleD2(const double U,
0417 const gp_Ax22d& Pos,
0418 const double Radius,
0419 gp_Pnt2d& P,
0420 gp_Vec2d& V1,
0421 gp_Vec2d& V2);
0422
0423 Standard_EXPORT static void EllipseD2(const double U,
0424 const gp_Ax22d& Pos,
0425 const double MajorRadius,
0426 const double MinorRadius,
0427 gp_Pnt2d& P,
0428 gp_Vec2d& V1,
0429 gp_Vec2d& V2);
0430
0431 Standard_EXPORT static void HyperbolaD2(const double U,
0432 const gp_Ax22d& Pos,
0433 const double MajorRadius,
0434 const double MinorRadius,
0435 gp_Pnt2d& P,
0436 gp_Vec2d& V1,
0437 gp_Vec2d& V2);
0438
0439 Standard_EXPORT static void ParabolaD2(const double U,
0440 const gp_Ax22d& Pos,
0441 const double Focal,
0442 gp_Pnt2d& P,
0443 gp_Vec2d& V1,
0444 gp_Vec2d& V2);
0445
0446 Standard_EXPORT static void CircleD3(const double U,
0447 const gp_Ax22d& Pos,
0448 const double Radius,
0449 gp_Pnt2d& P,
0450 gp_Vec2d& V1,
0451 gp_Vec2d& V2,
0452 gp_Vec2d& V3);
0453
0454 Standard_EXPORT static void EllipseD3(const double U,
0455 const gp_Ax22d& Pos,
0456 const double MajorRadius,
0457 const double MinorRadius,
0458 gp_Pnt2d& P,
0459 gp_Vec2d& V1,
0460 gp_Vec2d& V2,
0461 gp_Vec2d& V3);
0462
0463
0464
0465 Standard_EXPORT static void HyperbolaD3(const double U,
0466 const gp_Ax22d& Pos,
0467 const double MajorRadius,
0468 const double MinorRadius,
0469 gp_Pnt2d& P,
0470 gp_Vec2d& V1,
0471 gp_Vec2d& V2,
0472 gp_Vec2d& V3);
0473
0474 Standard_EXPORT static gp_Vec2d LineDN(const double U, const gp_Ax2d& Pos, const int N);
0475
0476 Standard_EXPORT static gp_Vec2d CircleDN(const double U,
0477 const gp_Ax22d& Pos,
0478 const double Radius,
0479 const int N);
0480
0481 Standard_EXPORT static gp_Vec2d EllipseDN(const double U,
0482 const gp_Ax22d& Pos,
0483 const double MajorRadius,
0484 const double MinorRadius,
0485 const int N);
0486
0487 Standard_EXPORT static gp_Vec2d HyperbolaDN(const double U,
0488 const gp_Ax22d& Pos,
0489 const double MajorRadius,
0490 const double MinorRadius,
0491 const int N);
0492
0493
0494
0495
0496 Standard_EXPORT static gp_Vec2d ParabolaDN(const double U,
0497 const gp_Ax22d& Pos,
0498 const double Focal,
0499 const int N);
0500
0501
0502
0503
0504
0505
0506
0507
0508
0509
0510
0511
0512
0513
0514
0515
0516
0517 static double Parameter(const gp_Lin& L, const gp_Pnt& P);
0518
0519
0520
0521 static double Parameter(const gp_Lin2d& L, const gp_Pnt2d& P);
0522
0523 static double Parameter(const gp_Circ& C, const gp_Pnt& P);
0524
0525
0526
0527
0528
0529 static double Parameter(const gp_Circ2d& C, const gp_Pnt2d& P);
0530
0531 static double Parameter(const gp_Elips& E, const gp_Pnt& P);
0532
0533
0534
0535
0536
0537 static double Parameter(const gp_Elips2d& E, const gp_Pnt2d& P);
0538
0539 static double Parameter(const gp_Hypr& H, const gp_Pnt& P);
0540
0541
0542
0543
0544
0545 static double Parameter(const gp_Hypr2d& H, const gp_Pnt2d& P);
0546
0547 static double Parameter(const gp_Parab& Prb, const gp_Pnt& P);
0548
0549
0550
0551
0552
0553 static double Parameter(const gp_Parab2d& Prb, const gp_Pnt2d& P);
0554
0555 Standard_EXPORT static double LineParameter(const gp_Ax1& Pos, const gp_Pnt& P);
0556
0557
0558
0559 Standard_EXPORT static double LineParameter(const gp_Ax2d& Pos, const gp_Pnt2d& P);
0560
0561 Standard_EXPORT static double CircleParameter(const gp_Ax2& Pos, const gp_Pnt& P);
0562
0563
0564
0565
0566
0567
0568 Standard_EXPORT static double CircleParameter(const gp_Ax22d& Pos, const gp_Pnt2d& P);
0569
0570 Standard_EXPORT static double EllipseParameter(const gp_Ax2& Pos,
0571 const double MajorRadius,
0572 const double MinorRadius,
0573 const gp_Pnt& P);
0574
0575
0576
0577
0578
0579
0580 Standard_EXPORT static double EllipseParameter(const gp_Ax22d& Pos,
0581 const double MajorRadius,
0582 const double MinorRadius,
0583 const gp_Pnt2d& P);
0584
0585 Standard_EXPORT static double HyperbolaParameter(const gp_Ax2& Pos,
0586 const double MajorRadius,
0587 const double MinorRadius,
0588 const gp_Pnt& P);
0589
0590
0591
0592
0593
0594
0595 Standard_EXPORT static double HyperbolaParameter(const gp_Ax22d& Pos,
0596 const double MajorRadius,
0597 const double MinorRadius,
0598 const gp_Pnt2d& P);
0599
0600 Standard_EXPORT static double ParabolaParameter(const gp_Ax2& Pos, const gp_Pnt& P);
0601
0602
0603
0604
0605
0606
0607
0608
0609 Standard_EXPORT static double ParabolaParameter(const gp_Ax22d& Pos, const gp_Pnt2d& P);
0610
0611 Standard_EXPORT static gp_Pnt To3d(const gp_Ax2& Pos, const gp_Pnt2d& P);
0612
0613 Standard_EXPORT static gp_Vec To3d(const gp_Ax2& Pos, const gp_Vec2d& V);
0614
0615 Standard_EXPORT static gp_Dir To3d(const gp_Ax2& Pos, const gp_Dir2d& V);
0616
0617 Standard_EXPORT static gp_Ax1 To3d(const gp_Ax2& Pos, const gp_Ax2d& A);
0618
0619 Standard_EXPORT static gp_Ax2 To3d(const gp_Ax2& Pos, const gp_Ax22d& A);
0620
0621 Standard_EXPORT static gp_Lin To3d(const gp_Ax2& Pos, const gp_Lin2d& L);
0622
0623 Standard_EXPORT static gp_Circ To3d(const gp_Ax2& Pos, const gp_Circ2d& C);
0624
0625 Standard_EXPORT static gp_Elips To3d(const gp_Ax2& Pos, const gp_Elips2d& E);
0626
0627 Standard_EXPORT static gp_Hypr To3d(const gp_Ax2& Pos, const gp_Hypr2d& H);
0628
0629
0630
0631
0632
0633 Standard_EXPORT static gp_Parab To3d(const gp_Ax2& Pos, const gp_Parab2d& Prb);
0634 };
0635
0636 #include <ElCLib.lxx>
0637
0638 #endif