Mesh export to UNV file does not work anymore with Salome 6.5
Mesh export to UNV file does not work anymore with Salome 6.5


Hello,
I downloaded the new version 6.5 and have right now the problem of exporting the mesh to OpenFoam.
As I did it before in 6.3, I export the mesh to UNV an import it via ideasUnvToFoam filename.unv to OpenFoam. With 6.3 I didn't have any problems, but when using 6.5 the boundary file is nearly empty .
Has anything changed in the export procedure?
Regards,
Makoto
Re: Mesh export to UNV file does not work anymore with Salome 6.5

The second line of the *.unv file has to be 6 columns wide. For me, it was 5 columns, so just insert a space on the left hand side and ideasUnvToFoam runs fine.
This is probably a bug in Salome 6.5.
Re: Mesh export to UNV file does not work anymore with Salome 6.5

Hello
Thank you for finding a reason of this problem. The bug has been fixed.
Attached you can find a fixed version of SMESH_SRC/src/DriverUNV/UNV164_Structure.cxx
Best regards
Edward
Re: Mesh export to UNV file does not work anymore with Salome 6.5

Hello,
great! I did not expect this problem to be fixed in 11 minutes.
For the people who do not want to recompile: Here is a quick&dirty python fix:
import os
def salome_6_5_unv_fix(f):
with open(f) as infile, open(f+"~","w") as outfile:
for i,line in enumerate(infile):
if i==1:
line=line[:-1].rjust(6," ")+line[-1]
outfile.write(line)
os.rename(f+"~",f)
salome_6_5_unv_fix("mesh.unv")
Regards,
Andy
Re: Mesh export to UNV file does not work anymore with Salome 6.5

Hello,
I have the same problem with exporting UNV files, but I don't knew how to fix it, There is someone to guide me .?
thank you.
Terminus
Re: Mesh export to UNV file does not work anymore with Salome 6.5

Hello Terminus
If the reason of your problem is the same as of that reported above, then you need to do the following. The second line of your UNV file looks like " 164", with 2 white spaces before "164", but there must be 3 white spaces. So you are to add one more.
St.Michael
Re: Mesh export to UNV file does not work anymore with Salome 6.5

Hello St.Michael:
actually, I added a 3 white spaces before "164" but saving the file and I executed the command "IdeasUnvToFoam" it returns me the message in the terminal :
Re: Mesh export to UNV file does not work anymore with Salome 6.5

Hi Terminus
From that output I understand that a program does not find some file. I never used "IdeasUnvToFoam" thus I can't help much.
St.Michael
Re: Mesh export to UNV file does not work anymore with Salome 6.5

Re: Mesh export to UNV file does not work anymore with Salome 6.5

Re: Mesh export to UNV file does not work anymore with Salome 6.5

Re: Mesh export to UNV file does not work anymore with Salome 6.5

Re: Mesh export to UNV file does not work anymore with Salome 6.5

Hello,
I tried to fix my UNV export but the python fix didn't work for me and i can't find the file I need to fix where should I search for it?
I'm using Ubuntu 12.10 with the universal binaries pack for 64 bit systems.
Thanks in advance
Nigirim
- History
-
Activate by Makoto Yamamoto on Aug 07, 2012 05:20 AM