I would like to chamfer the top, outer edge of a random union of contiguous
shapes like this:
$fn=100;
linear_extrude (height=10);
union(){
square([10,5],true);
translate([3,2])
square([5,10]);
translate([-2,-4])
circle(r=2);
}
I'd tried using "hull()" but that only works for completely convex unions.
At this point I'm doing the equivalent of "milling" the edge using a
succession of thin shapes based on an "offset" of the union. Since I'm 3D
printing the object, the stair-stepped edge is what I would have gotten
anyway.
Just wondering if there's a smarter way.
Please don't suggest Minkowski. It's just too slow.
Thanks,
Ken
Won't work now, but I was thinking that it would be REALLY useful for this
type of situation if linear_extrude had an offset parameter that you would
use the same way you use the scale parameter, but the ends would be
affected like they are by the offset module rather than the scale module.
It would take a little extra work to handle situations where negative
offsets make things go to zero-width or negative width, but it seems like a
logical addition that would be useful for a lot of things (draft angles!)
and it should be much faster than minkowski.
On March 3, 2020 at 09:56:18, ken@volksswitch.org (ken@volksswitch.org)
wrote:
I would like to chamfer the top, outer edge of a random union of contiguous
shapes like this:
$fn=100;
linear_extrude (height=10);
union(){
square([10,5],true);
translate([3,2])
square([5,10]);
translate([-2,-4])
circle(r=2);
}
I’d tried using “hull()” but that only works for completely convex unions.
At this point I’m doing the equivalent of “milling” the edge using a
succession of thin shapes based on an “offset” of the union. Since I’m 3D
printing the object, the stair-stepped edge is what I would have gotten
anyway.
Just wondering if there’s a smarter way.
Please don’t suggest Minkowski. It’s just too slow.
Thanks,
Ken
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
I wrote a module offset_sweep and also convex_offset_extrude that make
extrusions while varying the offset parameter. The former one can handle
arbitrary geometry, but you have to supply it as a point list. The latter
one works by hulling so you can only use it on convex shapes, but it acts on
its children, so it takes geometry rather than a point list.
These modules are both part of the BOSL2 library.
https://github.com/revarbat/BOSL2/wiki
Whosawhatsis wrote
Won't work now, but I was thinking that it would be REALLY useful for this
type of situation if linear_extrude had an offset parameter that you would
use the same way you use the scale parameter, but the ends would be
affected like they are by the offset module rather than the scale module.
It would take a little extra work to handle situations where negative
offsets make things go to zero-width or negative width, but it seems like
a
logical addition that would be useful for a lot of things (draft angles!)
and it should be much faster than minkowski.
On March 3, 2020 at 09:56:18,
ken@
(
ken@
)
wrote:
I would like to chamfer the top, outer edge of a random union of
contiguous
shapes like this:
$fn=100;
linear_extrude (height=10);
union(){
square([10,5],true);
translate([3,2])
square([5,10]);
translate([-2,-4])
circle(r=2);
}
I’d tried using “hull()” but that only works for completely convex unions.
At this point I’m doing the equivalent of “milling” the edge using a
succession of thin shapes based on an “offset” of the union. Since I’m 3D
printing the object, the stair-stepped edge is what I would have gotten
anyway.
Just wondering if there’s a smarter way.
Please don’t suggest Minkowski. It’s just too slow.
Thanks,
Ken
OpenSCAD mailing list
Discuss@.openscad
Discuss@.openscad
--
Sent from: http://forum.openscad.org/
It shouldn't be too difficult at least for the kind of code you showed.
E.g.
$fn=100;
union(){
cf(1,.9)square([10,5],true);
translate([3,2]+[5,10]/2) cf(1,.9)square([5,10], true);
translate([-2,-4]) cf(1,.9) circle(r=2);
}
module cf(height = 1, scale = 1)
linear_extrude(height, scale = scale, center = true) children();
--
Sent from: http://forum.openscad.org/
check out the latest pull request on this upcoming feature
Implement offset_extrude
https://github.com/openscad/openscad/pull/2079
--
Sent from: http://forum.openscad.org/