1
$\begingroup$

good morning. I have written a code of a spherical gyroid when I run it, it gives me a 3D drawing. now I need to save it in STL format for 3D printing. Mathematical doesn't have the option to save the file in STL format. I have been asking this question but I've gotten a concrete detailed answer. If someone can write me the full code on how to go about it I will be very grateful

r = 2 Pi;
model = ContourPlot3D[
  Sin[x] Cos[y] + Sin[y] Cos[z] + Sin[z] Cos[x] == 0, {x, -r, 
   r}, {y, -r, r}, {z, -r, r},
  RegionFunction -> ({x, y, z} \[Function] x^2 + y^2 + z^2 <= r^2),
  Mesh -> None]
$\endgroup$
  • $\begingroup$ Export["model.stl",model] works just fine for me. The STL file, however, is defect-ridden, which cannot be fixed with RepairMesh. This will be a very difficult model to print as there is no guidance on wall thickness or what is an inner vs. outer surface. $\endgroup$ – bobthechemist Mar 15 at 13:42
2
$\begingroup$
Export["a.stl", DiscretizeGraphics[model]]
| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.