LHEEA / meshmagick

A command line tool and a python package to manipulate hydrodynamics meshes
GNU General Public License v3.0
48 stars 27 forks source link

Meshmagick not running with Anaconda #29

Open battuta opened 3 years ago

battuta commented 3 years ago

Hi I have an issue that Meshmagick is no longer working with Anaconda. The following message appears when i try to run "--show" command. Any solution?

(base) C:\Users\User\Desktop\Simulations\Cube1>meshmagick Cube.stl --show
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\Scripts\meshmagick-script.py", line 33, in <module>
    sys.exit(load_entry_point('meshmagick', 'console_scripts', 'meshmagick')())
  File "C:\ProgramData\Anaconda3\Scripts\meshmagick-script.py", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
  File "C:\ProgramData\Anaconda3\lib\importlib\metadata.py", line 504, in distribution
    return Distribution.from_name(distribution_name)
  File "C:\ProgramData\Anaconda3\lib\importlib\metadata.py", line 177, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: meshmagick

Also, i would like to know if there is any way that i can run Meshmagick using CMD, as i used to do in older versions of Meshmagick (<2.1)

Thank you.

frongere commented 3 years ago

It looks like meshmagick is not properly installed.

I have to update the documentation concerning the install procedure. Install using conda does not work (conda install -c frongere meshmagick is not maintained).

The only currently supported install procedure is to use pip:

pip install -e .

run in the command line while being in the root directory of the cloned repository.

battuta commented 3 years ago

It works, thanks! but when i run the command -hs to calculate hydrostatics of a STL file i get this error:

File.stl successfully loaded
>>>> Performing hydrostatic computation on the current hull configuration considered at equilibrium
Traceback (most recent call last):
  File "C:\Users\User\anaconda3\Scripts\meshmagick-script.py", line 33, in <module>
    sys.exit(load_entry_point('meshmagick', 'console_scripts', 'meshmagick')())
  File "c:\program files\meshmagick3\meshmagick_cli.py", line 1196, in main
    raise RuntimeError("zcog should at least be given for correct stiffness values computations")
RuntimeError: zcog should at least be given for correct stiffness values computations