Polyline sweeps - Sketch
Description: Sketch

Next: Nested sweeps, Previous: Point sweeps, Up: Swept objects

#### 2.7.2 Polyline sweeps

Sweeping a polyline produces a surface composed of many faces. The unbroken helix in the example Helix with cull set false then true is produced by this code (plus a surrounding `put` rotation to make an interesting view; this has been omitted).

      def K [0,0,1]
      sweep[cull=false] {
        60,
        rotate(10, (0,0,0), [K]) then translate(1/6 * [K])
      } line[linewidth=2pt](-1,0)(1,0)

Again, 60 segments of the helix are produced by connecting 61 instances of the swept line. Options applied to the sweep, here `cull=false`, are treated as options for the generated polygon or polyline. Options of the swept line itself, here `linewidth=2pt`, are ignored, though with a warning. This `def` is a vector definition, which must be referenced with square brackets, e.g. `[foo]`.