Hi. Thank you for the explanation. You can add me to the list of people telling : export to stl is definitely good to have!
A On Thursday, January 12, 2017 at 7:25:50 PM UTC+1, Frédéric Chapoton wrote: > > Hello, > > I think this is more subtle than that. The procedure "triangulate" is used > in several places, and sometimes it may generate triangles. > When I wrote the old stl_ascii_string, I was lazy and did not care about > faces other than triangles, even if I knew perfectly that they could > happen. I have never seen any feedback on somebody using this STL export > and saying "that's good to have", so my motivation was low. > I do not think that the name "triangulate" is good, but there is not much > value in changing it. This is a rather deep internal method. > > Frederic > > > > Le jeudi 12 janvier 2017 12:29:13 UTC+1, ams a écrit : >> >> While investigating the stl export from 3D plots, (which have been >> recently improved, see trac-ticket-22144 >> <https://trac.sagemath.org/ticket/22144>) I found a method in >> plot/plot3d/parametric_surface.pyx >> <https://github.com/sagemath/sage/blob/develop/src/sage/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 >> <https://trac.sagemath.org/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 ? >> > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.