more shell examples (#3414)
* more shell examples Signed-off-by: Jess Frazelle <github@jessfraz.com> * update known issues Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
		@ -25,5 +25,5 @@ once fixed in engine will just start working here with no language changes.
 | 
			
		||||
 | 
			
		||||
    Sketching on the chamfered face does not currently work.
 | 
			
		||||
 | 
			
		||||
- **Shell**: Shell is only working for `end` faces, not for `side` or `start` 
 | 
			
		||||
    faces. We are tracking the engine side bug on this.
 | 
			
		||||
- **Shell**: Shell sometimes does not work when arcs or fillets are involved.
 | 
			
		||||
    We are tracking the engine side bug on this.
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -197582,7 +197582,9 @@
 | 
			
		||||
    "unpublished": false,
 | 
			
		||||
    "deprecated": false,
 | 
			
		||||
    "examples": [
 | 
			
		||||
      "const firstSketch = startSketchOn('XY')\n  |> startProfileAt([-12, 12], %)\n  |> line([24, 0], %)\n  |> line([0, -24], %)\n  |> line([-24, 0], %)\n  |> close(%)\n  |> extrude(6, %)\n\n// Remove the end face for the extrusion.\nshell({ faces: ['end'], thickness: 0.25 }, firstSketch)"
 | 
			
		||||
      "const firstSketch = startSketchOn('XY')\n  |> startProfileAt([-12, 12], %)\n  |> line([24, 0], %)\n  |> line([0, -24], %)\n  |> line([-24, 0], %)\n  |> close(%)\n  |> extrude(6, %)\n\n// Remove the end face for the extrusion.\nshell({ faces: ['end'], thickness: 0.25 }, firstSketch)",
 | 
			
		||||
      "const firstSketch = startSketchOn('-XZ')\n  |> startProfileAt([-12, 12], %)\n  |> line([24, 0], %)\n  |> line([0, -24], %)\n  |> line([-24, 0], %)\n  |> close(%)\n  |> extrude(6, %)\n\n// Remove the start face for the extrusion.\nshell({ faces: ['start'], thickness: 0.25 }, firstSketch)",
 | 
			
		||||
      "const firstSketch = startSketchOn('XY')\n  |> startProfileAt([-12, 12], %)\n  |> line([24, 0], %)\n  |> line([0, -24], %)\n  |> line([-24, 0], %, $myTag)\n  |> close(%)\n  |> extrude(6, %)\n\n// Remove a tagged face for the extrusion.\nshell({ faces: [myTag], thickness: 0.25 }, firstSketch)"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
@ -50,6 +50,7 @@ pub async fn circle(args: Args) -> Result<KclValue, KclError> {
 | 
			
		||||
///   |> hole(circle([0, 15], 5, %), %)
 | 
			
		||||
///
 | 
			
		||||
/// const example = extrude(5, exampleSketch)
 | 
			
		||||
/// ```
 | 
			
		||||
#[stdlib {
 | 
			
		||||
    name = "circle",
 | 
			
		||||
}]
 | 
			
		||||
 | 
			
		||||
@ -50,6 +50,38 @@ pub async fn shell(args: Args) -> Result<KclValue, KclError> {
 | 
			
		||||
///     thickness: 0.25,
 | 
			
		||||
/// }, firstSketch)
 | 
			
		||||
/// ```
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// const firstSketch = startSketchOn('-XZ')
 | 
			
		||||
///     |> startProfileAt([-12, 12], %)
 | 
			
		||||
///     |> line([24, 0], %)
 | 
			
		||||
///     |> line([0, -24], %)
 | 
			
		||||
///     |> line([-24, 0], %)
 | 
			
		||||
///     |> close(%)
 | 
			
		||||
///     |> extrude(6, %)
 | 
			
		||||
///
 | 
			
		||||
/// // Remove the start face for the extrusion.
 | 
			
		||||
/// shell({
 | 
			
		||||
///     faces: ['start'],
 | 
			
		||||
///     thickness: 0.25,
 | 
			
		||||
/// }, firstSketch)
 | 
			
		||||
/// ```
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// const firstSketch = startSketchOn('XY')
 | 
			
		||||
///     |> startProfileAt([-12, 12], %)
 | 
			
		||||
///     |> line([24, 0], %)
 | 
			
		||||
///     |> line([0, -24], %)
 | 
			
		||||
///     |> line([-24, 0], %, $myTag)
 | 
			
		||||
///     |> close(%)
 | 
			
		||||
///     |> extrude(6, %)
 | 
			
		||||
///
 | 
			
		||||
/// // Remove a tagged face for the extrusion.
 | 
			
		||||
/// shell({
 | 
			
		||||
///     faces: [myTag],
 | 
			
		||||
///     thickness: 0.25,
 | 
			
		||||
/// }, firstSketch)
 | 
			
		||||
/// ```
 | 
			
		||||
#[stdlib {
 | 
			
		||||
    name = "shell",
 | 
			
		||||
}]
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								src/wasm-lib/kcl/tests/outputs/serial_test_example_shell1.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/wasm-lib/kcl/tests/outputs/serial_test_example_shell1.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 161 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								src/wasm-lib/kcl/tests/outputs/serial_test_example_shell2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/wasm-lib/kcl/tests/outputs/serial_test_example_shell2.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 131 KiB  | 
		Reference in New Issue
	
	Block a user