As already stated in the comments, you can surely find a 3d export format which stores the normals too. On the other hand, I believe the only information you are missing is, that there is a function Normal
(which has nothing to do with the normals).
This function transforms a GraphicsComplex
back to a form where all polygons are stored explicitly. Therefore, you take you Graphics3D
, apply Normal
and then you can via e.g. Cases
and some rules extract all information you like.
OK, let's make this answer worth many upvotes: The triangle faces of your graphics are the first argument in all the Polygon
calls after you applied Normal
. The vertices are just in the first argument to GraphicsComplex
. The normals are supplied as optional argument to Polygon
.
Using TagSet
to build a simple access to those information
Faces /: gr_Graphics3D.Faces :=
Cases[Normal[gr], Polygon[__], Infinity] /. Polygon[pts_, ___] :> pts;
Vertices /: gr_Graphics3D.Vertices :=
gr[[1, 1]] /; gr[[1, 0]] === GraphicsComplex;
Normals /: gr_Graphics3D.Normals :=
Cases[Normal[gr], Polygon[__], Infinity] /.
Polygon[pts_, VertexNormals -> normals_] :> {pts, normals}
This should work in basic examples. Please don't try to draw this with a full detailed graphics. Your system may explode.
gr = RegionPlot3D[(x^2 + y^4 + z^4) - (x^3 + y^2 + z) > 1/2, {x, -1,
1}, {y, -1, 1}, {z, -1, 1}, MaxRecursion -> 0, PlotPoints -> 5,
Mesh -> All];
drawNormals[{pts_, normals_}] := {Arrow[Tube[#, 0.01]] & /@
Transpose[{pts, pts + .5 normals}]};
(* And here comes the simple access: *)
Graphics3D[{Polygon /@ (gr.Faces), Red, drawNormals /@ (gr.Normals),
Blue, Sphere[#, 0.05] & /@ (gr.Vertices)}]

X3D
formats? $\endgroup$