KittyCAD / modeling-app

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

Avocado Chair Regression - `"The given edge has no opposite edge"` #3830

Open jgomez720 opened 1 month ago

jgomez720 commented 1 month ago

Description

The avocado chair KCL sample used to work, but has regressed with the following error:

Modeling command failed: [ApiError { error_code: BadRequest, message: "The given edge has no opposite edge" }]

Line 50 is the issue: |> revolve({ angle: -180, axis: 'Y' }, %)

I'm taking it out of the KCL Samples until we see what the regression is.

Version

0.25.1

KCL

// Avocado Chair
// A modern office chair in the shape of an avocado

const radiusLarge = 25
const seatBackAngle = 68

const plane001 = {
  plane: {
    origin: [0.0, 0.0, 0.0],
    xAxis: [1.0, 0.0, 0.0],
    yAxis: [0.0, 0.4, 1.0],
    zAxis: [1.0, 0.0, 0.0]
  }
}

const chairBodyProfile = startSketchOn(plane001)
  |> startProfileAt([-0.1, 5], %)
  |> arc({
       angleStart: 270,
       angleEnd: 90 + seatBackAngle,
       radius: radiusLarge
     }, %)
  |> angledLine({
       angle: seatBackAngle,
       length: radiusLarge
     }, %)
  |> arc({
       angleStart: 90 + seatBackAngle,
       angleEnd: 90,
       radius: radiusLarge / 2 + 2.5
     }, %)
  |> yLine(-1, %)
  |> arc({
       angleStart: 90,
       angleEnd: 90 + seatBackAngle,
       radius: radiusLarge / 2 + 1.5
     }, %)
  |> angledLine({
       angle: seatBackAngle,
       length: -radiusLarge
     }, %)
  |> arc({
       angleStart: 90 + seatBackAngle,
       angleEnd: 270,
       radius: radiusLarge - 10
     }, %)
  |> xLine(8.3, %)
  |> close(%)
  |> revolve({ angle: -180, axis: 'Y' }, %)

const plane002 = {
  plane: {
    origin: [0.0, 0.0, 17.3],
    xAxis: [1.0, 0.0, 0.0],
    yAxis: [0.0, 1.0, 0.0],
    zAxis: [0.0, 0.0, 1.0]
  }
}
const chairSeatSketch = startSketchOn(plane002)
  |> startProfileAt([8.3, 7.4], %)
  |> arc({
       angleStart: -50,
       angleEnd: 230,
       radius: 13
     }, %)
  |> close(%)
const chairSeat = extrude(-2, chairSeatSketch)

const plane003 = {
  plane: {
    origin: [0.0, 15.0, 0.0],
    xAxis: [1.0, 0.0, 0.0],
    yAxis: [0.0, 0.0, 1.0],
    zAxis: [1.0, 0.0, 0.0]
  }
}

const standRevolve = startSketchOn(plane003)
  |> startProfileAt([10, 0], %)
  |> xLine(1, %)
  |> yLine(0.5, %)
  |> angledLine({ angle: 170, length: 4 }, %)
  |> arc({
       angleStart: 270,
       angleEnd: 220,
       radius: 1
     }, %)
  |> angledLine({ angle: 110, length: 3 }, %)
  |> xLine(-2, %)
  |> angledLineToY({ angle: 120, to: 0 }, %)
  |> close(%)
  |> revolve({ angle: 360, axis: 'Y' }, %)
jessfraz commented 1 month ago

this seems like maybe an engine thing since we didnt touch revolve on our side