Giter VIP home page Giter VIP logo

libigl's Introduction

libigl's People

Contributors

alecjacobson avatar bruegeln avatar chenming-wu avatar copyme avatar dxyk avatar fwilliams avatar gavinbarill avatar gjacquenot avatar hankstag avatar ikoruk avatar jdumas avatar jiangzhongshi avatar jmespadero avatar josefgraus avatar karlleell avatar kenshi84 avatar lawsonfulton avatar metorm avatar n-taka avatar odedstein avatar olkido avatar qnzhou avatar schuellc avatar skoch9 avatar stefanbrugger avatar stefanmessmer avatar teseoch avatar vfonov avatar xarthurx avatar yig 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  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

libigl's Issues

VS 2013v4 compilation errors when doing tutorials (libigl as per 4/19/2015)

Hi again, so I'm trying my luck on Windows (my virtual Linux machine doesn't allow OpenGL 3 graphics) -- again, just trying to get tutorial to build! Can you help me with one big (?) issue? I'm also reporting various minor things below that are probably without significance.

MAJOR ISSUE: Error ... "term does not evaluate to a function taking 1 arguments..." and two more:

Here Visual Studio barfs, look here:
https://gist.github.com/fusentasticus/7a896030ce5abf105b53

MINOR ISSUE: glfw binaries are not included. My solution: add
${PROJECT_SOURCE_DIR}/../external/glfw/src/Release
${PROJECT_SOURCE_DIR}/../../external/glfw/src/Release
to tutorial/cmake/FindGLFW.cmake in appropriate place, and cmake configure in glfw, and build.

MINOR ISSUE: Example 101 compiles with a million warnings: configuring with

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=" /D GLEW_STATIC" ..

solves that problem for Example 101. But this then results in a macro redefinition in OpenGL_shader.h when building Example 102. Apropos GLEW: it should perhaps be made clear somewhere that GLEW binaries are not needed. Perhaps I just missed it.

MORE MINOR ISSUES WITH VS2013:

  • Warning: ignoring unknown option '-std=c++11'
  • Warning: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc

/Nils

Problem about MIQ

When used miq function, meshes with boundaries will prevent jagged boundary if I don't add round_vertices and hard_features; After I added round_vertices and hard_features, the result is not correct. The output:
�[1;32mNot using externally supplied vertex valences.�[0m
�[43mCollapsing inconsistent edge. Length of he0 = 0, length of he1 = 1.4525e-85
If this happens prior to truncation it's ok. If it happens afterwards, this is a bug.�[0m
�[43mCollapsing inconsistent edge. Length of he0 = 0, length of he1 = 1.4935e-85
If this happens prior to truncation it's ok. If it happens afterwards, this is a bug.�[0m
�[43mCollapsing inconsistent edge. Length of he0 = 0, length of he1 = 1.41951e-85
If this happens prior to truncation it's ok. If it happens afterwards, this is a bug.�[0m
�[43mCollapsing inconsistent edge. Length of he0 = 0, length of he1 = 1.4935e-85
If this happens prior to truncation it's ok. If it happens afterwards, this is a bug.�[0m

However I don't the problem, could you tell me when used MIQ, what should I be care of meshes with boundaries? Thank you very much.

Errors on sparse.cpp

Hi, I got this error on Sparse.cpp:

My VS on windows says:
1 IntelliSense: no instance of overloaded function "igl::sparse" matches the specified type d:\VG_Project\BBW_LIBIGL\BBW_LIBIGL\igl\sparse.cpp 115

Error 8 error C2977: 'igl::sparse' : too many template arguments d:\vg_project\bbw_libigl\bbw_libigl\igl\sparse.cpp 115

Error 9 error C2977: 'igl::sparse' : too many template arguments d:\vg_project\bbw_libigl\bbw_libigl\igl\sparse.cpp 115

I define these preprocessors on my project:
IGL_NO_OPENGL
IGL_NO_ANTTWEAKBAR
IGL_NO_MOSEK
EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET

libigl and Bounded Biharmonic Weights c++ demo [linking to tetgen]

Copied from personal email:

I am trying to build libigl.lib and link it to Bounded Biharmonic Weights c++ demo

Now I can create libigl.lib successfully

but when I try to link it to c++ demo code

it always report

1>main.obj : error LNK2019: unresolved external symbol "void __cdecl tetrahedralize(char *,class tetgenio *,class tetgenio *,class tetgenio *,class tetgenio *)" (?tetrahedralize@@YAXPADPAVtetgenio@@111@Z) referenced in function "int __cdecl igl::tetrahedralize ...

I am very sure I include tetgen.h and tetgen.cxx in my libigl.lib project

Could you kindly give me some advising?

Thank you

Best
D

Seems like it’s not linking to tetgen correctly. Did you make sure to define TETLIBRARY before compiling tetgen.cxx? On mac or linux this would mean adding -DTETLIBRARY to your compilation command.

Thank you so much for your reply

I actually define TETLIBRARY

I use visual studio 2008 on windows

do I need to build lib for tetgen before I build libigl ?

Libigl mesh booleans

From personal email:

I am interested in trying out your Libigl for 3D mesh Boolean. I have tried Cork which does not work (crashes on its supplied sample files in Shewchuk's 2D Triangle code which is unstable according to my previous test despite the original developer's claim).

I have two questions :

  1. Does Libigl use the same 2D Triangle code (my search in the Libigl source code indicates NO, but a confirmation would be reassuring) ?
  2. Libigl's Boolean depends on some GPL-licensed header files from CGAL. Is it possible to remove this dependency?
  3. Do you have a ready to run command line program so that I can run a test with a few of my sample data sets?

Many thanks in advance,

  1. No, it uses CGAL for triangulation.
  2. No, the dependency on CGAL would require severely rewriting a core function. It is possible to do, but I will not do it.
  3. No, but it would be very easy to alter the boolean tutorial example to do that. Basically drop the viewer and change the hardcoded paths to command line arguments and write out the result to an obj.

Sorry for all of the nos. I will say, if you're unhappy with Shewchuk's triangle in terms of robustness, you might just be hard to please. I rarely encounter implementations that even come close to his robustness. I can also attest that cork is not robust (although pretty good as free/open-source libraries go).

We're still developing the boolean library in libigl. There are some known issues, but we (think we) know the solutions.

What is `bc` in the `bbw` function?

Alec: migrated from personal email.

...
Anyway, I'm working on a project that requires some 3D shape deformation and so naturally I came across your BBW code as part of libigl (awesome thing, by the way). I am now integrating it into my own code, but I am not sure about the input parameter 'bc', or rather, what it should contain. At first I thought it should contain, at each row, the translation of the handle point specified in 'b' at that same row. But upon closer examination of the paper and the code I am now doubting this assumption, so I thought I would consult you.

BBW works by first computing weights W in our code. There’s scalar weight function for each “handle” so W is #V by #handles. Then your deformation is computed via “linear blend skinning” (in my demos this is simply a matrix multiplication U = M * T where M is the “lbs matrix” constructed from W (weights) and V (vertices) and T is a stack of the affine transformations at each handle.

But the usual thing is to compute the deformation of each vertex in the vertex shader: u_j = ∑ w_ij T_i * v_j, where u_j is the deformed position of the jth vertex, w_ij is the weight of handle i at vertex j, T_i is the affine transformation applied to handle i and v_j is the rest (original) position of the jth vertex.

OK, now, what are b and bc in the input to my bbw function? Well, b contains a list of indices to all vertices that lie in or on a handle. If your handles are just selected vertices of the mesh then b will just be those vertices, if your handles are selected regions or bones (line segments) then b should contain a list of indices of vertices sampling those regions/bones (the bbw function expects that your mesh already contains vertices at/on your handles and that you have identified them via b and bc: i.e. bbw does not remesh). So b identifies vertices which will receive fixed values, either 1 or 0 depending on which weight function, which column of W. Then bc determines to which handle each entry in b _belongs, to which handle each belongs. That means bc is a #b by #handles matrix, typically bc(i,j) == 1 if b(i) lies in/or handle j and bc(i,j) == 0 otherwise.

You can use my boundary_conditions function to determine b and bc from common handle types.

Eventually, I plan to overload bbw to merge its inputs with boundary_conditions to skip this step. But for now, the typical routine is:

boundary_conditions(V,Ele,C,P,BE,CE,b,bc);
bbw(V,Ele,b,bc,data,W);

Ahh now I understand! I really did confuse the weight computation with the subsequent deformation. So from what you say I also understand that if my handles are just selected vertices, then 'bc' will be a diagonal matrix of size #b x #b (with 1's on the diagonal), is that correct?
In my setting I only have cages (that may be partial) as handles. I plan on computing the convex hull of the cage + underlying mesh and have that be the input to Tetgen, along with the additional requirement to include the rest of the vertices (which have not been fortunate enough to be a part of the convex hull) in the tetrahedralization. Does that make sense as the input to BBW?

Thanks for the super speedy response! :)

error in tutorial 503_ARAPParam & 502_LSCMParam

Hello,

I was just going through the tutoriols you provided, & when trying to run these two:
503_ARAPParam
&
502_LSCMParam

Th program crashes because of a vector out of range.

I am compiling with VS2013, windows 7.

Wireframe, Edges, and Isolated Points

Since the linewidth and pointsize parameters become deprecated in new version of OpenGL, their drawing should be replaced, perhaps with small (and configurable) cylinders for edges\segments and spheres for points, with an interface for the user to control sizes.

libigl error C2719

On 27 Feb 2014, at 20:36, Roch
Hi,

I'm in the process of installing libigl.
It's a very clean library, easy to install as long as Eigen, so congratulations first :p !

I still have a problem. Those kind of codes :

struct State
{
  igl::Camera camera;
} s;

with the following :

std::vector<State> undo_stack;
std::vector<State> redo_stack;

don't compile in VS 2010. I get the following error which seem to be documented but not resolved :

formal parameter with __declspec(align('16')) won't be aligned

Have you ever had this and how did you pass over it ? It seems to be a problem with the VS compiler, so maybe you can recommend to me another windows C++ compiler ?

Regards
Roch


Hi Roch,

thank you for the bug report. I think it is related with SSE, could you try to add this preprocessor directive? EIGEN_DONT_ALIGN

If this solves the issue, then it is a problem of Eigen/VS related to memory alignment. A possible solution is to change your struct by adding a pointer:

struct State
{
  igl::Camera* camera;
} s;

This should allow the compiler to more easily align the memory and get rid of the problem.

Please let me know if it works!
Cheers,
Daniele


I think Daniele is right. Specifically, the problem is that our igl::Camera has Eigen structures as members. I have updated Camera.h to hopefully fix this problem.

@roch, could you please git pull and let us know if this fixes your issue?

@danielepanozzo, I'm adding an todo to comb through the whole libigl and look for Eigen structures as class members and also look for Eigen structures in stl containers.


Hi,

Quick answer : it works, the error is not there anymore, just by adding the preprocessor, thanks !

Anyway I have still problems when I'm trying to make work the libigl\examples\colored-mesh\example.cpp file.

First, for you to know I had to download VS2012, since VS2010 doesn't compile this syntax (from c++11) :

for(auto & s : undo_stack)
{ s.camera.m_aspect = (double)width/(double)height; }

With 2012 it's fine so this is perfect, but I have the remaining four errors I can't remove, maybe it rings a bell for you ?

LNK2001: external symbol unresolved __imp____glewVertexAttrib1d example.obj
LNK2001: external symbol unresolved __imp____glewVertexAttrib2d example.obj
LNK2001: external symbol unresolved __imp____glewVertexAttrib3d example.obj
LNK2001: external symbol unresolved __imp____glewVertexAttrib4d example.obj

It seems to be related to glew32.lib but it's in the "additional library directories" of my project. Curiously no one one the internet seem to have heard of these function. And more suprisingly, it's the only glew function it has problem with... Doyou have any idea ?

Regards,
Roch


I'm not a windows user so I'm not sure about this one. I cced Kenshi with the hope he might recognize this and kindly help us out.
-Alec


Hi Roch,

I'm happy to offer help.

Are you sure you link your program with GLEW?
I see the exact same linker error messages if I don't link against glew32.lib, and they disappear if I do link.
Another possibility is that the .lib file you have is binary-incompatible with VS2012, and you have to download a different one or build it from the source yourself.

Hope this helps,
Kenshi


Hi !

Thanks for your answer. Indeed, it works.
I had put the goood directory "additional librairies" in the properties, but not mentionned glew32.lib directly as I though it would find by itself. I'm a bit lost in all the confinguration process ^^.

Actually now, I have the ReAntTweakBar example which is actually working. But I'm still on my way to make work the colored-mesh example :

I had to fix one part : there was a bug in the part
rebar.load(REBAR_NAME)
since the file doesn't exist at first, so I put in place the following from ReAntTweakBar :

FILE * fp = fopen(REBAR_NAME,"r");
if(fp != NULL)
{  fclose(fp);
  if(rebar.load(REBAR_NAME))
  { printf("ReAntTweakBar reloaded successfully from %s.\n",REBAR_NAME);
    }else{
    printf("ReAntTweakBar failed to load from %s.\n",REBAR_NAME); }
}else{
   printf("%s ReAntTweakBar file does not exist (yet).\n",REBAR_NAME); }

And now this error is resolved.

But I've still an error with this line :

glutInitDisplayString( "rgba depth double samples>=8 ");

which gives me the following error :

GLUT: Fatal Error in LIBIGL TEST.exe: pixel format with necessary capabilities
not found.

As advised on one site, I disabled this line, and no more error, but here's my problem : there's nothing but a blank window showing on my screen. Do you have any advise on those two errors / fact ?

One precision, I'm using the following files since I've not the beast-z.dmat :

string filename = "C:/libigl/examples/shared/decimated-knight.obj";
string cfilename = "C:/libigl/examples/shared/decimated-knight-selection.dmat";

Finally, for you to know, I'm planning to use your lib to implement the recent paper "Geodesic in Heat" as part of on of my Master's project. It consists in solving the heat equation on meshes at a little time to get the distance map. Your lib seems good for it, so if my project is woth it I'll send you the implementation if you're interested. (And maybe do you have an advise about an adapted example to start with from your lib ?)

Regards and thanks again,
Roch


Date: Sun, 2 Mar 2014 12:01:34 +0100

The rebar.load(REBAR_NAME); issue is I guess not such a big deal. If the file is not there it should just return false and proceed.

The problem with glutInitDisplayString seems to be that it's asking too much of your graphics card/opengl implementation. My guess is that it was the samples>=8. Could you try replacing (rather than deleting) that line with:

glutInitDisplayString( "rgba depth double samples>=8 ");

or

glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);

I'm guessing the issue is multi-sampling.

I checked in a beast-xyz.dmat file to shared and changed colored-mesh/example.cpp to use this file by default. You should see those if you pull.

The colored-mesh example seems like a good start for a geodesics in heat example. You could also see the embree example which implements picking (assuming you'll want to pick the point on the mesh from which distances are computed).

Good luck!


Hi,

It works ! Thanks, it was indeed the samples>=8 who was a problem. The beast-xyz.dmat works also works.

Now I can work on my project, I will tell you if I encounter other problems!

Regards,
Roch


Hi, I have one more question :

There's something strange in your cotangent.cpp : the formula you use for computing the cotangents is cotan(A)=(c²+b²-a²)/(4*Area).

However in the cpp file, the code line is (l(i,1)*l(i,1) + l(i,2)*l(i,2) - l(i,0)*l(i,0))/dblA(i)/4.0;

And in this code, dblA is not the area, but the double of the area, given by the double of Heron's formula in the following line :

dblA(i) = 2.0*sqrt(s(i)*(s(i)-l(i,0))*(s(i)-l(i,1))*(s(i)-l(i,2)));

My guess is we should replace the first code line by this :

(l(i,1)*l(i,1) + l(i,2)*l(i,2) - l(i,0)*l(i,0))/dblA(i)/2.0;

What do you think ?

Regards,

Roch

Date: Mon, 3 Mar 2014 15:21:53 +0100

Odd issue in tutorials (windows VS 2013)

Hi, I'm new using libigl. I downloaded the source 4 days ago and the Eigen library version 3.2.2. In order to understand the libigl's mesh deformation algorithms, I created with CMake a VS 2013 x64 tutorial solution. But when I run the tutorial 402_PolyharmonicDeformation_bin the figure in the window doesn’t look like the image in the tutorial page, the gold region doesn’t appear. When I tried others tutorials, the simplest works. But for example in the 205_Laplacian_bin, when I press the space the cow disappears.
I tried this in two different PCs and I got the same problem. I think that it’s something that I’m doing wrong. Maybe there is something wrong with the calculations, I got these console output for the 205_Laplacian_bin tutorial:
|K-L|: 1.#QNAN
Press [space] to smooth.
Press [r] to reset.
Status: Using GLEW 1.10.0
ERROR(AntTweakBar) >> Bad value
ERROR(AntTweakBar) >> Unable to set param 'libIGL-Viewer size' : Bad value

Maybe there is something wrong with Eigen, I searched and found this:
http://stackoverflow.com/questions/26013205/eigen-what-is-the-computational-limitation-for-log-windows-vs-linux. The post says: I have a strange problem with my Eigen code. It works well on Linux (64 bit) and Mac OSX (64 bit), but it fails on Windows (32 bit) with an 1.#INF value.

The result of mesh boolean is not "neat"

Hi,
recently I used the mesh boolean operations to combine some .obj files. But I found that the resulted mesh of "union" had some unexpected triangles.
In my case, the resulted mesh had a weird triangle which just connected with a single neighbor triangle.
The below image shows the conjunction of two meshes:
2015-04-14 14 48 53
And the weird triangle (marked using red color):
2015-04-14 14 49 37
2015-04-14 14 49 44
Just one edge of the triangle is connected with others, and the remians are floating.

I wonder if this is a bug or something?

A question about the dependencies of libigl

Copied from private email:

Hi, Alec,
I want to use the amazing libigl for our work. This project has only flew dependencies only with Eigen lib. However, I find this project need to include the mosek.h file in the mosek_guarded.h file. Does this project depends on mosek? If this file is need, how can get this file? Thanks in advance for your reply!

Sincerely,
K

Everything in libigl works as header only, so the static lib is purely optional. The dependencies for anything directly in the include/igl folder are really just stl, eigen and opengl. The subdirectories are organized by additional dependencies. For example, the include/igl/mosek/* functions depend on mosek a quadratic programming solver (free to academics).

Which functions are you trying to use?
-A

I run the example in libigl-master\tutorial\403_BoundedBiharmonicWeights\main.cpp
It depends on the mosek. Can I run the example successfully without using the mosek? Thanks!

example makefiles ignore global Makefile.conf configuration variables

It appears that most of the makefiles in the example folder only take into account some of the variables defined in Makefile.conf, thus leading to compilation errors when building the examples.

For instance, my makefile.conf states
EIGEN3_INC=-I$(DEFAULT_PREFIX)/libs/eigen324/

but the examples makefiles proceed to ignore this folder and force the Eigen include directory to
eigen=$(DEFAULT_PREFIX)/include/eigen3 which obviously doesn't exist on my configuration.

I suggest that these makefiles use the global Makefile.conf variables wherever possible.

Error in compilation LIBIGL

error LNK1120: 17 unresolved externals
error LNK2001: unresolved external symbol "public: virtual bool __thiscall CTwGraphOpenGLCore::IsDrawing(void)" (?IsDrawing@CTwGraphOpenGLCore@@UAE_NXZ)
error LNK2001: unresolved external symbol "public: virtual void * __thiscall CTwGraphOpenGLCore::NewTextObj(void)"
error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::BuildText(void *,class std::basic_string<char,struct std::char_traits,class std::allocator > const *,unsigned int *,unsigned int *,int,struct CTexFont const *,int,int)"
error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::ChangeViewport(int,int,int,int,int,int)"
error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DeleteTextObj(void *)"
error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DrawLine(int,int,int,int,unsigned int,unsigned int,bool)"
error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DrawRect(int,int,int,int,unsigned int,unsigned int,unsigned int,unsigned int)"
error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DrawTriangles(int,int *,unsigned int *,enum ITwGraph::Cull)"
error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::Restore(void)"
error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::RestoreViewport(void)"
error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::SetScissor(int,int,int,int)"
error LNK2001: unresolved external symbol "struct CTexFont * g_DefaultNormalFont"
error LNK2019: unresolved external symbol "public: virtual int __thiscall CTwGraphOpenGLCore::Init(void)" (?Init@CTwGraphOpenGLCore@@UAEHXZ) referenced in function "public: virtual int __thiscall igl::TextRenderer::Init(void)"
error LNK2019: unresolved external symbol "public: virtual int __thiscall CTwGraphOpenGLCore::Shut(void)" (?Shut@CTwGraphOpenGLCore@@UAEHXZ) referenced in function "public: virtual int __thiscall igl::TextRenderer::Shut(void)"
error LNK2019: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::BeginDraw(int,int)" (?BeginDraw@CTwGraphOpenGLCore@@UAEXHH@Z) referenced in function "public: void __thiscall igl::TextRenderer::BeginDraw(class Eigen::Matrix<float,4,4,0,4,4> const &,class Eigen::Matrix<float,4,4,0,4,4> const &,class Eigen::Matrix<float,4,1,0,4,1> const &,float)"
error LNK2019: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DrawText(void *,int,int,unsigned int,unsigned int)" (?DrawText@CTwGraphOpenGLCore@@UAEXPAXHHII@Z) referenced in function "public: void __thiscall igl::TextRenderer::DrawText(class Eigen::Matrix<double,3,1,0,3,1>,class Eigen::Matrix<double,3,1,0,3,1>,class std::basic_string<char,struct std::char_traits,class std::allocator > const &)"
error LNK2019: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::EndDraw(void)" (?EndDraw@CTwGraphOpenGLCore@@UAEXXZ) referenced in function "public: virtual void __thiscall igl::TextRenderer::EndDraw(void)"

Merge two meshes

Hi, I'd like to merge two 3D meshes into one. I used remesh_self_intersections(V, F, params, SV, SF, IF, J, IM) to compute self intersections successfully, but I don't know how to discard triangles from one surface inside the other. How to do it with igl?
Thanks for your help!

readSTL() sometimes treat binary format file as ASCII's

The current way to detect whether a STL mesh file is in ASCII or binary format is to check the first 5 bytes of the file. If those bytes are the ASCII codes of "solid", it is treated as ASCII format.

Some binary format files however, for some reason, put "73 6f 6c 69 64" at the beginning of file, these magic bytes are the ASCII codes of "solid", so those files will be recognized as ASCII format, causing "IOError: "<<filename<<" bad format (1)" while loading.

Obviously we need an additional way to check the format of a STL file.

VS 2013 tutorial 201

Hi

I am trying to work with libigl. I could run the first example FileIO but in the second I get some errores when I try to build my solution.

I did:

  • Additional include directories
    • external\glew\include
    • external\AntTweakBar\src
    • external\glfw\include
    • external\AntTweakBar\include
    • eigen-eigen-6b38706d90a9
    • \libigl\include
  • AdditionalLibraryDirectories
    • external\glfw\lib\x64
    • external\AntTweakBar\lib
  • AdditionalDependencies
    • AntTweakBar.lib
    • glfw3.lib

My errors are:

  • Error 44 error C2440: '=' : cannot convert from 'char *' to 'LPWSTR' c:\users\samuel\downloads\libigl-master\libigl-master\include\igl\file_dialog_open.cpp 49 1 test
  • Error 45 error C2440: '=' : cannot convert from 'const char [5]' to 'LPCWSTR' c:\users\samuel\downloads\libigl-master\libigl-master\include\igl\file_dialog_open.cpp 54 1 test
  • Error 46 error C2440: '=' : cannot convert from 'char *' to 'LPWSTR' c:\users\samuel\downloads\libigl-master\libigl-master\include\igl\file_dialog_save.cpp 51 1 test
  • Error 47 error C2440: '=' : cannot convert from 'const char [1]' to 'LPCWSTR' c:\users\samuel\downloads\libigl-master\libigl-master\include\igl\file_dialog_save.cpp 56 1 test

kind regards and thanks a lot

how to design a rosy field?

In other apps I have seen the the user is asked to specify singularities , and the then the rosy field is generated. But in libigl It seems like you have specify to faces and direction vectors to design a field.

Unfortunately I dont understand what that direction vector means or what coordinate space the vector it is in. Can anyone please help me thanks 😄. Is it possible to specify singularities?

warning: using integer absolute value function 'abs' when argument is of floating point type

I am receiving warnings when compiling the tutorials, which might not cause any problems, but allow me to commit a fix anyway.

Inside the trackball.cpp my compiler complains that abs is used with floating point input, where you probably want to use std::abs.

Maybe the cast to int is intended here, but it should then be done explicitly. Otherwise, please feel free to merge my pull request.

Error in make skinning

I am interested in the paper Fast Automatic Skinning Transformations.Then I download all the material in the project page(http://igl.ethz.ch/projects/fast/) , install all the library and dependence in the README file which unzip from skinning.zip.
At last I use the command 'make' to compile the sources , but it was failed.
Information shows that Class igl::Camera has no member 'rotation' .
Then I look up in to the libigl/include/igl/Camera.cpp , found that there is no 'rotation' in Class Camera, how should I fix it ?

resize callback

The users should have a resize callback in order to re-arrange their parameters (e.g., new bars).

2D reduction

The viewer should identify 2D files (by seeing z=0) and reducing accordingly: the shading should be flatter, and the rotations and translations etc. should be restricted to the z axis.

error R6010

I'm getting an abort() called on the tutorials now since the latest github commits...

I'm using VS2013, win 7, compiling x64. it crashes in debug & release.

Refactoring external dependencies as separate repositories.

I would like to advocate the use of separate github repositories for your external dependencies (AntTweakBar, glew, glfw, triangle, etc). It might make things more complicated from the look of it, but this way it would be possible to back port your fixes to the original repositories (if they are still being maintained). I would highly recommend using git submodules to pull these dependencies back into your library - this way your current folder structure could very much stay intact - you would "just" have to create these external repositories and then setup the submodules.

For example, you will find a few AntTweakBar repositories on github already and right now it is very difficult to merge other fixes into your code.

PS: I assume you don't have the time for it, but maybe it could go onto the todo list :)

VS 2012 viewer build (Windows 8.1)

First off, running cmake on individual tutorial examples works for me on my machine, for examples including a viewer (yay!). This issue relates to trying to use the libigl viewer functionality in a separate project.

Build is successful when I include the header igl/viewer/Viewer.h but upon declaring a viewer

igl::Viewer viewer;

I receive a long list of "unresolved external" errors (copied at the bottom of this post). Some relevant Project Properties are

  • Additional Include Directories:
    • external/AntTweakBar/include
    • external/AntTweakBar/src
    • external/glfw/include
    • external/glfw/src
    • external/glew/include
    • external/glew/src
    • libigl/include
    • eigen-eigen-10219c95fe65
  • Additional Library Directories:
    • external/AntTweakBar/lib
    • external/glfw/lib/x64
  • Additional Dependencies:
    • AntTweakBar64.lib
    • glfw3.lib

Pretty clearly, the bottom group of errors is related to glew, and indeed the tutorial examples that cmake built successfully on my machine (including working viewer) added glew.c to the project source code. There seem to be precompiled binaries for AntTweakBar and glfw but not for glew -- so I guess the project must build glew somehow? I'm not sure how to do that.

Thanks a bunch. Here are the errors:

1>main.obj : error LNK2019: unresolved external symbol __imp__glDepthMask@4 referenced in function "public: virtual void __thiscall igl::TextRenderer::EndDraw(void)" (?EndDraw@TextRenderer@igl@@UAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual int __thiscall CTwGraphOpenGLCore::Init(void)" (_imp?Init@CTwGraphOpenGLCore@@UAEHXZ) referenced in function "public: virtual int __thiscall igl::TextRenderer::Init(void)" (?Init@TextRenderer@igl@@UAEHXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual int __thiscall CTwGraphOpenGLCore::Shut(void)" (_imp?Shut@CTwGraphOpenGLCore@@UAEHXZ) referenced in function "public: virtual int __thiscall igl::TextRenderer::Shut(void)" (?Shut@TextRenderer@igl@@UAEHXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall CTwGraphOpenGLCore::EndDraw(void)" (_imp?EndDraw@CTwGraphOpenGLCore@@UAEXXZ) referenced in function "public: virtual void __thiscall igl::TextRenderer::EndDraw(void)" (?EndDraw@TextRenderer@igl@@UAEXXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::BeginDraw(int,int)" (?BeginDraw@CTwGraphOpenGLCore@@UAEXHH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::BuildText(void *,class std::basic_string<char,struct std::char_traits,class std::allocator > const *,unsigned int *,unsigned int *,int,struct CTexFont const *,int,int)" (?BuildText@CTwGraphOpenGLCore@@UAEXPAXPBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@PAI2HPBUCTexFont@@hh@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::ChangeViewport(int,int,int,int,int,int)" (?ChangeViewport@CTwGraphOpenGLCore@@UAEXHHHHHH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DeleteTextObj(void *)" (?DeleteTextObj@CTwGraphOpenGLCore@@UAEXPAX@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DrawLine(int,int,int,int,unsigned int,unsigned int,bool)" (?DrawLine@CTwGraphOpenGLCore@@UAEXHHHHII_N@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DrawLine(int,int,int,int,unsigned int,bool)" (?DrawLine@CTwGraphOpenGLCore@@UAEXHHHHI_N@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DrawRect(int,int,int,int,unsigned int)" (?DrawRect@CTwGraphOpenGLCore@@UAEXHHHHI@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DrawRect(int,int,int,int,unsigned int,unsigned int,unsigned int,unsigned int)" (?DrawRect@CTwGraphOpenGLCore@@UAEXHHHHIIII@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DrawText(void *,int,int,unsigned int,unsigned int)" (?DrawText@CTwGraphOpenGLCore@@UAEXPAXHHII@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DrawTriangles(int,int *,unsigned int *,enum ITwGraph::Cull)" (?DrawTriangles@CTwGraphOpenGLCore@@UAEXHPAHPAIW4Cull@ITwGraph@@@z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::EndDraw(void)" (?EndDraw@CTwGraphOpenGLCore@@UAEXXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CTwGraphOpenGLCore::Init(void)" (?Init@CTwGraphOpenGLCore@@UAEHXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CTwGraphOpenGLCore::IsDrawing(void)" (?IsDrawing@CTwGraphOpenGLCore@@UAE_NXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall CTwGraphOpenGLCore::NewTextObj(void)" (?NewTextObj@CTwGraphOpenGLCore@@UAEPAXXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::Restore(void)" (?Restore@CTwGraphOpenGLCore@@UAEXXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::RestoreViewport(void)" (?RestoreViewport@CTwGraphOpenGLCore@@UAEXXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::SetScissor(int,int,int,int)" (?SetScissor@CTwGraphOpenGLCore@@UAEXHHHH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CTwGraphOpenGLCore::Shut(void)" (?Shut@CTwGraphOpenGLCore@@UAEHXZ)
1>main.obj : error LNK2001: unresolved external symbol ___glewAttachShader
1>main.obj : error LNK2001: unresolved external symbol ___glewBindAttribLocation
1>main.obj : error LNK2001: unresolved external symbol ___glewCompileShader
1>main.obj : error LNK2001: unresolved external symbol ___glewCreateProgram
1>main.obj : error LNK2001: unresolved external symbol ___glewCreateShader
1>main.obj : error LNK2001: unresolved external symbol ___glewDeleteProgram
1>main.obj : error LNK2001: unresolved external symbol ___glewDeleteShader
1>main.obj : error LNK2001: unresolved external symbol ___glewGetProgramInfoLog
1>main.obj : error LNK2001: unresolved external symbol ___glewGetProgramiv
1>main.obj : error LNK2001: unresolved external symbol ___glewGetShaderInfoLog
1>main.obj : error LNK2001: unresolved external symbol ___glewGetShaderiv
1>main.obj : error LNK2001: unresolved external symbol ___glewGetUniformLocation
1>main.obj : error LNK2001: unresolved external symbol ___glewLinkProgram
1>main.obj : error LNK2001: unresolved external symbol ___glewShaderSource
1>main.obj : error LNK2001: unresolved external symbol ___glewBindFragDataLocation
1>main.obj : error LNK2001: unresolved external symbol ___glewProgramParameteri
1>C:\Users\Cap\Documents\Visual Studio 2012\Projects\libiglTemplate4\Debug\libiglTemplate4.exe : fatal error LNK1120: 38 unresolved externals

Wrong include in project_to_line_segment.h

The include in project_to_line_segment.h should refer to project_to_line_segment.cpp instead of project_to_line.cpp:

ifdef IGL_HEADER_ONLY
#  include "project_to_line.cpp"
#endif

correct would be:

ifdef IGL_HEADER_ONLY
#  include "project_to_line_segment.cpp"
#endif

API of IGL and other things

Alec: I've migrated this question from a personal email...

I took Olga’s course three years ago when I started my PhD and it was awesome!!! I learned how to use the IGL library during the course and I am happy it is released to public recently. It is a really nice library and will draw a lot of attention in the next few years.

Recently, I start to work on mesh editing for my own work and try to use the library again. However, the API of the library is not clear to me. For example, I implemented something that has already in the library, but I did not know it. It would be very cool if there were a table, telling users what has been implemented in the library and its functional. I am pretty sure a lot of people need this.

I also have following questions, for which I need your help:

  1. I want to show some property of the vertex. The property should not be related with surface (triangle). But when I used the viewer.data.set_colors(RGB), it automatically interpolates to the mesh. Is it possible to show the property of vertex with small colored balls, without affecting the color of the mesh? Like scatter3 in Matlab.
  2. How could I turn off the edge color? It seems that there is always edge color. Sometimes, I just want to see the smooth surface without seeing the edges.

Thank you for your help and looking forward to hearing any solution!

Working with VStudio 2013. Execution error. ARAP Mesh parametrization functions.

Hi,
I'm testing mesh parametrization tools of LIBIGL. I have developed a simple VStudio 2013 project and I have tested some examples, but when I execute this code program crashes ¿?

Error: assetion failed: dblA(i) == dblA(i) && "DOUBLEAREA() PRODUCED NaN", file ...doublearea.cpp, line 151
crash

This the code:

// I have tested different geometry files with equal result...

include "stdafx.h"

include

include <igl/readOFF.h>

include <igl/writeOFF.h>

include <igl/readOBJ.h>

include <igl/writeOBJ.h>

include <igl/boundary_loop.h>

include <igl/map_vertices_to_circle.h>

include <igl/harmonic.h>

include <igl/svd3x3/arap.h>

int _tmain(int argc, _TCHAR* argv[])
{
using namespace std;

char p;

Eigen::MatrixXd V;
Eigen::MatrixXi F;
Eigen::MatrixXd V_uv;
Eigen::MatrixXd initial_guess;

// Load a mesh in OFF format
//igl::readOBJ("c:\\temp\\1.obj", V, F);
igl::readOFF("c:\\temp\\1.off", V, F);

cout << V.count() << "-" << F.count() << "\n";
cout << "File Readed!!!" << "\n";

// Compute the initial solution for ARAP (harmonic parametrization)
Eigen::VectorXi bnd;
igl::boundary_loop(F, bnd);
cout << bnd.count( ) << "\n";
cout << "I'm here 1!!!" << "\n";

Eigen::MatrixXd bnd_uv;
igl::map_vertices_to_circle(V, bnd, bnd_uv);
cout << bnd_uv.count() << "\n";
cout << "I'm here 2!!!" << "\n";

igl::harmonic(V, F, bnd, bnd_uv, 2, initial_guess);
cout << "Initial solution computed!!!" << "\n";

// Add dynamic regularization to avoid to specify boundary conditions
igl::ARAPData arap_data;
arap_data.with_dynamics = true;
Eigen::VectorXi b = Eigen::VectorXi::Zero(0);
Eigen::MatrixXd bc = Eigen::MatrixXd::Zero(0, 0);

// Initialize ARAP
arap_data.max_iter = 100;
// 2 means that we're going to *solve* in 2d
arap_precomputation(V, F, 2, b, arap_data);
cout << "I'm here 3!!!" << "\n";

// Solve arap using the harmonic map as initial guess
V_uv = initial_guess;

arap_solve(bc, arap_data, V_uv);
cout << "Flattening done!!!" << "\n";

// Scale UV to make the texture more clear
//V_uv *= 20;

//igl::writeOBJ("flat.obj", V_uv, F);
cout << V_uv.count() << "-" << F.count() << "\n";
igl::writeOFF("flat.off", V_uv, F);

cout << "Saved!!!";

cin >> p;

}

Linking Error

While compiling libigl tutorial on Ubuntu 14.04 two libraries were missing. Namely, -lXcursor -lXinerama.

Fixed by adding them to libigl/tutorial/CMakeLists.shared

set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -lGL -lGLU -lrt -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lXcursor -lXinerama")

Errors when compling tutorial 102

Hi, I try to run tutorial 102 but was stuck with some errors:

Error 3 error LNK2019: unresolved external symbol __imp__glBindTexture@8 referenced in function "public: void __thiscall igl::OpenGL_state::bind_mesh(void)" (?bind_mesh@OpenGL_state@igl@@QAEXXZ) D:\Projects\registration\registration\main.obj

I have set the project path (additional include dirs, additional lib dirs, additional dependencies) and I'm not sure what else to do to solve the problem. Anyone can give me some suggestion?
BTW, tutorial 101 works just fine.
Thanks a lot!

Windows + gcc won't compile hello.cpp

From personal email:

I'm trying to use your libigl library. When I try to compile the hello.cpp example from the tutorial (using gcc in Windows Vista), I'm getting a long list of errors mostly along the lines of

"ISO C++ forbids declaration of ... with no type"

If I comment out the parts of the program using igl but keep the parts using Eigen, it works fine. Also, I get the same error messages merely trying to include the <igl/cotmatrix.h> but commenting out the code that uses it.

If you've got no quick/easy answer for me, then please don't worry about it. I'm just hoping maybe you've encountered my problem and there's an easy troubleshoot. If not, no worries. Thanks for making libigl available!

compilation problem in windows+matlab+cgal

Hi again,

As I am now looking to use the mesh_boolean capabilities, I have set up CGAL and its dependencies (hopefully), and dangerously proceeded to attempt to compile my mex file in the following way:

mex -O -DIGL_HEADER_ONLY ...
    -ID:\noa\igl\libigl-master\include\ ...
    -ID:\noa\igl\libigl-master\include\igl\boolean\ ...
    -ID:\noa\igl\eigen3 ...
    -ID:\noa\igl\eigen3\unsupported ...
    -ID:\boost_1_57_0 ...
    -I"C:\Program Files\CGAL-4.5.1\include" ...
    -I"C:\Program Files\CGAL-4.5.1\build\include" ...
    -L"C:\Program Files\CGAL-4.5.1\build\lib" -lCGAL_Core-vc100-mt-4.5.1 ...
    -I"C:\Program Files\CGAL-4.5.1\auxiliary\gmp\include" ...
    mesh_boolean_mex.cpp

I am then getting the following errors, preceded by a seemingly relevant warning:

d:\noa\igl\libigl-master\include\igl\cgal\SelfIntersectMesh.h(217) : warning C4346:
'igl::SelfIntersectMesh<Kernel,DerivedV,DerivedF,DerivedVV,DerivedFF,DerivedIF,DerivedJ,DerivedIM>::Box' : dependent
name is not a type
        prefix with 'typename' to indicate a type
        d:\noa\igl\libigl-master\include\igl\cgal\SelfIntersectMesh.h(219) : see reference to class template
        instantiation
        'igl::SelfIntersectMesh<Kernel,DerivedV,DerivedF,DerivedVV,DerivedFF,DerivedIF,DerivedJ,DerivedIM>' being
        compiled

d:\noa\igl\libigl-master\include\igl\cgal\SelfIntersectMesh.h(217) : error C2061: syntax error : identifier 'Box'

d:\noa\igl\libigl-master\include\igl\cgal\SelfIntersectMesh.h(286) : error C2244:
'igl::SelfIntersectMesh<Kernel,DerivedV,DerivedF,DerivedVV,DerivedFF,DerivedIF,DerivedJ,DerivedIM>::box_intersect' :
unable to match function definition to an existing declaration
        definition
        'void
        igl::SelfIntersectMesh<Kernel,DerivedV,DerivedF,DerivedVV,DerivedFF,DerivedIF,DerivedJ,DerivedIM>::box_intersect(igl::SelfIntersectMesh<Kernel,DerivedV,DerivedF,DerivedVV,DerivedFF,DerivedIF,DerivedJ,DerivedIM>
        *,const SelfIntersectMesh<Kernel,DerivedV,DerivedF,DerivedVV,DerivedFF,DerivedIF,DerivedJ,DerivedIM>::Box
        &,const SelfIntersectMesh<Kernel,DerivedV,DerivedF,DerivedVV,DerivedFF,DerivedIF,DerivedJ,DerivedIM>::Box &)'
        existing declarations
        'void
        igl::SelfIntersectMesh<Kernel,DerivedV,DerivedF,DerivedVV,DerivedFF,DerivedIF,DerivedJ,DerivedIM>::box_intersect(igl::SelfIntersectMesh<Kernel,DerivedV,DerivedF,DerivedVV,DerivedFF,DerivedIF,DerivedJ,DerivedIM>
        *)'
        'void
        igl::SelfIntersectMesh<Kernel,DerivedV,DerivedF,DerivedVV,DerivedFF,DerivedIF,DerivedJ,DerivedIM>::box_intersect(const
        CGAL::Box_intersection_d::Box_with_handle_d<double,3,vector<CGAL::Triangle_3<R_>>::iterator> &,const
        CGAL::Box_intersection_d::Box_with_handle_d<double,3,vector<CGAL::Triangle_3<R_>>::iterator> &)'

I suspect it's a compiler issue, since I tried compiling it in Linux and did not have this problem. However, since the CGAL process for Linux is different (and consequently also the mex command that I used), it may also be some CGAL component (or dependency) that I am missing in Windows.
Any ideas?

principal curvature crash

principal_curvature crashes when the radius is set to 1. I'm using Visual Studio 2008.
Also, it would be very nice to have the crease lines computed by the principal_curvature method, as described in the "Efficient Multi-scale Curvature and Crease Estimation" paper.

Python support.

It's not christmas, yet and easter just pasted, but I wish to see support for a Python interface to run libigl not only through C. It might actually not be too difficult to realize and could mostly be generate automatically. I might try to get something setup, if you guys agree that Cython is the way to go here?

Example 102_DrawMesh in Cygwin on Vista, error and (possible) fix

In the process of trying to compile this example (no success yet), I got two similar errors that I was able to eliminate with a small change to each of the files "file_dialog_open.cpp" and "file_dialog_save.cpp".

Should I describe the errors and the changes here or should I do the Fork and Pull Request thing? (Sorry I'm still new to GitHub).

Undefined symbols: CTwGraphOpenGLCore

Mac + Qt creator, used the anttweakbar version embedded in libigl/external. But I got errors:

Undefined symbols for architecture x86_64:
"CTwGraphOpenGLCore::BuildText(void_, std::__1::basic_string<char, std::_1::char_traits, std::1::allocator > const, unsigned int, unsigned int, int, CTexFont const*, int, int)", referenced from:
vtable for igl::TextRenderer in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

topology operations for mesh

It will be perfect to add the function of basic topology operations (such as split, flips, collapse, et. al) for mesh.

Reading ASCII STL into float fails

readSTL is templated for different scalar types, but it uses fscanf instead of C++ IO and hardcodes %lg which requires pointers to doubles.

Can be solved many ways, like switching to C++ IO, or reading into temporary doubles and assigning back to TypeV, TypeN, etc. Could also assume either float or double and switch format strings based on size.

If you read an ASCII STL into floats with the current code it's corrupting memory (writing a double into float storage) and returning the wrong values (all zeros in the one case I tried, but it was a unit cube).

505_MIQ tutorial generates poor results for a simple model

I have a simple model that generates poor global texture parameterization in the tutorial sample 505_MIQ. It is obvious in the viewer. The texture coordinate area is zero or near zero for several triangles.

II have attached the model in OBJ format by adding ".jpg" to the extension. Under the front left leg, you can see the distortion. You will need to change readOFF to readOBJ, but that should be the only change required.

cow mtl
cow obj

http://www.inf.ethz.ch/personal/dpanozzo/libigl_tutorial/505_MIQ/main.cpp

AntTweakBar: OpenGL Core Profile functions cannot be loaded.

Let me first say that I would like to use the "original" AntTweakBar version, which I installed through homebrew. If you think this is not a good idea, please share your thoughts.

I am compiling some of the tutorials and received this error from AntTweakBar:

AntTweakBar: OpenGL Core Profile functions cannot be loaded.
ERROR(AntTweakBar) >> Cannot load OpenGL library dynamically

It is apparently due to the OpenGL library not being found and can be fixed manually by adding the path to your OpenGL library to your linker path. In my case under Mac OS X this can be accomplished like this:

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/System/Library/Frameworks/OpenGL.framework/Versions/Current/

However, it may be a good idea to include the OpenGL lib path into the link_directories in your CMakeLists.shared file.

Credit for this blog-post to point me into the right direction: http://www.pixelnerve.com/v/2015/01/22/anttweakbar-with-core-gl-osx

Can't compile in Linux

When compiled in Linux, it there is option "-framework OpenGL" for g++ which should only appear in Mac OS

Does libigl have any remeshing modules?

Hello, I see that it can generate N-rosy fields, but is it possible to remesh based on the rosy field?
If not can anyone point me to another library or source code that can. Thanks.

Question about curvature.cpp class

Copied from personal email:

I have a question about the curvature.cpp class (source: https://github.com/libigl/libigl/blob/master/examples/principal_curvature/curvature.cpp). I hope that you, as the author of this file, are the appropriate person to contact. Is there any documentation for the curvature computation? I would be interested to know which attributes are saved to the output file. I assume that the first two columns are the principal curvatures?

Thanks,

M

Getting libigl working on windows [trouble with AntTweakBar libs]

Alec: migrating this from personal email...

I'm having trouble getting libigl to work on windows.
I can get the header-only features working, i'm having problem with the dependencies - in particular, with AntTweakBar. Using the available pre-compiled binaries of AntTweakBar, and linking only the include/AntTweakBar.h and AntTweakBar.lib (with its .dll), I get:

1>Projects\Research\Include\igl/viewer/TextRenderer.h(17): fatal error C1083: Cannot open include file: 'TwOpenGLCore.h': No such file or directory

... so if I copy the src of the AntTweakBar (which contains TwOpenGLCore.h) to my includes directory, I get linker errors:

Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::SetScissor(int,int,int,int)" (?SetScissor@CTwGraphOpenGLCore@@UAEXHHHH@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::RestoreViewport(void)" (?RestoreViewport@CTwGraphOpenGLCore@@UAEXXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::ChangeViewport(int,int,int,int,int,int)" (?ChangeViewport@CTwGraphOpenGLCore@@UAEXHHHHHH@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DrawText(void *,int,int,unsigned int,unsigned int)" (?DrawText@CTwGraphOpenGLCore@@UAEXPAXHHII@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::BuildText(void *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const *,unsigned int *,unsigned int *,int,struct CTexFont const *,int,int)" (?BuildText@CTwGraphOpenGLCore@@UAEXPAXPBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAI2HPBUCTexFont@@HH@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DeleteTextObj(void *)" (?DeleteTextObj@CTwGraphOpenGLCore@@UAEXPAX@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall CTwGraphOpenGLCore::NewTextObj(void)" (?NewTextObj@CTwGraphOpenGLCore@@UAEPAXXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DrawTriangles(int,int *,unsigned int *,enum ITwGraph::Cull)" (?DrawTriangles@CTwGraphOpenGLCore@@UAEXHPAHPAIW4Cull@ITwGraph@@@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DrawRect(int,int,int,int,unsigned int,unsigned int,unsigned int,unsigned int)" (?DrawRect@CTwGraphOpenGLCore@@UAEXHHHHIIII@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::DrawLine(int,int,int,int,unsigned int,unsigned int,bool)" (?DrawLine@CTwGraphOpenGLCore@@UAEXHHHHII_N@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::Restore(void)" (?Restore@CTwGraphOpenGLCore@@UAEXXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CTwGraphOpenGLCore::IsDrawing(void)" (?IsDrawing@CTwGraphOpenGLCore@@UAE_NXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::EndDraw(void)" (?EndDraw@CTwGraphOpenGLCore@@UAEXXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CTwGraphOpenGLCore::BeginDraw(int,int)" (?BeginDraw@CTwGraphOpenGLCore@@UAEXHH@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CTwGraphOpenGLCore::Shut(void)" (?Shut@CTwGraphOpenGLCore@@UAEHXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CTwGraphOpenGLCore::Init(void)" (?Init@CTwGraphOpenGLCore@@UAEHXZ)
1>Source.obj : error LNK2001: unresolved external symbol "struct CTexFont * g_DefaultNormalFont" (?g_DefaultNormalFont@@3PAUCTexFont@@A)
1>Projects\Research\Release\Research.exe : fatal error LNK1120: 17 unresolved externals

I'm not sure what to do at this stage, please let me know if you know what i'm doing wrong. Otherwise it'd be great if someone your end could provide static windows builds of libig!

problem with principal curvatures

Hi,

first off, thanks for making this libary public.
I am having a problem with igl::principal_curvature using the code provided in example 203 and the attached model http://goo.gl/ZGTruh. I am getting an output of very small and all the same numbers (4.8367*10^26).
I am working with visual studio 2012.

Any idea what I am doing wrong?

Thanks

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.