How to create a TPMS from an equation

Objective:

Learn how to create a TPMS by using math equations. This example creates a Schwarz TPMS

Applies to:

  • TPMS
  • Math

Procedure:

1. Build the equation using math blocks

The equation for the Schwarz TPMS is cos(x)+cos(y)+cos(z). Equations in nTop are built out by individual blocks. Some equations can quickly become complicated. Due to this, we recommend turning these workflows into Custom Blocks, so you only have to build it once. It is also useful to name each block as the function it is representing.

    • Add 3 Cos blocks 
    • In the first Cos block, write in 'X/1 mm'. This gets rid of the units associated with X and allows it to work with Cos.

cos.jpg

    • Repeat this for the remaining Cos blocks using Y and Z instead of X.
    • Add an Add block
      • Insert Cos(X) and Cos(Y) into the Add block

cos1.jpg

    • Add another Add block
      • Insert the Add block with Cos(X) + Cos(Y)
      • Insert Cos(Z)

cos2.jpg

View the results of your equation. If you just see black, zoom out or use 'Z' to zoom to the object. The TPMS should be quite large.

cos6.jpg

2. Give your TPMS units

In order to use the TPMS in other operations, it needs units. Add units by multiplying the field by 1 mm.

    • Add a Multiply block
      • Insert the equation from Step 1 into Operand A
      • In Operand B, write 1 mm

cos3.jpg

3. Trim your TPMS down to size

Use the Boolean Intersect block to edit the size of the TPMS

    • Add a Boolean Intersect block
      • Insert the Multiply block from Step 2.
      • Insert a body that you want to intersect the TPMS with. In this example, we use a small Cube.

cos5.jpg

And that’s it! You’ve successfully created a TPMS using math blocks

Are you still having issues? Contact the support team, and we’ll be happy to help!

Download the Example file:

More on this topic:

Keywords:

 TPMS variable math build cos how-to x equation schwarz 
Was this article helpful?

Comments

8 comments
  • Is there a way to use this custom-created tpms like a tpms made by nTop (i.e. to use "walled tpms" ...)?

    1
  • Are you asking to create a walled version of your custom TPMS? Or do you want to use your unit cell in those blocks? The best method would be to use the beta lattice blocks with a custom unit cell.

    2
  • A general Gyroid is represented by, F (x,y,z) =cos(x)∙sin(y) + cos(y)∙sin(z) + cos(z)∙sin(x) + c, and c is function which controls percentage of porosity in a TPMS model.
    Is there a method to implement gyroid architecture on a imported solid model, and control its level of porosity using C function.

    7
  • Is it possible to obtain with this methodology the unit cell of a TPMS? I see that with this method a whole lattice is formed and trimmed down to the desired size, but how can I decide the size of the unit cell itself and obtain just the unit cell? Thank you!

    1
  • How can I generate walled TPMS lattices from implicit functions with customizable unit cell size and iso-value? I want to control the porosity precisely so only controlling the wall thickness is not enough. Or can you tell me the relation between the isovalue, wall thickness and porosity used in Ntop?

    2
  • Dear Cayleigh McCreight,
    Regarding TPMS, let's say equation of Primitive is given as follows:
    cos(x)+cos(y)+cos(z) = C [1],
    Thus, is there any explicit equation for relationship between "Physical thickness", (C) in Eq.1 and volume fraction?
    Thanks

    0
  • To calculate percent density for a unit cell, I empirically measured it across many unit cell sizes and thicknesses and fit the curve to a 5th degree polynomial. The results are within 1% of predicted. This route works well for many purposes.

    0
  • how can i set perfect porosity to lattice structure.eg;70% ,80%
    what are the steps i need to follow to get the porosity of lattice?

    0

Please sign in to leave a comment.