Code Monkey home page Code Monkey logo

alicevision / geogram Goto Github PK

View Code? Open in Web Editor NEW
119.0 13.0 54.0 22.43 MB

Git mirror of the geogram library by INRIA

Home Page: https://github.com/BrunoLevy/geogram

License: BSD 3-Clause "New" or "Revised" License

CMake 1.14% Shell 0.42% Batchfile 0.04% C++ 83.84% C 8.98% Lex 0.06% Yacc 0.23% PLSQL 0.18% HTML 0.22% Lua 0.50% TeX 0.31% Python 0.13% JavaScript 0.06% Perl 0.77% GLSL 3.10%
geometry 3d-meshing delaunay-triangulation voronoi-diagram

geogram's Introduction

geogram

Geogram is a programming library with geometric algorithms. It contains the main results in Geometry Processing from the former ALICE Inria project, that is, more than 30 research articles published in ACM SIGGRAPH, ACM Transactions on Graphics, Symposium on Geometry Processing and Eurographics. It was supported by two grants from the European Research Council (ERC): GOODSHAPE and VORPALINE.

Links

  • Documentation, how to compile, tutorials.... Geogram Wiki
  • Programmer's reference manual... Doxygen
  • Releases... Latest
  • Graphite, an experimental 3D modeler built around geogram.

geogram's People

Contributors

fabiencastan avatar simogasp 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

geogram's Issues

Cannot compile

Hello,

I am trying to use Geogram but I struggle even to build the library. I am following what's said in the page but I end with this when running CMake:

CMake Deprecation Warning at CMakeLists.txt:9 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 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.18362.0 to target Windows 10.0.19041.
Using local options file: D:/Git/geogram/CMakeOptions.txt
Configuring build for standalone Geogram (without Vorpaline)
CMake Error at cmake/geogram.cmake:70 (include):
  include could not find requested file:

    D:/Git/geogram/cmake/platforms//config.cmake
Call Stack (most recent call first):
  CMakeLists.txt:47 (include)


CMake Error at CMakeLists.txt:57 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.


CMake Error at src/lib/geogram/third_party/CMakeLists.txt:1 (vor_reset_warning_level):
  Unknown CMake command "vor_reset_warning_level".


Configuring incomplete, errors occurred!
See also "D:/Git/geogram/build/CMakeFiles/CMakeOutput.log".

This is on Windows 10, Cmake 3.20.5 and Visual Studio 2019.
Can you help?

Thank you

GEO::Delaunnay order of points

Does this method have any requirements for the ordering of points? The results from my mesh are of poor quality, and even most of the tetrahedrons overlap.

threads

Hi
is it any possible to have a client application making simultaneous calls to a DLL using multi-threaded functions of Geogram (like Co3Ne_smooth_and_reconstruct)? I tried and I got crashes.
Pierre

Linker error when used as shared library on windows (and possible solution)

In geogram/src/lib/geogram/api/defs.h
The compile definition GEO_DYNAMIC_LIBS checked for on line 69 is never possibly set anywhere before in the CMake files. As a result, linker error occurs on windows when the library built as a shared library (I am using the library through vcpkg).

I could solve the problem and compile successfully geogram/src/examples/graphics/demo_Delaunay3d by adding the following to geogram/src/lib/geogram/CMakeLists.txt

if(WIN32 AND VORPALINE_BUILD_DYNAMIC)
    target_compile_definitions(geogram PUBLIC GEO_DYNAMIC_LIBS)
endif()

But I don't know if that's the ideal solution.

EDIT: would be nice to add NOMINMAX as a compile definition too

Assertion failed: variable_exists.

I was easily able to get this error, but it is not clear enough for me to correct my settings:

[2023-05-11 13:32:18.184234] [0x00007efd16f41000] [trace]   Embedded OCIO configuration file: '/home/drewp/own/tool/Meshroom-2023.1.0-av3.0.0-centos7-cuda11.3.1/aliceVision/share/aliceVision/config.ocio' found.
Program called with the following parameters:
 * angleHardThreshold = 90
 * bestScoreThreshold = 0.1
 * bumpType =  Unknown Type "N11aliceVision4mesh16EBumpMappingTypeE" (default)
 * colorMappingFileType =  Unknown Type "N11aliceVision5image14EImageFileTypeE" (default)
 * correctEV = 0
 * displacementMappingFileType =  Unknown Type "N11aliceVision5image14EImageFileTypeE" (default)
 * downscale =  Unknown Type "j"
 * fillHoles = 0
 * flipNormals = 0
 * forceVisibleByAllVertices = 0
 * heightFileType =  Unknown Type "N11aliceVision5image14EImageFileTypeE" (default)
 * imagesFolder = "MeshroomCache/PrepareDenseScene/fec86ff33bdabecfb72744c17fe78e86f464e71c"
 * input = "/MeshroomCache/Meshing/a998f2f7d6f81107cd21f7f6df3c7ad8f5898315/densePointCloud.abc"
 * inputMesh = "/MeshroomCache/MeshFiltering/787b804b715f3d79a1045b27b01206094c60cb39/mesh.obj"
 * inputRefMesh = ""
 * maxCoresAvailable =  Unknown Type "j" (default)
 * maxMemoryAvailable = 18446744073709551615 (default)
 * multiBandDownscale =  Unknown Type "j"
 * multiBandNbContrib =  Unknown Type "St6vectorIiSaIiEE"
 * normalFileType =  Unknown Type "N11aliceVision5image14EImageFileTypeE" (default)
 * output = "/MeshroomCache/Texturing/cbd55676d4e19c4a1c3a2f204bba8cb2135e2aee"
 * outputColorSpace =  Unknown Type "N11aliceVision5image16EImageColorSpaceE"
 * outputMeshFileType =  Unknown Type "N11aliceVision4mesh9EFileTypeE"
 * padding =  Unknown Type "j"
 * subdivisionTargetRatio = 0.8
 * textureSide =  Unknown Type "j"
 * unwrapMethod = "LSCM"
 * useScore = 1
 * useUDIM = 1
 * verboseLevel = "info"
 * visibilityRemappingMethod = "PullPush"
 * workingColorSpace =  Unknown Type "N11aliceVision5image16EImageColorSpaceE"

Hardware : 
	Detected core count : 8
	OpenMP will use 8 cores
	Detected available memory : 6958 Mo

[13:32:18.220785][info] Load dense point cloud.
[13:32:18.532617][warning] Alembic LOAD: NO OBSERVATIONS_WITH_FEATURES: , mvg_visibilityFeatId: 0, mvg_visibilityFeatPos: 0, OBSERVATIONS_WITH_FEATURES flag: false
[13:32:19.227711][info] Found 1 image dimension(s): 
[13:32:19.227797][info] 	- [1280x720]
[13:32:19.387909][info] Overall maximum dimension: [1280x720]
[13:32:19.388049][info] Load input mesh.
[13:32:21.867895][info] Convert dense point cloud into ref mesh
[13:32:22.342277][info] remapMeshVisibility based on triangles start.
[13:32:24.238240][info] remapMeshVisibility done.
[13:32:24.243335][info] Input mesh has no UV coordinates, start unwrapping (LSCM)
[13:32:24.334626][info] Start mesh atlasing (using Geogram LSCM).
Assertion failed: variable_exists.
File: /tmp/AliceVisionDeps_build/geogram/src/lib/geogram/basic/environment.cpp,
Line: 217

header files for include

Hi guys,

I'm working on getting geogram added to conda-forge as part of a effort to polish up a functionality gap that exists in the python 3D geometry library landscape (see PyMesh/PyMesh#302). I've managed to get the software bulding with VS 19 and mscv 14. I'm unsure which header files I should copy into \include as part of the build process.

Cheers,
Neil

Mac OS X / Clang: no _mm_set_pd1 definition

See here: Homebrew/homebrew-core#31094 (comment)

If compiling without changes on OS X, I get the error:

geogram_1.6.6/src/lib/geogram/numerics/predicates.cpp:341:20: error: use of undeclared identifier '_mm_set_pd1'; did you mean '_mm_set_ps1'?

From this StackOverflow answer, I found the apparent actual equivalent in Clang is _mm_set1_pd. Apparently Intel's implementation has #define _mm_set_pd1 _mm_set1_pd, so it may be possible to simply replace the one instance of _mm_set_pd1 with _mm_set1_pd.

What's the appropriate contact for getting this change made upstream?

Vorpalite Assert loading any model

I've tried some point clouds in .ply and .obj fileformats but unfortunately I always get the same assertion:

_

Received an exception: Assertion failed: mesh.facets.nb() > 0.
File: E:\builds\geogram\src\lib\geogram/mesh/mesh_sampling.h,
Line: 136

_

Any tip about that?

Build error with MinGW

Hi,

I try to compile geogram with MinGW (MinGW-W64-builds-4.3.5) but got the following error message. I have set
set(VORPALINE_PLATFORM MinGW-x86_64-w64)

Error running link command: The system cannot find the file specified src\lib\geogram\CMakeFiles\geogram.dir\build.make:1839: recipe for target 'lib/libgeogram.a' failed mingw32-make[2]: *** [lib/libgeogram.a] Error 2 CMakeFiles\Makefile2:123: recipe for target 'src/lib/geogram/CMakeFiles/geogram.dir/all' failed mingw32-make[1]: *** [src/lib/geogram/CMakeFiles/geogram.dir/all] Error 2 Makefile:150: recipe for target 'all' failed mingw32-make: *** [all] Error 2

Any clue?

Thanks!

MeshEdges

When I use mesh_load to load an OBJ model, the number of edges is zero, why?

RVD

I am trying to compute RVD using an input samples shown here
interior_samples
and wishing to clip it by the model (surface triangles) shown here
vc 0000
I was expecting the results to be just the clipped 3D Voronoi cells with the model, but what I got includes also the clipping model union the clipped Voronoi as shown here
clipping

The command line I used was

compute_RVD.exe fertility.obj fertility.xyz fertility_output.obj

where fertility.obj is the input model, fertility.xyz contains the samples coordinates, and fertility_output.obj is for the output.

I wonder if it is possible to output the clipped Voronoi cells (without the triangulated model)? is there any extra flags I should add to the command line?

Unresolved external in Windows

The call to create_tets creates an unresolved external symbol on Windows:

#include "geogram/mesh/mesh.h"

int main(int argc, char *argv[]) {

	GEO::Mesh aMesh;
	aMesh.cells.create_tets(1); // This line causes error

}

The snapshot is shown below:
image

Built with VS 2017 version 15.7.3

Multiple declaration of `timing_` `debug_` in `third_party/numeric/ARPACK`

{os:linux, gcc:10.1.0, geogram:1.7.5}
I'm unable to build geogram with default CMake settings, mainly GEOGRAM_WITH_LAGACY_NUMERIC
All files under third_party/numeric/ARPACK have timing_ and debug_ type defined which results in ld error:

/usr/bin/ld: CMakeFiles/geogram_num_3rdparty.dir/ARPACK/zngets.c.o:(.bss+0x0): multiple definition of `timing_'; CMakeFiles/geogram_num_3rdparty.dir/ARPACK/cgetv0.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/geogram_num_3rdparty.dir/ARPACK/zstatn.c.o:(.bss+0x0): multiple definition of `timing_'; CMakeFiles/geogram_num_3rdparty.dir/ARPACK/cgetv0.c.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [src/lib/third_party/numerics/CMakeFiles/geogram_num_3rdparty.dir/build.make:10619: lib/libgeogram_num_3rdparty.so.1.7.5] Error 1

relevant lines:
https://github.com/alicevision/geogram/blob/master/src/lib/third_party/numerics/ARPACK/zngets.c#L17-L31
https://github.com/alicevision/geogram/blob/master/src/lib/third_party/numerics/ARPACK/zstatn.c#L17-L25

Different behaviour with clang10 and gcc8

Hello,

I'm using geogram v1.7.4, and I have noticed that depending on which compiler I use (clang10 or gcc8), the result of the fill_holes function lead to different output meshes. The resulting shape is the same, but the vertex indices are a bit different. I guess this is due to the mesh_repair call at the end of the function fill_holes, because if I set the parameter repair to false, the output meshes are identical.

Do you have any idea why the vertex indices are different with clang10 and gcc8? Is it a known problem or an "expected" behaviour ?

Opening ply pointclouds

Hello, I'm trying to do a simple co3n reconstruction from a pointcloud that has normals already. When I try to open the pointcloud it tells me the extension is not supported but when i use vorpaline example it works. How can I open a .ply file?

// Declare a mesh.
GEO::Mesh M;

// Load the mesh and display timings.
GEO::Logger::div("Loading");
{
    GEO::Stopwatch W("load");
    if(!GEO::mesh_load("./cloudwithnormals.ply", M)) {
        return 1;
    }
}

GEO::Co3Ne_reconstruct  (M,0.02);

// Save the mesh and display timings.    
GEO::Logger::div("Saving");
{
    //GEO::Stopwatch W("save");        
    if(!GEO::mesh_save(M,"./meshCo3Ne.ply")) {
        return 1;
    }
}

This is the only thing I have for the moment.
I'm getting the following error:

=====Command line
[MyApp] Opening mesh with geogram: ./cloudwithnormals.ply
=====Loading
[I/O] Loading file ./cloudwithnormals.ply...
(E)-[I/O] Unsupported file format: ply
(E)-[I/O] Could not load file: ./cloudwithnormals.ply
[load] Elapsed time: 0 s

Could NOT find Threads (missing: Threads_FOUND)

Hi!
I'm trying to build geogram in Ami Linux but I'm getting error. Below you will fin the error:

============= Checking for CMake ============

cmake version 3.10.0

CMake suite maintained and supported by Kitware (kitware.com/cmake).
Found CMake

============= Creating makefiles for Linux64-gcc-dynamic-Release ============

-- The C compiler identification is GNU 7.2.1
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring build for standalone Geogram (without Vorpaline)
-- GCC version >= 4.3, activating sign conversion warnings
-- GCC version >= 4.6, activating double promotion warnings
-- Did not find GLFW3 in the system, using built-in GLFW3.
-- Looking for pthread.h
-- Looking for pthread.h - not found
CMake Error at /usr/local/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
/usr/local/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.10/Modules/FindThreads.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
src/lib/third_party/glfw/CMakeLists.txt:70 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/ec2-user/libraries/geogram/build/Linux64-gcc-dynamic-Release/CMakeFiles/CMakeOutput.log".
See also "/home/ec2-user/libraries/geogram/build/Linux64-gcc-dynamic-Release/CMakeFiles/CMakeError.log".

============= Creating makefiles for Linux64-gcc-dynamic-Debug ============

-- The C compiler identification is GNU 7.2.1
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring build for standalone Geogram (without Vorpaline)
-- GCC version >= 4.3, activating sign conversion warnings
-- GCC version >= 4.6, activating double promotion warnings
-- Did not find GLFW3 in the system, using built-in GLFW3.
-- Looking for pthread.h
-- Looking for pthread.h - not found
CMake Error at /usr/local/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
/usr/local/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.10/Modules/FindThreads.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
src/lib/third_party/glfw/CMakeLists.txt:70 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/ec2-user/libraries/geogram/build/Linux64-gcc-dynamic-Debug/CMakeFiles/CMakeOutput.log".
See also "/home/ec2-user/libraries/geogram/build/Linux64-gcc-dynamic-Debug/CMakeFiles/CMakeError.log".

============== Geogram build configured ==================

To build geogram:

  • go to build/Linux64-gcc-dynamic-Release or build/Linux64-gcc-dynamic-Debug
  • run 'make' or 'cmake --build .'

Note: local configuration can be specified in CMakeOptions.txt
(see CMakeOptions.txt.sample for an example)
You'll need to re-run configure.sh if you create or modify CMakeOptions.txt

linux aarch64 support?

Trying to compile on the aarch64 platform, there are many errors, is there any intention to support the aarch64 platform?

win10 cannot draw tetrahedral

glupBegin(GLUP_TETRAHEDRA) shows error in "geogram_demo_GLUP"
but it success on linux platform or Win7!

could you please figure out the reason?

UBSAN shows error in in_sphere_3d_filter_avx2

Running a program compiler with UBSAN , shows an error in in_sphere_3d_filter_avx2 when compiled with -mavx2 flag:

runtime error: store to address 0x7fffffffb790 with insufficient space for an object of type 'double' 0x7fffffffb790: note: pointer points 

in geogram version 1.6.8 , it's because in src/lib/geogram/numerics/predicates.cpp:362 , the function _mm_store_pd1 is trying to store two double values into epsval , see https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_store_pd1&expand=5586

failure build on aarch64 platform

[ 76%] Building CXX object src/lib/geogram/CMakeFiles/geogram.dir/basic/process.cpp.o
[ 76%] Building CXX object src/lib/geogram/CMakeFiles/geogram.dir/basic/process_unix.cpp.o
In file included from /mnt/c/nano/git/geogram_1.7.6/src/lib/geogram/basic/thread_sync.h:50:0,
                 from /mnt/c/nano/git/geogram_1.7.6/src/lib/geogram/basic/process.h:50,
                 from /mnt/c/nano/git/geogram_1.7.6/src/lib/geogram/basic/packed_arrays.h:52,
                 from /mnt/c/nano/git/geogram_1.7.6/src/lib/geogram/basic/packed_arrays.cpp:46:
/mnt/c/nano/git/geogram_1.7.6/src/lib/geogram/basic/atomics.h: In member function ‘void GEO::PackedArrays::get_array(GEO::index_t, GEO::index_t*, bool) const’:
/mnt/c/nano/git/geogram_1.7.6/src/lib/geogram/basic/atomics.h:291:6: error: impossible constraint in ‘asm’
     );
      ^
/mnt/c/nano/git/geogram_1.7.6/src/lib/geogram/basic/atomics.h:291:6: error: impossible constraint in ‘asm’
/mnt/c/nano/git/geogram_1.7.6/src/lib/geogram/basic/atomics.h:323:6: error: impossible constraint in ‘asm’
     );
      ^
src/lib/geogram/CMakeFiles/geogram.dir/build.make:290: recipe for target 'src/lib/geogram/CMakeFiles/geogram.dir/basic/packed_arrays.cpp.o' failed
make[2]: *** [src/lib/geogram/CMakeFiles/geogram.dir/basic/packed_arrays.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:1108: recipe for target 'src/lib/geogram/CMakeFiles/geogram.dir/all' failed
make[1]: *** [src/lib/geogram/CMakeFiles/geogram.dir/all] Error 2
Makefile:171: recipe for target 'all' failed
make: *** [all] Error 2

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.