Message Boards Message Boards

GROUPS:

How can I export efficiently a huge number of cuboids using Graphics3D?

Posted 7 months ago
3868 Views
|
5 Replies
|
0 Total Likes
|

Hi! I'm generating some cellular automata for 3D printing and I'm having trouble exporting my models. Here is what I've been doing. This is how I'm generating the array that defines the cellular automata

enter image description here

Using one of the set of parameters that I'm running, I get this array enter image description here

From what I've tried I can generate a 3D model with this array using 2 functions, that are Image3D and Graphics3D. With image3D I get something like this enter image description here

With Graphics3D, I get something like this enter image description here Since I'm 3d printing them I need to use the Graphics3D cause I'm not able to export the result on the 3rd image (using Image3D) to a .stl file. And here is where my problems start. First, the parameter "l" describes the domain of the 3D model that I'm generating and the rendering process using the Graphics3D with a domain this huge (which is when l=200) doesn't complete and the program freezes and closes. I suppressed the rendering and it completed this part but when I try to export the model, it takes a lot of time and in the end generates an empty file. I'm using a 200x200x200 cell domain, the cell is set to be 1mm side length by default so it generates a 3d graph with 200mm side length, but I need the models to have 50mm side length, so I reduce it using Simplify3D (which is the software that i'm using to 3d print it). I think the problem is with the number of cuboids that I'm generating using those parameters (23, 200, 50, 100, 12) with Graphics3D which is around 4007223 cuboids. So I'd like to know, is there a way to export this many cuboids efficiently? Can I reduce their size to be less demanding computationally? Or is there another function that can do what I'm trying to do using Graphics3D and it's more likely to be successful? I attached the file with the coding bellow, it only has the expression for the Graphics3D function that generates the cellular automata.

5 Replies

Please next time mention that you asked a similar question in a previous post https://community.wolfram.com/groups/-/m/t/2071516

Posted 7 months ago

Hi Rafael,

I tried the Export. It completed after ~1.5h and generated a 2.4GB STL file. I imported it (which took ~7min) and its RegionBounds and other region measures were correct, so it seems to be good. I can upload it to gDrive and share if you are interested.

Hi Rohit,

Thanks for the answer again. I am interested and would really appreciate if you could share it. This is part of a research for generating porous media using cellular automata and 3d printing them. I'm going to use these samples on a permeater and analyse its permeability to validade the methodology on the near future. I'm currently working with 15 samples and this was one of them. The problem is that on my computer (that has 8GB of memory) it runs for ~2h and, as i said, the program freezes. I was trying do solve it by reducing the size of the model or finding another function that allowed me to export them as a STL file. I tried recently using RescalingTransform but it didn't worked. If you have any recomendations to help me i would really appreciate it too. Thanks for the help!

Posted 7 months ago

Hi Rafael,

Sorry, I don't know how to reduce the size. The STL file is available here.

Posted 7 months ago

WOWOWOW the output is great, can't wait to try this.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract