I don’t have millipede anymore (it hasn’t been updated for a very long time) - but the Isosurfacing in Fox is pretty much the same.
You’re generating a very dense mesh to begin with, you have quite a small object and you’re generating the gyroid with 216,000 points, and then you’re subdividing it, giving you an absurd number of points that are actually making the gyroid less accurate (and on top of that you’re then arraying it in 3 directions, your poor computer must be melting) - personally, I would generate it with a much lower resolution to begin with and then subdivide it - at least until you’ve got your parameters worked out, if you need more resolution, you can bump it up at the end once your script is doing what you need it to do. (Same again for your box, it’s a box with rounded edges, it doesn’t need half a million faces)
While I can see the logic of making one module and then arraying it - you’ll get a much cleaner mesh if you just apply the grid to your existing geometry - I’ve included a small example on how you would do that - there are three ways to make a solid out of a gyroid - you can bridge the positive or the negative side - this is very cheap to do (it gives you a watertight mesh useful for printing and has an added bonus of supporting your walls)
So Normal:
Positive:
Negative:
If you want the gyroid to have a “thickness” - that’s more expensive because we have to trim the mesh afterward, which is slow when your meshes are complex - I would be curious how long it takes your computer to calculate this script without Dendro - I have Rhino 8, so you probably will need to rebuild it from the image:
Place a DataDam before Mesh Split so that you can play with the gyroid values - this shouldn’t take more than 30 seconds - once you’re happy with the density and your model - you allow the dam to send the information to the split, which will still be slow - you can thicken the final mesh with Weaverbird or Dendro
If you are interested in bridging, there’s a very small C# script to replace the values - you can copy and paste it straight in where it says “Place your definition here” (and there’s probably a line saying a=something, you can remove this) - then add a third input (zoom into the component to see the buttons) - right click on each one and select “Type Hints” - x needs to be a bool, y and z are doubles:
if(x) a = y;
else a = z;
This says “If x is True, output y. Otherwise output z” - you can do this with vanilla Gh but it will be marginally slower.
The number sliders for Frequency are between 0.1 and 10 (don’t allow the slider to go to 0 as it can cause rhino to crash)
DiscourseGyroid.gh (16.4 KB)
Good luck, have fun, don’t die.