Giter Site home page Giter Site logo

potpourri3d's Introduction

potpourri3d

A Python library of various algorithms and utilities for 3D triangle meshes and point clouds. Managed by Nicholas Sharp, with new tools added lazily as needed. Currently, mainly bindings to C++ tools from geometry-central.

pip install potpourri3d

The blend includes:

  • Mesh and point cloud reading/writing to a few file formats
  • Use heat methods to compute distance, parallel transport, logarithmic maps, and more
  • Computing geodesic polylines along surface via edge flips
  • More!

Installation

Potpourri3d is on the pypi package index with precompiled binaries for most configuations. Get it like:

pip install potpourri3d

If none of the precompiled binaries match your system, pip will attempt to compile the library from scratch. This requires cmake and a workng C++ compiler toolchain.

Note: Some bound functions invoke sparse linear solvers internally. The precompiled binaries use Eigen's solvers; using Suitesparse's solvers instead may significantly improve performance & robustness. To get them, locally compile the package on a machine with Suitesparse installed using the command below (relevant docs).

python -m pip install potpourri3d --no-binary potpourri3d

Documentation

Input / Output

Read/write meshes and point clouds from some common formats.

  • read_mesh(filename) Reads a mesh from file. Returns numpy matrices V, F, a Nx3 real numpy array of vertices and a Mx3 integer numpy array of 0-based face indices (or Mx4 for a quad mesh, etc).

    • filename the path to read the file from. Currently supports the same file types as geometry-central. The file type is inferred automatically from the path extension.
  • write_mesh(V, F, filename) Write a mesh to file.

    • V a Nx3 real numpy array of vertices
    • F a Mx3 integer numpy array of faces, with 0-based vertex indices (or Mx4 for a quad mesh, etc).
    • filename the path to write the file to. Currently supports the same file types as geometry-central. The file type is inferred automatically from the path extension.
  • read_point_cloud(filename) Reads a point cloud from file. Returns numpy matrix V, a Nx3 real numpy array of vertices. Really, this just reads a mesh file and ignores the face entries.

    • filename the path to read the file from. Currently supports the same file types as geometry-central's mesh reader. The file type is inferred automatically from the path extension.
  • write_point_cloud(V, filename) Write a mesh to file. Really, this just writes a mesh file with no face entries.

    • V a Nx3 real numpy array of vertices
    • filename the path to write the file to. Currently supports the same file types as geometry-central's mesh writer. The file type is inferred automatically from the path extension.

Mesh basic utilities

  • face_areas(V, F) computes a length-F real numpy array of face areas for a triangular mesh
  • vertex_areas(V, F) computes a length-V real numpy array of vertex areas for a triangular mesh (equal to 1/3 the sum of the incident face areas)
  • cotan_laplacian(V, F, denom_eps=0.) computes the cotan-Laplace matrix as a VxV real sparse csr scipy matrix. Optionally, set denom_eps to a small value like 1e-6 to get some additional stability in the presence of degenerate faces.

Mesh Distance

Use the heat method for geodesic distance to compute geodesic distance on surfaces. Repeated solves are fast after initial setup. Uses intrinsic triangulations internally for increased robustness.

import potpourri3d as pp3d

# = Stateful solves (much faster if computing distance many times)
solver = pp3d.MeshHeatMethodDistanceSolver(V,F)
dist = solver.compute_distance(7)
dist = solver.compute_distance_multisource([1,2,3])  

# = One-off versions
dist = pp3d.compute_distance(V,F,7)
dist = pp3d.compute_distance_multisource(V,F,[1,3,4])

The heat method works by solving a sequence of linear PDEs on the surface of your shape. On extremely coarse meshes, it may yield inaccurate results, if you observe this, consider using a finer mesh to improve accuracy. (TODO: do this internally with intrinsic Delaunay refinement.)

  • MeshHeatMethodDistanceSolver(V, F, t_coef=1., use_robust=True) construct an instance of the solver class.
    • V a Nx3 real numpy array of vertices
    • F a Mx3 integer numpy array of faces, with 0-based vertex indices (triangle meshes only, but need not be manifold).
    • t_coef set the time used for short-time heat flow. Generally don't change this. If necessary, larger values may make the solution more stable at the cost of smoothing it out.
    • use_robust use intrinsic triangulations for increased robustness. Generaly leave this enabled.
  • MeshHeatMethodDistanceSolver.compute_distance(v_ind) compute distance from a single vertex, given by zero-based index. Returns an array of distances.
  • MeshHeatMethodDistanceSolver.compute_distance_multisource(v_ind_list) compute distance from the nearest of a collection of vertices, given by a list of zero-based indices. Returns an array of distances.
  • compute_distance(V, F, v_ind) Similar to above, but one-off instead of stateful. Returns an array of distances.
  • compute_distance_multisource(V, F, v_ind_list) Similar to above, but one-off instead of stateful. Returns an array of distances.

Mesh Vector Heat

Use the vector heat method to compute various interpolation & vector-based quantities on meshes. Repeated solves are fast after initial setup.

import potpourri3d as pp3d

# = Stateful solves
V, F = # a Nx3 numpy array of points and Mx3 array of triangle face indices
solver = pp3d.MeshVectorHeatSolver(V,F)

# Extend the value `0.` from vertex 12 and `1.` from vertex 17. Any vertex 
# geodesically closer to 12. will take the value 0., and vice versa 
# (plus some slight smoothing)
ext = solver.extend_scalar([12, 17], [0.,1.])

# Get the tangent frames which are used by the solver to define tangent data
# at each vertex
basisX, basisY, basisN = solver.get_tangent_frames()

# Parallel transport a vector along the surface
# (and map it to a vector in 3D)
sourceV = 22
ext = solver.transport_tangent_vector(sourceV, [6., 6.])
ext3D = ext[:,0,np.newaxis] * basisX +  ext[:,1,np.newaxis] * basisY

# Compute the logarithmic map
logmap = solver.compute_log_map(sourceV)
  • MeshVectorHeatSolver(V, F, t_coef=1.) construct an instance of the solver class.
    • V a Nx3 real numpy array of vertices
    • F a Mx3 integer numpy array of faces, with 0-based vertex indices (triangle meshes only, should be manifold).
    • t_coef set the time used for short-time heat flow. Generally don't change this. If necessary, larger values may make the solution more stable at the cost of smoothing it out.
  • MeshVectorHeatSolver.extend_scalar(v_inds, values) nearest-geodesic-neighbor interpolate values defined at vertices. Vertices will take the value from the closest source vertex (plus some slight smoothing)
    • v_inds a list of source vertices
    • values a list of scalar values, one for each source vertex
  • MeshVectorHeatSolver.get_tangent_frames() get the coordinate frames used to define tangent data at each vertex. Returned as a tuple of basis-X, basis-Y, and normal axes, each as an Nx3 array. May be necessary for change-of-basis into or out of tangent vector convention.
  • MeshVectorHeatSolver.get_connection_laplacian() get the connection Laplacian used internally in the vector heat method, as a VxV sparse matrix.
  • MeshVectorHeatSolver.transport_tangent_vector(v_ind, vector) parallel transports a single vector across a surface
    • v_ind index of the source vertex
    • vector a 2D tangent vector to transport
  • MeshVectorHeatSolver.transport_tangent_vectors(v_inds, vectors) parallel transports a collection of vectors across a surface, such that each vertex takes the vector from its nearest-geodesic-neighbor.
    • v_inds a list of source vertices
    • vectors a list of 2D tangent vectors, one for each source vertex
  • MeshVectorHeatSolver.compute_log_map(v_ind) compute the logarithmic map centered at the given source vertex
    • v_ind index of the source vertex

Mesh Geodesic Paths

Use edge flips to compute geodesic paths on surfaces. These methods are especially useful when you want the path itself, rather than the distance. These routines use an iterative strategy which is quite fast, but note that it is not guaranteed to generate the globally-shortest geodesic (they sometimes find some other very short geodesic instead).

import potpourri3d as pp3d

V, F = # your mesh
path_solver = pp3d.EdgeFlipGeodesicSolver(V,F) # shares precomputation for repeated solves
path_pts = path_solver.find_geodesic_path(v_start=14, v_end=22)
# path_pts is a Vx3 numpy array of points forming the path
  • EdgeFlipGeodesicSolver(V, F) construct an instance of the solver class.
    • V a Nx3 real numpy array of vertices
    • F a Mx3 integer numpy array of faces, with 0-based vertex indices (must form a manifold, oriented triangle mesh).
  • EdgeFlipGeodesicSolver.find_geodesic_path(v_start, v_end) compute a geodesic from v_start to v_end. Output is an Nx3 numpy array of positions which define the path as a polyline along the surface.
  • EdgeFlipGeodesicSolver.find_geodesic_path_poly(v_list) like find_geodesic_path(), but takes as input a list of vertices [v_start, v_a, v_b, ..., v_end], which is shorted to find a path from v_start to v_end. Useful for finding geodesics which are not shortest paths. The input vertices do not need to be connected; the routine internally constructs a piecwise-Dijkstra path between them. However, that path must not cross itself.
  • EdgeFlipGeodesicSolver.find_geodesic_loop(v_list) like find_geodesic_path_poly(), but connects the first to last point to find a closed geodesic loop.

Point Cloud Distance & Vector Heat

Use the heat method for geodesic distance and vector heat method to compute various interpolation & vector-based quantities on point clouds. Repeated solves are fast after initial setup.

point cloud vector heat examples

import potpourri3d as pp3d

# = Stateful solves
P = # a Nx3 numpy array of points
solver = pp3d.PointCloudHeatSolver(P)

# Compute the geodesic distance to point 4
dists = solver.compute_distance(4)

# Extend the value `0.` from point 12 and `1.` from point 17. Any point 
# geodesically closer to 12. will take the value 0., and vice versa 
# (plus some slight smoothing)
ext = solver.extend_scalar([12, 17], [0.,1.])

# Get the tangent frames which are used by the solver to define tangent data
# at each point
basisX, basisY, basisN = solver.get_tangent_frames()

# Parallel transport a vector along the surface
# (and map it to a vector in 3D)
sourceP = 22
ext = solver.transport_tangent_vector(sourceP, [6., 6.])
ext3D = ext[:,0,np.newaxis] * basisX +  ext[:,1,np.newaxis] * basisY

# Compute the logarithmic map
logmap = solver.compute_log_map(sourceP)
  • PointCloudHeatSolver(P, t_coef=1.) construct an instance of the solver class.
    • P a Nx3 real numpy array of points
    • t_coef set the time used for short-time heat flow. Generally don't change this. If necessary, larger values may make the solution more stable at the cost of smoothing it out.
  • PointCloudHeatSolver.extend_scalar(p_inds, values) nearest-geodesic-neighbor interpolate values defined at points. Points will take the value from the closest source point (plus some slight smoothing)
    • v_inds a list of source points
    • values a list of scalar values, one for each source points
  • PointCloudHeatSolver.get_tangent_frames() get the coordinate frames used to define tangent data at each point. Returned as a tuple of basis-X, basis-Y, and normal axes, each as an Nx3 array. May be necessary for change-of-basis into or out of tangent vector convention.
  • PointCloudHeatSolver.transport_tangent_vector(p_ind, vector) parallel transports a single vector across a surface
    • p_ind index of the source point
    • vector a 2D tangent vector to transport
  • PointCloudHeatSolver.transport_tangent_vectors(p_inds, vectors) parallel transports a collection of vectors across a surface, such that each vertex takes the vector from its nearest-geodesic-neighbor.
    • p_inds a list of source points
    • vectors a list of 2D tangent vectors, one for each source point
  • PointCloudHeatSolver.compute_log_map(p_ind) compute the logarithmic map centered at the given source point
    • p_ind index of the source point

Other Point Cloud Routines

Local Triangulation

Construct a local triangulation of a point cloud, a surface-like set of triangles amongst the points in the cloud. This is not a nice connected/watertight mesh, instead it is a crazy soup, which is a union of sets of triangles computed independently around each point. These triangles are suitable for running many geometric algorithms on, such as approximating surface properties of the point cloud, evaluating physical and geometric energies, or building Laplace matrices. See "A Laplacian for Nonmanifold Triangle Meshes", Sharp & Crane 2020, Sec 5.7 for details.

  • PointCloudLocalTriangulation(P, with_degeneracy_heuristic=True)
    • PointCloudLocalTriangulation.get_local_triangulation() returns a [V,M,3] integer numpy array, holding indices of vertices which form the triangulation. Each [i,:,:] holds the local triangles about vertex i. M is the max number of neighbors in any local triangulation. For vertices with fewer neighbors, the trailing rows hold -1.

potpourri3d's People

Contributors

lkskstlr avatar nmwsharp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

potpourri3d's Issues

Exposing face correspondence for geodesic edges derived from EdgeFlipGeodesicSolver

Currently we are building a feature that requires us to find which face IDs the edges that connects geodesic point pairs lie on. Currently, we have to solve this in R3 since we have to perform barycentric check on all of the faces, and it gets extremely slow on large meshes. Similar performance is observed when we use trimesh. It would be very useful to have EdgeFlipGeodesicSolver to return geodesic points, geodesic edges, and the face id on which the geodesic edges lie on (instead of just geodesic points) in the case that the mesh is triangular. I hope it would be useful for other users too, especially if they have to propagate linear equations from the derived geodesic path.

Feature Request : Connection Laplacian (to project DiffusionNet gradients in spectral basis)

Thank you for this super useful tool !
At present, we cannot have access to the connection Laplacian operator used for Heat Diffusion on tangent vector fields (defined on vertices).
It would be useful to be able to access it from the solver (with point cloud and with mesh if possible),
for instance L = solver.connection_laplacian()
The idea would be to use this laplacian to write gradients (defined at points) in spectral basis.
In this spirit, it could be useful to access gradient operators from within the solver too (since they have to be written in the local complex basis at each point which has to be the same as the one for the laplacian I suppose)
for instance G = solver.complex_gradient(). Alternatively, one could use for instance gradients defined in DiffusionNet but they would have to agree with the local basis of the connection Laplacian of the solver.

I hope this is enough information, thanks again for your huge help !

Threshold length for curve shortening with EdgeFlipGeodesicSolver

Thanks for this great work!
I'm not an expert in 3D geometry and searched for a while until I found your geodesic path implementation. Exactly what I need!

I want to use the EdgeFlipGeodesicSolver to straighten jagged loops for mesh segmentation, but some of my loops can be reduced to a point so I think I need to set the threshold length as described in your paper. Is there any way this can be exposed with the python api?

Cannot install on Python 3.11

I am unable to install this program on either Windows or Linux using Python 3.11.

In windows, I get the following error. The most relevant part seems to be:

The C compiler

          "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe"

        is not able to compile a simple test program.

The error is more specifically:

C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003: The specified task executable "CL.exe" could not be run. System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.dir\Debug\cmTC_244d2.tlog'. [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]

There may be problems with my installation of Microsoft Visual Studio 2022 or configuration of CMake but after much googling I cannot figure out how I should configure CMake to get this to work, and I think it might be the Python install script. The precompiled binaries work out of the box for Python 3.9 and Python 3.10 so I have not experimented with CMake there.

Full error:

Collecting potpourri3d
  Downloading potpourri3d-0.0.8-cp310-cp310-win_amd64.whl (485 kB)
     ---------------------------------------- 485.9/485.9 kB 3.8 MB/s eta 0:00:00
Requirement already satisfied: numpy in c:\users\patn\appdata\local\miniconda3\envs\3.10\lib\site-packages (from potpourri3d) (1.25.0)
Requirement already satisfied: scipy in c:\users\patn\appdata\local\miniconda3\envs\3.10\lib\site-packages (from potpourri3d) (1.10.1)
Installing collected packages: potpourri3d
Successfully installed potpourri3d-0.0.8
(3.10) PS C:\> conda deactivate
(base) PS C:\> pip install potpourri3d
Collecting potpourri3d
  Using cached potpourri3d-0.0.8.tar.gz (1.4 MB)
  Preparing metadata (setup.py) ... done
Collecting numpy (from potpourri3d)
  Downloading numpy-1.25.1-cp311-cp311-win_amd64.whl (15.0 MB)
     ---------------------------------------- 15.0/15.0 MB 23.4 MB/s eta 0:00:00
Collecting scipy (from potpourri3d)
  Using cached scipy-1.11.1-cp311-cp311-win_amd64.whl (44.0 MB)
Building wheels for collected packages: potpourri3d
  Building wheel for potpourri3d (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [150 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\potpourri3d
      copying src\potpourri3d\core.py -> build\lib.win-amd64-cpython-311\potpourri3d
      copying src\potpourri3d\io.py -> build\lib.win-amd64-cpython-311\potpourri3d
      copying src\potpourri3d\mesh.py -> build\lib.win-amd64-cpython-311\potpourri3d
      copying src\potpourri3d\point_cloud.py -> build\lib.win-amd64-cpython-311\potpourri3d
      copying src\potpourri3d\__init__.py -> build\lib.win-amd64-cpython-311\potpourri3d
      running build_ext
      C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\setup.py:30: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        cmake_version = LooseVersion(re.search(r'version\s*([\d.]+)', out.decode()).group(1))
      Running cmake configure command: cmake C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\lib.win-amd64-cpython-311 -DPYTHON_EXECUTABLE=C:\Users\patn\AppData\Local\miniconda3\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\lib.win-amd64-cpython-311 -A x64 -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
      -- Building for: Visual Studio 17 2022
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.5 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.


      -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19045.
      -- The C compiler identification is MSVC 19.34.31933.0
      -- The CXX compiler identification is MSVC 19.34.31933.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - failed
      -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe
      -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - broken
      CMake Error at C:/Program Files/CMake/share/cmake-3.27/Modules/CMakeTestCCompiler.cmake:67 (message):
        The C compiler

          "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe"

        is not able to compile a simple test program.

        It fails with the following output:

          Change Dir: 'C:/Users/patn/AppData/Local/Temp/pip-install-r9xhx066/potpourri3d_6d90223e14de4ab7b036116bf0105c08/build/temp.win-amd64-cpython-311/Release/CMakeFiles/CMakeScratch/TryCompile-0tiggc'

          Run Build Command(s): "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/amd64/MSBuild.exe" cmTC_244d2.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:n
          MSBuild version 17.4.0+18d5aef85 for .NET Framework
          Build started 7/20/2023 12:00:40 PM.
          Project "C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj" on node 1 (default targets).
          PrepareForBuild:
            Creating directory "cmTC_244d2.dir\Debug\".
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(527,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
            Creating directory "C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\Debug\".
            Creating directory "cmTC_244d2.dir\Debug\cmTC_244d2.tlog\".
          InitializeBuildStatus:
            Creating "cmTC_244d2.dir\Debug\cmTC_244d2.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
          ClCompile:
            C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX64\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_244d2.dir\Debug\\" /Fd"cmTC_244d2.dir\Debug\vc143.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\testCCompiler.c"
            Microsoft (R) C/C++ Optimizing Compiler Version 19.34.31933 for x64
            testCCompiler.c
            Copyright (C) Microsoft Corporation.  All rights reserved.
            cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_244d2.dir\Debug\\" /Fd"cmTC_244d2.dir\Debug\vc143.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\testCCompiler.c"
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003: The specified task executable "CL.exe" could not be run. System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.dir\Debug\cmTC_244d2.tlog'. [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at System.IO.FileSystemEnumerableIterator`1.CommonInit() [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at System.IO.Directory.GetFiles(String path, String searchPattern) [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at Microsoft.Build.Utilities.TrackedDependencies.ExpandWildcards(ITaskItem[] expand) [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at Microsoft.Build.CPPTasks.TrackedVCToolTask.DeleteFiles(ITaskItem[] filesToDelete) [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at Microsoft.Build.CPPTasks.CL.PostExecuteTool(Int32 exitCode) [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at Microsoft.Build.CPPTasks.TrackedVCToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at Microsoft.Build.Utilities.ToolTask.Execute() [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          Done Building Project "C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj" (default targets) -- FAILED.

          Build FAILED.

          "C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj" (default target) (1) ->
          (PrepareForBuild target) ->
            C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(527,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]


          "C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj" (default target) (1) ->
          (ClCompile target) ->
            C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003: The specified task executable "CL.exe" could not be run. System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.dir\Debug\cmTC_244d2.tlog'. [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at System.IO.FileSystemEnumerableIterator`1.CommonInit() [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at System.IO.Directory.GetFiles(String path, String searchPattern) [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at Microsoft.Build.Utilities.TrackedDependencies.ExpandWildcards(ITaskItem[] expand) [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at Microsoft.Build.CPPTasks.TrackedVCToolTask.DeleteFiles(ITaskItem[] filesToDelete) [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at Microsoft.Build.CPPTasks.CL.PostExecuteTool(Int32 exitCode) [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at Microsoft.Build.CPPTasks.TrackedVCToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at Microsoft.Build.Utilities.ToolTask.Execute() [C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\build\temp.win-amd64-cpython-311\Release\CMakeFiles\CMakeScratch\TryCompile-0tiggc\cmTC_244d2.vcxproj]

              1 Warning(s)
              1 Error(s)

          Time Elapsed 00:00:00.61





        CMake will not be able to correctly generate this project.
      Call Stack (most recent call first):
        CMakeLists.txt:2 (project)


      -- Configuring incomplete, errors occurred!
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\setup.py", line 111, in <module>
          main()
        File "C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\setup.py", line 91, in main
          setup(
        File "C:\Users\patn\AppData\Local\miniconda3\Lib\site-packages\setuptools\__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\patn\AppData\Local\miniconda3\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "C:\Users\patn\AppData\Local\miniconda3\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
          dist.run_commands()
        File "C:\Users\patn\AppData\Local\miniconda3\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "C:\Users\patn\AppData\Local\miniconda3\Lib\site-packages\setuptools\dist.py", line 1244, in run_command
          super().run_command(command)
        File "C:\Users\patn\AppData\Local\miniconda3\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\patn\AppData\Local\miniconda3\Lib\site-packages\wheel\bdist_wheel.py", line 325, in run
          self.run_command("build")
        File "C:\Users\patn\AppData\Local\miniconda3\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\patn\AppData\Local\miniconda3\Lib\site-packages\setuptools\dist.py", line 1244, in run_command
          super().run_command(command)
        File "C:\Users\patn\AppData\Local\miniconda3\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\patn\AppData\Local\miniconda3\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
          self.run_command(cmd_name)
        File "C:\Users\patn\AppData\Local\miniconda3\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\patn\AppData\Local\miniconda3\Lib\site-packages\setuptools\dist.py", line 1244, in run_command
          super().run_command(command)
        File "C:\Users\patn\AppData\Local\miniconda3\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\setup.py", line 35, in run
          self.build_extension(ext)
        File "C:\Users\patn\AppData\Local\Temp\pip-install-r9xhx066\potpourri3d_6d90223e14de4ab7b036116bf0105c08\setup.py", line 69, in build_extension
          subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
        File "C:\Users\patn\AppData\Local\miniconda3\Lib\subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\patn\\AppData\\Local\\Temp\\pip-install-r9xhx066\\potpourri3d_6d90223e14de4ab7b036116bf0105c08', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\patn\\AppData\\Local\\Temp\\pip-install-r9xhx066\\potpourri3d_6d90223e14de4ab7b036116bf0105c08\\build\\lib.win-amd64-cpython-311', '-DPYTHON_EXECUTABLE=C:\\Users\\patn\\AppData\\Local\\miniconda3\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\patn\\AppData\\Local\\Temp\\pip-install-r9xhx066\\potpourri3d_6d90223e14de4ab7b036116bf0105c08\\build\\lib.win-amd64-cpython-311', '-A', 'x64', '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON']' returned non-zero exit status 1.

I am also not able to install it on Linux. The error message here seems much more likely to be a Python 3.11 compatibility issue, perhaps due to a change in the C API? This is on Ubuntu 22.04 (running in WSL2). I have also tried it in a Docker container.

[ 96%] Building CXX object CMakeFiles/potpourri3d_bindings.dir/src/cpp/io.cpp.o
      /usr/bin/c++ -DNOMINMAX -D_USE_MATH_DEFINES -Dpotpourri3d_bindings_EXPORTS -I/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/potpourri3d_bindings -I/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/src/cpp -I/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/geometry-central/src/../include -I/usr/local/include/eigen3 -I/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/geometry-central/deps/nanort/include -I/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/geometry-central/deps/nanoflann/include -I/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/geometry-central/deps/happly -isystem /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include -isystem /home/patn/miniconda3/envs/cajal-3.11/include/python3.11 -DVERSION_INFO=\"0.0.8\" -O3 -DNDEBUG -fPIC -fvisibility=hidden -flto -fno-fat-lto-objects -MD -MT CMakeFiles/potpourri3d_bindings.dir/src/cpp/core.cpp.o -MF CMakeFiles/potpourri3d_bindings.dir/src/cpp/core.cpp.o.d -o CMakeFiles/potpourri3d_bindings.dir/src/cpp/core.cpp.o -c /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/src/cpp/core.cpp
      /usr/bin/c++ -DNOMINMAX -D_USE_MATH_DEFINES -Dpotpourri3d_bindings_EXPORTS -I/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/potpourri3d_bindings -I/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/src/cpp -I/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/geometry-central/src/../include -I/usr/local/include/eigen3 -I/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/geometry-central/deps/nanort/include -I/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/geometry-central/deps/nanoflann/include -I/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/geometry-central/deps/happly -isystem /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include -isystem /home/patn/miniconda3/envs/cajal-3.11/include/python3.11 -DVERSION_INFO=\"0.0.8\" -O3 -DNDEBUG -fPIC -fvisibility=hidden -flto -fno-fat-lto-objects -MD -MT CMakeFiles/potpourri3d_bindings.dir/src/cpp/io.cpp.o -MF CMakeFiles/potpourri3d_bindings.dir/src/cpp/io.cpp.o.d -o CMakeFiles/potpourri3d_bindings.dir/src/cpp/io.cpp.o -c /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/src/cpp/io.cpp
      In file included from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/cast.h:16,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/attr.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pybind11.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/numpy.h:12,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/eigen.h:18,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/src/cpp/core.h:5,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/src/cpp/core.cpp:1:
      /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/detail/type_caster_base.h: In function ‘std::string pybind11::detail::error_string()’:
      /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/detail/type_caster_base.h:482:26: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
        482 |             frame = frame->f_back;
            |                          ^~
      In file included from /home/patn/miniconda3/envs/cajal-3.11/include/python3.11/Python.h:42,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/detail/common.h:186,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pytypes.h:12,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/cast.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/attr.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pybind11.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/numpy.h:12,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/eigen.h:18,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/src/cpp/core.h:5,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/src/cpp/core.cpp:1:
      /home/patn/miniconda3/envs/cajal-3.11/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
         22 | typedef struct _frame PyFrameObject;
            |                ^~~~~~
      In file included from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/cast.h:16,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/attr.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pybind11.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/numpy.h:12,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/eigen.h:18,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/src/cpp/io.cpp:14:
      /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/detail/type_caster_base.h: In function ‘std::string pybind11::detail::error_string()’:
      /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/detail/type_caster_base.h:482:26: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
        482 |             frame = frame->f_back;
            |                          ^~
      In file included from /home/patn/miniconda3/envs/cajal-3.11/include/python3.11/Python.h:42,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/detail/common.h:186,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pytypes.h:12,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/cast.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/attr.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pybind11.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/numpy.h:12,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/eigen.h:18,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/src/cpp/io.cpp:14:
      /home/patn/miniconda3/envs/cajal-3.11/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
         22 | typedef struct _frame PyFrameObject;
            |                ^~~~~~
      In file included from /home/patn/miniconda3/envs/cajal-3.11/include/python3.11/Python.h:38,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/detail/common.h:186,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pytypes.h:12,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/cast.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/attr.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pybind11.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/numpy.h:12,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/eigen.h:18,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/src/cpp/core.h:5,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/src/cpp/core.cpp:1:
      /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pybind11.h: In function ‘pybind11::function pybind11::detail::get_type_override(const void*, const pybind11::detail::type_info*, const char*)’:
      /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pybind11.h:2348:29: error: ‘PyCodeObject’ {aka ‘struct PyCodeObject’} has no member named ‘co_varnames’; did you mean ‘co_names’?
       2348 |                     locals, PyTuple_GET_ITEM(f_code->co_varnames, 0)
            |                             ^~~~~~~~~~~~~~~~
      In file included from /home/patn/miniconda3/envs/cajal-3.11/include/python3.11/Python.h:38,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/detail/common.h:186,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pytypes.h:12,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/cast.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/attr.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pybind11.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/numpy.h:12,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/eigen.h:18,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/src/cpp/io.cpp:14:
      /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pybind11.h: In function ‘pybind11::function pybind11::detail::get_type_override(const void*, const pybind11::detail::type_info*, const char*)’:
      /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pybind11.h:2348:29: error: ‘PyCodeObject’ {aka ‘struct PyCodeObject’} has no member named ‘co_varnames’; did you mean ‘co_names’?
       2348 |                     locals, PyTuple_GET_ITEM(f_code->co_varnames, 0)
            |                             ^~~~~~~~~~~~~~~~
      In file included from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/cast.h:16,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/attr.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pybind11.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/numpy.h:12,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/eigen.h:18,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/src/cpp/mesh.cpp:14:
      /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/detail/type_caster_base.h: In function ‘std::string pybind11::detail::error_string()’:
      /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/detail/type_caster_base.h:482:26: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
        482 |             frame = frame->f_back;
            |                          ^~
      In file included from /home/patn/miniconda3/envs/cajal-3.11/include/python3.11/Python.h:42,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/detail/common.h:186,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pytypes.h:12,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/cast.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/attr.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pybind11.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/numpy.h:12,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/eigen.h:18,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/src/cpp/mesh.cpp:14:
      /home/patn/miniconda3/envs/cajal-3.11/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
         22 | typedef struct _frame PyFrameObject;
            |                ^~~~~~
      In file included from /home/patn/miniconda3/envs/cajal-3.11/include/python3.11/Python.h:38,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/detail/common.h:186,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pytypes.h:12,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/cast.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/attr.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pybind11.h:13,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/numpy.h:12,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/eigen.h:18,
                       from /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/src/cpp/mesh.cpp:14:
      /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pybind11.h: In function ‘pybind11::function pybind11::detail::get_type_override(const void*, const pybind11::detail::type_info*, const char*)’:
      /tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/deps/pybind11/include/pybind11/pybind11.h:2348:29: error: ‘PyCodeObject’ {aka ‘struct PyCodeObject’} has no member named ‘co_varnames’; did you mean ‘co_names’?
       2348 |                     locals, PyTuple_GET_ITEM(f_code->co_varnames, 0)
            |                             ^~~~~~~~~~~~~~~~
      gmake[2]: *** [CMakeFiles/potpourri3d_bindings.dir/build.make:79: CMakeFiles/potpourri3d_bindings.dir/src/cpp/core.cpp.o] Error 1
      gmake[2]: *** Waiting for unfinished jobs....
      gmake[2]: *** [CMakeFiles/potpourri3d_bindings.dir/build.make:93: CMakeFiles/potpourri3d_bindings.dir/src/cpp/io.cpp.o] Error 1
      gmake[2]: *** [CMakeFiles/potpourri3d_bindings.dir/build.make:107: CMakeFiles/potpourri3d_bindings.dir/src/cpp/mesh.cpp.o] Error 1
      gmake[2]: Leaving directory '/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/build/temp.linux-x86_64-cpython-311'
      gmake[1]: *** [CMakeFiles/Makefile2:154: CMakeFiles/potpourri3d_bindings.dir/all] Error 2
      gmake[1]: Leaving directory '/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/build/temp.linux-x86_64-cpython-311'
      gmake: *** [Makefile:94: all] Error 2

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/setup.py", line 111, in <module>
          main()
        File "/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/setup.py", line 91, in main
          setup(
        File "/home/patn/.local/lib/python3.11/site-packages/setuptools/__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/patn/.local/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/home/patn/.local/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/patn/.local/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/patn/.local/lib/python3.11/site-packages/setuptools/dist.py", line 1208, in run_command
          super().run_command(command)
        File "/home/patn/.local/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/patn/miniconda3/envs/cajal-3.11/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 325, in run
          self.run_command("build")
        File "/home/patn/.local/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/patn/.local/lib/python3.11/site-packages/setuptools/dist.py", line 1208, in run_command
          super().run_command(command)
        File "/home/patn/.local/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/patn/.local/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 132, in run
          self.run_command(cmd_name)
        File "/home/patn/.local/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/patn/.local/lib/python3.11/site-packages/setuptools/dist.py", line 1208, in run_command
          super().run_command(command)
        File "/home/patn/.local/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/setup.py", line 35, in run
          self.build_extension(ext)
        File "/tmp/pip-install-nvw0msc6/potpourri3d_9bc38efbd0494ee3b07a074a0db6b5e9/setup.py", line 73, in build_extension
          subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
        File "/home/patn/miniconda3/envs/cajal-3.11/lib/python3.11/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j3']' returned non-zero exit status 2.

Geodesic Loop through a Specific Point?

I am attempting to compute a geodesic loop through a specific point, but when I use either find_geodesic_loop or find_geodesic_path_poly, the returned path does not contain any of the input points. What I would like is to find a loop through a given point, and use the seed path (loop) to determine the isotopy group of the path.

This image shows what I get currently. The red points are what I input to either find_geodesic_loop or find_geodesic_path_poly. The red line is the result of both of those methods, while the blue line is what I'm hoping for; a loop that starts and ends at the point pointed to in green.

Is there a way to achieve this?

geodesic_loop

Geodesic from a predefined path?

Thank you so much for making the python binding! I use mainly use python for geometry stuff, so this is extremely helpful.

I'm working on some anthropometry, and trying to extract the rise curve, from the navel down the crotch and up to the lower back. I'm trying to use the edge flip solver for this, but the shorter path it found is around the side of the torso. According to the paper, it seems it should be possible to optimize a path through a different direction. Would that be possible to do with the python binding?
Screen Shot 2021-05-27 at 10 22 20 AM

Geodesic pairwise distance

Hi,

I would like to get the geodesic pairwise distance of a mesh. I saw that there are some methods to get the distance for a specific each. However, I did not see how to get efficiently the pairwise distance.

Thanks,

RuntimeError: vertices lie on disconnected components of the surface

I load a mesh with triangle faces. Then I try to execute these code lines:
`
path_solver = pp3d.EdgeFlipGeodesicSolver(V, F) # shares precomputation for repeated solves

path_pts = path_solver.find_geodesic_path(v_start=0, v_end=100)`

But launch "RuntimeError: vertices lie on disconnected components of the surface".

How to solve this problem??

`find_geodesic_path_poly` fails when there’s overlap in the dijkstraPath

Screenshot 2024-04-04 at 15 25 54

As the diagram shows, find_geodesic_path_poly will generate something unsatisfactory when there's overlap in the dijkstraPath. I remember the original author of the papar said that there's some problem when overlap / knot / loop presents in the initial path.

My workaround is to find the edge path by myself, making sure there's no overlapped vertices before calling the function.

`MeshVectorHeatSolver` fails when the shape comes form DT4D dataset.

Hi,
I’d like to compute the connection Laplacian of 3D triangle mesh via L=pp3d.MeshVectorHeatSolver(verts,faces).get_connection_laplacian(). However, I find that it fails when it runs on the DT4D dataset. The code gives the following error message.
1715999895046

How to solve this problem??

Randomly generated mesh test fails

Hello!

I've been trying to figure out how to generate a 2D circle mesh for use with potpourri3d, but I keep getting this error: self-edge in face list [x] -- [x]. While investigating, I came across your test functions, generate_verts() and generate_faces(). When I tried to load a mesh using those two, I also got self-edge in face list. However, puzzlingly, I could use the bunny mesh without any errors.

Other errors I got while trying to make my circle mesh work include vertex [x] appears in more than one boundary loop and duplicate edge in list [i] -- [j].

I'm confused because polyscope renders the meshes correctly, but potpourri3d has a hard time with the same meshes.

Thank you!

image

import numpy as np
import polyscope as ps
import potpourri3d as pp3d

# Initialize polyscope
ps.init()

def generate_verts(n_pts=999):
    np.random.seed(777)        
    return np.random.rand(n_pts, 3)

def generate_faces(n_pts=999):
    # n_pts should be a multiple of 3 for indexing to work out
    np.random.seed(777)        
    rand_faces = np.random.randint(0, n_pts, size=(2*n_pts,3))
    coverage_faces = np.arange(n_pts).reshape(-1, 3)
    faces = np.vstack((rand_faces, coverage_faces))
    return faces

verts = generate_verts()
faces = generate_faces()
solver = pp3d.MeshVectorHeatSolver(verts, faces)
ps.register_surface_mesh("random mesh", verts, faces, smooth_shade=True)

verts, faces = pp3d.read_mesh("bunny_small.ply")
solver = pp3d.MeshVectorHeatSolver(verts, faces)
ps.register_surface_mesh("bunny mesh", verts, faces, smooth_shade=True)

radians = np.linspace(0, 2*np.pi-(2*np.pi/40), 40)
unit_circle = np.stack((np.cos(radians), np.sin(radians), radians*0), axis=1)
verts = unit_circle
faces = []
for i in range(0, verts.shape[0]):
    if i == verts.shape[0]-1:
        faces.append([i, 0, 0])
    else:
        faces.append([i, i+1, 0])
faces = np.array(faces)
solver = pp3d.MeshVectorHeatSolver(verts, faces)
ps.register_surface_mesh("unit circle mesh", verts, faces, smooth_shade=True)

ps.show()

Poor geodesic distance accuracy in a simple case

Forgive me if my expectations for accuracy are unreasonable for the HEAT method. I have the following minimal example

import numpy as np
from potpourri3d import MeshHeatMethodDistanceSolver

solver = MeshHeatMethodDistanceSolver(np.array([[0, 0, 0], [1, 0, 0], [0, 1, 0]]), np.array([[0, 1, 2]]))
solver.compute_distance(0) # -> array([0.        , 0.70710654, 0.70710654])
solver.compute_distance(1) # -> array([0.91430181, 0.        , 1.31933315])
solver.compute_distance(2) # -> array([0.91430181, 1.31933315, 0.        ])

The fact that the first example is returning distances of sqrt(2)/2 makes it seem like this is a bug rather than a limitation of the method somehow.

Its worth noting that setting t_coef=0.001 makes the results of the second two cases more accurate, but the first case returns [0. , 0.70710654, 0.70710654] no matter the value of t_coef

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.