Import shape from a BREP file
(cls, f: str | BytesIO)
| 569 | |
| 570 | @classmethod |
| 571 | def importBrep(cls, f: str | BytesIO) -> Shape: |
| 572 | """ |
| 573 | Import shape from a BREP file |
| 574 | """ |
| 575 | s = TopoDS_Shape() |
| 576 | builder = BRep_Builder() |
| 577 | |
| 578 | BRepTools.Read_s(s, f, builder) |
| 579 | |
| 580 | if s.IsNull(): |
| 581 | raise ValueError(f"Could not import {f}") |
| 582 | |
| 583 | return cls.cast(s) |
| 584 | |
| 585 | def exportBin(self, f: str | BytesIO) -> bool: |
| 586 | """ |