• Stars
    star
    667
  • Rank 67,625 (Top 2 %)
  • Language
    Python
  • License
    Other
  • Created over 6 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

MPI-IS Mesh Processing Library

Build Status

Perceiving Systems Mesh Package

This package contains core functions for manipulating meshes and visualizing them. It requires Python 3.5+ and is supported on Linux and macOS operating systems.

The Mesh processing libraries support several of our projects such as

Requirements

You first need to install the Boost <http://www.boost.org>_ libraries. You can compile your own local version or simply do on Linux

$ sudo apt-get install libboost-dev

or on macOS

$ brew install boost

Installation

First, create a dedicated Python virtual environment and activate it:

$ python3 -m venv --copies my_venv
$ source my_venv/bin/activate

You should then compile and install the psbody-mesh package easily using the Makefile:

$ BOOST_INCLUDE_DIRS=/path/to/boost/include make all

Testing

To run the tests, simply do:

$ make tests

Documentation

A detailed documentation can be compiled using the Makefile:

$ make documentation

Viewing the Meshes

Starting from version 0.4 meshviewer ships with meshviewer -- a program that allows you to display polygonal meshes produced by mesh package.

Viewing a mesh on a local machine

The most straightforward use-case is viewing the mesh on the same machine where it is stored. To do this simply run

$ meshviewer view sphere.obj

This will create an interactive window with your mesh rendering. You can render more than one mesh in the same window by passing several paths to view command

$ meshviewer view sphere.obj cylinder.obj

This will arrange the subplots horizontally in a row. If you want a grid arrangement, you can specify the grid parameters explicitly

$ meshviewer view -nx 2 -ny 2 *.obj

Viewing a mesh from a remote machine

It is also possible to view a mesh stored on a remote machine. To do this you need mesh to be installed on both the local and the remote machines. You start by opening an empty viewer window listening on a network port

(local) $ meshviewer open --port 3000

To stream a shape to this viewer you have to either pick a port that is visible from the remote machine or by manually exposing the port when connecting. For example, through SSH port forwarding

(local) $ ssh -R 3000:127.0.0.1:3000 user@host

Then on a remote machine you use view command pointing to the locally forwarded port

(remote) $ meshviewer view -p 3000 sphere.obj

This should display the remote mesh on your local viewer. In case it does not it might be caused by the network connection being closed before the mesh could be sent. To work around this one can try increasing the timeout up to 1 second

(remote) $ meshviewer view -p 3000 --timeout 1 sphere.obj

To take a snapshot you should locally run a snap command

(local) $ meshviewer snap -p 3000 sphere.png

License

Please refer for LICENSE.txt for using this software. The software is compiled using CGAL sources following the license in CGAL_LICENSE.pdf

Acknowledgments

We thank the external contribution from the following people:

More Repositories

1

bilateralNN

Learning Sparse High Dimensional Filters with Neural Networks
C++
69
star
2

meshlite

MeshLite is a lightweight package for visualizing, editing and saving meshes.
Python
40
star
3

Grassmann-Averages-PCA

Robust and scalable PCA using Grassmann averages, in C++ with Matlab bindings
C++
29
star
4

multitensor

Library for multilayer network tensor factorization
Jupyter Notebook
13
star
5

camera_zwo_asi

Python bindings to ZWO astronomical cameras SDK
C++
12
star
6

ArmSym

A simulated VR laboratory for human-robot control experiments ๐Ÿค–
C#
10
star
7

MYND

MYND: Neuroscience at home
Swift
8
star
8

configer

Easy configuration of arguments in a python code!
Python
8
star
9

ntfy_lite

minimalist python API for pushing ntfy notifications
Python
7
star
10

tests-wo-splitting

Python
5
star
11

pfos

Probabilistic Filtering ODE Solver
MATLAB
5
star
12

probinet

Probabilistic Inference on Networks
Python
2
star
13

CityGraph

Framework for representing a city (real or virtual) and moving around it.
Python
2
star
14

folder-rsync

A naรฏve implementation of rsync parallelisation that splits the tasks per first-level entries.
D
2
star
15

singularity_package_builder

Makefile to build deb and tar packages for installing Singularity
Makefile
2
star
16

Learn2Feel

Python
2
star
17

isensus

Helper for helping MPI-IS sys-admin to manage their users
Python
1
star
18

signal_handler

Utilities for C++ signal handling.
C++
1
star
19

cute-shm

Sharing of numpy arrays across processes made easy
Python
1
star
20

variconf

Wrapper around OmegaConf for loading configuration from various types of files.
Python
1
star