![]() But of course hull() will destroy a non-convex section. You can just make thin polyhedra and weld them with hull(). ![]() With a convex section, it all becomes a lot easier. And if one does this with full generality, as I am trying to, where the cross-section can change along the sweep (an eventual goal is to generate boomerangs with airfoils, for instance), one has to triangulate many times, and I don't know that OpenSCAD will be fast enough to handle that (I don't know that pure Python is either, though pypy may help). It's easier to write it in a mainstream language and then just generate an SCAD file. Writing triangulation code within OpenSCAD's functional language would, I think, be quite a nuisance. Of course, when generating an STL surface mesh, if I did sweeps along an open curve, I'd also need to triangulate the cross-section, but currently the code only does sweeps along a closed curve.Īll this would be harder to do in OpenSCAD directly. I think roundoff error makes them look not coplanar to OpenSCAD.) (Why can't I just generate polygonal caps, feed them into the polyhedron(faces=) and let OpenSCAD's CGAL worry about triangulating? I tried that, but OpenSCAD gives CGAL errors complaining about non-coplanar polygons. The problem with the solid segment approach is that it needs to triangulate the cross-section for the endcaps, and currently I just have naive triangulation code for convex or star-shaped polygons. The script has two ways of building the knot: simply by generating an STL surface mesh, which will self-intersect if one isn't careful in setting parameters, or by generating an OpenSCAD file that makes a bunch of short solid segments.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |