This is probably a silly question but...
Context
I have gathered from this site Functions to draw sets of concentric 3D rings
as follows:
annulus3D[c_?VectorQ, {r1_, r2_}, h_?Positive] /; 0 < r1 < r2 :=
BSplineSurface[
Map[TranslationTransform[c],
Map[Function[pt,
Append[#1 pt, #2]], {{1, 0}, {1, 1}, {-1, 1}, {-1,
0}, {-1, -1}, {1, -1}, {1, 0}}] & @@@ {{r2, h}, {r1, h}, {r1,
0}, {r2, 0}}, {2}], SplineClosed -> True,
SplineDegree -> {1, 2},
SplineKnots -> {{0, 0, 1/4, 1/2, 3/4, 1, 1}, {0, 0, 0, 1/4, 1/2,
1/2, 3/4, 1, 1, 1}},
SplineWeights ->
Outer[Times, ConstantArray[1, 4], {1, 1/2, 1/2, 1, 1/2, 1/2, 1}]]
ring3D[orientation_?VectorQ, radius_?NumberQ, width_?NumberQ,
height_?NumberQ] :=
GeometricTransformation[
annulus3D[{0, 0, 0}, {radius, radius + width}, height],
RotationMatrix[Pi/4, orientation]]
so that
ring3D[{0, 0, 1/2}, 3, 3, 0.1]
produces
But as soon as I wrap it with a Graphics3D
, it displays a mesh and is very slow
Graphics3D[ring3D[{0, 0, 1/2}, 3, 3, 0.1]]
Question
How can I simply recover the rotated object so that I can superimpose them and still have smoth surfaces and fast rendering? (No mesh)
E.g. Not this:
Graphics3D[{ring3D[{0, 0, 1/2}, 3, 3, 0.1],
ring3D[{0, 1/2, 1/2}, 3, 3, 0.1]}]
It might be that the solution involves something else than GeometricTransformation
?
I use Mathematica 12.3 on MacOS.
Note that on Wolfram Cloud the code fails differently: only the first annulus is shown when aiming to display two; so something is wrong with the 3D bounding box.
EdgeForm[]
— looks like after the conversion region -> graphics, the edges of the polygons are being drawn. It might be a bug (probably is, imo, at this point). $\endgroup$annulus3D2[c_?VectorQ, {r1_, r2_}, h_?Positive] /; 0 < r1 < r2 := RegionProduct[BoundaryDiscretizeRegion[Annulus[c, {r1, r2}]], MeshRegion[{{0}, {h}}, Line[{1, 2}]]]
I get much improved performance but still a mesh $\endgroup$