Reworks the implementation for how knots are interpreted when importing NURBS in .obj format. It refactors each test into a separate function and simplifies functions using a 'multiplicity sequence' which counts repeated occurances of knot values (or their 'multiplicity'). Making comparisons simpler, clearer, and with improved correctness. With regard to regression tests behavior is almost the same, noticable difference is consideration of cyclic. Allowing curves with multiplicity at the endpoints to be cyclic (so Bezier curves can be cyclic given one repeated point). Untested behavior may also have been 'refined' (changed), but additional tests would be needed to identify those cases. Pull Request: https://projects.blender.org/blender/blender/pulls/138778
18 lines
513 B
Plaintext
18 lines
513 B
Plaintext
==== Curves: 1
|
|
- Curve 'nurbs' dim:3D resu:12 resv:12 splines:1
|
|
- spline type:NURBS pts:9x1 order:4x4 cyclic:True,False endp:False,False
|
|
- (0.260, -1.477, -0.866) w:1.000
|
|
- (-1.410, -0.513, 0.866) w:1.000
|
|
- (-1.500, 2.598, 0.000) w:1.000
|
|
...
|
|
- (-1.410, 0.513, -0.866) w:1.000
|
|
- (0.260, 1.477, 0.866) w:1.000
|
|
- (3.000, 0.000, 0.000) w:1.000
|
|
|
|
==== Objects: 1
|
|
- Obj 'nurbs' CURVE data:'nurbs'
|
|
- pos 0.000, 0.000, 0.000
|
|
- rot 1.571, 0.000, 0.000 (XYZ)
|
|
- scl 1.000, 1.000, 1.000
|
|
|