# Rounding library

15 messages
Open this post in threaded view
|

## Rounding library

Open this post in threaded view
|

## Re: Rounding library

Open this post in threaded view
|

## Re: Rounding library

Open this post in threaded view
|

## Re: Rounding library

 I think I understand:  you're using a stair-step type construction to create the shape with extrudeWithRadius and you're constructing a polyhedron for polyRoundExtrude.   My offset_sweep() will take any polygon, extrude it, and add rounding (or some other end treatment) to either end.  It sounds like it's the same method as your polyRoundExtrude.   I compute offsets of the input polygon and use them to construct a polyhedron.  The real challenge in doing this was in writing an offset() function, and book keeping when points disappear during offset.   (It's very hard to write a robust offset function.)  I also have convex_offset_extrude, which is like your stair-step approach but it uses hull to make slices with sloped boundaries.  This means it won't work on concave children.  (Well, it will hull them.)   I never thought the stair-step modeling approach was acceptable.   What do you see as the missing functionality for rounding?  What do you wish you could do but you can't? -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: Rounding library

 Yup, stair-step. I did try the hull as well, but preferred the stair-step over loosing the ability to use concave children. 👍 I don't have anything in mind that's missing. Some times I wish the polygon could be used more like a "sketch" in other cad packages, where you could add constrains instead of defining every point, but that's got nothing to do with rounding. -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: Rounding library

 On 16.08.20 22:05, irevdev via Discuss wrote: > Some times I wish the polygon could be used more like > a "sketch" in other cad packages, where you could add > constrains instead of defining every point, but that's > got nothing to do with rounding. How would you extend the language to express that? ciao,   Torsten. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org -- Torsten
Open this post in threaded view
|

## Re: Rounding library

 In reply to this post by OpenSCAD mailing list-2 I'm not familiar with this "sketch" feature.  What is it?  How does it work? OpenSCAD mailing list-2 wrote > I don't have anything in mind that's missing. > > Some times I wish the polygon could be used more like a "sketch" in other > cad packages, where you could add constrains instead of defining every > point, but that's got nothing to do with rounding. -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: Rounding library

Open this post in threaded view
|

## Re: Rounding library

Open this post in threaded view
|

## Re: Rounding library

Open this post in threaded view
|

## Re: Rounding library

Open this post in threaded view
|

## Re: Rounding library

 [Sketch] One could imagine having a way to describe a figure and its constraints in the form of a data structure, and having a solver that would analyze the data structure to find a figure that satisfies the constraints. Something like: ```poly = solve([ [ ABS, 0, [0,0,0] ], // Point 0 is at the origin [ REL, 1, 0, [10,0,0]], // Point 1 is +10 X from point 0 [ LENGTH, [1,2], [0,1], 2], // The distance from point 1 to // point 2 is twice the distance // from point 0 to point 1. [ ANGLE, [0,1,2], 90 ], // The angle between points 0, 1, and 2 // is 90 degrees. [ ABS, 2, [undef,undef,0] ] // Point 2 is on the Z=0 plane. ]); ``` I think there are two solutions to those constraints:  [0,0,0]-[10,0,0]-[10,20,0] and [0,0,0]-[10,0,0]-[10,-20,0].  (Maybe only the -Y one, if the ANGLE rule follows the right-hand-rule.) I don't know how hard it is to create such a solver.  (It would depend of course on what rules are allowed.)  Probably too hard for me. I don't know whether anybody would really be interested in such a thing in OpenSCAD. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: Rounding library

 On 8/18/2020 6:03 AM, adrianv wrote: ```It seems like if you allow a specific limited class of rules that operate sequentially then it is not hard to do this. The point basically is that for every rule you need to ask if you can solve the relevant equation it implies. This actually seems a lot like the turtle graphics concept but without the turtle state or order: at every step you create a new point based on a previous point using some kind of instruction. I am wondering whether this scheme is significantly more powerful than my turtle implementation. I think the main possible source of extra power in this system is the ability to refer back to previously generated points, but I can't tell if that really lets you do anything different. If you don't require a sequential process then it is going to get a lot harder, because the equations will form a large coupled nonlinear system. A general solver might be able to find a solution, but finding all solutions will be hard to do, and the process may not be robust. And of course there may be no solutions, or an infinite set of solutions. If someone gave me this capability as a black box, how would I use it? It seems likely that this is going to be hard to use as a practical tool for constructing shapes. ``` What I was intending to describe - and what I *think* these tools do - is the latter.  I wrote out the rules more or less sequentially, because that's how I was mentally constructing the figure, but the intent was that they were an unordered set of constraints on the various points. It's a very different way of thinking of design from the much more concrete "transform a shape" model that OpenSCAD uses. As I said, it's not clear to me that there would be an audience for it in the OpenSCAD context.  I was just trying to describe how a tool like this could be carried over to an OpenSCAD environment. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org