-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstandard_c_api.cc
510 lines (411 loc) · 15.4 KB
/
standard_c_api.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
#include "standard_c_api.h"
#include "standard_impl.hh"
#ifdef __cplusplus
extern "C" {
#endif
dir3d_t make_dir(vec3d_t p) {
gce_MakeDir md(cast_to_gp(p));
return cast_from_gp(md.Value());
}
dir3d_t make_dir_from_xyz(double x, double y, double z) {
gce_MakeDir md(x, y, z);
return cast_from_gp(md.Value());
}
dir3d_t make_dir_from_point(pnt3d_t p1, pnt3d_t p2) {
gce_MakeDir md(gp_Pnt(cast_to_gp(p1)), gp_Pnt(cast_to_gp(p2)));
return cast_from_gp(md.Value());
}
dir2d_t make_dir2d(vec2d_t p) {
gce_MakeDir2d md(cast_to_gp(p));
return cast_from_gp(md.Value());
}
dir2d_t make_dir2d_from_xy(double x, double y) {
gce_MakeDir2d md(x, y);
return cast_from_gp(md.Value());
}
dir2d_t make_dir2d_from_point(pnt2d_t p1, pnt2d_t p2) {
gce_MakeDir2d md(gp_Pnt2d(cast_to_gp(p1)), gp_Pnt2d(cast_to_gp(p2)));
return cast_from_gp(md.Value());
}
axis1_t make_axis(pnt3d_t p, dir3d_t v) {
gp_Ax1 ax1{cast_to_gp(p), cast_to_gp(v)};
return cast_from_gp(ax1);
}
axis2_t make_axis2_from_nvx(pnt3d_t p, dir3d_t N, dir3d_t Vx) {
gp_Ax2 ax2{gp_Pnt(cast_to_gp(p)), cast_to_gp(N), cast_to_gp(Vx)};
return cast_from_gp(ax2);
}
axis2_t make_axis2(pnt3d_t p, dir3d_t v) {
gp_Ax2 ax2{gp_Pnt(cast_to_gp(p)), cast_to_gp(v)};
return cast_from_gp(ax2);
}
axis3_t make_axis3(axis2_t a) {
gp_Ax3 ax3{cast_to_gp(a)};
return cast_from_gp(ax3);
}
axis3_t make_axis3_from_nvx(pnt3d_t p, dir3d_t N, dir3d_t Vx) {
gp_Ax3 ax3{gp_Pnt(cast_to_gp(p)), cast_to_gp(N), cast_to_gp(Vx)};
return cast_from_gp(ax3);
}
axis3_t make_axis3_from_v(pnt3d_t p, dir3d_t v) {
gp_Ax3 ax3{gp_Pnt(cast_to_gp(p)), cast_to_gp(v)};
return cast_from_gp(ax3);
}
axis2d_t make_axis2d(pnt2d_t p, dir2d_t v) {
gp_Ax2d ax2{gp_Pnt2d(cast_to_gp(p)), cast_to_gp(v)};
return cast_from_gp(ax2);
}
axis22d_t make_axis22d(axis2d_t a) {
gp_Ax22d ax2{cast_to_gp(a)};
return cast_from_gp(ax2);
}
axis22d_t make_axis22d_from_v(pnt2d_t p, dir2d_t v) {
gp_Ax22d ax2{gp_Pnt2d(cast_to_gp(p)), cast_to_gp(v)};
return cast_from_gp(ax2);
}
axis22d_t make_axis22d_from_vxy(pnt2d_t p, dir2d_t vx, dir2d_t vy) {
gp_Ax22d ax2{gp_Pnt2d(cast_to_gp(p)), cast_to_gp(vx), cast_to_gp(vy)};
return cast_from_gp(ax2);
}
circ_t make_circ_from_axis2(axis2_t a, double radius) {
gce_MakeCirc mc(cast_to_gp(a), radius);
return cast_from_gp(mc.Value());
}
circ_t make_circ_from_circ_dist(circ_t a, double Dist) {
gce_MakeCirc mc(cast_to_gp(a), Dist);
return cast_from_gp(mc.Value());
}
circ_t make_circ_from_circ_point(circ_t a, pnt3d_t p) {
gce_MakeCirc mc(cast_to_gp(a), cast_to_gp(p));
return cast_from_gp(mc.Value());
}
circ_t make_circ_from_point(pnt3d_t p1, pnt3d_t p2, pnt3d_t p3) {
gce_MakeCirc mc(gp_Pnt(cast_to_gp(p1)), gp_Pnt(cast_to_gp(p2)),
gp_Pnt(cast_to_gp(p3)));
return cast_from_gp(mc.Value());
}
circ_t make_circ_from_center_norm(pnt3d_t center, dir3d_t Norm, double radius) {
gce_MakeCirc mc(gp_Pnt(cast_to_gp(center)), gp_Dir(cast_to_gp(Norm)), radius);
return cast_from_gp(mc.Value());
}
circ_t make_circ_from_center_plan(pnt3d_t center, plane_t pl, double radius) {
gce_MakeCirc mc(gp_Pnt(cast_to_gp(center)), cast_to_gp(pl), radius);
return cast_from_gp(mc.Value());
}
circ_t make_circ_from_axis1(axis1_t a, double radius) {
gce_MakeCirc mc(cast_to_gp(a), radius);
return cast_from_gp(mc.Value());
}
circ2d_t make_circ2d_from_axis2(axis2d_t a, double radius) {
gce_MakeCirc2d mc(cast_to_gp(a), radius);
return cast_from_gp(mc.Value());
}
circ2d_t make_circ2d_from_axis22d(axis22d_t a, double radius) {
gce_MakeCirc2d mc(cast_to_gp(a), radius);
return cast_from_gp(mc.Value());
}
circ2d_t make_circ2d_from_circ_dist(circ2d_t a, double Dist) {
gce_MakeCirc2d mc(cast_to_gp(a), Dist);
return cast_from_gp(mc.Value());
}
circ2d_t make_circ2d_from_circ2d(circ2d_t a, pnt2d_t p) {
gce_MakeCirc2d mc(cast_to_gp(a), gp_Pnt2d(cast_to_gp(p)));
return cast_from_gp(mc.Value());
}
circ2d_t make_circ2d_from_point(pnt2d_t p1, pnt2d_t p2, pnt2d_t p3) {
gce_MakeCirc2d mc(gp_Pnt2d(cast_to_gp(p1)), gp_Pnt2d(cast_to_gp(p2)),
gp_Pnt2d(cast_to_gp(p3)));
return cast_from_gp(mc.Value());
}
circ2d_t make_circ2d_from_center_radius(pnt2d_t center, double radius) {
gce_MakeCirc2d mc(gp_Pnt2d(cast_to_gp(center)), radius);
return cast_from_gp(mc.Value());
}
circ2d_t make_circ2d_from_center_point(pnt2d_t center, pnt2d_t p) {
gce_MakeCirc2d mc(gp_Pnt2d(cast_to_gp(center)), gp_Pnt2d(cast_to_gp(center)));
return cast_from_gp(mc.Value());
}
cone_t make_cone_from_axis2(axis2_t a, double ang, double radius) {
gce_MakeCone mc(cast_to_gp(a), ang, radius);
return cast_from_gp(mc.Value());
}
cone_t make_cone_from_cone_point(cone_t a, pnt3d_t p) {
gce_MakeCone mc(cast_to_gp(a), gp_Pnt(cast_to_gp(p)));
return cast_from_gp(mc.Value());
}
cone_t make_cone_from_cone_dist(cone_t a, double dist) {
gce_MakeCone mc(cast_to_gp(a), dist);
return cast_from_gp(mc.Value());
}
cone_t make_cone_from_point(pnt3d_t p1, pnt3d_t p2, pnt3d_t p3, pnt3d_t p4) {
gce_MakeCone mc(gp_Pnt(cast_to_gp(p1)), gp_Pnt(cast_to_gp(p2)),
gp_Pnt(cast_to_gp(p3)), gp_Pnt(cast_to_gp(p3)));
return cast_from_gp(mc.Value());
}
cone_t make_cone_from_axis1_point(axis1_t a, pnt3d_t p1, pnt3d_t p2) {
gce_MakeCone mc(cast_to_gp(a), gp_Pnt(cast_to_gp(p1)),
gp_Pnt(cast_to_gp(p2)));
return cast_from_gp(mc.Value());
}
cone_t make_cone_from_line_point(line_t l, pnt3d_t p1, pnt3d_t p2) {
gce_MakeCone mc(cast_to_gp(l), gp_Pnt(cast_to_gp(p1)),
gp_Pnt(cast_to_gp(p2)));
return cast_from_gp(mc.Value());
}
cone_t make_cone_point_radius(pnt3d_t p1, pnt3d_t p2, double r1, double r2) {
gce_MakeCone mc(gp_Pnt(cast_to_gp(p1)), gp_Pnt(cast_to_gp(p2)), r1, r2);
return cast_from_gp(mc.Value());
}
cylinder_t make_cylinder_from_axis2(axis2_t a, double radius) {
gce_MakeCylinder mc(cast_to_gp(a), radius);
return cast_from_gp(mc.Value());
}
cylinder_t make_cylinder_from_cylinder_point(cylinder_t a, pnt3d_t p) {
gce_MakeCylinder mc(cast_to_gp(a), gp_Pnt(cast_to_gp(p)));
return cast_from_gp(mc.Value());
}
cylinder_t make_cylinder_from_cylinder_dist(cylinder_t a, double dist) {
gce_MakeCylinder mc(cast_to_gp(a), dist);
return cast_from_gp(mc.Value());
}
cylinder_t make_cylinder_from_point(pnt3d_t p1, pnt3d_t p2, pnt3d_t p3) {
gce_MakeCylinder mc(gp_Pnt(cast_to_gp(p1)), gp_Pnt(cast_to_gp(p2)),
gp_Pnt(cast_to_gp(p3)));
return cast_from_gp(mc.Value());
}
cylinder_t make_cylinder_from_axis1_radius(axis1_t a, double radius) {
gce_MakeCylinder mc(cast_to_gp(a), radius);
return cast_from_gp(mc.Value());
}
cylinder_t make_cylinder_from_circ(circ_t a) {
gce_MakeCylinder mc(cast_to_gp(a));
return cast_from_gp(mc.Value());
}
elips_t make_elips_from_axis2_radius(axis2_t a, double major_radius,
double minor_radius) {
gce_MakeElips mc(cast_to_gp(a), major_radius, minor_radius);
return cast_from_gp(mc.Value());
}
elips_t make_elips_point(pnt3d_t s1, pnt3d_t s2, pnt3d_t center) {
gce_MakeElips mc(gp_Pnt(cast_to_gp(s1)), gp_Pnt(cast_to_gp(s2)),
gp_Pnt(cast_to_gp(center)));
return cast_from_gp(mc.Value());
}
elips2d_t make_elips2d_axis2d_radius(axis2d_t a, double major_radius,
double minor_radius) {
gce_MakeElips2d mc(cast_to_gp(a), major_radius, minor_radius);
return cast_from_gp(mc.Value());
}
elips2d_t make_elips2d_point(pnt2d_t s1, pnt2d_t s2, pnt2d_t center) {
gce_MakeElips2d mc(gp_Pnt2d(cast_to_gp(s1)), gp_Pnt2d(cast_to_gp(s2)),
gp_Pnt2d(cast_to_gp(center)));
return cast_from_gp(mc.Value());
}
hyperbola_t make_hyperbola_from_axis2(axis2_t a, double major_radius,
double minor_radius) {
gce_MakeHypr mc(cast_to_gp(a), major_radius, minor_radius);
return cast_from_gp(mc.Value());
}
hyperbola_t make_hyperbola_from_point(pnt3d_t s1, pnt3d_t s2, pnt3d_t center) {
gce_MakeHypr mc(gp_Pnt(cast_to_gp(s1)), gp_Pnt(cast_to_gp(s2)),
gp_Pnt(cast_to_gp(center)));
return cast_from_gp(mc.Value());
}
hyperbola2d_t make_hyperbola2d_from_axis2d(axis2d_t a, double major_radius,
double minor_radius) {
gce_MakeHypr2d mc(cast_to_gp(a), major_radius, minor_radius);
return cast_from_gp(mc.Value());
}
hyperbola2d_t make_hyperbola2d_from_point(pnt2d_t s1, pnt2d_t s2,
pnt2d_t center) {
gce_MakeHypr2d mc(gp_Pnt2d(cast_to_gp(s1)), gp_Pnt2d(cast_to_gp(s2)),
gp_Pnt2d(cast_to_gp(center)));
return cast_from_gp(mc.Value());
}
line_t make_line_from_axis1(axis1_t a) {
gce_MakeLin mc(cast_to_gp(a));
return cast_from_gp(mc.Value());
}
line_t make_line_from_point_dir(pnt3d_t p, dir3d_t v) {
gce_MakeLin mc(gp_Pnt(cast_to_gp(p)), cast_to_gp(v));
return cast_from_gp(mc.Value());
}
line_t make_line_from_line_point(line_t l, pnt3d_t p) {
gce_MakeLin mc(cast_to_gp(l), gp_Pnt(cast_to_gp(p)));
return cast_from_gp(mc.Value());
}
line_t make_line_from_point(pnt3d_t p1, pnt3d_t p2) {
gce_MakeLin mc(gp_Pnt(cast_to_gp(p1)), gp_Pnt(cast_to_gp(p2)));
return cast_from_gp(mc.Value());
}
line2d_t make_line2d_from_axis2d(axis2d_t a) {
gce_MakeLin2d mc(cast_to_gp(a));
return cast_from_gp(mc.Value());
}
line2d_t make_line2d_point_dir(pnt2d_t p, dir2d_t v) {
gce_MakeLin2d mc(gp_Pnt2d(cast_to_gp(p)), cast_to_gp(v));
return cast_from_gp(mc.Value());
}
line2d_t make_line2d_from_line_dist(line2d_t l, double dist) {
gce_MakeLin2d mc(cast_to_gp(l), dist);
return cast_from_gp(mc.Value());
}
line2d_t make_line2d_line_point(line2d_t l, pnt2d_t p) {
gce_MakeLin2d mc(cast_to_gp(l), gp_Pnt2d(cast_to_gp(p)));
return cast_from_gp(mc.Value());
}
line2d_t make_line2d_from_point(pnt2d_t p1, pnt2d_t p2) {
gce_MakeLin2d mc(gp_Pnt2d(cast_to_gp(p1)), gp_Pnt2d(cast_to_gp(p2)));
return cast_from_gp(mc.Value());
}
trsf_t make_trsf_mirror_from_point(pnt3d_t p) {
gce_MakeMirror mc(gp_Pnt(cast_to_gp(p)));
return trsf_t{cast_from_gp(mc.Value())};
}
trsf_t make_trsf_mirror_from_axis1(axis1_t a) {
gce_MakeMirror mc(cast_to_gp(a));
return trsf_t{cast_from_gp(mc.Value())};
}
trsf_t make_trsf_mirror_from_line(line_t a) {
gce_MakeMirror mc(cast_to_gp(a));
return trsf_t{cast_from_gp(mc.Value())};
}
trsf_t make_trsf_mirror_from_point_dir(pnt3d_t p, dir3d_t v) {
gce_MakeMirror mc(gp_Pnt(cast_to_gp(p)), cast_to_gp(v));
return trsf_t{cast_from_gp(mc.Value())};
}
trsf_t make_trsf_mirror_from_axis2(axis2_t a) {
gce_MakeMirror mc(cast_to_gp(a));
return trsf_t{cast_from_gp(mc.Value())};
}
trsf_t make_trsf_mirror_from_plane(plane_t a) {
gce_MakeMirror mc(cast_to_gp(a));
return trsf_t{cast_from_gp(mc.Value())};
}
trsf_t make_trsf_rotation_from_line(line_t a, double Angle) {
gce_MakeRotation mc(cast_to_gp(a), Angle);
return trsf_t{cast_from_gp(mc.Value())};
}
trsf_t make_trsf_rotation_from_axis1(axis1_t a, double Angle) {
gce_MakeRotation mc(cast_to_gp(a), Angle);
return trsf_t{cast_from_gp(mc.Value())};
}
trsf_t make_trsf_rotation_point_dir(pnt3d_t p, dir3d_t v, double Angle) {
gce_MakeRotation mc(gp_Pnt(cast_to_gp(p)), cast_to_gp(v), Angle);
return trsf_t{cast_from_gp(mc.Value())};
}
trsf_t make_trsf_scale_from_point(pnt3d_t p, double Scale) {
gce_MakeScale mc(gp_Pnt(cast_to_gp(p)), Scale);
return trsf_t{cast_from_gp(mc.Value())};
}
trsf_t make_trsf_translation_from_vector(vec3d_t v) {
gce_MakeTranslation mc(gp_Vec(cast_to_gp(v)));
return trsf_t{cast_from_gp(mc.Value())};
}
trsf_t make_trsf_translation_from_point(pnt3d_t p1, pnt3d_t p2) {
gce_MakeTranslation mc(gp_Pnt(cast_to_gp(p1)), gp_Pnt(cast_to_gp(p2)));
return trsf_t{cast_from_gp(mc.Value())};
}
trsf2d_t make_trsf2d_mirror_from_point(pnt2d_t p) {
gce_MakeMirror2d mc(gp_Pnt2d(cast_to_gp(p)));
return trsf2d_t{cast_from_gp(mc.Value())};
}
trsf2d_t make_trsf2d_mirror_from_axis2d(axis2d_t a) {
gce_MakeMirror2d mc(cast_to_gp(a));
return trsf2d_t{cast_from_gp(mc.Value())};
}
trsf2d_t make_trsf2d_mirror_from_line(line2d_t a) {
gce_MakeMirror2d mc(cast_to_gp(a));
return trsf2d_t{cast_from_gp(mc.Value())};
}
trsf2d_t make_trsf2d_mirror_from_point_dir(pnt2d_t p, dir2d_t v) {
gce_MakeMirror2d mc(gp_Pnt2d(cast_to_gp(p)), cast_to_gp(v));
return trsf2d_t{cast_from_gp(mc.Value())};
}
trsf2d_t make_trsf2d_rotation_from_point(pnt2d_t p, double Angle) {
gce_MakeRotation2d mc(gp_Pnt2d(cast_to_gp(p)), Angle);
return trsf2d_t{cast_from_gp(mc.Value())};
}
trsf2d_t make_trsf2d_scale_from_point(pnt2d_t p, double Scale) {
gce_MakeScale2d mc(gp_Pnt2d(cast_to_gp(p)), Scale);
return trsf2d_t{cast_from_gp(mc.Value())};
}
trsf2d_t make_trsf2d_translation_from_vector(vec2d_t v) {
gce_MakeTranslation2d mc(gp_Vec2d(cast_to_gp(v)));
return trsf2d_t{cast_from_gp(mc.Value())};
}
trsf2d_t make_trsf2d_translation_from_point(pnt2d_t p1, pnt2d_t p2) {
gce_MakeTranslation2d mc(gp_Pnt2d(cast_to_gp(p1)), gp_Pnt2d(cast_to_gp(p2)));
return trsf2d_t{cast_from_gp(mc.Value())};
}
parabola_t make_parabola_from_axis2(axis2_t a, double Focal) {
gce_MakeParab mc(cast_to_gp(a), Focal);
return cast_from_gp(mc.Value());
}
parabola_t make_parabola_from_axis1(axis1_t a, pnt3d_t v) {
gce_MakeParab mc(cast_to_gp(a), gp_Pnt(cast_to_gp(v)));
return cast_from_gp(mc.Value());
}
parabola2d_t make_parabola2d_from_axis2d(axis2d_t a, double Focal) {
gce_MakeParab2d mc(cast_to_gp(a), Focal);
return cast_from_gp(mc.Value());
}
parabola2d_t make_parabola2d_from_axis22d(axis22d_t a, double Focal) {
gce_MakeParab2d mc(cast_to_gp(a), Focal);
return cast_from_gp(mc.Value());
}
parabola2d_t make_parabola2d_from_axis2d_point(axis2d_t a, pnt2d_t F) {
gce_MakeParab2d mc(cast_to_gp(a), gp_Pnt2d(cast_to_gp(F)));
return cast_from_gp(mc.Value());
}
parabola2d_t make_parabola2d_point(pnt2d_t S1, pnt2d_t center) {
gce_MakeParab2d mc(gp_Pnt2d(cast_to_gp(S1)), gp_Pnt2d(cast_to_gp(center)));
return cast_from_gp(mc.Value());
}
plane_t make_plane_from_axis2(axis2_t a) {
gce_MakePln mc(cast_to_gp(a));
return cast_from_gp(mc.Value());
}
plane_t make_plane_from_point_dir(pnt3d_t p, dir3d_t v) {
gce_MakePln mc(gp_Pnt(cast_to_gp(p)), cast_to_gp(v));
return cast_from_gp(mc.Value());
}
plane_t make_plane_from_lrud(double a, double b, double c, double d) {
gce_MakePln mc(a, b, c, d);
return cast_from_gp(mc.Value());
}
plane_t make_plane_from_plane_point(plane_t pln, pnt3d_t p) {
gce_MakePln mc(cast_to_gp(pln), gp_Pnt(cast_to_gp(p)));
return cast_from_gp(mc.Value());
}
plane_t make_plane_from_plane_dist(plane_t pln, double dist) {
gce_MakePln mc(cast_to_gp(pln), dist);
return cast_from_gp(mc.Value());
}
plane_t make_plane_from_point(pnt3d_t p1, pnt3d_t p2, pnt3d_t p3) {
gce_MakePln mc(gp_Pnt(cast_to_gp(p1)), gp_Pnt(cast_to_gp(p2)),
gp_Pnt(cast_to_gp(p3)));
return cast_from_gp(mc.Value());
}
plane_t make_plane_from_two_point(pnt3d_t p1, pnt3d_t p2) {
gce_MakePln mc(gp_Pnt(cast_to_gp(p1)), gp_Pnt(cast_to_gp(p2)));
return cast_from_gp(mc.Value());
}
plane_t make_plane_from_axis1(axis1_t a) {
gce_MakePln mc(cast_to_gp(a));
return cast_from_gp(mc.Value());
}
sphere_t make_sphere_from_axis3(axis3_t a, double radius) {
return cast_from_gp(gp_Sphere(cast_to_gp(a), radius));
}
torus_t make_torus_from_axis3(axis3_t a, double major_radius,
double minor_radius) {
return cast_from_gp(gp_Torus(cast_to_gp(a), major_radius, minor_radius));
}
torus_t make_torus_from_elips(elips_t el) {
return make_torus_from_axis3(make_axis3(el.a2), el.major_radius,
el.minor_radius);
}
#ifdef __cplusplus
}
#endif