Closed Dacastror closed 6 years ago
Did you take a look at the examples provided with this project?
Yes, but I can not understand them, could you give me a simple example?
Well, then lets start there:
If you want to use the new C API, take a look at triangle_api.h. If you want to compile against the static library, take a look at triangle_api.c and see how to work with the original code. Then tell me, what you don't understand.
Hi, I'm getting an error like this:
Error LNK2019 unresolved external symbol triangulate referenced in function "void __cdecl igl::triangle::triangulate<class Eigen::Matrix<double,-1,-1,0,-1,-1>,class Eigen::...
I am using the files of: https://github.com/libigl/triangle
and I add the folder to the project. I do not know how to use cmake in Visual Studio, I just select "build solution", am I doing something wrong?
I'm a little bit confused now: https://github.com/libigl/triangle is not related to this project in any way.
If you are using the code from this project, the error message makes sense, since the main triangulate
function was removed (which is clearly stated in the changes section).
I'm in a similar situation: I have a project using (original) triangle-1.6, and want to use your version instead.
Can you give a rough porting guide? Obviously, triangulate() is gone, and it seems that struct triangulateio is now called triangleio_t. I didn't see a replacement function, though...
On a related note: is it possible to use triangle.h / the code in the Triangle directory on its own? Or do I need to use triangle-api.h from the examples directory?
The replacement would be triangle_mesh_create in triangle_api.c.
See my comment above. If you don't want to use the new api, just take a look at the implementation of this function.
@wo80 Thanks for the pointer -- I'll take a look at it. It's not that I don't want to use the new api. It's just that I am/was unsure how everything fits together. On a related note, the naming of "example" for the folder containing the new api did nothing to inspire any faith in its completeness and usability ;-)
Hi all, I want to ask how to call a Triangle as a library from another code in c++. I'm using Vsual Studio 2015. My second step is to make it work from the libigl library but for now I'm satisfied with being able to use it alone. I would like to see an example in which a Triangle is called from c++ to triangulate some polygon. In advance I appreciate your help.
(I use google translator, sorry for the translation errors)