using Meshes
using PyPlot
using FileIO
using MeshIO
obj = load(filename)
vts = obj.vertices
502-element Array{FixedSizeArrays.Point{3,Float32},1}:
Point(0.00117,-0.02631,0.03907) The faces can be accessed with faces(load("foo.obj")) or mesh.faces.
Probably the easiest way to display the mesh at this point is with ThreeJS.jl: https://github.com/rohitvarkey/ThreeJS.jl/blob/master/examples/mesh.jl. This approach should work in IJulia and Blink.
GLVisualize has some good demos and a much more responsive backend, but it needs some work to run in OpenGL < 3.3 and the working commits aren't on Metadata yet. Meshes is kind of a weird state right now, and most of the functionality can be had with GeometryTypes, Meshing, and MeshIO. We have been working the past few months to finish the coupling between data structures for geometry and visualization. It would be great to hear your application, and see if we could achieve something in the short term that would work for you. Personally I use Meshlab when I do solid modelling in Julia which slows down my iteration time, and it would be nice to have a mesh viewer in the workflow.
Best,
Steve
using GLVisualize
using FileIO
w,r = glscreen()
view(visualize(obj))
r()obj_file = "pathto.obj"
obj = load(obj_file)
display(obj.vertices)
502-element Array{FixedSizeArrays.Point{3,Float32},1}:
Point(0.00117,-0.02631,0.03907)
Point(-0.00896,-0.02466,0.03908)
⋮
Point(-0.01634,-0.0178,-0.05919)
Point(-0.01751,-0.01913,-0.06169)obj.vertices[1,:][1,1]FixedSizeArrays.Point{3,Float32}((0.00117f0,-0.02631f0,0.03907f0))obj.vertices[1,:][1,1][1]
0.00117f0| using GLVisualize, FileIO, Colors, GeometryTypes, GLAbstraction | |
| window, renderloop = glscreen() | |
| obj = load("cat.obj") | |
| obj_vizz = visualize(obj, color=RGBA{Float32}(0,0,0,0.1)) | |
| point3d_vizz = visualize(vertices(obj), scale=Vec3f0(0.01)) | |
| axis = visualize(boundingbox(point3d_vizz).value, :grid) | |
| view(obj_vizz) | |
| view(point3d_vizz) | |
| view(axis) | |
| renderloop() | |