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

Function polyline

cadquery/occ_impl/shapes.py:6264–6274  ·  view source on GitHub ↗

Construct a polyline from points.

(*pts: VectorLike)

Source from the content-addressed store, hash-verified

6262
6263
6264def polyline(*pts: VectorLike) -> Wire:
6265 """
6266 Construct a polyline from points.
6267 """
6268
6269 builder = BRepBuilderAPI_MakePolygon()
6270
6271 for p in pts:
6272 builder.Add(Vector(p).toPnt())
6273
6274 return _shape(builder.Wire(), Wire)
6275
6276
6277def polygon(*pts: VectorLike) -> Wire:

Callers 4

test_edge_paramAtFunction · 0.90
test_curvatureFunction · 0.90
test_interpPlateMethod · 0.85
test_polylineFunction · 0.85

Calls 3

VectorClass · 0.85
_shapeFunction · 0.85
toPntMethod · 0.80

Tested by 4

test_edge_paramAtFunction · 0.72
test_curvatureFunction · 0.72
test_interpPlateMethod · 0.68
test_polylineFunction · 0.68