Ellipse issue on OpenCASCADE
When switching to OpenCASCADE the Ellipse function does not behave as expected, the expected outcome of the function is to create an arc that is part of an ellipse, exactly as the Built-in Ellipse function would.
Here is the code:
SetFactory("OpenCASCADE");
// Ellipsoid points
p1 = newp; Point(p1) = {0, 0, 0};
p2 = newp; Point(p2) = {0, -1, 0};
p3 = newp; Point(p3) = {0.6, -0.8, 0};
p4 = newp; Point(p4) = {10, 0, 0};
// Ellipsoid lines
e1 = newl; Ellipse(e1) = {p2, p1, p4, p3};
And the outcome:
Error : Could not create ellipse arc
Error : 'test_bug.geo', line 10 : Could not add ellipse
This seems to be an issue in the implementation of the function and it only works if it is making a circle instead of an ellipse, to create an ellipse arc it would need the full 4 parameters but in the code it only uses 3 so it cannot reproduce the expected curve:
else if(tags.size() == 4){
r = GModel::current()->getOCCInternals()->addEllipseArc
(num, tags[0], tags[1], tags[3]);
}
From the file Gmsh.tab.cpp line 7796
Tested with latest release version 4.3.0