Nabble removed Mailing-list integration from the Forum.
This killed the Forum. This is now an ARCHIVE.
It is likely Nabble will shutdown in the future.

# 3d offset

7 messages
Open this post in threaded view
|

## 3d offset

 I just discovered the power of offset for 2d shapes. It can make the development of designs with parameterised fits quite easy. Having the equivalent functionality for 3d models would be extremely useful. You can do some similar operations using minkowski with spheres, but performance limitations mean you end up having to limit the complexity of the sphere which in turn can affect the accuracy of the offset and can result in some funny faceting. Is a 3d version of offset planned? Im guessing this would be far less computationally intensive than minkowski, so it would be far more useful in designs. Could this perhaps be a GSoC project? I really have no idea of the complexity. Greg
Open this post in threaded view
|

## Re: 3d offset

 One of the great things about offset is that you can apply it in two directions to smooth or fillet an object. 3d smoothing and filleting would be one of the major advantages of a 3d offset() function.
Open this post in threaded view
|

## Re: 3d offset

 I guess I should give the code example to show how easy it is to smooth and fillet 2d shapes with offset(): ```module shape() { polygon([[0,0],[30,0],[30,30],[15,15],[0,45]]); } module smooth(r=3) { \$fn=30; offset(r=r) offset(r=-r) children(); } module fillet(r=3) { \$fn=30; offset(r=-r) offset(r=r) children(); } translate([0,0]) { translate([0,-15,0]) resize([30,0,0]) text("Original"); shape(); } translate([40,0]) { translate([0,-15,0]) resize([30,0,0]) text("Smooth()"); smooth() shape(); } translate([80,0]) { translate([0,-15,0]) resize([30,0,0]) text("Fillet()"); fillet() shape(); } translate([120,0]) { translate([0,-15,0]) resize([30,0,0]) text("Smooth()Fillet()"); smooth() fillet() shape(); }```
Open this post in threaded view
|

## Re: 3d offset

 On 2015-03-21 08:07, Greg Frost wrote: > I guess I should give the code example to show how easy it is to smooth > and fillet 2d shapes with offset(): Thank you for these great examples! I had wondered how to do 2d filleting, and this appears to be the answer. Simply using offset() twice is a neat trick. Your example also illustrates the "children()" feature in a clean way, another bonus for me. Great stuff, I am going to use it. Thanks again. Carsten Arnholm _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: 3d offset

 In reply to this post by Greg Frost On Fri, Mar 20, 2015 at 03:38:43PM -0700, Greg Frost wrote: > I just discovered the power of offset for 2d shapes. It can make the > development of designs with parameterised fits quite easy. Having the > equivalent functionality for 3d models would be extremely useful. You can do > some similar operations using minkowski with spheres, but performance > limitations mean you end up having to limit the complexity of the sphere > which in turn can affect the accuracy of the offset and can result in some > funny faceting. I'd definitely welcome this. I can't recall how many times I've had to disable all the fillet()[1] calls in my designs while iterating just to save some render time. > Is a 3d version of offset planned? Im guessing this would be far less > computationally intensive than minkowski, so it would be far more useful in > designs. Could this perhaps be a GSoC project? I really have no idea of the > complexity. I read somewhere that a simpler implementation of 3d offset without involving minkowski could involve translating each face outward along its normal, trimming off the intersecting bits somehow, and then filling in the gaps somehow. [1] https://github.com/clothbot/ClothBotCreations/blob/master/utilities/fillet.scad-- Kind regards, Loong Jin _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org signature.asc (836 bytes) Download Attachment