47 lines
		
	
	
		
			80 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			80 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| ---
 | |
| title: "angledLineOfYLength"
 | |
| excerpt: "Create a line segment from the current 2-dimensional sketch origin"
 | |
| layout: manual
 | |
| ---
 | |
| 
 | |
| Create a line segment from the current 2-dimensional sketch origin
 | |
| 
 | |
| along some angle (in degrees) for some relative length in the 'y' dimension.
 | |
| 
 | |
| ```js
 | |
| angledLineOfYLength(data: AngledLineData, sketch: Sketch, tag?: TagDeclarator) -> Sketch
 | |
| ```
 | |
| 
 | |
| 
 | |
| ### Arguments
 | |
| 
 | |
| | Name | Type | Description | Required |
 | |
| |----------|------|-------------|----------|
 | |
| | `data` | [`AngledLineData`](/docs/kcl/types/AngledLineData) | Data to draw an angled line. | Yes |
 | |
| | `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
 | |
| | `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) |  | No |
 | |
| 
 | |
| ### Returns
 | |
| 
 | |
| [`Sketch`](/docs/kcl/types/Sketch) - A sketch is a collection of paths.
 | |
| 
 | |
| 
 | |
| ### Examples
 | |
| 
 | |
| ```js
 | |
| exampleSketch = startSketchOn('XZ')
 | |
|   |> startProfileAt([0, 0], %)
 | |
|   |> line([10, 0], %)
 | |
|   |> angledLineOfYLength({ angle = 45, length = 10 }, %)
 | |
|   |> line([0, 10], %)
 | |
|   |> angledLineOfYLength({ angle = 135, length = 10 }, %)
 | |
|   |> line([-10, 0], %)
 | |
|   |> line([0, -30], %)
 | |
| 
 | |
| example = extrude(10, exampleSketch)
 | |
| ```
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 |