Skip to main content

Geometry Processing and mesh handling in python

Project description

Mouette is a small python library for handling point clouds, polylines, surface and volume meshes. It also contains various geometry processing algorithm, like shortest-paths, old-school parametrization or frame field computations.

Mouette (French for seagull) stands for Maillages, OUtils Et Traitement auTomatique de la géométriE (French for "Meshes, Tools and Geometry Processing").

Installation

Using pip: pip install mouette

Overview

Mouette allows to easily load data from various file format and access geometrical primitives

Import and export made simple

import mouette as M

mesh = M.mesh.load("path/to/my/mesh/mesh.obj")
print(mesh.vertices[0])
print(mesh.faces[2])
M.mesh.save(mesh,"path/to/export/mesh.obj")

Define quantities over meshes and work with it

It is possible to define any quantity on mesh elements

my_v_attribute = mesh.vertices.create_attribute("my_attribute", float) # an attribute storing one floating-point number per vertex
my_v_attribute[3] = 4.

my_f_attribute = mesh.faces.create_attribute("my_attribute", 2, int) # an attribute storing two integers per face
m_f_attribute[2] = [1,3]

Attributes can store booleans, integers, floating-point numbers, complex numbers and strings, using the provided python types bool, int, float, complex and str.

Call geometry processing algorithms

ff = framefield.SurfaceFrameField(mesh, "vertices", order=4, verbose=True)
ff.run()
ffmesh = ff.export_as_mesh()
M.mesh.save(ffmesh, "framefield.mesh")

And much more

See full documentation at https://gcoiffier.github.io/mouette/

Run tests

python -m pytest tests/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mouette-1.2.7.tar.gz (170.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mouette-1.2.7-py3-none-any.whl (223.0 kB view details)

Uploaded Python 3

File details

Details for the file mouette-1.2.7.tar.gz.

File metadata

  • Download URL: mouette-1.2.7.tar.gz
  • Upload date:
  • Size: 170.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for mouette-1.2.7.tar.gz
Algorithm Hash digest
SHA256 025a1334c2a8b6f1c5281ca2096697ebc9353108fc005c5cba93e63e4c5799ca
MD5 1dc8ce8d7e617eb38cbc5090870a6a09
BLAKE2b-256 4904e7af71cbecc7ee3b38c9ec9c96cb2831139aab8943a56161de28ac671ef6

See more details on using hashes here.

File details

Details for the file mouette-1.2.7-py3-none-any.whl.

File metadata

  • Download URL: mouette-1.2.7-py3-none-any.whl
  • Upload date:
  • Size: 223.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for mouette-1.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2fa627d7a3b75829d9fc130f1fb78d1327773196482dddeef735374b74e4cb59
MD5 380f12ebb15d9eef3cd50b3fc826c2c6
BLAKE2b-256 f48432950d06f1e65abd25625f7e96e6691777473cb5c1d23e74f0e5901ceb35

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page