Open franknoirot opened 4 months ago
Currently there's no way to implement elliptical curves in the engine. There are straight lines, arcs, and cubic bezier curves, but none of these options could make a fully accurate ellipse.
Best way i can think of to currently implement this ellipse kcl stdlib function is using 4 cubic bezier curves, but this will deviate from the ellipse as eccentricity increases. Does anyone have a better approach? or perhaps a plan to implement some sketch primitive in the engine that could draw an ellipse more accurately?
We need the ability to define ellipses in KCL. Since ellipses are by definition closed profiles, I think it should not require a
startProfileAt
but should be a SketchProfile in its own right (when we support multiple profiles per sketch).Proposed API
Other considerations
circle
function could be made a thin wrapper on this function that just hasmajorAxisLength == minorAxisLength