Remove mesh triangle lines on flat shape

This playground shows a flat sheet like shape created using ExtrudeShape. I don’t expect the triangle mesh lines to show as this is a perfectally flat object from all sides. How do I remove it?

Welcome aboard!

It is the edge renderer that renders the lines: comment line 47 to remove them.


Thanks for your comments! I should have been more clear though, what i would like is for the sheet edges to be shown, but not in the way it currently is showing. My question really is about why is Babylonjs showing this object using triangle meshes when all faces are flat. Please see this playground where I show two sheets, one showing red edges is what I want; the blue edges shows the triangle lines, which I dont’ want.

The problem is that the extrudeShape method is generating degenerated triangles where two vertices have the same coordinates: those are treated as an edge by the edge renderer, which is expected.

I don’t know if it’s possible to make extrudeShape not create those degenerated triangles…

Anyway, having a switch to make the edge renderer not handle degenerated triangles is easy, here’s a PR that does it:

You would use it like that:


Awesome!! Thank you very much :smiley: