Hi
I've been suffering in OpenSCAD with the lack of chamfer and fillet operations. Spent time trying to figure out sweep() (Sorry Oskar, you haven't made something that's readable or useable; Ronaldo you fixed it. Sorry Ronaldo, you haven't either, though your posts have code that are must-haves that a improved, even minimal, sweep() must have. Maybe please put it into a downloadable library. Better yet get OpenSCAD to incorporate the thing. Jeez.) Failed. Here's a simple idea. CGAL is based on half-spaces, 3D planes with one side "in" and one side "out"; any triangle in 3-space defines its plane, and a bunch of them together (with their "in" sides, half-spaces, intersected) create an arbitrary object surface. I think this is not news. But.. Every intersection or union of half-spaces could be softened by a chamfer or fillet, defined as a plane cutting the corner. Here's a bad hand illustration suggesting where and how a fillet can be fitted to the two planes. <http://forum.openscad.org/file/t3073/IMG-1360_-_Copy.jpg> I don't know how to work with this or the CGAL community. Please help me understand, how can we get a modification into CGAL so that union_with_fillet() and intersection_with_chamfer() are some available options in the library? And if we did wouldn't it enable OpenSCAD to have those functions also? Can this be done? How can it be done? What do you want me to do if it needs to be done, and what can you do to help it be done? Yes I am a mere newbie, but hey this is an issue that has plagued and limited OpenSCAD for many years, let's fix it. I'll try to help where I can. Tom Thomas C Veatch PhD tomveatch.com -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
The BOSL2 library is downloadable, documented, and implements sweep and also
various other features to make rounding and chamfers easier. For example see https://github.com/revarbat/BOSL2/wiki/rounding.scad https://github.com/revarbat/BOSL2/wiki/skin.scad You can use the basic cuboid module to generate cubes with chamfers or roundings on specified edges. tom veatch wrote > Hi > > I've been suffering in OpenSCAD with the lack of chamfer and fillet > operations. Spent time trying to > figure out sweep() (Sorry Oskar, you haven't made something that's > readable > or useable; Ronaldo you fixed it. Sorry Ronaldo, you haven't either, > though > your posts have code that are must-haves that a improved, even minimal, > sweep() must have. Maybe please put it into a downloadable library. > Better > yet get OpenSCAD to incorporate the thing. Jeez.) Failed. > > Here's a simple idea. CGAL is based on half-spaces, 3D planes with one > side > "in" and one side "out"; any triangle in 3-space defines its plane, and a > bunch of them together (with their "in" sides, half-spaces, intersected) > create an arbitrary object surface. I think this is not news. > > But.. > > Every intersection or union of half-spaces could be softened by a chamfer > or > fillet, defined as a plane cutting the corner. Here's a bad hand > illustration suggesting where and how a fillet can be fitted to the two > planes. > > <http://forum.openscad.org/file/t3073/IMG-1360_-_Copy.jpg> > > I don't know how to work with this or the CGAL community. Please help me > understand, how can we get a modification into CGAL so that > union_with_fillet() and intersection_with_chamfer() are some available > options in the library? And if we did wouldn't it enable OpenSCAD to have > those functions also? Can this be done? How can it be done? What do you > want me to do if it needs to be done, and what can you do to help it be > done? Yes I am a mere newbie, but hey this is an issue that has plagued > and > limited OpenSCAD for many years, let's fix it. I'll try to help where I > can. > > Tom > > Thomas C Veatch PhD > tomveatch.com > > > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@.openscad > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
In reply to this post by tom veatch
On 06.01.21 04:19, tom veatch wrote:
> I don't know how to work with this or the CGAL community. > Please help me understand, how can we get a modification > into CGAL so that union_with_fillet() and > intersection_with_chamfer() are some available options > in the library? I don't know, so far I personally only had some interaction on the OpenSCAD github where they were quite helpful. I'm not sure about actual code contributions, I believe they require a signed copyright assignment (or whatever the legal name is) as there's also a commercial CGAL release. But I have not looked into details. > And if we did wouldn't it enable OpenSCAD to have those > functions also? Can this be done? In theory that's simply it. There's a catch though as we normally want to allow people to build OpenSCAD on existing installations, not just the latest brand new platforms. That's mostly a Linux distribution topic though. That said, for a feature that important, I'm sure there's ways to workaround that issue. > What do you want me to do if it needs to be done, and > what can you do to help it be done? I'd say the first step would be to investigate if NEF Polyhedrons are the way to go. CGAL has a second engine for doing boolean operations which is supposedly quite a bit faster. There's even requests to use a different library altogether. So at any rate it might be useful to look at the bigger picture too. > Yes I am a mere newbie, but hey this is an issue > that has plagued and limited OpenSCAD for many years, > let's fix it. I'll try to help where I can. That would be great, I'm sure it's not just me who would like to see that feature. As related/similar topic, maybe also have a look at the work done in this PR: Straight skeleton / voronoi diagram based roof #3486 https://github.com/openscad/openscad/pull/3486 ciao, Torsten. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
|
In reply to this post by tom veatch
A 3D version of offset() would do that. Sadly, that seems impractical to do
in OpenSCAD code. -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
In reply to this post by tom veatch
I Hear you. iv'e been peculating for years about this subject. Spoiler
edge-centric chamfer has unsolvable edge cases. In fact you can get into trouble even in open-cascade based software. But that is not a reason not to try something that work in most sane cases. The user just have to take more adult care. I know scary concept. The Idea was much like your to make the boolean of A and B. Make a copy and trow out all points and edges that was in the in the A/B input geometry. Now you have a path along the exact boundary of A/B. <http://forum.openscad.org/file/t1678/polytools.png> <http://forum.openscad.org/file/t1678/polytools3.png> This boundary could be sweept with some corner function (chamfer /fillet,pretty). The caveat is that the boundary branch breaks and that the surrounding geometry might be to "thin" to support a naive implementation. Now construct a second boundary offset pushing out on the surface each A and B. As A and B not necessarily meat at 90 degree the varying amount of offset had to be considered along the boundary depending on what angle A/B meet. Graceful failure has to be defined each point where no true solution can be found. At sharp points should radius shrink, adapt or just run out? so many ways to mess up. <http://forum.openscad.org/file/t1678/polytools2.png> <http://forum.openscad.org/file/t1678/polytools4.png> These three boundaries together is the information needed to construct some profile sweep on rails. Said sweep must handle any kind of wild and branching boundary . This is all in the simplest union case. Cooking up a chamfer between two unioned primitives might be doable but from there on the pain begin. -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
Free forum by Nabble | Edit this page |