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

Method polygon

cadquery/sketch.py:352–367  ·  view source on GitHub ↗

Construct a polygonal face.

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

Source from the content-addressed store, hash-verified

350 return self.polygon(pts, angle, mode, tag)
351
352 def polygon(
353 self: T,
354 pts: Iterable[Point],
355 angle: Real = 0,
356 mode: Modes = "a",
357 tag: Optional[str] = None,
358 ) -> T:
359 """
360 Construct a polygonal face.
361 """
362
363 w = Wire.makePolygon(
364 (p if isinstance(p, Vector) else Vector(*p) for p in pts), False, True
365 )
366
367 return self.face(w, angle, mode, tag)
368
369 # distribute locations
370

Callers 2

trapezoidMethod · 0.95
regularPolygonMethod · 0.95

Calls 3

faceMethod · 0.95
VectorClass · 0.85
makePolygonMethod · 0.80

Tested by

no test coverage detected