* Show more info on hover for variables Signed-off-by: Nick Cameron <nrc@ncameron.org> * Move hover impls to lsp module Signed-off-by: Nick Cameron <nrc@ncameron.org> * Make hover work on names inside calls, fix doc line breaking, trim docs in tool tips Signed-off-by: Nick Cameron <nrc@ncameron.org> * Test the new hovers; fix signature syntax Signed-off-by: Nick Cameron <nrc@ncameron.org> * Hover tips for kwargs Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
490 KiB
490 KiB
title, excerpt, layout
| title | excerpt | layout |
|---|---|---|
| offsetPlane | Offset a plane by a distance along its normal. | manual |
Offset a plane by a distance along its normal.
For example, if you offset the 'XZ' plane by 10, the new plane will be parallel to the 'XZ' plane and 10 units away from it.
offsetPlane(
plane: PlaneData,
offset: number,
): Plane
Arguments
| Name | Type | Description | Required |
|---|---|---|---|
plane |
PlaneData |
The plane (e.g. 'XY') which this new plane is created from. | Yes |
offset |
number |
Distance from the standard plane this new plane will be created at. | Yes |
Returns
Plane - A plane.
Examples
// Loft a square and a circle on the `XY` plane using offset.
squareSketch = startSketchOn('XY')
|> startProfileAt([-100, 200], %)
|> line(end = [200, 0])
|> line(end = [0, -200])
|> line(end = [-200, 0])
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
circleSketch = startSketchOn(offsetPlane('XY', offset = 150))
|> circle(center = [0, 100], radius = 50)
loft([squareSketch, circleSketch])
// Loft a square and a circle on the `XZ` plane using offset.
squareSketch = startSketchOn('XZ')
|> startProfileAt([-100, 200], %)
|> line(end = [200, 0])
|> line(end = [0, -200])
|> line(end = [-200, 0])
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
circleSketch = startSketchOn(offsetPlane('XZ', offset = 150))
|> circle(center = [0, 100], radius = 50)
loft([squareSketch, circleSketch])
// Loft a square and a circle on the `YZ` plane using offset.
squareSketch = startSketchOn('YZ')
|> startProfileAt([-100, 200], %)
|> line(end = [200, 0])
|> line(end = [0, -200])
|> line(end = [-200, 0])
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
circleSketch = startSketchOn(offsetPlane('YZ', offset = 150))
|> circle(center = [0, 100], radius = 50)
loft([squareSketch, circleSketch])
// Loft a square and a circle on the `-XZ` plane using offset.
squareSketch = startSketchOn('-XZ')
|> startProfileAt([-100, 200], %)
|> line(end = [200, 0])
|> line(end = [0, -200])
|> line(end = [-200, 0])
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
circleSketch = startSketchOn(offsetPlane('-XZ', offset = -150))
|> circle(center = [0, 100], radius = 50)
loft([squareSketch, circleSketch])
// A circle on the XY plane
startSketchOn("XY")
|> startProfileAt([0, 0], %)
|> circle(radius = 10, center = [0, 0])
// Triangle on the plane 4 units above
startSketchOn(offsetPlane("XY", offset = 4))
|> startProfileAt([0, 0], %)
|> line(end = [10, 0])
|> line(end = [0, 10])
|> close()