zalo / CascadeStudio

A Full Live-Scripted CAD Kernel in the Browser
https://zalo.github.io/CascadeStudio/
MIT License
1.03k stars 129 forks source link

Is BRepBuilderAPI_MakeEdge from GC_MakeArcOfCircle not working? #126

Open womaas opened 2 years ago

womaas commented 2 years ago

Hi. I am trying to create an edge from an arc:

let arc_curve = new oc.GC_MakeArcOfCircle(p1, p2, p3).Value();
let arc1 = new oc.BRepBuilderAPI_MakeEdge(arc_curve).Edge();

sceneShapes.push(arc1);

but I get the error:

Line 12511002: RuntimeError: indirect call to null
Line 18: uncaught exception: There were no scene shapes returned!

Everything works for an edge from a line (GC_MakeSegment) .

womaas commented 2 years ago

It looks like the problem was related to the inability to build an arc through the provided points. With suitable points everything is ok.

But the error message was not informative. Is it the same in the C ++ version?