Personal tools
You are here: Home Forum Other... (new forum, problems, etc.) 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

Up to Other... (new forum, problems, etc.)

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

Posted by Makoto Yamamoto at August 07. 2012

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

Posted by Meister Eder at August 13. 2012
http://www.openfoam.org/mantisbt/view.php?id=584

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

Posted by SMESH expert at August 13. 2012

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

Attachments

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

Posted by Meister Eder at August 13. 2012

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

Posted by Larabi Hakim at October 02. 2012

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

Attachments

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

Posted by Saint Michael at October 03. 2012

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

Posted by Larabi Hakim at October 07. 2012

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 :

Attachments

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

Posted by Saint Michael at October 08. 2012

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

Posted by Larabi Hakim at October 08. 2012

Thank you Saint Michael.

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

Posted by wiebe Zoon at October 08. 2012

Here is my quick fix for on the command line:

sed '2 s/^/ /' <file_from_salome.unv >fixed_file.unv

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

Posted by Larabi Hakim at October 08. 2012

Hello wieb Zoon:
On each Folder this command line is executed ?

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

Posted by Freddy Florez at October 28. 2012

I had the same problem but I corrected it according to your suggestion and now works! Thanks a lot!

 

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

Posted by Nigirim at December 13. 2012

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

Quick reply
URLs will be automatically hyperlinked. Basic HTML tags are OK.
Powered by Ploneboard
History
Activate by Makoto Yamamoto on Aug 07, 2012 06:20 AM
Document Actions