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
✨ Un bot Twitter totalement fait en Python par moi, et en français.

Twitter Bot ❗ Un bot Twitter totalement fait en Python par moi, et en français. Il faut remplacer auth = tweepy.OAuthHandler(consumer_key, consumer_se

MrGabin 3 Jun 06, 2021
A small python library that helps you to generate localization strings for your mobile projects.

LocalizationUtiltiy A small python library that helps you to generate localization strings for your mobile projects. This small script aims to help yo

1 Nov 12, 2021
Implicit hierarchical a posteriori error estimates in FEniCSx

FEniCSx Error Estimation (FEniCSx-EE) Description FEniCSx-EE is an open source library showing how various error estimation strategies can be implemen

Jack S. Hale 1 Dec 08, 2021
Manage your exceptions in Python like a PRO

A linter to manage all your python exceptions and try/except blocks (limited only for those who like dinosaurs).

Guilherme Latrova 353 Dec 31, 2022
Spacegit is a .git exposed finder

Spacegit Spacegit is a basic .git exposed finder Usage: You need python3 installed to run spacegit use: python3 spacegit.py (url) Disclaimer: **This i

2 Nov 30, 2021
Minimal Windows system information tool written in Python

wfetch wfetch is a Minimal Windows system information tool written in Python (Only works on Windows) Installation First of all have python installed.

zJairO 3 Jan 24, 2022
A set of Python scripts to surpass human limits in accomplishing simple tasks.

Human benchmark fooler Summary A set of Python scripts with Selenium designed to surpass human limits in accomplishing simple tasks available on https

Bohdan Dudchenko 3 Feb 10, 2022
A monitor than send discord webhook when a specific monitored product has stock in your nearby pickup stores.

Welcome to Apple In-store Monitor This is a monitor that are not fully scaled, and might still have some bugs.

5 Jun 16, 2022
Automatically Generate Rulesets for IIS for Intelligent HTTP/S C2 Redirection

Automatically Generate Rulesets for IIS for Intelligent HTTP/S C2 Redirection This project converts a Cobalt Strike profile to a functional web.config

Jesse 99 Dec 13, 2022
Python Classes Without Boilerplate

attrs is the Python package that will bring back the joy of writing classes by relieving you from the drudgery of implementing object protocols (aka d

The attrs Cabal 4.6k Jan 06, 2023
Format Norminette Output!

Format Norminette Output!

7 Apr 19, 2022
A simple example for calling C++ functions in Python by `ctypes`.

ctypes-example A simple example for calling C++ functions in Python by ctypes. Features call C++ function int bar(int* value, char* msg) with argumene

Yusu Pan 3 Nov 23, 2022
Grank is a feature-rich script that automatically grinds Dank Memer for you

Grank Inspired by this repository. This is a WIP and there will be more functions added in the future. What is Grank? Grank is a feature-rich script t

42 Jul 20, 2022
Data Utilities e.g. for importing files to onetask

Use this repository to easily convert your source files (csv, txt, excel, json, html) into record-oriented JSON files that can be uploaded into onetask.

onetask.ai 1 Jul 18, 2022
Early version for manipulate Geo localization data trough API REST.

Backend para obtener los datos (beta) Descripción El servidor está diseñado para recibir y almacenar datos enviados en forma de JSON por una aplicació

Víctor Omar Vento Hernández 1 Nov 14, 2021
Control-Alt-Delete - Help Tux Escape Beastie's Jail!

Control-Alt-Delete Help Tux escape Beastie's jail by completing the following challenges! Challenges Challenge 00: Drinks: Tux needs to drink less. Ch

NDLUG 8 Oct 31, 2021
Finds price floor for every single attribute in a given collection

Solana Solanart Scanner Enjoy the Free Code Steps to run Download VS Code

Dalton Nisbett 19 Oct 20, 2022
This is a python table of data implementation with styles, colors

Table This is a python table of data implementation with styles, colors Example Table adapts to the lack of data Lambda color features Full power of l

Урядов Алексей 5 Nov 09, 2021
Dynamic key remapper for Wayland Window System, especially for Sway

wayremap Dynamic keyboard remapper for Wayland. It works on both X Window Manager and Wayland, but focused on Wayland as it intercepts evdev input and

Kay Gosho 50 Nov 29, 2022
A time table app to notify the user about their class timings

kivyTimeTable A time table app to notify the user about their class timings Features This project incorporates some features i wanted to see in a time

2 Dec 15, 2021