Coder Social home page Coder Social logo

Converting a mesh file about meshmagick HOT 7 OPEN

lheea avatar lheea commented on June 16, 2024
Converting a mesh file

from meshmagick.

Comments (7)

mancellin avatar mancellin commented on June 16, 2024
meshmagick SEAREV.vtp -ifmt paraview SEAREV.vtp -ofmt nemoh SEAREV.dat

In your command, the input file SEAREV.vtp is given twice and the output file is not labelled with -o.
What about something like the following (untested)?

meshmagick -ifmt paraview -ofmt nemoh -o SEAREV.mar SEAREV.vtp

All arguments are preceded with a - label except for the input file.

Not sure what is going on with the GitBash issue.

from meshmagick.

zanderder avatar zanderder commented on June 16, 2024

Thank you Mancellin.

It is an example command given in the user's guide. I tested the command you suggested, and it did not work out (OSError: Extension ".paraview" is not known), unfortunately.

I am really confused, other example commands work well, but this one does not.

from meshmagick.

mancellin avatar mancellin commented on June 16, 2024

Indeed. According to the reference list of supported formats, the keyword paraview is not associated with any kind of file. You should either use the keyword vtp instead or trust meshmagick to recognize the .vtp file extension.

This example from the documentation looks wrong to me, but maybe I'm missing something.

from meshmagick.

zanderder avatar zanderder commented on June 16, 2024

Indeed. According to the reference list of supported formats, the keyword paraview is not associated with any kind of file. You should either use the keyword vtp instead or trust meshmagick to recognize the .vtp file extension.

This example from the documentation looks wrong to me, but maybe I'm missing something.

You are right. It did the conversion successfully when I removed the keyword paraview. I used the following command:

meshmagick SEAREV.vtp -ifmt vtp -ofmt nemoh -o SEAREV.dat

I kept nemoh because I would like to have the .dat file of Nemoh format, and it worked (though I am not sure whether the conversion is correct). The strange thing is that it does not work if I replace nemoh with dat (which is the extension of the output file), i.e., meshmagick SEAREV.vtp -ifmt vtp -ofmt dat -o SEAREV.dat.

from meshmagick.

mancellin avatar mancellin commented on June 16, 2024

I kept nemoh because I would like to have the .dat file of Nemoh format, and it worked (though I am not sure whether the conversion is correct). The strange thing is that it does not work if I replace nemoh with dat (which is the extension of the output file), i.e., meshmagick SEAREV.vtp -ifmt vtp -ofmt dat -o SEAREV.dat.

According to the documentation page I linked above, the keyword for Nemoh format is either nemoh or mar, but not dat (although the file has commonly the extension .dat).

from meshmagick.

XinmengZeng avatar XinmengZeng commented on June 16, 2024

dear @mancellin @zanderder
image
image
image
can you help me to check why the file is not work?

from meshmagick.

mancellin avatar mancellin commented on June 16, 2024

@XinmengZeng
In your first example, you give:

  • gmsh as input format (-ifmt flag)
  • nemoh as output format (-ofmt flag)
  • oc4.msh as output file (-o flag)
  • oc4.dat as input file (no flag)

so the code is probably failing because the input file is not in the input format.

In your second example, you give:

  • gmsh as input format (-ifmt flag)
  • oc4.msh as input file (no flag)
  • nemoh as output format (-ofmt flag)
  • oc4.dat as input file (no flag)

so the code is confused because there are two input files.

Your last example looks good to me:

  • oc4.msh as input file (no flag)
  • gmsh as input format (-ifmt flag)
  • nemoh as output format (-ofmt flag)
  • oc4.dat as output file (-o flag)

It is failing because you are missing the gmshparser library that can be installed with pip install gmshparser.

@frongere Should gmshparser be added to setup.py?

from meshmagick.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.