Possible bug in ezdxf open_uniform_knot_vector function #1028
Unanswered
subsurfaceiodev
asked this question in
Issues
Replies: 1 comment 1 reply
-
This is a special spline configuration and not an open B-spline with uniform knot distribution because the interior knots (1.0) are repeated and the curve passes the third control vertex. See definition for open uniform knots. This means that this spline configuration cannot be created using the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @mozman !
ezdxf_spline_issue.zip contains the following files:
to_import.dxf created in AutoCAD containing 3 splines: 2 individual splines on the left and the product of joining those splines as a single spline on the right
spline_mwe.py containing the following code:
As you may see, the right spline is not exported correctly when commenting line 15 of the above code (
knots=e.knots
), we noticed when knots are not providedadd_open_spline
function callsopen_uniform_knot_vector
to calculate them. Said calculation works fine for the left splines, but for the right spline you may see AutoCAD knots are:[0.0, 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 2.0]
while calculated knots by ezdxf are[0.0, 0.0, 0.0, 1.0, 2.0, 3.0, 3.0, 3.0]
which seems to be a bug causing exported right spline to not look correct.Beta Was this translation helpful? Give feedback.
All reactions