MCPcopy
hub / github.com/CadQuery/cadquery / rect

Method rect

cadquery/sketch.py:239–253  ·  view source on GitHub ↗

Construct a rectangular face.

(
        self: T,
        w: Real,
        h: Real,
        angle: Real = 0,
        mode: Modes = "a",
        tag: Optional[str] = None,
    )

Source from the content-addressed store, hash-verified

237 return self.face(res, angle, mode, tag)
238
239 def rect(
240 self: T,
241 w: Real,
242 h: Real,
243 angle: Real = 0,
244 mode: Modes = "a",
245 tag: Optional[str] = None,
246 ) -> T:
247 """
248 Construct a rectangular face.
249 """
250
251 res = Face.makePlane(h, w).rotate(Vector(), Vector(0, 0, 1), angle)
252
253 return self.each(lambda l: res.located(l), mode, tag)
254
255 def circle(self: T, r: Real, mode: Modes = "a", tag: Optional[str] = None) -> T:
256 """

Callers

nothing calls this directly

Calls 5

eachMethod · 0.95
VectorClass · 0.85
makePlaneMethod · 0.80
rotateMethod · 0.45
locatedMethod · 0.45

Tested by

no test coverage detected