99 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			99 KiB
		
	
	
	
	
	
	
	
title, excerpt, layout
| title | excerpt | layout | 
|---|---|---|
| sweep | Extrude a sketch along a path. | manual | 
Extrude a sketch along a path.
This, like extrude, is able to create a 3-dimensional solid from a 2-dimensional sketch. However, unlike extrude, this creates a solid by using the extent of the sketch as its path. This is useful for creating more complex shapes that can't be created with a simple extrusion.
sweep(data: SweepData, sketch: Sketch) -> Solid
Arguments
| Name | Type | Description | Required | 
|---|---|---|---|
data | 
SweepData | 
Data for a sweep. | Yes | 
sketch | 
Sketch | 
A sketch is a collection of paths. | Yes | 
Returns
Solid - An solid is a collection of extrude surfaces.
Examples
// Create a pipe using a sweep.
// Create a path for the sweep.
sweepPath = startSketchOn('XZ')
  |> startProfileAt([0.05, 0.05], %)
  |> line([0, 7], %)
  |> tangentialArc({ offset = 90, radius = 5 }, %)
  |> line([-3, 0], %)
  |> tangentialArc({ offset = -90, radius = 5 }, %)
  |> line([0, 7], %)
// Create a hole for the pipe.
pipeHole = startSketchOn('XY')
  |> circle({ center = [0, 0], radius = 1.5 }, %)
sweepSketch = startSketchOn('XY')
  |> circle({ center = [0, 0], radius = 2 }, %)
  |> hole(pipeHole, %)
  |> sweep({ path = sweepPath }, %)