Construct a solid torus.
(d1: float, d2: float)
| 6446 | |
| 6447 | |
| 6448 | def torus(d1: float, d2: float) -> Solid: |
| 6449 | """ |
| 6450 | Construct a solid torus. |
| 6451 | """ |
| 6452 | |
| 6453 | return _shape( |
| 6454 | BRepPrimAPI_MakeTorus( |
| 6455 | gp_Ax2(Vector(0, 0, 0).toPnt(), Vector(0, 0, 1).toDir()), |
| 6456 | d1 / 2, |
| 6457 | d2 / 2, |
| 6458 | 0, |
| 6459 | 2 * pi, |
| 6460 | ).Shape(), |
| 6461 | Solid, |
| 6462 | ) |
| 6463 | |
| 6464 | |
| 6465 | @multidispatch |