cdyk / rvmparser

Code to work with AVEVA PDMS RVM files
MIT License
98 stars 55 forks source link

Thank you for sharing your code (problem on parse rvm) #16

Closed hbssessa closed 2 years ago

hbssessa commented 3 years ago

Dear cdyk, I am testing your code to parse a rvm file. However, I got the following error:

Failed to parse PDMS.rvm: In CNTB, unknown chunk id INSU [I] Stats: [I] Groups 593 [I] Geometries 570 (grp avg=1.0) [I] Pyramids 0 [I] Boxes 0 [I] Rectangular tori 0 [I] Circular tori 252 [I] Elliptical dish 0 [I] Spherical dish 0 [I] Snouts 4 [I] Cylinders 314 [I] Spheres 0 [I] Facet groups 0 [I] triangles 0 [I] quads 0 [I] polygons 0 (fgrp avg=-nan(ind)) [I] contours 0 (poly avg=-nan(ind)) [I] vertices 0 (cont avg=-nan(ind)) [I] Lines 0

as far as I understood, INSU is something which is parsed ParseRVM.cpp between the lines 302-317. Do you have any idea on how to skip this specific ID or parse it? Your support would be of great help, thank you very much in advance.

Best regards Salvo

Rjvs commented 3 years ago

@hbssessa any progress with this on your end? We are having the same problem.

From reading through other comments from @cdyk it looks like we will need to reverse-engineer the meaning of those chunks in order to parse them. Are you able to create files with specific INSU chunks to facilitate this?

cdyk commented 3 years ago

@hbssessa @Rjvs Sorry, I missed this one, I didn't get an email notifaction, I'll investigate.

The simplest solution is to skip the INSU chunks. I can try to add code that skips it, and see if that is sufficient.

Would be interesting to look at an RVM file with an INSU chunk.

Rjvs commented 3 years ago

No problem @cdyk the INSU (and the OBST) chunks appear to be both just PRIM chunks with an extra 32-bits which we presume to be an INT describing the degree of insulation or obstruction. Unfortunately the customer won't allow us to share our test files but we will create a PR.

cdyk commented 3 years ago

@Rjvs Thanks for the info, a PR will be appreciated.

If id_chunk_id is passed to parse_prim, that function can just skip the value if needed.

xiaofan-start commented 3 years ago

Dear cdyk, I use your code to parse a rvm file and convert it to a obj file, but the accuracy of the model mesh is slightly lower for me. Can I set the model mesh accuracy during conversion? Thank you very much!

cdyk commented 3 years ago

@xiaofan-start : I made a new issue https://github.com/cdyk/rvmparser/issues/23 for your question

ddcsjtu commented 3 years ago

Dear cdyk, Can the code parse the INSU and OBST now? As I know, the INSU and OBST chunks mean the insulation volume and obstruction volume. The sample PIPESTRESS have the two parameters. The rvm file can have INSU and OBST in Utilities/Export/Create/Representation. I can provide the rvm file with INSU and OBST, if needed. Thank you very much. Best regards

cdyk commented 3 years ago

Hi,

No, the code cannot parse these two chunks currently, as I have not seen any files containing these chunks. Though, with sample data, I could probably add support.

ddcsjtu commented 2 years ago

Dear cdyk, Thanks for your reply! The two chunks are very similar to PRIM, with one more parameter "translucency". I think I have known how to figure it out. After some tests, I will contact you. Best regards ddcsjtu

ddcsjtu commented 2 years ago

Dear cdyk, I have sent the rvm and my "parse_insu_obst" to your email. Best regards

cdyk commented 2 years ago

Great, thank you very much!

Rjvs commented 2 years ago

Hi @cdyk a bit late with this but we are parsing insu and obst in our fork at https://github.com/StirlingLabs/rvmparser been meaning to create a PR.

cdyk commented 2 years ago

Thanks, though INSU and OBST are already handled in https://github.com/cdyk/rvmparser/pull/33. I'll take a peek and compare