Bezier Curves

shoogen's picture

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

abv's picture

Yes, duplicated poles are Ok

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.

shoogen's picture

D0 bopcheck

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.

www.opencascade.com

Copyright 2011-2019
OPEN CASCADE SAS
Contact us