pythonocc-core
pythonocc-core copied to clipboard
Arcs/Circles are segmented when converting to BSplineCurve
Hi,
I have been trying to construct some Breps in OCC using PythonOCC. I have managed to successfully create Breps composed of BSplineSurfaces and most types of edges/curves (lines, BSplineCurves, polylines, etc.). I use the 2d curves in parameter space and the relevant surface to construct edges (i.e. BRepBuilderAPI_MakeEdge::BRepBuilderAPI_MakeEdge (Geom2d_Curve, Geom_Surface)
). For 2d BSplineCurves and lines, this seems to work fine.
The problem is that, when converting Arcs (using GCE2d_MakeArcOfCircle()
), it seems to segment the arcs into BSplineCurves with degree 1 (see attached screenshot).
Any idea why it is doing this? According to the OCC docs, it should create a BSplineCurve of degree 2 that is the same shape as the arc. Is this a bug? Or am I approaching this the wrong way?
This is the resultant Brep (single rectangle face with filleted corners to simplify the case) where you can see the individual vertices that approximate the arc, and that the curve is degree 1.
Any tips or help very much appreciated :)
Another test with a simple circle. Right side is how the Brep should come out, left side is how it comes out: the circle segmentation can be clearly seen...