(
box_center: Vector3, box_size: Vector3, is_cylindrical: bool = False
)
| 290 | |
| 291 | |
| 292 | def box_vertices( |
| 293 | box_center: Vector3, box_size: Vector3, is_cylindrical: bool = False |
| 294 | ) -> Tuple[float, float, float, float, float, float]: |
| 295 | # in cylindrical coordinates, radial (R) axis |
| 296 | # is in the range (0,R) rather than (-R/2,+R/2) |
| 297 | # as in Cartesian coordinates. |
| 298 | if is_cylindrical: |
| 299 | xmin = 0 |
| 300 | xmax = box_size.x |
| 301 | else: |
| 302 | xmin = box_center.x - 0.5 * box_size.x |
| 303 | xmax = box_center.x + 0.5 * box_size.x |
| 304 | ymin = box_center.y - 0.5 * box_size.y |
| 305 | ymax = box_center.y + 0.5 * box_size.y |
| 306 | zmin = box_center.z - 0.5 * box_size.z |
| 307 | zmax = box_center.z + 0.5 * box_size.z |
| 308 | |
| 309 | return xmin, xmax, ymin, ymax, zmin, zmax |
| 310 | |
| 311 | |
| 312 | # ------------------------------------------------------- # |
no outgoing calls
no test coverage detected