While investigating the stl export from 3D plots, (which have been recently improved, see
trac-ticket-22144) I found a method in
plot/plot3d/parametric_surface.pyx that is called
triangulate, but that actually quadrangulates the underlying self (maybe it also produces triangles, when some quadrilateral is degenerate, I am not sure).
def triangulate(self, render_params=None):
r"""
[…] so normals of the triangles […]
"""
# […]
face.n = 4 # […]
The reason I looked into it was that it caused problem for saving to stl format because the old version of
stl_ascii_string method assumed that the output of a method called
triangulate would always have only
triangles.
stl_ascii_string have been modified in
ticket 22144, but I still thing it's kind of counterintuitive to have a
triangulate method that do not produces triangles but quadrilaterals instead.
Does anybody here knows what were the reasons behind this choice ? And where is it used ?