discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

creating a lattice of a shape from another shape

AP
adam purdie
Sat, Jun 30, 2018 12:55 PM

Greetings! i've perused the OpenSCAD forums but not posted before.

I'm trying to figure out how to use OpenSCAD to create s say a cube or a
wall but make the lattice of only the complete contents of another.
Similar to the "pattern" feature of meshmixer.
Basically i want to be able to take any complex or even an imported STL
and make it be "made of" whole kelvin cells like this -
https://pressurevesseltech.asmedigitalcollection.asme.org/data/journals/jpvtas/28540/029004jpv1.jpeg
I can figure out how to make it work for simple shapes with known
geometries but not with complex shapes like benchy.
Any suggestions? can this be done with openscad? cheers!

Greetings! i've perused the OpenSCAD forums but not posted before. I'm trying to figure out how to use OpenSCAD to create s say a cube or a wall but make the lattice of only the complete contents of another. Similar to the "pattern" feature of meshmixer. Basically i want to be able to take any complex or even an imported STL and make it be "made of" whole kelvin cells like this - https://pressurevesseltech.asmedigitalcollection.asme.org/data/journals/jpvtas/28540/029004jpv1.jpeg I can figure out how to make it work for simple shapes with known geometries but not with complex shapes like benchy. Any suggestions? can this be done with openscad? cheers!
DM
doug moen
Sat, Jun 30, 2018 1:40 PM

Well, suppose that you create a Kelvin cell lattice structure, and then you
combine this with "benchy" using either intersection or difference. Is that
a good description of what you are trying to achieve? If so, then it just
becomes a matter of how to write code to create the lattice.

On 30 June 2018 at 08:55, adam purdie adam@symmetry.ninja wrote:

Greetings! i've perused the OpenSCAD forums but not posted before.

I'm trying to figure out how to use OpenSCAD to create s say a cube or a
wall but make the lattice of only the complete contents of another. Similar
to the "pattern" feature of meshmixer.

Basically i want to be able to take any complex or even an imported STL
and make it be "made of" whole kelvin cells like this -
https://pressurevesseltech.asmedigitalcollection.asme.
org/data/journals/jpvtas/28540/029004jpv1.jpeg

I can figure out how to make it work for simple shapes with known
geometries but not with complex shapes like benchy.

Any suggestions? can this be done with openscad? cheers!


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

Well, suppose that you create a Kelvin cell lattice structure, and then you combine this with "benchy" using either intersection or difference. Is that a good description of what you are trying to achieve? If so, then it just becomes a matter of how to write code to create the lattice. On 30 June 2018 at 08:55, adam purdie <adam@symmetry.ninja> wrote: > Greetings! i've perused the OpenSCAD forums but not posted before. > > I'm trying to figure out how to use OpenSCAD to create s say a cube or a > wall but make the lattice of only the complete contents of another. Similar > to the "pattern" feature of meshmixer. > > Basically i want to be able to take any complex or even an imported STL > and make it be "made of" whole kelvin cells like this - > https://pressurevesseltech.asmedigitalcollection.asme. > org/data/journals/jpvtas/28540/029004jpv1.jpeg > > I can figure out how to make it work for simple shapes with known > geometries but not with complex shapes like benchy. > > Any suggestions? can this be done with openscad? cheers! > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
AP
adam purdie
Sat, Jun 30, 2018 2:04 PM

That was my first thought and i gave it a go but there was no way to
ensure that the cells were all complete, most of the cells on the edges
were all partial which would be ok except the cells are only strong when
they're complete.

On Sat, 30 Jun 2018, at 11:40 PM, doug moen wrote:

Well, suppose that you create a Kelvin cell lattice structure, and
then you combine this with "benchy" using either intersection or
difference. Is that a good description of what you are trying to
achieve? If so, then it just becomes a matter of how to write code to
create the lattice.>
On 30 June 2018 at 08:55, adam purdie adam@symmetry.ninja wrote:

__
Greetings! i've perused the OpenSCAD forums but not posted before.

I'm trying to figure out how to use OpenSCAD to create s say a cube
or a wall but make the lattice of only the complete contents of
another. Similar to the "pattern" feature of meshmixer.>>
Basically i want to be able to take any complex or even an imported
STL and make it be "made of" whole kelvin cells like this -
https://pressurevesseltech.asmedigitalcollection.asme.org/data/journals/jpvtas/28540/029004jpv1.jpeg>>
I can figure out how to make it work for simple shapes with known
geometries but not with complex shapes like benchy.>>
Any suggestions? can this be done with openscad? cheers!


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

That was my first thought and i gave it a go but there was no way to ensure that the cells were all complete, most of the cells on the edges were all partial which would be ok except the cells are only strong when they're complete. On Sat, 30 Jun 2018, at 11:40 PM, doug moen wrote: > Well, suppose that you create a Kelvin cell lattice structure, and > then you combine this with "benchy" using either intersection or > difference. Is that a good description of what you are trying to > achieve? If so, then it just becomes a matter of how to write code to > create the lattice.> > On 30 June 2018 at 08:55, adam purdie <adam@symmetry.ninja> wrote: >> __ >> Greetings! i've perused the OpenSCAD forums but not posted before. >> >> I'm trying to figure out how to use OpenSCAD to create s say a cube >> or a wall but make the lattice of only the complete contents of >> another. Similar to the "pattern" feature of meshmixer.>> >> Basically i want to be able to take any complex or even an imported >> STL and make it be "made of" whole kelvin cells like this - >> https://pressurevesseltech.asmedigitalcollection.asme.org/data/journals/jpvtas/28540/029004jpv1.jpeg>> >> I can figure out how to make it work for simple shapes with known >> geometries but not with complex shapes like benchy.>> >> Any suggestions? can this be done with openscad? cheers! >> >> _______________________________________________ >> 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
DM
doug moen
Sat, Jun 30, 2018 3:21 PM

In principle, what you want is to create a Kelvin cell mesh. It's a mesh
because it's made of polygons joined at the edges. But this is a volume
filling mesh, not a surface mesh, so it isn't 2-manifold. Then you
intersect the Kelvin cell mesh with Benchy. Then you take the resulting
volume mesh, and turn each resulting polygon edge into a strut (eg, a
cylinder). So that process takes care of repairing the boundaries of
partial Kelvin cells.

But, I don't know how to do this in OpenSCAD using high level operations.
This kind of volume mesh is not compatible with the CGAL intersection
operator. And after you perform an intersection, you don't have
programmatic access to the edges of the resulting mesh.

You could program this in OpenSCAD at a low level, working directly with
mesh data structures, but then I don't see any benefit of OpenSCAD over a
general purpose language with better support for data structures.

On 30 June 2018 at 10:04, adam purdie adam@symmetry.ninja wrote:

That was my first thought and i gave it a go but there was no way to
ensure that the cells were all complete, most of the cells on the edges
were all partial which would be ok except the cells are only strong when
they're complete.

On Sat, 30 Jun 2018, at 11:40 PM, doug moen wrote:

Well, suppose that you create a Kelvin cell lattice structure, and then
you combine this with "benchy" using either intersection or difference. Is
that a good description of what you are trying to achieve? If so, then it
just becomes a matter of how to write code to create the lattice.

On 30 June 2018 at 08:55, adam purdie adam@symmetry.ninja wrote:

Greetings! i've perused the OpenSCAD forums but not posted before.

I'm trying to figure out how to use OpenSCAD to create s say a cube or a
wall but make the lattice of only the complete contents of another. Similar
to the "pattern" feature of meshmixer.

Basically i want to be able to take any complex or even an imported STL
and make it be "made of" whole kelvin cells like this -
https://pressurevesseltech.asmedigitalcollection.asme.org/
data/journals/jpvtas/28540/029004jpv1.jpeg

I can figure out how to make it work for simple shapes with known
geometries but not with complex shapes like benchy.

Any suggestions? can this be done with openscad? cheers!


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

In principle, what you want is to create a Kelvin cell mesh. It's a mesh because it's made of polygons joined at the edges. But this is a volume filling mesh, not a surface mesh, so it isn't 2-manifold. Then you intersect the Kelvin cell mesh with Benchy. Then you take the resulting volume mesh, and turn each resulting polygon edge into a strut (eg, a cylinder). So that process takes care of repairing the boundaries of partial Kelvin cells. But, I don't know how to do this in OpenSCAD using high level operations. This kind of volume mesh is not compatible with the CGAL intersection operator. And after you perform an intersection, you don't have programmatic access to the edges of the resulting mesh. You could program this in OpenSCAD at a low level, working directly with mesh data structures, but then I don't see any benefit of OpenSCAD over a general purpose language with better support for data structures. On 30 June 2018 at 10:04, adam purdie <adam@symmetry.ninja> wrote: > That was my first thought and i gave it a go but there was no way to > ensure that the cells were all complete, most of the cells on the edges > were all partial which would be ok except the cells are only strong when > they're complete. > > > On Sat, 30 Jun 2018, at 11:40 PM, doug moen wrote: > > Well, suppose that you create a Kelvin cell lattice structure, and then > you combine this with "benchy" using either intersection or difference. Is > that a good description of what you are trying to achieve? If so, then it > just becomes a matter of how to write code to create the lattice. > > On 30 June 2018 at 08:55, adam purdie <adam@symmetry.ninja> wrote: > > > Greetings! i've perused the OpenSCAD forums but not posted before. > > I'm trying to figure out how to use OpenSCAD to create s say a cube or a > wall but make the lattice of only the complete contents of another. Similar > to the "pattern" feature of meshmixer. > > Basically i want to be able to take any complex or even an imported STL > and make it be "made of" whole kelvin cells like this - > https://pressurevesseltech.asmedigitalcollection.asme.org/ > data/journals/jpvtas/28540/029004jpv1.jpeg > > I can figure out how to make it work for simple shapes with known > geometries but not with complex shapes like benchy. > > Any suggestions? can this be done with openscad? cheers! > > _______________________________________________ > 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 > >
MS
Mark Schafer
Sat, Jun 30, 2018 9:09 PM

As doug says OpenSCAD might not be the right app for you.
I have seen this done using manifold lab version of Wings3d.
here is some info:
- on the general manifold labs plugin - http://www.wings3d.com/forum/forumdisplay.php?fid=14
- scroll through here for something that looks similar - https://www.youtube.com/user/ggaliens/videos
- like: https://www.youtube.com/watch?v=A6eavvoudMI
- OR https://www.youtube.com/watch?v=Y1HGdvgMbxw&list=PL8liErXtlMzcOjbisq10xee48P5MkX7Zs

On 7/1/2018 12:55 AM, adam purdie wrote:

p.MsoNormal,p.MsoNoSpacing{margin:0}Greetings! i've perused the OpenSCAD forums but not posted before.

I'm trying to figure out how to use OpenSCAD to create s say a cube or a wall but make the lattice of only the complete contents of another. Similar to the "pattern" feature of meshmixer.

Basically i want to be able to take any complex or even an imported STL and make it be "made of" whole kelvin cells like this - https://pressurevesseltech.asmedigitalcollection.asme.org/data/journals/jpvtas/28540/029004jpv1.jpeg

I can figure out how to make it work for simple shapes with known geometries but not with complex shapes like benchy.

Any suggestions? can this be done with openscad? cheers!

<pre wrap="">_______________________________________________
OpenSCAD mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Discuss@lists.openscad.org">Discuss@lists.openscad.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org">http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org</a>
DM
doug moen
Sun, Jul 1, 2018 3:19 AM

I'm working on a lattice implementation that might work in OpenSCAD.

The problem is closing off the outside of the lattice so you don't have
dangling strut ends.
My idea is to construct the following shapes:

target = Benchy, or whatever shape you want to make a lattice from
basic_lattice = the Kelvin cell lattice, with struts of diameter d
basic_mesh = the Kelvin cell mesh, with polygonal walls of thickness d.
It's a proper 3D object made by thickening the walls of the non-manifold
object I described in my previous post.
internal_lattice = intersection() { basic_lattice; target; }
lattice_shell = intersection() { basic_mesh; shell(d) target; }

The internal_lattice is the version of the lattice with dangling strut
ends. The lattice_shell connects those dangling strut ends into a connected
lattice.

the final result is: union() { internal_lattice; lattice_shell; }

The trick is to figure out how to create a nice looking lattice_shell that
closes off the dangling struts.
With my current implementation, I'm getting something close to what I want,
but it's not quite right yet.

The operation 'shell(d) shape' is something you can implement in OpenSCAD
using minkowski.
http://jweoblog.com/?p=644
http://forum.openscad.org/make-an-object-hollow-with-constant-wall-thickness-td14255.html

(I'm prototyping this in Curv, but am hoping the final version could also
be written in OpenSCAD. That's why no code.)

On 30 June 2018 at 11:21, doug moen doug@moens.org wrote:

In principle, what you want is to create a Kelvin cell mesh. It's a mesh
because it's made of polygons joined at the edges. But this is a volume
filling mesh, not a surface mesh, so it isn't 2-manifold. Then you
intersect the Kelvin cell mesh with Benchy. Then you take the resulting
volume mesh, and turn each resulting polygon edge into a strut (eg, a
cylinder). So that process takes care of repairing the boundaries of
partial Kelvin cells.

But, I don't know how to do this in OpenSCAD using high level operations.
This kind of volume mesh is not compatible with the CGAL intersection
operator. And after you perform an intersection, you don't have
programmatic access to the edges of the resulting mesh.

You could program this in OpenSCAD at a low level, working directly with
mesh data structures, but then I don't see any benefit of OpenSCAD over a
general purpose language with better support for data structures.

On 30 June 2018 at 10:04, adam purdie adam@symmetry.ninja wrote:

That was my first thought and i gave it a go but there was no way to
ensure that the cells were all complete, most of the cells on the edges
were all partial which would be ok except the cells are only strong when
they're complete.

On Sat, 30 Jun 2018, at 11:40 PM, doug moen wrote:

Well, suppose that you create a Kelvin cell lattice structure, and then
you combine this with "benchy" using either intersection or difference. Is
that a good description of what you are trying to achieve? If so, then it
just becomes a matter of how to write code to create the lattice.

On 30 June 2018 at 08:55, adam purdie adam@symmetry.ninja wrote:

Greetings! i've perused the OpenSCAD forums but not posted before.

I'm trying to figure out how to use OpenSCAD to create s say a cube or a
wall but make the lattice of only the complete contents of another. Similar
to the "pattern" feature of meshmixer.

Basically i want to be able to take any complex or even an imported STL
and make it be "made of" whole kelvin cells like this -
https://pressurevesseltech.asmedigitalcollection.asme.org/da
ta/journals/jpvtas/28540/029004jpv1.jpeg

I can figure out how to make it work for simple shapes with known
geometries but not with complex shapes like benchy.

Any suggestions? can this be done with openscad? cheers!


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

I'm working on a lattice implementation that might work in OpenSCAD. The problem is closing off the outside of the lattice so you don't have dangling strut ends. My idea is to construct the following shapes: target = Benchy, or whatever shape you want to make a lattice from basic_lattice = the Kelvin cell lattice, with struts of diameter d basic_mesh = the Kelvin cell mesh, with polygonal walls of thickness d. It's a proper 3D object made by thickening the walls of the non-manifold object I described in my previous post. internal_lattice = intersection() { basic_lattice; target; } lattice_shell = intersection() { basic_mesh; shell(d) target; } The internal_lattice is the version of the lattice with dangling strut ends. The lattice_shell connects those dangling strut ends into a connected lattice. the final result is: union() { internal_lattice; lattice_shell; } The trick is to figure out how to create a nice looking lattice_shell that closes off the dangling struts. With my current implementation, I'm getting something close to what I want, but it's not quite right yet. The operation 'shell(d) shape' is something you can implement in OpenSCAD using minkowski. http://jweoblog.com/?p=644 http://forum.openscad.org/make-an-object-hollow-with-constant-wall-thickness-td14255.html (I'm prototyping this in Curv, but am hoping the final version could also be written in OpenSCAD. That's why no code.) On 30 June 2018 at 11:21, doug moen <doug@moens.org> wrote: > In principle, what you want is to create a Kelvin cell mesh. It's a mesh > because it's made of polygons joined at the edges. But this is a volume > filling mesh, not a surface mesh, so it isn't 2-manifold. Then you > intersect the Kelvin cell mesh with Benchy. Then you take the resulting > volume mesh, and turn each resulting polygon edge into a strut (eg, a > cylinder). So that process takes care of repairing the boundaries of > partial Kelvin cells. > > But, I don't know how to do this in OpenSCAD using high level operations. > This kind of volume mesh is not compatible with the CGAL intersection > operator. And after you perform an intersection, you don't have > programmatic access to the edges of the resulting mesh. > > You could program this in OpenSCAD at a low level, working directly with > mesh data structures, but then I don't see any benefit of OpenSCAD over a > general purpose language with better support for data structures. > > On 30 June 2018 at 10:04, adam purdie <adam@symmetry.ninja> wrote: > >> That was my first thought and i gave it a go but there was no way to >> ensure that the cells were all complete, most of the cells on the edges >> were all partial which would be ok except the cells are only strong when >> they're complete. >> >> >> On Sat, 30 Jun 2018, at 11:40 PM, doug moen wrote: >> >> Well, suppose that you create a Kelvin cell lattice structure, and then >> you combine this with "benchy" using either intersection or difference. Is >> that a good description of what you are trying to achieve? If so, then it >> just becomes a matter of how to write code to create the lattice. >> >> On 30 June 2018 at 08:55, adam purdie <adam@symmetry.ninja> wrote: >> >> >> Greetings! i've perused the OpenSCAD forums but not posted before. >> >> I'm trying to figure out how to use OpenSCAD to create s say a cube or a >> wall but make the lattice of only the complete contents of another. Similar >> to the "pattern" feature of meshmixer. >> >> Basically i want to be able to take any complex or even an imported STL >> and make it be "made of" whole kelvin cells like this - >> https://pressurevesseltech.asmedigitalcollection.asme.org/da >> ta/journals/jpvtas/28540/029004jpv1.jpeg >> >> I can figure out how to make it work for simple shapes with known >> geometries but not with complex shapes like benchy. >> >> Any suggestions? can this be done with openscad? cheers! >> >> _______________________________________________ >> 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 >> >> >
AP
adam purdie
Sun, Jul 1, 2018 10:06 AM

Thanks doug and neon.

Some good points to go forward with, i feel like this might not be the
right app for this particular problem though.
I found this video: https://www.youtube.com/watch?v=C1bsG0V3BeM and it
sort of shows me that what i'm doing is more of a post-post-process than
works with openscad.
I might give meshlab a go :)

cheers!

On Sun, 1 Jul 2018, at 1:19 PM, doug moen wrote:

I'm working on a lattice implementation that might work in OpenSCAD.

The problem is closing off the outside of the lattice so you don't
have dangling strut ends.> My idea is to construct the following shapes:

target = Benchy, or whatever shape you want to make a lattice from
basic_lattice = the Kelvin cell lattice, with struts of diameter d
basic_mesh = the Kelvin cell mesh, with polygonal walls of thickness
d. It's a proper 3D object made by thickening the walls of the non-
manifold object I described in my previous post.> internal_lattice = intersection() { basic_lattice; target; }
lattice_shell = intersection() { basic_mesh; shell(d) target; }

The internal_lattice is the version of the lattice with dangling strut
ends. The lattice_shell connects those dangling strut ends into a
connected lattice.>
the final result is: union() { internal_lattice; lattice_shell; }

The trick is to figure out how to create a nice looking lattice_shell
that closes off the dangling struts.> With my current implementation, I'm getting something close to what I
want, but it's not quite right yet.>
The operation 'shell(d) shape' is something you can implement in
OpenSCAD using minkowski.> http://jweoblog.com/?p=644
http://forum.openscad.org/make-an-object-hollow-with-constant-wall-thickness-td14255.html>
(I'm prototyping this in Curv, but am hoping the final version could
also be written in OpenSCAD. That's why no code.)>
On 30 June 2018 at 11:21, doug moen doug@moens.org wrote:

In principle, what you want is to create a Kelvin cell mesh. It's a
mesh because it's made of polygons joined at the edges. But this is a
volume filling mesh, not a surface mesh, so it isn't 2-manifold. Then
you intersect the Kelvin cell mesh with Benchy. Then you take the
resulting volume mesh, and turn each resulting polygon edge into a
strut (eg, a cylinder). So that process takes care of repairing the
boundaries of partial Kelvin cells.>>
But, I don't know how to do this in OpenSCAD using high level
operations. This kind of volume mesh is not compatible with the CGAL
intersection operator. And after you perform an intersection, you
don't have programmatic access to the edges of the resulting mesh.>>
You could program this in OpenSCAD at a low level, working directly
with mesh data structures, but then I don't see any benefit of
OpenSCAD over a general purpose language with better support for data
structures.

Thanks doug and neon. Some good points to go forward with, i feel like this might not be the right app for this particular problem though. I found this video: https://www.youtube.com/watch?v=C1bsG0V3BeM and it sort of shows me that what i'm doing is more of a post-post-process than works with openscad. I might give meshlab a go :) cheers! On Sun, 1 Jul 2018, at 1:19 PM, doug moen wrote: > I'm working on a lattice implementation that might work in OpenSCAD. > > The problem is closing off the outside of the lattice so you don't > have dangling strut ends.> My idea is to construct the following shapes: > > target = Benchy, or whatever shape you want to make a lattice from > basic_lattice = the Kelvin cell lattice, with struts of diameter d > basic_mesh = the Kelvin cell mesh, with polygonal walls of thickness > d. It's a proper 3D object made by thickening the walls of the non- > manifold object I described in my previous post.> internal_lattice = intersection() { basic_lattice; target; } > lattice_shell = intersection() { basic_mesh; shell(d) target; } > > The internal_lattice is the version of the lattice with dangling strut > ends. The lattice_shell connects those dangling strut ends into a > connected lattice.> > the final result is: union() { internal_lattice; lattice_shell; } > > The trick is to figure out how to create a nice looking lattice_shell > that closes off the dangling struts.> With my current implementation, I'm getting something close to what I > want, but it's not quite right yet.> > The operation 'shell(d) shape' is something you can implement in > OpenSCAD using minkowski.> http://jweoblog.com/?p=644 > http://forum.openscad.org/make-an-object-hollow-with-constant-wall-thickness-td14255.html> > (I'm prototyping this in Curv, but am hoping the final version could > also be written in OpenSCAD. That's why no code.)> > On 30 June 2018 at 11:21, doug moen <doug@moens.org> wrote: >> In principle, what you want is to create a Kelvin cell mesh. It's a >> mesh because it's made of polygons joined at the edges. But this is a >> volume filling mesh, not a surface mesh, so it isn't 2-manifold. Then >> you intersect the Kelvin cell mesh with Benchy. Then you take the >> resulting volume mesh, and turn each resulting polygon edge into a >> strut (eg, a cylinder). So that process takes care of repairing the >> boundaries of partial Kelvin cells.>> >> But, I don't know how to do this in OpenSCAD using high level >> operations. This kind of volume mesh is not compatible with the CGAL >> intersection operator. And after you perform an intersection, you >> don't have programmatic access to the edges of the resulting mesh.>> >> You could program this in OpenSCAD at a low level, working directly >> with mesh data structures, but then I don't see any benefit of >> OpenSCAD over a general purpose language with better support for data >> structures.
KM
Kuba Marek
Sun, Jul 1, 2018 10:46 AM

Wow, that's a very nice idea.
But can you represent the infinite-ish non-manifold mesh in OpenSCAD?

I was playing with a similar thing some time ago (in fact this was the
reason why I started writing CodeCad), but I couldn't figure out how to
close the surfaces, so I just left it with a solid shell.

I'm working on a lattice implementation that might work in OpenSCAD.

The problem is closing off the outside of the lattice so you don't
have dangling strut ends.
My idea is to construct the following shapes:

target = Benchy, or whatever shape you want to make a lattice from
basic_lattice = the Kelvin cell lattice, with struts of diameter d
basic_mesh = the Kelvin cell mesh, with polygonal walls of thickness
d. It's a proper 3D object made by thickening the walls of the
non-manifold object I described in my previous post.
internal_lattice = intersection() { basic_lattice; target; }
lattice_shell = intersection() { basic_mesh; shell(d) target; }

The internal_lattice is the version of the lattice with dangling strut
ends. The lattice_shell connects those dangling strut ends into a
connected lattice.

the final result is: union() { internal_lattice; lattice_shell; }

The trick is to figure out how to create a nice looking lattice_shell
that closes off the dangling struts.
With my current implementation, I'm getting something close to what I
want, but it's not quite right yet.

The operation 'shell(d) shape' is something you can implement in
OpenSCAD using minkowski.
http://jweoblog.com/?p=644
http://forum.openscad.org/make-an-object-hollow-with-constant-wall-thickness-td14255.html

(I'm prototyping this in Curv, but am hoping the final version could
also be written in OpenSCAD. That's why no code.)

On 30 June 2018 at 11:21, doug moen doug@moens.org wrote:

In principle, what you want is to create a Kelvin cell mesh. It's a
mesh because it's made of polygons joined at the edges. But this is
a volume filling mesh, not a surface mesh, so it isn't 2-manifold.
Then you intersect the Kelvin cell mesh with Benchy. Then you take
the resulting volume mesh, and turn each resulting polygon edge
into a strut (eg, a cylinder). So that process takes care of
repairing the boundaries of partial Kelvin cells.

But, I don't know how to do this in OpenSCAD using high level
operations. This kind of volume mesh is not compatible with the
CGAL intersection operator. And after you perform an intersection,
you don't have programmatic access to the edges of the resulting
mesh.

You could program this in OpenSCAD at a low level, working directly
with mesh data structures, but then I don't see any benefit of
OpenSCAD over a general purpose language with better support for
data structures.

On 30 June 2018 at 10:04, adam purdie adam@symmetry.ninja wrote:

That was my first thought and i gave it a go but there was no way
to ensure that the cells were all complete, most of the cells on
the edges were all partial which would be ok except the cells are
only strong when they're complete.

On Sat, 30 Jun 2018, at 11:40 PM, doug moen wrote:

Well, suppose that you create a Kelvin cell lattice structure, and
then you combine this with "benchy" using either intersection or
difference. Is that a good description of what you are trying to
achieve? If so, then it just becomes a matter of how to write code
to create the lattice.

On 30 June 2018 at 08:55, adam purdie adam@symmetry.ninja wrote:

Greetings! i've perused the OpenSCAD forums but not posted before.

I'm trying to figure out how to use OpenSCAD to create s say a
cube or a wall but make the lattice of only the complete contents
of another. Similar to the "pattern" feature of meshmixer.

Basically i want to be able to take any complex or even an
imported STL and make it be "made of" whole kelvin cells like this

I can figure out how to make it work for simple shapes with known
geometries but not with complex shapes like benchy.

Any suggestions? can this be done with openscad? cheers!


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

Wow, that's a very nice idea. But can you represent the infinite-ish non-manifold mesh in OpenSCAD? I was playing with a similar thing some time ago (in fact this was the reason why I started writing CodeCad), but I couldn't figure out how to close the surfaces, so I just left it with a solid shell. > I'm working on a lattice implementation that might work in OpenSCAD. > > The problem is closing off the outside of the lattice so you don't > have dangling strut ends. > My idea is to construct the following shapes: > > target = Benchy, or whatever shape you want to make a lattice from > basic_lattice = the Kelvin cell lattice, with struts of diameter d > basic_mesh = the Kelvin cell mesh, with polygonal walls of thickness > d. It's a proper 3D object made by thickening the walls of the > non-manifold object I described in my previous post. > internal_lattice = intersection() { basic_lattice; target; } > lattice_shell = intersection() { basic_mesh; shell(d) target; } > > The internal_lattice is the version of the lattice with dangling strut > ends. The lattice_shell connects those dangling strut ends into a > connected lattice. > > the final result is: union() { internal_lattice; lattice_shell; } > > The trick is to figure out how to create a nice looking lattice_shell > that closes off the dangling struts. > With my current implementation, I'm getting something close to what I > want, but it's not quite right yet. > > The operation 'shell(d) shape' is something you can implement in > OpenSCAD using minkowski. > http://jweoblog.com/?p=644 > http://forum.openscad.org/make-an-object-hollow-with-constant-wall-thickness-td14255.html > > (I'm prototyping this in Curv, but am hoping the final version could > also be written in OpenSCAD. That's why no code.) > > On 30 June 2018 at 11:21, doug moen <doug@moens.org> wrote: > > > In principle, what you want is to create a Kelvin cell mesh. It's a > > mesh because it's made of polygons joined at the edges. But this is > > a volume filling mesh, not a surface mesh, so it isn't 2-manifold. > > Then you intersect the Kelvin cell mesh with Benchy. Then you take > > the resulting volume mesh, and turn each resulting polygon edge > > into a strut (eg, a cylinder). So that process takes care of > > repairing the boundaries of partial Kelvin cells. > > > > But, I don't know how to do this in OpenSCAD using high level > > operations. This kind of volume mesh is not compatible with the > > CGAL intersection operator. And after you perform an intersection, > > you don't have programmatic access to the edges of the resulting > > mesh. > > > > You could program this in OpenSCAD at a low level, working directly > > with mesh data structures, but then I don't see any benefit of > > OpenSCAD over a general purpose language with better support for > > data structures. > > > > On 30 June 2018 at 10:04, adam purdie <adam@symmetry.ninja> wrote: > > > >> That was my first thought and i gave it a go but there was no way > >> to ensure that the cells were all complete, most of the cells on > >> the edges were all partial which would be ok except the cells are > >> only strong when they're complete. > >> > >> > >> On Sat, 30 Jun 2018, at 11:40 PM, doug moen wrote: > >> > >> Well, suppose that you create a Kelvin cell lattice structure, and > >> then you combine this with "benchy" using either intersection or > >> difference. Is that a good description of what you are trying to > >> achieve? If so, then it just becomes a matter of how to write code > >> to create the lattice. > >> > >> On 30 June 2018 at 08:55, adam purdie <adam@symmetry.ninja> wrote: > >> > >> > >> Greetings! i've perused the OpenSCAD forums but not posted before. > >> > >> I'm trying to figure out how to use OpenSCAD to create s say a > >> cube or a wall but make the lattice of only the complete contents > >> of another. Similar to the "pattern" feature of meshmixer. > >> > >> Basically i want to be able to take any complex or even an > >> imported STL and make it be "made of" whole kelvin cells like this > >> - https://pressurevesseltech.asmedigitalcollection.asme.org/da > >> ta/journals/jpvtas/28540/029004jpv1.jpeg > >> > >> I can figure out how to make it work for simple shapes with known > >> geometries but not with complex shapes like benchy. > >> > >> Any suggestions? can this be done with openscad? cheers! > >> > >> _______________________________________________ > >> 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 > >> > >> > >
DM
doug moen
Sun, Jul 1, 2018 1:02 PM

Hi Kuba.

No infinite shapes in OpenSCAD, so you make the volume mesh just big enough
to fully enclose the target shape.
No zero-width walls in OpenSCAD, so you make the polyhedral faces in the
volume mesh into very thin polyhedral prisms. As thin as possible, but not
so thin that you get accidental self intersection or CGAL errors.

You make a shell of the target shape using minkowski, as thin as is
practical. Then you intersect this shell with the volume mesh, and you get
the "lattice shell", which consists mostly of thin tubes, which will be
used to close off dangling struts. Then you thicken these tubes using
minkowski so that they have the same diameter as the struts.

This is only an approximation of the desired effect. It works best when all
of the polyhedral faces in the volume mesh intersect the target shell at
close to 90°. You get artifacts when a polyhedral face intersects the shell
at an angle close to 0°. At that point, you can try adjusting parameters to
minimize the artifacts.

In CodeCad or Curv, you could play further tricks to get rid of the
artifacts, like vary the thickness of the polyhedral faces based on the
surface normal of the target shape relative to the surface normal of the
face.

On 1 July 2018 at 06:46, Kuba Marek blue.cube@seznam.cz wrote:

Wow, that's a very nice idea.
But can you represent the infinite-ish non-manifold mesh in OpenSCAD?

I was playing with a similar thing some time ago (in fact this was the
reason why I started writing CodeCad), but I couldn't figure out how to
close the surfaces, so I just left it with a solid shell.

I'm working on a lattice implementation that might work in OpenSCAD.

The problem is closing off the outside of the lattice so you don't
have dangling strut ends.
My idea is to construct the following shapes:

target = Benchy, or whatever shape you want to make a lattice from
basic_lattice = the Kelvin cell lattice, with struts of diameter d
basic_mesh = the Kelvin cell mesh, with polygonal walls of thickness
d. It's a proper 3D object made by thickening the walls of the
non-manifold object I described in my previous post.
internal_lattice = intersection() { basic_lattice; target; }
lattice_shell = intersection() { basic_mesh; shell(d) target; }

The internal_lattice is the version of the lattice with dangling strut
ends. The lattice_shell connects those dangling strut ends into a
connected lattice.

the final result is: union() { internal_lattice; lattice_shell; }

The trick is to figure out how to create a nice looking lattice_shell
that closes off the dangling struts.
With my current implementation, I'm getting something close to what I
want, but it's not quite right yet.

The operation 'shell(d) shape' is something you can implement in
OpenSCAD using minkowski.
http://jweoblog.com/?p=644
http://forum.openscad.org/make-an-object-hollow-with-

constant-wall-thickness-td14255.html

(I'm prototyping this in Curv, but am hoping the final version could
also be written in OpenSCAD. That's why no code.)

On 30 June 2018 at 11:21, doug moen doug@moens.org wrote:

In principle, what you want is to create a Kelvin cell mesh. It's a
mesh because it's made of polygons joined at the edges. But this is
a volume filling mesh, not a surface mesh, so it isn't 2-manifold.
Then you intersect the Kelvin cell mesh with Benchy. Then you take
the resulting volume mesh, and turn each resulting polygon edge
into a strut (eg, a cylinder). So that process takes care of
repairing the boundaries of partial Kelvin cells.

But, I don't know how to do this in OpenSCAD using high level
operations. This kind of volume mesh is not compatible with the
CGAL intersection operator. And after you perform an intersection,
you don't have programmatic access to the edges of the resulting
mesh.

You could program this in OpenSCAD at a low level, working directly
with mesh data structures, but then I don't see any benefit of
OpenSCAD over a general purpose language with better support for
data structures.

On 30 June 2018 at 10:04, adam purdie adam@symmetry.ninja wrote:

That was my first thought and i gave it a go but there was no way
to ensure that the cells were all complete, most of the cells on
the edges were all partial which would be ok except the cells are
only strong when they're complete.

On Sat, 30 Jun 2018, at 11:40 PM, doug moen wrote:

Well, suppose that you create a Kelvin cell lattice structure, and
then you combine this with "benchy" using either intersection or
difference. Is that a good description of what you are trying to
achieve? If so, then it just becomes a matter of how to write code
to create the lattice.

On 30 June 2018 at 08:55, adam purdie adam@symmetry.ninja wrote:

Greetings! i've perused the OpenSCAD forums but not posted before.

I'm trying to figure out how to use OpenSCAD to create s say a
cube or a wall but make the lattice of only the complete contents
of another. Similar to the "pattern" feature of meshmixer.

Basically i want to be able to take any complex or even an
imported STL and make it be "made of" whole kelvin cells like this

I can figure out how to make it work for simple shapes with known
geometries but not with complex shapes like benchy.

Any suggestions? can this be done with openscad? cheers!


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

Hi Kuba. No infinite shapes in OpenSCAD, so you make the volume mesh just big enough to fully enclose the target shape. No zero-width walls in OpenSCAD, so you make the polyhedral faces in the volume mesh into very thin polyhedral prisms. As thin as possible, but not so thin that you get accidental self intersection or CGAL errors. You make a shell of the target shape using minkowski, as thin as is practical. Then you intersect this shell with the volume mesh, and you get the "lattice shell", which consists mostly of thin tubes, which will be used to close off dangling struts. Then you thicken these tubes using minkowski so that they have the same diameter as the struts. This is only an approximation of the desired effect. It works best when all of the polyhedral faces in the volume mesh intersect the target shell at close to 90°. You get artifacts when a polyhedral face intersects the shell at an angle close to 0°. At that point, you can try adjusting parameters to minimize the artifacts. In CodeCad or Curv, you could play further tricks to get rid of the artifacts, like vary the thickness of the polyhedral faces based on the surface normal of the target shape relative to the surface normal of the face. On 1 July 2018 at 06:46, Kuba Marek <blue.cube@seznam.cz> wrote: > Wow, that's a very nice idea. > But can you represent the infinite-ish non-manifold mesh in OpenSCAD? > > I was playing with a similar thing some time ago (in fact this was the > reason why I started writing CodeCad), but I couldn't figure out how to > close the surfaces, so I just left it with a solid shell. > > > I'm working on a lattice implementation that might work in OpenSCAD. > > > > The problem is closing off the outside of the lattice so you don't > > have dangling strut ends. > > My idea is to construct the following shapes: > > > > target = Benchy, or whatever shape you want to make a lattice from > > basic_lattice = the Kelvin cell lattice, with struts of diameter d > > basic_mesh = the Kelvin cell mesh, with polygonal walls of thickness > > d. It's a proper 3D object made by thickening the walls of the > > non-manifold object I described in my previous post. > > internal_lattice = intersection() { basic_lattice; target; } > > lattice_shell = intersection() { basic_mesh; shell(d) target; } > > > > The internal_lattice is the version of the lattice with dangling strut > > ends. The lattice_shell connects those dangling strut ends into a > > connected lattice. > > > > the final result is: union() { internal_lattice; lattice_shell; } > > > > The trick is to figure out how to create a nice looking lattice_shell > > that closes off the dangling struts. > > With my current implementation, I'm getting something close to what I > > want, but it's not quite right yet. > > > > The operation 'shell(d) shape' is something you can implement in > > OpenSCAD using minkowski. > > http://jweoblog.com/?p=644 > > http://forum.openscad.org/make-an-object-hollow-with- > constant-wall-thickness-td14255.html > > > > (I'm prototyping this in Curv, but am hoping the final version could > > also be written in OpenSCAD. That's why no code.) > > > > On 30 June 2018 at 11:21, doug moen <doug@moens.org> wrote: > > > > > In principle, what you want is to create a Kelvin cell mesh. It's a > > > mesh because it's made of polygons joined at the edges. But this is > > > a volume filling mesh, not a surface mesh, so it isn't 2-manifold. > > > Then you intersect the Kelvin cell mesh with Benchy. Then you take > > > the resulting volume mesh, and turn each resulting polygon edge > > > into a strut (eg, a cylinder). So that process takes care of > > > repairing the boundaries of partial Kelvin cells. > > > > > > But, I don't know how to do this in OpenSCAD using high level > > > operations. This kind of volume mesh is not compatible with the > > > CGAL intersection operator. And after you perform an intersection, > > > you don't have programmatic access to the edges of the resulting > > > mesh. > > > > > > You could program this in OpenSCAD at a low level, working directly > > > with mesh data structures, but then I don't see any benefit of > > > OpenSCAD over a general purpose language with better support for > > > data structures. > > > > > > On 30 June 2018 at 10:04, adam purdie <adam@symmetry.ninja> wrote: > > > > > >> That was my first thought and i gave it a go but there was no way > > >> to ensure that the cells were all complete, most of the cells on > > >> the edges were all partial which would be ok except the cells are > > >> only strong when they're complete. > > >> > > >> > > >> On Sat, 30 Jun 2018, at 11:40 PM, doug moen wrote: > > >> > > >> Well, suppose that you create a Kelvin cell lattice structure, and > > >> then you combine this with "benchy" using either intersection or > > >> difference. Is that a good description of what you are trying to > > >> achieve? If so, then it just becomes a matter of how to write code > > >> to create the lattice. > > >> > > >> On 30 June 2018 at 08:55, adam purdie <adam@symmetry.ninja> wrote: > > >> > > >> > > >> Greetings! i've perused the OpenSCAD forums but not posted before. > > >> > > >> I'm trying to figure out how to use OpenSCAD to create s say a > > >> cube or a wall but make the lattice of only the complete contents > > >> of another. Similar to the "pattern" feature of meshmixer. > > >> > > >> Basically i want to be able to take any complex or even an > > >> imported STL and make it be "made of" whole kelvin cells like this > > >> - https://pressurevesseltech.asmedigitalcollection.asme.org/da > > >> ta/journals/jpvtas/28540/029004jpv1.jpeg > > >> > > >> I can figure out how to make it work for simple shapes with known > > >> geometries but not with complex shapes like benchy. > > >> > > >> Any suggestions? can this be done with openscad? cheers! > > >> > > >> _______________________________________________ > > >> 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 >
N
NateTG
Sun, Jul 1, 2018 4:23 PM

That was my first thought and i gave it a go but there was no way to
ensure that the cells were all complete, most of the cells on the edges
were all partial which would be ok except the cells are only strong when
they're complete.

Are you trying to make a 'space frame model'?  A bit like doing "adaptive
cubic subdivision" but with wire frame instead of solid-faced cubes?

That's not something you'll have an easy time doing in OpenSCAD since you
don't get numerical access to the geometry.

--
Sent from: http://forum.openscad.org/

> That was my first thought and i gave it a go but there was no way to > ensure that the cells were all complete, most of the cells on the edges > were all partial which would be ok except the cells are only strong when > they're complete. Are you trying to make a 'space frame model'? A bit like doing "adaptive cubic subdivision" but with wire frame instead of solid-faced cubes? That's not something you'll have an easy time doing in OpenSCAD since you don't get numerical access to the geometry. -- Sent from: http://forum.openscad.org/