-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
suggested handling for a closed loop #8
Comments
changes to skin.scad required (as per openscad/list-comprehension-demos#8): change signature to module skin(profiles, no_endcaps=false) change last line to polyhedron(convexity=4, points=profiles, faces = no_endcaps ? triangles : concat(start_cap, triangles, end_cap)); stl files provided for convenience :)
This may fail pretty brutally if due to rounding errors in the computation the final points differ a bit (or if the user makes a mistake). I have produced a pull request which recycles the first points so that there is no need to duplicate points and the closure is always guaranteed. See #12 |
Maybe a good solution for the users. no_endcaps as suggested above still does exactly what it says and is only guaranteed to produce manifold geometry if the last profile is a copy of the first one and should be unique functionality. Depending on the resolution error handling of CGAL, the usefulness is limited by transformations incurring further numerical errors. In https://github.com/MisterHW/IoP-satellite/blob/master/OpenSCAD%20bottle%20threads/azimuthal_profile.scad that exact mistake is made to rely on roundoff-error-free behavior of trigonometric functions. Ultimately however I feel that calling the feature 'loop' invites +/-1-type misunderstandings, as it's unclear whether loop describes a property of the profiles passed or whether it's a parameter controlling skin(). Nitpicking aside, close_loop or bridge_ends might leave less room for confusion? |
Yes, I didn't pick the name as the flag was already there albeit unimplemented. Let's now see if one of the maintainers take action... |
change signature to
module skin(profiles, no_endcaps=false)
change last line to
polyhedron(convexity=4, points=profiles, faces = no_endcaps ? triangles : concat(start_cap, triangles, end_cap));
duplicate vertices are acceptable (https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#Point_repetitions_in_a_polyhedron_point_list) so when the first and last profiles are identical this produces e.g. a closed toroid.
The text was updated successfully, but these errors were encountered: