parsing files with VEX

   4618   7   1
User Avatar
Member
1799 posts
Joined: 10月 2010
Offline
Hey guys, I think I may have actually asked this on a now locked and invisible thread so I thought I would ask it again, especially with all the cool new string operations in H14 vex:

what is the best way to operate on lines on a file in vex? I basically want to create a point for each line on a file based on some parameters in the line, i.e:

13.5 44.7 4.6 0 255 128 128

where the format is x y z i (intensity) r g b

thank you!
-G
User Avatar
スタッフ
6219 posts
Joined: 7月 2005
Offline
… which do not yet exist. We pulled out most of the file_ operations pending further internal testing, but it seems the documentation did make it in.
User Avatar
Member
1799 posts
Joined: 10月 2010
Offline
He he he I was wondering why I did not see them on the new features section the other problem I have is that, ideally, I can parse multiple lines of the file at once in parallel via simd (the reason why I wanted to use vex) I presume I would have to put it in a string array attribute first? (Would it work with 100 mil lines?)

Thank you guys!
-G
User Avatar
スタッフ
6219 posts
Joined: 7月 2005
Offline
Currently you need to do a systemRAW() expression on a string field, then you can chs() into VEX.

You won't get SIMD processing then, however. It is hard to set that up currently without there being an O(n^2) component that will eliminate the advantage of SIMD actions…

I've done this with some large files, but I don't think 100 million.
User Avatar
Member
1799 posts
Joined: 10月 2010
Offline
mhhh.. perhaps the time has come to write my first HDK node its only been 5 years or so…
-G
User Avatar
スタッフ
2592 posts
Joined: 7月 2005
Offline
grayOlorin
mhhh.. perhaps the time has come to write my first HDK node its only been 5 years or so…

Before you go whole hog C++, maybe you could investigate a Python SOP

You might want to look at the Python source for the Table Import SOP.
User Avatar
Member
637 posts
Joined: 6月 2006
Offline
when will be the vex file operators released?

i made a simple vex based stl exporter and it would be cool to test it on big meshes. :-)

or are there other possibility's for reading the string values in python?
  • Quick Links