Mesh editing CGAL routines in C++

Everything else that doesn't fall into one of the other PB categories.
marc_256
Addict
Addict
Posts: 862
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Mesh editing CGAL routines in C++

Post by marc_256 »

For my mesh editor,
I like to use the CGAL (www.cgal.org) math routines.

Is there someone who have tested the CGAL math routines ?

I never did some stuff, but is is possible to use C++ routines in PB 5.21 ?

Thanks,
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
User avatar
idle
Always Here
Always Here
Posts: 6238
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Mesh editing CGAL routines in C++

Post by idle »

I don't think it'd be doable from the headers I looked at.
There are limitations on what native c++ libs can be used from PB
constructors need to be declared as extern c
and classes have to be exported as pure virtual functions
additionally x86 requires a fasm hack to work via PB Interfaces since thiscall isn't supported
but x64 is ok since it's all fastcall
Windows 11, Manjaro, Raspberry Pi OS
Image
marc_256
Addict
Addict
Posts: 862
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: Mesh editing CGAL routines in C++

Post by marc_256 »

thanks idle,

maybe I have to port these to PB, via PB coding ...
For me CGAL looks good stuff to use for my Mesh editor.
Like the mesh bool stuff (intersection, difference, add)

Greetings,
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
User avatar
idle
Always Here
Always Here
Posts: 6238
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Mesh editing CGAL routines in C++

Post by idle »

It'd be difficult wrap for PB, you'd need to write a wrapper in C++ to construct objects of the specific types you needed
and either flatten the class exporting each function from the classes
or export a class via a pure virtual class if you only need it for x64

doesn't appear to be many alternatives to the library.
Probably easier to port what you need into PB if you can follow the code
Windows 11, Manjaro, Raspberry Pi OS
Image
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Mesh editing CGAL routines in C++

Post by IdeasVacuum »

I asked GeometryFactory about the CGAL license - surprisingly, no response, which might indicate that it is defunct, or at least they are.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply