Hello,
I would like to create a torus (Øi=30, Øa=34) with 24 rhombi on every row (4 rows per quarter). Then it shall be exported as step for further useage in Solidworks.
I found an example but am not able to modify it for my needs. It comes with hexagonal pattern on 3 rows per quarter.
Only managed to get 24 hexagonals on every row. Also I managed to get a solely torus with desired measures. But thats it ![]()
With 24 hexagonal tiles a row:
hexTile[n_, m_] :=
With[{hex = Polygon[Table[{Cos[2 Pi k/6] + #, Sin[2 Pi k/6] + #2}, {k, 6}]] &},
Table[hex[3 i + 3 ((-1)^j + 1)/4, Sqrt[3]/2 j], {i, n}, {j, m}] /.
{x_?NumericQ, y_?NumericQ} :> 2 π {x/(3 m), 2 y/(n Sqrt[3])}
]
ht = With[{torus = {Cos[#] (3 + Cos[#2]), Sin[#] (3 + Cos[#2]), Sin[#2]} &},
Graphics3D[hexTile[24, 24] /. Polygon[l_List] :> Polygon[torus @@@ l], Boxed -> False]
]
And Torus with desired dimensions:
Graphics3D[Torus[{0, 0, 0}, {30, 34}]]
Any idea?