Export
to "VTK"
does not handle Arrow
, not even Arrow[Tube[..]]
; but it can handle Tube
and CylinderCone
:
$maxlen = 0.08;
$aratio = 4.;
tubeArrow[p : {p1_, p2_}, radius_: 0.05] := Module[{len, v, r},
v = p2 - p1;
len = 0.5 Norm[v];
len = Min[$maxlen, len];
v = len*Normalize[v];
r = len/$aratio;
{Tube[{p1, p2 - v}, 0.5 r], Cone[{p2 - v, p2}, r]}
];
VectorPlot3D[{x, y, z}, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}] /.
Arrow -> tubeArrow
Export["/tmp/foo.vtk",
foo = VectorPlot3D[{x, y, z}, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}] /.
Arrow -> tubeArrow]
(* "/tmp/foo.vtk" *)
Import["/tmp/foo.vtk"]