Loads the BREP file as a single shape into a cadquery Workplane. :param fileName: The path and name of the BREP file to be imported
(fileName: str)
| 55 | |
| 56 | |
| 57 | def importBrep(fileName: str) -> "cq.Workplane": |
| 58 | """ |
| 59 | Loads the BREP file as a single shape into a cadquery Workplane. |
| 60 | |
| 61 | :param fileName: The path and name of the BREP file to be imported |
| 62 | |
| 63 | """ |
| 64 | shape = Shape.importBrep(fileName) |
| 65 | |
| 66 | # We know a single shape is returned. Sending it as a list prevents |
| 67 | # newObject from decomposing the part into its constituent parts. If the |
| 68 | # shape is a compound, it will be stored as a compound on the workplane. In |
| 69 | # some cases it may be desirable for the compound to be broken into its |
| 70 | # constituent solids. To do this, use list(shape) or shape.Solids(). |
| 71 | return cq.Workplane("XY").newObject([shape]) |
| 72 | |
| 73 | |
| 74 | def importBin(fileName: str) -> "cq.Workplane": |
no test coverage detected