using MeshSlicer
using PyPlot
INFO: Loading help data...
mesh = PolygonMesh("jmil_2012_GeneratedVasculature.stl");
rotate!(mesh, 45.0, [1.0,0.0,0.0],[0.0,0.0,0.0])
layers = 100;
# find slice heights
step = (mesh.bounds.zmax - mesh.bounds.zmin)/layers
heights = [mesh.bounds.zmin:step:mesh.bounds.zmax]
# create an array of slices
slices = PolygonSlice(mesh,heights)
# plot slices
for slice in slices
for seg in slice.segments
plot3D([seg.start[1],seg.finish[1]], [seg.start[2],seg.finish[2]], slice.layer)
end
end