KittyCAD / modeling-app

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

revolve() produces error about axis when sketch is on XZ to begin with #3497

Closed yeroca closed 2 months ago

yeroca commented 2 months ago

[Add a title above and insert a description of the issue here]

If I start a sketch on the XZ axis, and tell revolve() to revolve on the Z axis, it tells me "Modeling command failed: [ApiError { error_code: InternalEngine, message: "Invalid axis of revolution. Axis of revolution must lie in the plane" }]"

The Z axis does in fact lie in the XZ plane.

If I specify to revolve on the Y axis, it works (which it should not).

If I change the SketchOn axis to XY, and then revolve on Y, that works too.

So there's something wrong regarding the Z axis that's causing an error

I think I reported a simlar bug a while back, but I don't think it was about revolve. I could be wrong, and if so, sorry about this duplicate bug.

Screenshot

Core Dump [coredump-97eeeba9-9f12-4830-a70d-94e7164f8418.json](https://public.blob.zoo.dev/cb418988-c069-4881-9b2c-25f9cc9c5f81/modeling-app/coredump-97eeeba9-9f12-4830-a70d-94e7164f8418.json) Reference ID: 97eeeba9-9f12-4830-a70d-94e7164f8418
KCL Code ```kcl const bottomInnerR = 6 const bottomOuterR = 12 const topInnerR = 7 const topOuterR = 8 const coneH = 8 const baseH = 2 const sketch001 = startSketchOn('XZ') |> startProfileAt([bottomInnerR,0], %) |> xLineTo(bottomOuterR, %) |> yLine(baseH, %) |> line([-(bottomOuterR - topOuterR), coneH], %) |> line([-(topOuterR - topInnerR), 0], %) |> close(%) |> revolve({axis: 'Z'}, %) ```
yeroca commented 2 months ago

Oops, this is a duplicate of #2450

jessfraz commented 2 months ago

close as dupe of https://github.com/KittyCAD/modeling-app/issues/2540