You can also do it with triangles using the same definition I posted for the gyroid, just with a different input.

This definition contains 2 different ways to triangulate this surface, depending how you want it to align with the boundaries:

subd_diamond.gh (15.8 KB)

Great stuff! Many thanks!

I noticed most of these TPMS are generated only in cubes or rectangular forms. Is there a way to change the boundary to a sphere maybe?

Hi Bobeng,

The P in TPMS stands for periodic - so the unit cell has to be a shape that can tile space, which a sphere doesn’t. Common ones aside from the cube are the rhombic dodecahedron, and the truncated octahedron. There are lots of examples on Ken Brakke’s page.

You can also certainly generate discrete minimal surfaces with all sorts of other boundary shapes if you don’t require them to be periodic.

Thanks for your reply Daniel. However, I’m talking of models like the attached. Is there a way to generate such models?

The first one looks like someone has taken a regular periodic minimal surface and trimmed it with the bunny shaped boundary mesh. This should be possible with the Mesh Split component.

The second one looks like it has been stretched and mapped to the torus (and is no longer minimal).

Thanks a lot for your response Daniel. This is amazing!!. By the way, which part of your .gh file the contains the equation of Schwarz D so i can change to other minimal surface if possible?

In these examples the minimal surface comes from the initial mesh, which is internalised as the first component in the definition. In this thread I’ve posted these discretizations for the gyroid and Schwarz D surface. The Schwarz P surface also has a very simple discrete version.

how do I change:

i) The type of minimal surface used ie. into a gyroid or schwarz p using their equations.

ii)The boundary mesh into another shape

I created this gyroid but I am not able to define the length, width and height. I will be glad if i can get help controlling the dimensions. Thanks. Gyroid.gh (16.9 KB)

Hi @bobeng1, it’s not clear to me what you are trying to do.

In the minsurf_trim file I posted above, the X input to the ArrBox component controls the size of the array of gyroid units. If you are trimming the result with some closed solid, the array needs to be bigger than the solid.

Thanks for the response @DanielPiker. I was hoping to define the x, y and z dimension in the gyroid.gh definition I sent for a regular Cube without trimming. I noticed the dimensions I get for the entire model is different from what in put in at x, y and z. Is there a way to create say, a 10mm x10mm x10mm box of gyroid?

Can you create a BoundingBox of your final Gyroid cube, DeconstructBox to get the X,Y and Z dimensions and then Scale NU to get it to the size you want?

Your definition probably sets the X, Y and Z for the initial mesh and the final size is dictated by everything that happens after that.

I can’t open your Gyroid.gh file because I don’t have Millipede but the attached file takes a mesh and scales it to be 10.0 in X, Y and Z directions.

SCALE_NU.gh (10.8 KB)

Many thanks to Daniel Piker

And here’s a 32 sec. video: Minimal1

Needless to say I could not have done this myself - what I did was take Daniel’s GH file and tweak it a bit to make the object 3D printable. My first attempt to print failed because no side of the geometry is truly flat, which means there were only tiny points of contact with the printer’s print bed. These points were not large enough to hold the part in place. So I whacked off a small amount of the bottom of the geometry and made it flat. This allowed the print to complete in 7 hrs. 52 min.

Daniel was generous enough to post an alternate design, so I combined that with the first one and added some GH components to do the bottom fixing. I’ll be happy to post the whole GH file for anyone who’s interested, but it requires some explaining because it uses 3 separate solutions.

The STL file for printing is here: Thingiverse and Pinshape.

@martynjhogg THANKS A LOT!! I have been able to define the dimensions with your example. Thanks for the amazing support

Hi Daniel, Thank you very much for pointing me to this thread. Great results! I’m curious if you have any tips for cleaning up the mesh edges when you follow this minsurf_trim.gh method, as the cutting produces rough geometry when thickened. I’ve tried most of the weaverbird subdivisions and smoothing objects at various steps in the process without much luck.