* KCL: Show beautiful Miette errors when a KCL example test fails
Background: KCL example tests are generated from the stdlib KCL examples in the `#[stdlib]` macro in derive-docs.
Problem: When these tests fail, they output a really unhelpful error message like Kcl(Semantic(KclErrorDetails { source_ranges: [156, 160, 0], message: "Expected a sketch but found array" } )).
Solution: Use miette. Now the errors highlight the KCL code that failed and show exactly what went wrong, on which line, presenting nice diagnostics that look like cargo/rustc output.
* Update helix snapshots
176 KiB
176 KiB
title, excerpt, layout
| title | excerpt | layout |
|---|---|---|
| helix | Create a helix on a cylinder. | manual |
Create a helix on a cylinder.
helix(data: HelixData, solid: Solid) -> Solid
Arguments
| Name | Type | Description | Required |
|---|---|---|---|
data |
HelixData |
Data for helices. | Yes |
solid |
Solid |
An solid is a collection of extrude surfaces. | Yes |
Returns
Solid - An solid is a collection of extrude surfaces.
Examples
part001 = startSketchOn('XY')
|> circle({ center = [5, 5], radius = 10 }, %)
|> extrude(10, %)
|> helix({
angleStart = 0,
ccw = true,
revolutions = 16
}, %)