Appearance import fixes (#6466)
* fix appearance imports Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix appearance Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
		
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -22,6 +22,5 @@ once fixed in engine will just start working here with no language changes.
 | 
			
		||||
    chamfer cases work currently.
 | 
			
		||||
 | 
			
		||||
- **Appearance**: Changing the appearance on a loft does not work. 
 | 
			
		||||
    Changing the appearance on an imported model does not work.
 | 
			
		||||
 | 
			
		||||
- **CSG Booleans**: Coplanar (bodies that share a plane) unions, subtractions, and intersections are not currently supported.
 | 
			
		||||
 | 
			
		||||
@ -36222,7 +36222,7 @@
 | 
			
		||||
      "// Setting the appearance of a 3D pattern can be done _before_ or _after_ the pattern.\n// This example shows _after_ the pattern.\nexampleSketch = startSketchOn(XZ)\n  |> startProfileAt([0, 0], %)\n  |> line(end = [0, 2])\n  |> line(end = [3, 1])\n  |> line(end = [0, -4])\n  |> close()\n\nexample = extrude(exampleSketch, length = 1)\n  |> patternLinear3d(axis = [1, 0, 1], instances = 7, distance = 6)\n  |> appearance(color = '#ff0000', metalness = 90, roughness = 90)",
 | 
			
		||||
      "// Color the result of a 2D pattern that was extruded.\nexampleSketch = startSketchOn(XZ)\n  |> startProfileAt([.5, 25], %)\n  |> line(end = [0, 5])\n  |> line(end = [-1, 0])\n  |> line(end = [0, -5])\n  |> close()\n  |> patternCircular2d(\n       center = [0, 0],\n       instances = 13,\n       arcDegrees = 360,\n       rotateDuplicates = true,\n     )\n\nexample = extrude(exampleSketch, length = 1)\n  |> appearance(color = '#ff0000', metalness = 90, roughness = 90)",
 | 
			
		||||
      "// Color the result of a sweep.\n\n// Create a path for the sweep.\nsweepPath = startSketchOn(XZ)\n  |> startProfileAt([0.05, 0.05], %)\n  |> line(end = [0, 7])\n  |> tangentialArc(angle = 90, radius = 5)\n  |> line(end = [-3, 0])\n  |> tangentialArc(angle = -90, radius = 5)\n  |> line(end = [0, 7])\n\npipeHole = startSketchOn(XY)\n  |> circle(center = [0, 0], radius = 1.5)\n\nsweepSketch = startSketchOn(XY)\n  |> circle(center = [0, 0], radius = 2)\n  |> hole(pipeHole, %)\n  |> sweep(path = sweepPath)\n  |> appearance(color = \"#ff0000\", metalness = 50, roughness = 50)",
 | 
			
		||||
      "// Change the appearance of an imported model.\n\n\nimport \"tests/inputs/cube.sldprt\" as cube\n\ncube\n// |> appearance(\n// color = \"#ff0000\",\n// metalness = 50,\n// roughness = 50\n// )"
 | 
			
		||||
      "// Change the appearance of an imported model.\n\n\nimport \"tests/inputs/cube.sldprt\" as cube\n\ncube\n  |> appearance(color = \"#ff0000\", metalness = 50, roughness = 50)"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
@ -277,11 +277,11 @@ pub async fn appearance(exec_state: &mut ExecState, args: Args) -> Result<KclVal
 | 
			
		||||
/// import "tests/inputs/cube.sldprt" as cube
 | 
			
		||||
///
 | 
			
		||||
/// cube
 | 
			
		||||
/// //    |> appearance(
 | 
			
		||||
/// //        color = "#ff0000",
 | 
			
		||||
/// //        metalness = 50,
 | 
			
		||||
/// //        roughness = 50
 | 
			
		||||
/// //    )
 | 
			
		||||
///    |> appearance(
 | 
			
		||||
///        color = "#ff0000",
 | 
			
		||||
///        metalness = 50,
 | 
			
		||||
///        roughness = 50
 | 
			
		||||
///    )
 | 
			
		||||
/// ```
 | 
			
		||||
#[stdlib {
 | 
			
		||||
    name = "appearance",
 | 
			
		||||
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 60 KiB  | 
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 67 KiB  | 
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 82 KiB  | 
		Reference in New Issue
	
	Block a user