A parallelepiped (i.e., a brick, possibly with non-orthogonal axes).
| 1238 | |
| 1239 | |
| 1240 | class Block(GeometricObject): |
| 1241 | """ |
| 1242 | A parallelepiped (i.e., a brick, possibly with non-orthogonal axes). |
| 1243 | """ |
| 1244 | |
| 1245 | def __init__( |
| 1246 | self, |
| 1247 | size, |
| 1248 | e1=Vector3(1, 0, 0), |
| 1249 | e2=Vector3(0, 1, 0), |
| 1250 | e3=Vector3(0, 0, 1), |
| 1251 | **kwargs, |
| 1252 | ): |
| 1253 | """ |
| 1254 | Construct a `Block`. |
| 1255 | |
| 1256 | + **`size` [`Vector3`]** — The lengths of the block edges along each of its three |
| 1257 | axes. Not really a 3-vector, but it has three components, each of which should |
| 1258 | be nonzero. No default value. |
| 1259 | |
| 1260 | + **`e1`, `e2`, `e3` [`Vector3`]** — The directions of the axes of the block; the |
| 1261 | lengths of these vectors are ignored. Must be linearly independent. They default |
| 1262 | to the three lattice directions. |
| 1263 | """ |
| 1264 | |
| 1265 | self.size = Vector3(*size) |
| 1266 | self.e1 = Vector3(*e1) |
| 1267 | self.e2 = Vector3(*e2) |
| 1268 | self.e3 = Vector3(*e3) |
| 1269 | super().__init__(**kwargs) |
| 1270 | |
| 1271 | |
| 1272 | class Ellipsoid(Block): |
nothing calls this directly
no outgoing calls
no test coverage detected