PolylineVolume corner normalization error.
What happened?
If points in PolylineVolume are collinear (after scaling to surface operation), computation fails with error "Normalized result is not a number" on attept to normalize cornerDirection.
Reproduction steps
- Create a
PolylineVolumethat will result a collinear line afterscaleToSurfacecall (that's hard to reproduce).
Sandcastle example
https://sandcastle.cesium.com/#c=dVRdT9swFP0rVp/S0blxE+eDFjQoFZPGNokhXggPbupSa44d2U6hoP732fkopXQPSex7zzk+vtdOLoU2YM3oM1XgDAj6DKZUs6qA93XMy3p5PZ9KYQgTVGW9/jgTmVhWIjdMCpDLoqwMnTKVc+opsmCV7oO3TACbcuql1MwhtV3g4XHsEkupgMepAczG/LH9TEAQucHJScvt2E6Q1NzW2E9iVtDI2ybusf64ge+WgWWlV14TBPtbmhJl7IiI0S4LQGMYfAG1bi61167YH/wPpJn4DOpGjZ2teylqKiXejdnM1pWu2diTolRcyhe7s6b+kApjgVRDslh4dREEKegpyHrXDgvmFvzMzArM6ZpyurAVUrYjGhCxALIy3PYn69U+Ssk3bnoveeUk3g5qdPqpJgFcKllcUWdLXyhFNt8pe1oZ7T20W/yKEIIpjnGE4yjCSeKnAxD6EPt+gnyUohSjURgNAApwCNPY99MoDpB98OCYRBjjFId7EjgKwyBN9xSCUeSjOEzi+KgCCqME4XcFNApCayMK8aBTiIPEekhxGuw6tS+BY8vyg8FOIY3TxNKiTsBFAj/ACcYN/7FrtF6R0lb24/H3oY9wh2jac7dxsK7cuxC8nN3PbmZXLbYghipG+B6SSwWvb2ezX9A1/YKXK2L1d+ptw0+BURX9GKu5B0qXNxfTHzVsa9/b5hJnoj16r1IWd9I7OIgO1Bv0JtpsOD3v6veNFaVUBlSKexAODS1Kbt3r4bzK/1IDc627OzkZ7lMnC7YGbHF25J8Cck60tpllxfkf9mrP8flkaPGfqFzamyeefq+p4mTjYCt0ftMEIYSToZ0eZxop+ZyoA+V/
Environment
Browser: Chrome, Edge CesiumJS Version: 1.120 Operating System: Windows 11
Thanks for the report as well as the PR @p-skakun! WE'll continue conversation in https://github.com/CesiumGS/cesium/pull/12255.