| 3579 | |
| 3580 | @classmethod |
| 3581 | def makePlane( |
| 3582 | cls, |
| 3583 | length: float | None = None, |
| 3584 | width: float | None = None, |
| 3585 | basePnt: VectorLike = (0, 0, 0), |
| 3586 | dir: VectorLike = (0, 0, 1), |
| 3587 | ) -> Face: |
| 3588 | basePnt = Vector(basePnt) |
| 3589 | dir = Vector(dir) |
| 3590 | |
| 3591 | pln_geom = gp_Pln(basePnt.toPnt(), dir.toDir()) |
| 3592 | |
| 3593 | if length and width: |
| 3594 | pln_shape = BRepBuilderAPI_MakeFace( |
| 3595 | pln_geom, -width * 0.5, width * 0.5, -length * 0.5, length * 0.5 |
| 3596 | ).Face() |
| 3597 | else: |
| 3598 | pln_shape = BRepBuilderAPI_MakeFace(pln_geom).Face() |
| 3599 | |
| 3600 | return cls(pln_shape) |
| 3601 | |
| 3602 | @overload |
| 3603 | @classmethod |