Hey List, I've been doing rounded edges manually using hollowed out cylinders. This part is a good example: http://www.createthis.com/products/impala-heater-knob-scad-- CreateThis.com _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad http://openscad.org - https://flattr.com/thing/121566 |
Learn to use hull(). It will make things simpler and cleaner, though there are some tricks to learn when you need concavities in your shapes.
On Wednesday, May 22, 2013 at 5:44 PM, Jesse Guardiani wrote:
_______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad http://openscad.org - https://flattr.com/thing/121566 |
In reply to this post by Jesse Guardiani
On 23 May 2013 10:44, Jesse Guardiani <[hidden email]> wrote:
as Whosawhatsis says, hull is awesome for rounded shapes! see http://triffid-hunter.no-ip.info/MMax_x-end-motor.png and http://triffid-hunter.no-ip.info/MMax_x-end-motor.scad for example the basic construction goes like this: hull() { for (i=[0:3]) translate([(i % 2) * 30, (i - i % 2) * 20, 0]) { cylinder(r=5, h=1); translate([0, 0, 10]) sphere(5); } }although as you can see from my scad I prefer to use toruses for the upper corners rather than spheres _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad http://openscad.org - https://flattr.com/thing/121566 |
In reply to this post by Jesse Guardiani
Hi Jesse,
I have extended openscad with a 2D 'loop' primitive that could be of some help. It cannot replace a true 3d round-off operator, but with extrusion you can bring 2D rounded edges to live. See the example. Also polygons, arcs and beziers are possible. It posted this before, but there were exactly zero reactions, so i am curious if it worthwhile to publish the code. Attached cube.png was made with this: module base(axis) { rotate(90,axis) linear_extrude(height=10, center=true) loop(poly=[4,"flat",[10]], vertices=[["arc",1]], edges=[["wav",2,1]]); } intersection() { base([1,0,0]); base([0,1,0]); base([0,0,1]); } I On 23-05-13 02:44, Jesse Guardiani wrote: > Hey List, > > I've been doing rounded edges manually using hollowed out cylinders. This > part is a good example: > http://www.createthis.com/products/impala-heater-knob-scad > > It's a real pain in the balls. Long and laborious. There has to be a better > way. Any ideas? > > > > _______________________________________________ > OpenSCAD mailing list > [hidden email] > http://rocklinux.net/mailman/listinfo/openscad > http://openscad.org - https://flattr.com/thing/121566 > _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad http://openscad.org - https://flattr.com/thing/121566 |
Ruud, That would probably make more sense to me if I could see the intermediary steps. I tried the code without the loop command and got:WARNING: No top level geometry to render I don't extrude things very often.
On Thu, May 23, 2013 at 3:26 AM, Ruud Vlaming <[hidden email]> wrote: Hi Jesse, _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad http://openscad.org - https://flattr.com/thing/121566 |
In reply to this post by Triffid Hunter
Ok. That's certainly interesting. I rendered that code without hull and with hull. I see how that would be useful at times. Definitely not appropriate for all situations though. On Wed, May 22, 2013 at 11:52 PM, Triffid Hunter <[hidden email]> wrote:
_______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad http://openscad.org - https://flattr.com/thing/121566 |
In reply to this post by Jesse Guardiani
Jesse,
If you copy paste the code below (in version 2013.01), it should work, and is a rude version of the previous example. (see attachment) Note btw that OpenCSG (F5) has a hard time rendering this, use CGAL instead (F6). module base(axis) { rotate(90,axis) linear_extrude(height=10, center=true) polygon([[ 4, 0],[ 5, 1],[ 5, 4],[ 4, 5],[ 1, 5], [ 0, 4],[-1, 5],[-4, 5],[-5, 4],[-5, 1], [-4, 0],[-5,-1],[-5,-4],[-4,-5],[-1,-5], [ 0,-4],[ 1,-5],[ 4,-5],[ 5,-4],[ 5,-1] ]); } intersection() { base([1,0,0]); base([0,1,0]); base([0,0,1]); } Ruud On 23-05-13 15:24, Jesse Guardiani wrote: > Ruud, > > That would probably make more sense to me if I could see the intermediary > steps. I tried the code without the loop command and got: > > WARNING: No top level geometry to render > > > I don't extrude things very often. > > > > > On Thu, May 23, 2013 at 3:26 AM, Ruud Vlaming <[hidden email]> wrote: > >> Hi Jesse, >> >> I have extended openscad with a 2D 'loop' primitive that >> could be of some help. It cannot replace a true 3d round-off >> operator, but with extrusion you can bring 2D rounded edges >> to live. See the example. Also polygons, arcs and beziers >> are possible. It posted this before, but there were >> exactly zero reactions, so i am curious if it worthwhile >> to publish the code. >> >> Attached cube.png was made with this: >> >> module base(axis) >> { rotate(90,axis) >> linear_extrude(height=10, center=true) >> loop(poly=[4,"flat",[10]], vertices=[["arc",1]], >> edges=[["wav",2,1]]); } >> >> intersection() >> { base([1,0,0]); >> base([0,1,0]); >> base([0,0,1]); } >> >> >> >> I >> >> On 23-05-13 02:44, Jesse Guardiani wrote: >>> Hey List, >>> >>> I've been doing rounded edges manually using hollowed out cylinders. This >>> part is a good example: >>> http://www.createthis.com/products/impala-heater-knob-scad >>> >>> It's a real pain in the balls. Long and laborious. There has to be a >> better >>> way. Any ideas? >>> >>> >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> [hidden email] >>> http://rocklinux.net/mailman/listinfo/openscad >>> http://openscad.org - https://flattr.com/thing/121566 >>> >> >> >> _______________________________________________ >> OpenSCAD mailing list >> [hidden email] >> http://rocklinux.net/mailman/listinfo/openscad >> http://openscad.org - https://flattr.com/thing/121566 >> > > > > _______________________________________________ > OpenSCAD mailing list > [hidden email] > http://rocklinux.net/mailman/listinfo/openscad > http://openscad.org - https://flattr.com/thing/121566 > _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad http://openscad.org - https://flattr.com/thing/121566 |
If you add convexity = 2 to the linear extrude it works with F5 as well. On 23 May 2013 15:07, Ruud Vlaming <[hidden email]> wrote: Jesse, _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad http://openscad.org - https://flattr.com/thing/121566 |
In reply to this post by devlaam
You can also use minkowski() to make rounded edges. But minkowski() get somewhat slow for shapes with a lot of vertices.![]() On 23 May 2013 16:07, Ruud Vlaming <[hidden email]> wrote: Jesse, -- [hidden email] P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben. Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. P.S. In case my e-mail is shorter than you enjoy: I am currently trying short replies instead of no replies at all. Please let me know, if you like to read more. Enjoy! _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad http://openscad.org - https://flattr.com/thing/121566 |
In reply to this post by nophead
You Rule!
R. On 23-05-13 16:25, nop head wrote: > If you add convexity = 2 to the linear extrude it works with F5 as well. > > > On 23 May 2013 15:07, Ruud Vlaming <[hidden email]> wrote: > _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad http://openscad.org - https://flattr.com/thing/121566 |
My take on a beveled cube function, it's fast and looks smooth enough
module bevelcube(size=[1, 1, 1], center=false, bevel=2) { translate(center?-size/2:0) translate([1, 1, 1]*bevel/sqrt(2)) minkowski(){ cube(size - [1, 1, 1]*bevel*3.828 ); rotate([45,0,0]) cube(bevel); rotate([0,45,0]) cube(bevel); rotate([0,0,45]) cube(bevel); } } |
Free forum by Nabble | Edit this page |