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

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

adrian
If I have some arbitrary complex object, is there some method to produce a hollowed out version of it?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

cacb
On 2017-02-25 19:17, adrian wrote:
> If I have some arbitrary complex object, is there some method to
> produce a
> hollowed out version of it?

Subtract a scaled down version.

Carsten Arnholm

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

jdawgaz
to amplify arnholm's reply:

I have done a translate() of the difference out object to show that it did indeed "hollow" it out.


$fn = 60;

module object() {
  cylinder(r1=4, r2=10, h= 20, center=true);
  translate([0,0,5]) cube([20,3,3], center=true);
}

difference() {
  object();
  translate([0,0,-1.5]) scale([.9,.9,.9]) object();
}



--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov


On Sat, Feb 25, 2017 at 11:24 AM, <[hidden email]> wrote:
On 2017-02-25 19:17, adrian wrote:
If I have some arbitrary complex object, is there some method to produce a
hollowed out version of it?

Subtract a scaled down version.

Carsten Arnholm


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

nophead
In reply to this post by cacb
That only works for a convex shapes and doesn't necessarily give a constant wall thickness.

In 2D you can use offset(-thickness) to produce a smaller to subtract.

In 3D it can be done with a sequence of Minkowskis but will be very slow.

On 25 February 2017 at 18:24, <[hidden email]> wrote:
On 2017-02-25 19:17, adrian wrote:
If I have some arbitrary complex object, is there some method to produce a
hollowed out version of it?

Subtract a scaled down version.

Carsten Arnholm


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

adrian
In reply to this post by jdawgaz
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,

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

frankv
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" <[hidden email]> 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-there-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
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

nophead
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 <[hidden email]> 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" <[hidden email]> 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-there-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
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Greg Frost
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 <[hidden email]> 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 <[hidden email]> 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" <[hidden email]> 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-there-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
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

adrian
Thanks everyone,

Due to the complexity, I've opted to make each component of the complex object to allow generating either the inner, outer or skin of the object (usually a difference operation of two sizes).  This allowed me to generate the complex object using a combination of intersections and differences of the sub objects.

Not trivial, but much faster than doing anything stated here.

Appreciate the help though.  Thanks again.


A
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Ronaldo
Would tell us what you have done with a small example?

2017-02-26 11:36 GMT-03:00 adrian <[hidden email]>:
Due to the complexity, I've opted to make each component of the complex
object to allow generating either the inner, outer or skin of the object
(usually a difference operation of two sizes). 


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

doug.moen
In reply to this post by Greg Frost
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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" <[hidden email]> 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-there-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
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

adrian
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

nophead
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 <[hidden email]> 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
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

kintel
Administrator
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


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

doug.moen
In reply to this post by adrian
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.

On 26 February 2017 at 11:55, adrian <[hidden email]> 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
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org




_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

TLC123
In reply to this post by kintel
Don't know if it's the same cgal as in osca http://doc.cgal.org/latest/Surface_mesh_skeletonization/index.html
Loading...