A collection of utility functions to prototype geometry processing research in python

Overview

gpytoolbox

This repo is a work in progress and contains general utility functions I have needed to code while trying to work on geometry process research in python. Most of them will be one-to-one correspondences with gptoolbox functions that I have used in my previous Matlab life and for which I have found no equivalence in existing libraries. Feel free to contribute by submitting a pull request!

Comments
  • Adding sample_mesh.py function

    Adding sample_mesh.py function

    Adding a function to sample a mesh. Future possible additions:

    • tet meshes (currently only polyline and triangle mesh)
    • blue noise (currently only uniform / white noise)

    We might want to consider deprecating random_points_on_polyline. For now, I have just updated that function to use sample_mesh.

    sample_mesh is also a nice example of how I think we should handle random number generation in the library in the future.

    opened by odedstein 2
  • Adding colormap functionality

    Adding colormap functionality

    Adding a function "colormap" that works like MATLAB's colormap, and then also "apply_colormap" to apply the colormap to a scalar function. I was not sure what exact interpolation behavior to choose for "apply_colormap", but MATLAB does piecewise constant, so I went with piecewise constant.

    opened by odedstein 1
  • Adding simple obj reader and writer

    Adding simple obj reader and writer

    So far for triangle meshes only.

    I have some confusion with the types that npe generates and the ones used in the Python library by convention. When should our functions return int32, and when should it be int64?

    opened by odedstein 1
  • Added new utility functions and updated doublearea formula

    Added new utility functions and updated doublearea formula

    Added the following utility functions:

    • halfedges
    • halfedge_lengths_squared
    • halfedge_lengths
    • edges
    • boundary_edges
    • boundary_loops

    Updated the doublearea function to use Kahan's formula.

    Added two new meshes as well as mesh credits to the unit test directory.

    opened by odedstein 1
  • fixing pip build error

    fixing pip build error

    It seems like the PyPi wheel for gpytoolbox in MacOs fails intermitently (it didn't use to fail, but pushing a trivial commit made it fail one hour after succeeding). It fails at installing numpy!

    opened by sgsellan 0
  • `signed_distance_polygon` returns nans if first polyline point is repeated

    `signed_distance_polygon` returns nans if first polyline point is repeated

    Sometimes, you'll see that a polyline is given with the last point being equal to the first to denote that it's closed. Currently, signed_distance_polygon does not support this and instead returns nan since it finds an edge with zero length. It'd be nice if the function just ignored zero-length edges instead of giving nans.

    enhancement 
    opened by sgsellan 0
  • png2poly rotates shape

    png2poly rotates shape

    Here's a png:

    octopus

    Running

    from gpytoolbox import png2poly
    poly = png2poly("octopus.png")[0]
    import matplotlib.pyplot as plt
    plt.plot(poly[:,0],poly[:,1])
    plt.show()
    

    for some reason produces a rotated polyline, as if the x and y coordinates were flipped:

    Screen Shot 2022-09-04 at 2 34 33 PM bug 
    opened by sgsellan 0
  • Better error messager for read/write mesh

    Better error messager for read/write mesh

    Instead of erroring with the C++ error code, the python code now interprets each C++ error code and provides an exception with a useful error message.

    opened by odedstein 0
  • Fixed dof solve

    Fixed dof solve

    Introduced function for solving a linear system with fixed degrees of freedom (the linear system is ignored on the fixed rows). This function attempts to behave similar to how gptoolbox's min_quad_with_fixed would behave on a non-symmetric matrix. In my opinion our min_quad_with_fixed is not the correct place for this functionality, since this is not a quadratic optimization problem with a symmetric matrix.

    This function is useful, for example, for finite difference Dirichlet boundary value problems.

    opened by odedstein 0
  • Bindings compilation times

    Bindings compilation times

    This separates all the bindings so that compilation can make use of parallelization. Also, changes some magic words in the numpyeigen calls so that it compiles faster.

    opened by sgsellan 0
  • Adding subdivision capability

    Adding subdivision capability

    This pull request adds a subdivide function that can be used to subdivide polylines and triangle meshes. Supports normal upsampling for polylines and triangle meshes, and loop subdivision for triangle meshes.

    Things to add to this in the future:

    • Spline subdivision for polylines
    • Upsampling for quad meshes
    • Catmull-Clark for quads and mixed quad/tri
    • Upsampling for tet meshes
    opened by odedstein 0
  • GMPlib certificate expiration

    GMPlib certificate expiration

    The SSL certificate in gmplib.org, from which libigl (and therefore us) downloads gmp, has expired, which causes curl (called to download gmp during our build) to fail. I merged #41 , a hotfix that changes our version of libigl to my PR branch sgsellan/libigl, but I am opening this issue so we have a reminder to revert this in the future when the libigl folks have converged on a solution.

    opened by sgsellan 0
  • remesh_botsch does not work for non-closed meshes

    remesh_botsch does not work for non-closed meshes

    I tried to remesh a non-closed/ watertight mesh with the remesh_botsch algorithm. Compared to a closed mesh (with almost the same size) it takes a lot longer (>100 times) and returns an error by exiting my python console.

    • Is your implementation not useable for non-closed meshes? The original paper has options for the boundary.
    enhancement 
    opened by EmJay276 11
Releases(v0.0.3)
Owner
Silvia Sellán
PhD student at University of Toronto Computer Science department.
Silvia Sellán
A collection of tools for biomedical research assay analysis in Python.

waltlabtools A collection of tools for biomedical research assay analysis in Python. Key Features Analysis for assays such as digital ELISA, including

Tyler Dougan 1 Apr 18, 2022
A simple and easy to use collection of random python functions.

A simple and easy to use collection of random python functions.

Diwan Mohamed Faheer 1 Nov 17, 2021
Cleaning-utils - a collection of small Python functions and classes which make cleaning pipelines shorter and easier

cleaning-utils [] [] [] cleaning-utils is a collection of small Python functions

null 4 Aug 31, 2022
Modest utility collection for development with AIOHTTP framework.

aiohttp-things Modest utility collection for development with AIOHTTP framework. Documentation https://aiohttp-things.readthedocs.io Installation Inst

Ruslan Ilyasovich Gilfanov 0 Dec 11, 2022
Collection of code auto-generation utility scripts for the Horizon `Boot` system module

boot-scripts This is a collection of code auto-generation utility scripts for the Horizon Boot system module, intended for use in Atmosphère. Usage Us

null 4 Oct 11, 2022
Let's renew the puzzle collection. We'll produce a collection of new puzzles out of the lichess game database.

Let's renew the puzzle collection. We'll produce a collection of new puzzles out of the lichess game database.

Thibault Duplessis 96 Jan 3, 2023
Python @deprecat decorator to deprecate old python classes, functions or methods.

deprecat Decorator Python @deprecat decorator to deprecate old python classes, functions or methods. Installation pip install deprecat Usage To use th

null 12 Dec 12, 2022
A python package containing all the basic functions and classes for python. From simple addition to advanced file encryption.

A python package containing all the basic functions and classes for python. From simple addition to advanced file encryption.

PyBash 11 May 22, 2022
A Python utility belt containing simple tools, a stdlib like feel, and extra batteries. Hashing, Caching, Timing, Progress, and more made easy!

Ubelt is a small library of robust, tested, documented, and simple functions that extend the Python standard library. It has a flat API that all behav

Jon Crall 638 Dec 13, 2022
isort is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type.

isort is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type. It provides a command line utility, Python library and plugins for various editors to quickly sort all your imports.

Python Code Quality Authority 5.5k Jan 8, 2023
Python utility for discovering interesting CFPreferences values on iDevices

Description Simple utility to search for interesting preferences in iDevices. Installation python3 -m pip install -U --user cfprefsmon Example In this

null 12 Aug 19, 2022
This is Cool Utility tools that you can use in python.

This is Cool Utility tools that you can use in python. There are a few tools that you might find very useful, you can use this on pretty much any project and some utils might help you a lot and save so much time since it’s a simple function.

Senarc Studios 6 Apr 18, 2022
Yet another retry utility in Python

Yet another retry utility in Python, avereno being the Malagasy word for retry.

Haute École d'Informatique de Madagascar 4 Nov 2, 2021
The git for the Python Story Utility Package library.

SUP The git for the Python Story Utility Package library. Installation: Install SUP by simply running pip install psup in your terminal. Check out our

Enoki 6 Nov 27, 2022
A utility that makes it easy to work with Python projects containing lots of packages, of which you only want to develop some.

Mixed development source packages on top of stable constraints using pip mxdev [mɪks dɛv] is a utility that makes it easy to work with Python projects

BlueDynamics Alliance 6 Jun 8, 2022
pydsinternals - A Python native library containing necessary classes, functions and structures to interact with Windows Active Directory.

pydsinternals - Directory Services Internals Library A Python native library containing necessary classes, functions and structures to interact with W

Podalirius 36 Dec 14, 2022
Helpful functions for use alongside the rich Python library.

?? Rich Tools A python package with helpful functions for use alongside with the rich python library. ???? The current features are: Convert a Pandas

Avi Perl 14 Oct 14, 2022
Pyfunctools is a module that provides functions, methods and classes that help in the creation of projects in python

Pyfunctools Pyfunctools is a module that provides functions, methods and classes that help in the creation of projects in python, bringing functional

Natanael dos Santos Feitosa 5 Dec 22, 2022
Python Libraries with functions and constants related to electrical engineering.

ElectricPy Electrical-Engineering-for-Python Python Libraries with functions and constants related to electrical engineering. The functions and consta

Joe Stanley 39 Dec 23, 2022