discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Is there a way to make a skin from a complex object?

DM
doug moen
Sun, Feb 26, 2017 4:12 PM

Greg Frost: "An efficient 3D offset function would be great"

I agree. With support for both rounded and mitred offset, like we have for
the 2D case.

The 2D offset function is implemented using the Clipper library. We'd need
to bring in another external library that implements 3D offset, and write
glue code to integrate with it. AFAIK, Open Cascade supports this.

As for "efficient", well yes, but 3D rounded offset explodes the number of
vertices, so it could be quite slow if you apply a boolean operation to the
result. (If you really want this to be efficient, you might consider using
an F-Rep modelling system instead, since rounded offset is quite cheap in
that representation.)

On 25 February 2017 at 20:51, Greg Frost gregorybartonfrost@gmail.com
wrote:

An efficient 3D offset function would be great, and has been raised on
this mailing list before, but as I understand it, it is not trivial to
implement with the libraries and tools used currently.

When I have needed to do this, I have used meshlab to generate offset
STLs, then imported them to OpenSCAD for further manipulation.

On 26 Feb 2017, at 11:40 am, nop head nop.head@gmail.com wrote:

Yes exactly. I can't remember if Minkowski works on hollow objects yet. It
used to be the case I had to punch a sprue hole in the mould for it to
recognise the inside and then I had to cut off the resultant bleed from the
object. That was probably 2D Minkowski though, before offset.

On 25 February 2017 at 19:53, Frank van der Hulst <drifter.frank@gmail.com

wrote:

Difference your object from a larger cube (or whatever) to get a female
mould. Then minkowski that and intersect with the original object.

On 26/02/2017 08:20, "adrian" adrianh.bsc@gmail.com wrote:

Thanks Carsten and jdawgaz, but I did say complex object, so scaling
will not
achieve what I need (though I did try that before I posted).

Thanks nophead, I did look into minkowski, but that expands the object,
which isn't what I'm looking for.

Any other suggestions?

Thanks,

--
View this message in context: http://forum.openscad.org/Is-t
here-a-way-to-make-a-skin-from-a-complex-object-tp20575p20579.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Greg Frost: "An efficient 3D offset function would be great" I agree. With support for both rounded and mitred offset, like we have for the 2D case. The 2D offset function is implemented using the Clipper library. We'd need to bring in another external library that implements 3D offset, and write glue code to integrate with it. AFAIK, Open Cascade supports this. As for "efficient", well yes, but 3D rounded offset explodes the number of vertices, so it could be quite slow if you apply a boolean operation to the result. (If you really want this to be efficient, you might consider using an F-Rep modelling system instead, since rounded offset is quite cheap in that representation.) On 25 February 2017 at 20:51, Greg Frost <gregorybartonfrost@gmail.com> wrote: > An efficient 3D offset function would be great, and has been raised on > this mailing list before, but as I understand it, it is not trivial to > implement with the libraries and tools used currently. > > When I have needed to do this, I have used meshlab to generate offset > STLs, then imported them to OpenSCAD for further manipulation. > > On 26 Feb 2017, at 11:40 am, nop head <nop.head@gmail.com> wrote: > > Yes exactly. I can't remember if Minkowski works on hollow objects yet. It > used to be the case I had to punch a sprue hole in the mould for it to > recognise the inside and then I had to cut off the resultant bleed from the > object. That was probably 2D Minkowski though, before offset. > > On 25 February 2017 at 19:53, Frank van der Hulst <drifter.frank@gmail.com > > wrote: > >> Difference your object from a larger cube (or whatever) to get a female >> mould. Then minkowski that and intersect with the original object. >> >> On 26/02/2017 08:20, "adrian" <adrianh.bsc@gmail.com> wrote: >> >>> Thanks Carsten and jdawgaz, but I did say complex object, so scaling >>> will not >>> achieve what I need (though I did try that before I posted). >>> >>> Thanks nophead, I did look into minkowski, but that expands the object, >>> which isn't what I'm looking for. >>> >>> Any other suggestions? >>> >>> Thanks, >>> >>> >>> >>> >>> >>> -- >>> View this message in context: http://forum.openscad.org/Is-t >>> here-a-way-to-make-a-skin-from-a-complex-object-tp20575p20579.html >>> Sent from the OpenSCAD mailing list archive at Nabble.com. >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> Discuss@lists.openscad.org >>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>> >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >> > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
A
adrian
Sun, Feb 26, 2017 4:55 PM

Wouldn't this be possible to do by just duplicating the faces, offsetting
them by a value along the face's normal, and then adjusting the edges so
that they intersect with their neighbour?  Any face that has an area of zero
would then be discarded.

--
View this message in context: http://forum.openscad.org/Is-there-a-way-to-make-a-skin-from-a-complex-object-tp20575p20589.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Wouldn't this be possible to do by just duplicating the faces, offsetting them by a value along the face's normal, and then adjusting the edges so that they intersect with their neighbour? Any face that has an area of zero would then be discarded. -- View this message in context: http://forum.openscad.org/Is-there-a-way-to-make-a-skin-from-a-complex-object-tp20575p20589.html Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Sun, Feb 26, 2017 5:00 PM

Yes that is basically the 3D offset algorithm but there are lots of tricky
corner cases at the corners.

On 26 February 2017 at 16:55, adrian adrianh.bsc@gmail.com wrote:

Wouldn't this be possible to do by just duplicating the faces, offsetting
them by a value along the face's normal, and then adjusting the edges so
that they intersect with their neighbour?  Any face that has an area of
zero
would then be discarded.

--
View this message in context: http://forum.openscad.org/Is-
there-a-way-to-make-a-skin-from-a-complex-object-tp20575p20589.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Yes that is basically the 3D offset algorithm but there are lots of tricky corner cases at the corners. On 26 February 2017 at 16:55, adrian <adrianh.bsc@gmail.com> wrote: > Wouldn't this be possible to do by just duplicating the faces, offsetting > them by a value along the face's normal, and then adjusting the edges so > that they intersect with their neighbour? Any face that has an area of > zero > would then be discarded. > > > > -- > View this message in context: http://forum.openscad.org/Is- > there-a-way-to-make-a-skin-from-a-complex-object-tp20575p20589.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
MK
Marius Kintel
Sun, Feb 26, 2017 5:09 PM

I believe one method is to build a straight skeleton (https://en.wikipedia.org/wiki/Straight_skeleton) in 3D, and then using that to offset along the skeleton leaf segments. I expect this to be how the 2D offset it done today, but I haven’t looked into the underlying code.

-Marius

I believe one method is to build a straight skeleton (https://en.wikipedia.org/wiki/Straight_skeleton) in 3D, and then using that to offset along the skeleton leaf segments. I expect this to be how the 2D offset it done today, but I haven’t looked into the underlying code. -Marius
DM
doug moen
Sun, Feb 26, 2017 5:29 PM

Adrian: yes, that will construct a mitred offset, which is one of the two
offsetting modes we support in 2D. The devil is in the details.

Here's a paper that explores your algorithm.
http://brweb.haltonrc.edu.on.ca/202204/ICE3/V1Nos1to4_33.pdf

On 26 February 2017 at 11:55, adrian adrianh.bsc@gmail.com wrote:

Wouldn't this be possible to do by just duplicating the faces, offsetting
them by a value along the face's normal, and then adjusting the edges so
that they intersect with their neighbour?  Any face that has an area of
zero
would then be discarded.

--
View this message in context: http://forum.openscad.org/Is-
there-a-way-to-make-a-skin-from-a-complex-object-tp20575p20589.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Adrian: yes, that will construct a mitred offset, which is one of the two offsetting modes we support in 2D. The devil is in the details. Here's a paper that explores your algorithm. http://brweb.haltonrc.edu.on.ca/202204/ICE3/V1Nos1to4_33.pdf On 26 February 2017 at 11:55, adrian <adrianh.bsc@gmail.com> wrote: > Wouldn't this be possible to do by just duplicating the faces, offsetting > them by a value along the face's normal, and then adjusting the edges so > that they intersect with their neighbour? Any face that has an area of > zero > would then be discarded. > > > > -- > View this message in context: http://forum.openscad.org/Is- > there-a-way-to-make-a-skin-from-a-complex-object-tp20575p20589.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > >
T
TLC123
Thu, Mar 23, 2017 6:00 PM

Don't know if it's the same cgal as in osca
http://doc.cgal.org/latest/Surface_mesh_skeletonization/index.html

--
View this message in context: http://forum.openscad.org/Is-there-a-way-to-make-a-skin-from-a-complex-object-tp20575p21007.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Don't know if it's the same cgal as in osca http://doc.cgal.org/latest/Surface_mesh_skeletonization/index.html -- View this message in context: http://forum.openscad.org/Is-there-a-way-to-make-a-skin-from-a-complex-object-tp20575p21007.html Sent from the OpenSCAD mailing list archive at Nabble.com.