Replace plane strings with literals (#6592)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -26,7 +26,7 @@ pub async fn segment_end(exec_state: &mut ExecState, args: Args) -> Result<KclVa
|
||||
///
|
||||
/// ```no_run
|
||||
/// w = 15
|
||||
/// cube = startSketchOn('XY')
|
||||
/// cube = startSketchOn(XY)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [w, 0], tag = $line1)
|
||||
/// |> line(end = [0, w], tag = $line2)
|
||||
@ -36,7 +36,7 @@ pub async fn segment_end(exec_state: &mut ExecState, args: Args) -> Result<KclVa
|
||||
/// |> extrude(length = 5)
|
||||
///
|
||||
/// fn cylinder(radius, tag) {
|
||||
/// return startSketchOn('XY')
|
||||
/// return startSketchOn(XY)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> circle(radius = radius, center = segEnd(tag) )
|
||||
/// |> extrude(length = radius)
|
||||
@ -78,7 +78,7 @@ pub async fn segment_end_x(exec_state: &mut ExecState, args: Args) -> Result<Kcl
|
||||
/// Compute the ending point of the provided line segment along the 'x' axis.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [20, 0], tag = $thing)
|
||||
/// |> line(end = [0, 5])
|
||||
@ -119,7 +119,7 @@ pub async fn segment_end_y(exec_state: &mut ExecState, args: Args) -> Result<Kcl
|
||||
/// Compute the ending point of the provided line segment along the 'y' axis.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [20, 0])
|
||||
/// |> line(end = [0, 3], tag = $thing)
|
||||
@ -162,7 +162,7 @@ pub async fn segment_start(exec_state: &mut ExecState, args: Args) -> Result<Kcl
|
||||
///
|
||||
/// ```no_run
|
||||
/// w = 15
|
||||
/// cube = startSketchOn('XY')
|
||||
/// cube = startSketchOn(XY)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [w, 0], tag = $line1)
|
||||
/// |> line(end = [0, w], tag = $line2)
|
||||
@ -172,7 +172,7 @@ pub async fn segment_start(exec_state: &mut ExecState, args: Args) -> Result<Kcl
|
||||
/// |> extrude(length = 5)
|
||||
///
|
||||
/// fn cylinder(radius, tag) {
|
||||
/// return startSketchOn('XY')
|
||||
/// return startSketchOn(XY)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> circle( radius = radius, center = segStart(tag) )
|
||||
/// |> extrude(length = radius)
|
||||
@ -214,7 +214,7 @@ pub async fn segment_start_x(exec_state: &mut ExecState, args: Args) -> Result<K
|
||||
/// Compute the starting point of the provided line segment along the 'x' axis.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [20, 0], tag = $thing)
|
||||
/// |> line(end = [0, 5])
|
||||
@ -255,7 +255,7 @@ pub async fn segment_start_y(exec_state: &mut ExecState, args: Args) -> Result<K
|
||||
/// Compute the starting point of the provided line segment along the 'y' axis.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [20, 0])
|
||||
/// |> line(end = [0, 3], tag = $thing)
|
||||
@ -298,7 +298,7 @@ pub async fn last_segment_x(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
/// sketch.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn("XZ")
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [5, 0])
|
||||
/// |> line(end = [20, 5])
|
||||
@ -344,7 +344,7 @@ pub async fn last_segment_y(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
/// sketch.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn("XZ")
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [5, 0])
|
||||
/// |> line(end = [20, 5])
|
||||
@ -387,7 +387,7 @@ pub async fn segment_length(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
/// Compute the length of the provided line segment.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn("XZ")
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> angledLine(
|
||||
/// angle = 60,
|
||||
@ -434,7 +434,7 @@ pub async fn segment_angle(exec_state: &mut ExecState, args: Args) -> Result<Kcl
|
||||
/// Compute the angle (in degrees) of the provided line segment.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [10, 0])
|
||||
/// |> line(end = [5, 10], tag = $seg01)
|
||||
@ -480,7 +480,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
///
|
||||
/// ```no_run
|
||||
/// // Horizontal pill.
|
||||
/// pillSketch = startSketchOn('XZ')
|
||||
/// pillSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [20, 0])
|
||||
/// |> tangentialArc(end = [0, 10], tag = $arc1)
|
||||
@ -496,7 +496,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
///
|
||||
/// ```no_run
|
||||
/// // Vertical pill. Use absolute coordinate for arc.
|
||||
/// pillSketch = startSketchOn('XZ')
|
||||
/// pillSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [0, 20])
|
||||
/// |> tangentialArc(endAbsolute = [10, 20], tag = $arc1)
|
||||
@ -511,7 +511,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
/// ```
|
||||
///
|
||||
/// ```no_run
|
||||
/// rectangleSketch = startSketchOn('XZ')
|
||||
/// rectangleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [10, 0], tag = $seg1)
|
||||
/// |> angledLine(
|
||||
@ -526,7 +526,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
/// ```
|
||||
///
|
||||
/// ```no_run
|
||||
/// bottom = startSketchOn("XY")
|
||||
/// bottom = startSketchOn(XY)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> arc(
|
||||
/// endAbsolute = [10, 10],
|
||||
@ -538,10 +538,10 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
/// ```
|
||||
///
|
||||
/// ```no_run
|
||||
/// circSketch = startSketchOn("XY")
|
||||
/// circSketch = startSketchOn(XY)
|
||||
/// |> circle( center= [0, 0], radius= 3 , tag= $circ)
|
||||
///
|
||||
/// triangleSketch = startSketchOn("XY")
|
||||
/// triangleSketch = startSketchOn(XY)
|
||||
/// |> startProfile(at = [-5, 0])
|
||||
/// |> angledLine(angle = tangentToEnd(circ), length = 10)
|
||||
/// |> line(end = [-15, 0])
|
||||
|
Reference in New Issue
Block a user