skoch9 / meshplot

Plot 3D triangle meshes
GNU General Public License v3.0
148 stars 37 forks source link

Fix colors for tetrahedral mesh #39

Closed stefsmeets closed 11 months ago

stefsmeets commented 3 years ago

Hi,

Tetrahedral meshes are converted to triangle meshes internally. If a color array is specified with the same length as the number of tetrahedra, meshplot gives an error: Invalid color array given! Supported are numpy arrays. <class 'numpy.ndarray'>

This PR adds a fix that repeats the color array 4 times, so that the color array matches the number of triangles generated.