SCIInstitute / map3d

Other
3 stars 3 forks source link

Loading in Files #39

Open bzenger opened 4 years ago

bzenger commented 4 years ago

I would like to be able to load in files with different inherent structures. This applies exclusivley to matlab files.

Currently, we have to have a very specific set structure in .mat files of the matlab structure.

  1. I would like to be able to save matlab structures 1 or 2 layers deep.
  2. I would like to be able to load a matlab mesh with several different "node" and "face" names in the structure.
    • So the structure could be struct.node struct.pts
    • So the structure for faces could be struct.face struct.fac
  3. read in the files in one or the other direction (transpose) .node or .fac
  4. read in a matlab structure of NODES ONLY! right now I have to save them as a .pts ASCII file.
  5. Read in scirun fields *.fld. Although this is more a wish and not an explicit need compared to the others listed.

Thanks!

bzenger commented 4 years ago

@rsmacleod @wgood @jab0707

bryanworthen commented 4 years ago

Hi,

I'd like to see some examples of some of these. Particularly (1) and (3), if my question on 3 is not what you mean.

  1. Does this mean you want to nest layers inside each other?
  2. This should probably be easy enough, but can I ask what you need it for? Does some other software produce files with these names?
  3. Do you mean have the ability to read [x][3] or [3][x] for both node and fac? (If so, I thought we already did that?) Sorry if I'm reading what you want wrong.
  4. Does the ability to turn off the triangle rendering satisfy this?
  5. This would probably take a while.
bzenger commented 4 years ago

Hi @bryanworthen ,

  1. Sorry, I should have been far more explicity on that one. Currently, if try to load in a .mat file that has the correct structure (.node and .fac) but if it is one structure buried (i.e. matlab.structure.node and matlab.structure.fac) it will not work unless I save the matlab structure one level up (i.e. matlab.node and matlab.fac) Does that make sense? See an example of this below in the zipped attachement.

  2. Honestly, it isn't a software per se, but collaborators that name their files differently. I think the ideal scenario would be to have the ability to change those names as a text box or something that has default settings, but could be something you can change on the fly for map3d to look for (i.e. if the file uses .pts and .faces you can type that in somewhere and map3d would then know where to look in th file).

  3. I was mistaken, we can already do that. I was checking a geometry that had another problem.

  4. Attached is a file that is just a matlab structure with matlab.nodes. Currently this does not load because it is only nodes. I believe that would be fine, from my perspective.

  5. Ok, let's not worry about that for the time being.

Thanks so much! Brian Archive.zip

bryanworthen commented 4 years ago

Okay.

1) Should there be a way to specify that the middle layer is "stricture"? Could this be any name? If so, we might have to define some rules, like:

  1. I could make a GUI/config setting that lets you specify the set of possible names, but it would be longer. If I knew a reasonable set of possible names, I could add that pretty quick.

  2. ok

  3. Shouldn't be too bad.

bzenger commented 4 years ago
  1. It could be any name, but it would be the only one in the file, would that make it easier? I agree it would be kind of ridiculous to go through every single one.

  2. reasonable names Nodes: .node, .nodes, .pts, .points faces: .face, .faces, .fac , .cell

@wgood @jab0707 are there any other names we run across?

jab0707 commented 4 years ago

Hey All,

for face: elem is sometime a thing but that is only for volume meshes which I am not sure how map3d handles (if it does at all).

other than that I cannot think of other names for the points and faces that we see commonly.

Best,

Jake Bergquist

On Tue, Sep 24, 2019 at 8:22 PM bzenger notifications@github.com wrote:

1.

It could be any name, but it would be the only one in the file, would that make it easier? I agree it would be kind of ridiculous to go through every single one. 2.

reasonable names Nodes: .node, .nodes, .pts, .points faces: .face, .faces, .fac , .cell

@wgood https://github.com/wgood @jab0707 https://github.com/jab0707 are there any other names we run across?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SCIInstitute/map3d/issues/39?email_source=notifications&email_token=AJD4EUXFWTLK2X6B5WMZBW3QLLDNLA5CNFSM4IUSUORKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7QL2JI#issuecomment-534822181, or mute the thread https://github.com/notifications/unsubscribe-auth/AJD4EUUPAGZXPTORCPAV3FLQLLDNLANCNFSM4IUSUORA .

bryanworthen commented 4 years ago

image Pts only matlab file

bryanworthen commented 4 years ago

Do you really need "cell" for faces? "cell" is already used for tetras.

bryanworthen commented 4 years ago

Nest Test image

bryanworthen commented 4 years ago

I have a hardcoded list in for (2). If you could send me a test file I would appreciate it. PS - they were very helpful in the other 2 cases.

bzenger commented 4 years ago

Cell for faces can be removed. I agree that is confusing.

bzenger commented 4 years ago

Also, I have attached some more examples for the loading questions. I couldn't find examples of every single one but this is a good set of possible ones I have seen.

Thanks so much!

Testing.zip

bryanworthen commented 4 years ago

Okay, I managed to get all those files open.

bryanworthen commented 4 years ago

Do you mostly run on macs? I (finally) have some macs at home, but I don't have them set up for development. Do we have somebody who can produce (this was Jess once) a map3d.dmg, or do I need to set up my macs to do that?

bzenger commented 4 years ago

Awesome! I just got it built on my (mac) machine so we should be good! We are testing in now, let us bang on it for a bit and we will get back.

Thanks so much!

bryanworthen commented 4 years ago

Any updates?

bzenger commented 4 years ago

Dude, this is awesome. over the past couple of weeks I have tried so many different configurations. I am super happy with it currently!