I do have a problem with exporting 3D graphics out of Mathematica into a binary stl file. In the 3d graphic there is a 3d disk, which is not originally contained in the mathematica function pool, but I found a very helpful code here in the forum.
(How to draw a Circle in 3D on a sphere)
disk3D[centre_: {0, 0, 0}, radius_: 1, normal_: {0, 0, 1},
angle_: {0, 2 Pi}] :=
Polygon[Map[RotationTransform[{{0, 0, 1}, normal}, centre]][
If[First@Differences@angle >= 2 Pi, #, Append[#, centre]] &[
Map[Append[#, Last@centre] &][
SortBy[#, N[ArcTan @@ (# - Most@centre)] &] &[
MeshCoordinates[DiscretizeRegion[Circle[Most@centre, radius, angle]]]]]]]]
In addition to the disk there is another Graphics3D figure, but when I try to export them as a whole it only exports the disk into the stl file. Here is my code:
B1 = Graphics3D[disk3D[ {0, 0, 0}, 1, {0, 0, 1}, {0, 2 Pi}]]
H1 = Graphics3D[{CapForm[None],
Tube[{{0, 0, 1}, {0, 0, 2}}, {1, 0.5}]}]
Test = Show[H1, B1]
Export["Test.stl", Test, {"STL", "BinaryFormat" -> False}]
Can someone help me? Thanks!
VertexNormalsfor yourTubeinside theH1. – Rom38 Nov 15 '17 at 11:30VertexNormalshas a certain default settings but MMa fails with these defaults in case when you combines two different graphics. The combined graphics has an empty vertex list and, therefore, you have an error-message. – Rom38 Nov 16 '17 at 09:06