Improve snapshot testing (#5856)
* Improve snapshot testing Signed-off-by: Nick Cameron <nrc@ncameron.org> * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
		
							
								
								
									
										56
									
								
								rust/kcl-lib/tests/i_shape/unparsed.snap
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								rust/kcl-lib/tests/i_shape/unparsed.snap
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,56 @@
 | 
			
		||||
---
 | 
			
		||||
source: kcl-lib/src/simulation_tests.rs
 | 
			
		||||
description: Result of unparsing i_shape.kcl
 | 
			
		||||
---
 | 
			
		||||
d_wrist_circumference = [22.8, 10.7, 16.4, 18.5]
 | 
			
		||||
width = d_wrist_circumference[0] + d_wrist_circumference[1] + d_wrist_circumference[2] + d_wrist_circumference[3]
 | 
			
		||||
length = 120.0
 | 
			
		||||
hand_thickness = 24.0
 | 
			
		||||
corner_radius = 5.0
 | 
			
		||||
 | 
			
		||||
// At first I thought this was going to be symmetric,
 | 
			
		||||
// but I measured intentionally to not be symmetric,
 | 
			
		||||
// because your wrist isn't a perfect cylindrical surface
 | 
			
		||||
brace_base = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([corner_radius, 0], %)
 | 
			
		||||
  |> line(end = [width - corner_radius, 0.0])
 | 
			
		||||
  |> tangentialArcToRelative([corner_radius, corner_radius], %)
 | 
			
		||||
  |> yLine(length = 25.0 - corner_radius)
 | 
			
		||||
  |> tangentialArcToRelative([-corner_radius, corner_radius], %)
 | 
			
		||||
  |> xLine(length = -(d_wrist_circumference[0] - (corner_radius * 2)))
 | 
			
		||||
  |> tangentialArcToRelative([-corner_radius, corner_radius], %)
 | 
			
		||||
  |> yLine(length = length - 25.0 - 23.0 - (corner_radius * 2))
 | 
			
		||||
  |> tangentialArcToRelative([corner_radius, corner_radius], %)
 | 
			
		||||
  |> xLine(length = 15.0 - (corner_radius * 2))
 | 
			
		||||
  |> tangentialArcToRelative([corner_radius, corner_radius], %)
 | 
			
		||||
  |> yLine(length = 23.0 - corner_radius)
 | 
			
		||||
  |> tangentialArcToRelative([-corner_radius, corner_radius], %)
 | 
			
		||||
  |> xLine(length = -(hand_thickness + 15.0 + 15.0 - (corner_radius * 2)))
 | 
			
		||||
  |> tangentialArcToRelative([-corner_radius, -corner_radius], %)
 | 
			
		||||
  |> yLine(length = -(23.0 - corner_radius))
 | 
			
		||||
  |> tangentialArcToRelative([corner_radius, -corner_radius], %)
 | 
			
		||||
  |> xLine(length = 15.0 - (corner_radius * 2))
 | 
			
		||||
  |> tangentialArcToRelative([corner_radius, -corner_radius], %)
 | 
			
		||||
  |> yLine(length = -(length - 25.0 - 23.0 - (corner_radius * 2)))
 | 
			
		||||
  |> tangentialArcToRelative([-corner_radius, -corner_radius], %)
 | 
			
		||||
  |> xLine(length = -(d_wrist_circumference[1] + d_wrist_circumference[2] + d_wrist_circumference[3] - hand_thickness - corner_radius))
 | 
			
		||||
  |> tangentialArcToRelative([-corner_radius, -corner_radius], %)
 | 
			
		||||
  |> yLine(length = -(25.0 - corner_radius))
 | 
			
		||||
  |> tangentialArcToRelative([corner_radius, -corner_radius], %)
 | 
			
		||||
  |> close(%)
 | 
			
		||||
 | 
			
		||||
inner = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> xLine(length = 1.0)
 | 
			
		||||
  |> tangentialArcToRelative([corner_radius, corner_radius], %)
 | 
			
		||||
  |> yLine(length = 25.0 - (corner_radius * 2))
 | 
			
		||||
  |> tangentialArcToRelative([-corner_radius, corner_radius], %)
 | 
			
		||||
  |> xLine(length = -1.0)
 | 
			
		||||
  |> tangentialArcToRelative([-corner_radius, -corner_radius], %)
 | 
			
		||||
  |> yLine(length = -(25.0 - (corner_radius * 2)))
 | 
			
		||||
  |> tangentialArcToRelative([corner_radius, -corner_radius], %)
 | 
			
		||||
  |> close(%)
 | 
			
		||||
 | 
			
		||||
final = brace_base
 | 
			
		||||
  |> hole(inner, %)
 | 
			
		||||
  |> extrude(length = 3.0)
 | 
			
		||||
		Reference in New Issue
	
	Block a user