Hello all,

My name is Luki. 
I'm new in yt. 

I have a problem in extracting object from yt. I want to have the surface object in .obj or .ply file so then i can transform it to .u3d for 3d pdf

I have a data cube that i build this way.

from yt.mods import *

from numpy import *


myfile=loadtxt("3ddata_300_lowerres.txt")

dens=myfile[:,3]

densitycube=dens.reshape(61,61,61)


mydata=dict(Density=densitycube)

bbox=np.array([[-300,300],[-300,300],[-300,300]])

pf=load_uniform_grid(mydata,densitycube.shape,3.08e18,bbox=bbox)


Then, I would like to have a surface of certain value in my data and extract it to .obj files


sp = pf.h.sphere("center", (250, "pc"))

trans = 1.0

distf = 3.08e18

surf = pf.h.surface(sp, "Density", 0.0006)

surf.export_obj("myism.obj", transparency=trans, dist_fac = distf)


But i have a problem with segmentation fault.

Segmentation fault: 11

I'll also try export_ply but i have the same problem :(

sp = pf.h.sphere("center", (250, "pc"))

surf = pf.h.surface(sp, "Density", 0.0006)

bounds = [(sp.center[i] - 125.0/pf['pc'],sp.center[i] + 125.0/pf['pc']) for i in range(3)]

surf.export_ply("myism.ply",bounds=bounds)


Can you help me? 

Thankyou in advance

Best regards,
luki