draw.Drawing

Methods

Method Reference: draw.Drawing.polyline

draw.Drawing: D = polyline (D, PL)

Append a polyline.

D = polyline (D, PL) appends the geom.Polyline PL, open or closed, its arcs drawn as arcs. A polyline of arcs and lines together is how a slot, a rounded plate or an obround is drawn as one entity rather than as a handful that a later edit can pull apart:

 
 D = draw.Drawing ();
 D = D.polyline (geom.Polyline ([0, 0; 80, 0; 80, 50; 0, 50], ...
                                'Closed', true));
 D = D.polyline (geom.Polyline ([0, -6, 0; 40, -6, 1; 40, 6, 0; ...
                                 0, 6, 1], 'Closed', true));

A drawing is flat, so PL must lie in its xy plane. Its geom.UCS may still have its own origin and x axis there, and may face down: the vertices are carried into the drawing’s coordinates, and an arc keeps its true sense seen from above.

See also: geom.Polyline

Source Code: draw.Drawing