KittyCAD / modeling-app

The KittyCAD modeling app.
https://kittycad.io/modeling-app/download
MIT License
422 stars 35 forks source link

Comments can break the kcl code within a sketch group #3708

Closed mlfarrell closed 2 months ago

mlfarrell commented 2 months ago

Works

const insideDia = 1
const sphereDia = 0.5
const thickness = 0.25
const sketch001 = startSketchOn('XY')
  |> startProfileAt([
       0.05 + insideDia / 2 + thickness,
       0 - 0.05
     ], %)
  |> line([sphereDia - 0.1, 0], %)
  |> arc({
       angleStart: 0,
       angleEnd: -180,
       radius: sphereDia / 2 - 0.05
     }, %)
  |>close(%)
  |> revolve({
    axis: "Y",
  }, %)

Shows an error on the sidebar

const insideDia = 1
const sphereDia = 0.5
const thickness = 0.25
const sketch001 = startSketchOn('XY')
  // |> startProfileAt([0, 0], %)
  // |> arc({
  //   angleEnd: 270,
  //   angleStart: 450,
  //   radius: 50,
  // }, %)
  |> startProfileAt([
       0.05 + insideDia / 2 + thickness,
       0 - 0.05
     ], %)
  |> line([sphereDia - 0.1, 0], %)
  |> arc({
       angleStart: 0,
       angleEnd: -180,
       radius: sphereDia / 2 - 0.05
     }, %)
  |>close(%)
  |> revolve({
    axis: "Y",
  }, %)
jessfraz commented 2 months ago

I believe @adamchalmers fixed this on main but maybe it was not this specific case?

mlfarrell commented 2 months ago

My modeling app branch is up to date as of yesterday.