MCPcopy Index your code
hub / github.com/CadQuery/cadquery / importBrep

Function importBrep

cadquery/occ_impl/importers/__init__.py:57–71  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

55
56
57def 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
74def importBin(fileName: str) -> "cq.Workplane":

Callers 1

importShapeFunction · 0.85

Calls 2

importBrepMethod · 0.80
newObjectMethod · 0.80

Tested by

no test coverage detected