Loading

Report as inappropriate

Not quite sure what happened to the comment by @tpchuckles, but it's a good question, so I'll answer it anyway:

it LOOKS like we construct the "end-caps" simply by declaring those additional faces out of the points in polypoints, but I assume those may not necessarily be planar (int precision from translating the 2D profile into 3D space?) and we really ought to be setting up a series of triangles to close off the end? (gross!) gringer: any thoughts here? is my understanding of how the "end-caps" are made correct, and do you have any other thoughts on a solution? (aside from "use a different version" which i'm not thrilled about).

The end caps are indeed treated as a single planar polygon, as they should be in a theoretical world where I don't need to care about floating point rounding. Just in case it wasn't obvious, this also applies to the faces between adjacent object copies, where the code assumes a planar trapezium.

As a simple fix for the end points, I'd create triangles between the polygon points and the origin, and let the users of the code deal with any intersection issues that might arise from that (as happens currently with the extrusion anyway). For the extruded trapezoids, I had the triangle version implemented in an earlier code version, but thought it was no longer necessary now that OpenSCAD supports non-triangles. The simpler implementation for the trapezoids is to split them down the diagonal, which shouldn't require too much change to the code.

These are probably the most frustrating issues for me (because it keeps giving errors in OpenSCAD), which I guess means I'm more likely to fix them first... but I'd also like to add on @halfshavedyak's scale fixes, and @kwx's end merge fix.

... when I have some time spare to think on this.