I will create a 3D printable model of a kagome lattice on a torus.
My solution:
c[p_, m_, n_, v_] := Join @@ CoordinateBoundingBoxArray[{p, p + {m, n} v}, v];
tor[u_, v_, m_, n_] := {(m + n Cos[v]) Cos[u], (m + n Cos[v]) Sin[u], n Sin[v]};
f[x_, m_, n_] := Rescale[x, {m, n}, {0, 2 Pi}];
torp[m_, n_, a_, b_] := With[{pts = CirclePoints[{##}, 1, 6] & @@@ Join @@ (c[#, m, n, {2, 2 Sqrt[3]}] & /@ {{0, 0}, {1, Sqrt[3]}})}, Map[tor[f[#[[1]], -1, 2 m + 2 - 1], f[#[[2]], -Sqrt[3]/2, (4 n + 3) Sqrt[3]/2], a, b] &, pts, {2}]];
gv[m_?IntegerQ, n_?IntegerQ] :=
Module[{lst, cylinders, spheres, cyR = 0.1, sphR = 0.3},
lst = torp[m, n, (2 m + 3)/(2 Pi), (4 n + 3) Pi/(4 Pi)];
cylinders =
Table[Cylinder[{lst[[i, j]], lst[[i, If[j < 6, j + 1, 1]]]}, cyR], {i, Length@lst}, {j, 6}];
spheres = Sphere[#, sphR] & /@ lst;
Graphics3D[{Black, spheres, cylinders}]
];
output = gv[30, 3];
Print[output];
Old question:
I've used some code of this question.
c[p_, m_, n_, v_] := Join @@ CoordinateBoundingBoxArray[{p, p + {m, n} v}, v]
tor[u_, v_, m_, n_] := {(m + n Cos[v]) Cos[u], (m + n Cos[v]) Sin[u], n Sin[v]}
f[x_, m_, n_] := Rescale[x, {m, n}, {0, 2 Pi}]
torp[m_, n_, a_, b_] := With[{pts = CirclePoints[{##}, 1, 6] & @@@ Join @@ (c[#, m, n, {2, 2 Sqrt[3]}] & /@ {{0, 0}, {1, Sqrt[3]}})}, Map[tor[f[#[[1]], -1, 2 m + 2], f[#[[2]], -Sqrt[3]/2, (4 n + 3) Sqrt[3]/2], a, b] &, pts, {2}]]
gv[m_, n_] := Graphics3D[{EdgeForm[{Thick}], FaceForm[None], Polygon /@ torp[m, n, (2 m + 3)/(2 Pi), (4 n + 3) Pi/(4 Pi)], Point /@ torp[m, n, (2 m + 3)/(2 Pi), (4 n + 3) Pi/(4 Pi)]}]
output = Show[gv[30, 3]]
Export["Kagome3DModell.stl", output];
In the Mathematica script it shows only edges as I want.
After exporting it to a STL file, we can only see the faces.
How can I produce a STL file only showing the edges like in the Mathematica Show-command?
Thank you very much for help.



FaceForm -> None, which only modifies the way they are displayed, but doesn't make them disappear. You could try constructing your structure using e.g.Lineelements instead. – MarcoB Jun 11 '18 at 16:09Blender 3D.1.Import model. 2.Add Modifer-Wireframe-> Apply. 3 And export to STL. – Mariusz Iwaniuk Jun 11 '18 at 16:27