mirror of
https://github.com/blender/blender
synced 2026-11-01 03:16:58 +03:00
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
50 lines
1.8 KiB
Text
50 lines
1.8 KiB
Text
==== Curves: 4
|
|
- Curve 'Curve_Cyclic' dim:3D resu:12 resv:12 splines:1
|
|
- spline type:NURBS pts:4x1 order:4x4 cyclic:True,False endp:False,False
|
|
- (-2.000, 0.000, 2.000) w:1.000
|
|
- (2.000, 0.000, 2.000) w:1.000
|
|
- (2.000, 0.000, -2.000) w:1.000
|
|
- (-2.000, 0.000, -2.000) w:1.000
|
|
|
|
- Curve 'Curve_Endpoints' dim:3D resu:12 resv:12 splines:1
|
|
- spline type:NURBS pts:5x1 order:4x4 cyclic:False,False endp:True,False
|
|
- (-2.000, 0.000, 2.000) w:1.000
|
|
- (2.000, 0.000, 2.000) w:1.000
|
|
- (2.000, 0.000, -2.000) w:1.000
|
|
- (-2.000, 0.000, -2.000) w:1.000
|
|
- (2.000, 0.000, 2.000) w:1.000
|
|
|
|
- Curve 'Curve_NonUniform_Parm' dim:3D resu:12 resv:12 splines:1
|
|
- spline type:NURBS pts:5x1 order:4x4 cyclic:False,False endp:False,False
|
|
- (-2.000, 0.000, 2.000) w:1.000
|
|
- (2.000, 0.000, 2.000) w:1.000
|
|
- (2.000, 0.000, -2.000) w:1.000
|
|
- (-2.000, 0.000, -2.000) w:1.000
|
|
- (-2.000, 0.000, 2.000) w:1.000
|
|
|
|
- Curve 'Curve_Uniform_Parm' dim:3D resu:12 resv:12 splines:1
|
|
- spline type:NURBS pts:5x1 order:4x4 cyclic:False,False endp:False,False
|
|
- (-2.000, 0.000, 2.000) w:1.000
|
|
- (2.000, 0.000, 2.000) w:1.000
|
|
- (2.000, 0.000, -2.000) w:1.000
|
|
- (-2.000, 0.000, -2.000) w:1.000
|
|
- (-2.000, 0.000, 2.000) w:1.000
|
|
|
|
==== Objects: 4
|
|
- Obj 'Curve_Cyclic' CURVE data:'Curve_Cyclic'
|
|
- pos 0.000, 0.000, 0.000
|
|
- rot 1.571, 0.000, 0.000 (XYZ)
|
|
- scl 1.000, 1.000, 1.000
|
|
- Obj 'Curve_Endpoints' CURVE data:'Curve_Endpoints'
|
|
- pos 0.000, 0.000, 0.000
|
|
- rot 1.571, 0.000, 0.000 (XYZ)
|
|
- scl 1.000, 1.000, 1.000
|
|
- Obj 'Curve_NonUniform_Parm' CURVE data:'Curve_NonUniform_Parm'
|
|
- pos 0.000, 0.000, 0.000
|
|
- rot 1.571, 0.000, 0.000 (XYZ)
|
|
- scl 1.000, 1.000, 1.000
|
|
- Obj 'Curve_Uniform_Parm' CURVE data:'Curve_Uniform_Parm'
|
|
- pos 0.000, 0.000, 0.000
|
|
- rot 1.571, 0.000, 0.000 (XYZ)
|
|
- scl 1.000, 1.000, 1.000
|
|
|