discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

3d offset

GF
Greg Frost
Fri, Mar 20, 2015 10:38 PM

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

--
View this message in context: http://forum.openscad.org/3d-offset-tp12100.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

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 -- View this message in context: http://forum.openscad.org/3d-offset-tp12100.html Sent from the OpenSCAD mailing list archive at Nabble.com.
GF
Greg Frost
Sat, Mar 21, 2015 6:50 AM

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.

http://forum.openscad.org/file/n12106/offset.png

--
View this message in context: http://forum.openscad.org/3d-offset-tp12100p12106.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

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. <http://forum.openscad.org/file/n12106/offset.png> -- View this message in context: http://forum.openscad.org/3d-offset-tp12100p12106.html Sent from the OpenSCAD mailing list archive at Nabble.com.
GF
Greg Frost
Sat, Mar 21, 2015 7:07 AM

I guess I should give the code example to show how easy it is to smooth and
fillet 2d shapes with offset():

--
View this message in context: http://forum.openscad.org/3d-offset-tp12100p12107.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I guess I should give the code example to show how easy it is to smooth and fillet 2d shapes with offset(): -- View this message in context: http://forum.openscad.org/3d-offset-tp12100p12107.html Sent from the OpenSCAD mailing list archive at Nabble.com.
CA
Carsten Arnholm
Sat, Mar 21, 2015 8:42 AM

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

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
CL
Chow Loong Jin
Mon, Mar 23, 2015 9:06 AM

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

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
CL
Chow Loong Jin
Mon, Mar 23, 2015 9:07 AM

On Mon, Mar 23, 2015 at 05:06:28PM +0800, Chow Loong Jin wrote:

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

Hmm, FreeCAD seems to have a working implementation of 3D offset. Does anyone
know more? Perhaps we could just port their algorithm into OpenSCAD.

[1] http://www.freecadweb.org/wiki/index.php?title=Part_Offset

--
Kind regards,
Loong Jin

On Mon, Mar 23, 2015 at 05:06:28PM +0800, Chow Loong Jin wrote: > 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 > Hmm, FreeCAD seems to have a working implementation of 3D offset. Does anyone know more? Perhaps we could just port their algorithm into OpenSCAD. [1] http://www.freecadweb.org/wiki/index.php?title=Part_Offset -- Kind regards, Loong Jin
K
kintel
Mon, Mar 23, 2015 5:26 PM

They use the offset from OpenCascade. If anyone wants to tinker, see here:
https://github.com/tpaviot/oce/blob/master/src/Geom/Geom_OffsetSurface.cxx

--
View this message in context: http://forum.openscad.org/3d-offset-tp12100p12156.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

They use the offset from OpenCascade. If anyone wants to tinker, see here: https://github.com/tpaviot/oce/blob/master/src/Geom/Geom_OffsetSurface.cxx -- View this message in context: http://forum.openscad.org/3d-offset-tp12100p12156.html Sent from the OpenSCAD mailing list archive at Nabble.com.