Bezier Curves

I just a short but fundamental question:
Are Bezier curves with duplicate poles considered valid?
example: beziercurve res 4 0 1 0 0 1 0 1 2 0 2 2 0

Andrey BETENEV's picture

In general, duplication of poles by itself does not make Bezier of BSpline curve bad. However, duplication of first and second poles, as in your case (or, symmetrically, two last ones) will make first derivative zero at the start point of the curve. This may cause troubles when such curves are involved in algorithms. See e.g. issue #23706 for example of this kind of problem.

Sebastian Hoogen's picture

Hello Andrey and thank you for your quick answer.
I suspect those duplicated poles to be the reasons for #25730 and #25104. (The stack traces match your explanation that the derivatives become zero)

But if the input geometry has to be considered valid, then it would perhaps make sense to add a "D0"-check to bopcheck.

I'll ask the follow-up question, how to deal with such curves, (as they occur in SVG files and in DXF SPLINES), in the user forum.

m-halyal's picture

Thank you for the mail on using brep file. I have tried the example you have suggested. But, I am really interested in using the database storage/retrieval. I would be greatful if you could help on that.