[Bf-committers] CSG + gcc = problems

Brecht Van Lommel bf-committers@blender.org
16 Feb 2004 22:23:43 +0000


Hi

On Mon, 2004-02-16 at 14:51, Laurence Bourn wrote:
> Hello,
> 
> This code is still not being used by blender and can safely be ignored for now. 
> 
> As I mentioned before, I have not made any Makefiles yet for the CSG code
> (where are these from?). Judging by the barf output looks like I need to get
> hold of a linux machine from somewhere and get it compiling. I was kinda hoping
> someone else would help with it on Linux but maybe its too much to ask. 
> 
> I'll carry on with my home cygwin setup and try to get it working over the next
> few weeks.
> Laurence.

I got it compiled on linux using gcc 3.2. I'm a C++ rookie, so I'm not
sure I did everything as I was supposed to.

The main problem seemed to be with the templates. GCC didn't know what
was a typename and what was not. MSVC++ seems to implicitly accept some
non ISO C++ to solve this. I have pasted 'typename' keywords all over
the place, and you will probably want to do this better. I couldn't get
typename typedef'd. That's probably something to look up in one of those
c++ faqs. I hope I made any sense at all with this explanation :).

I also removed some 'comparison between signed and unsigned integer'
warnings, cause it's already hard enough to read those lengthy c++
errors / warnings gcc produces.

Here's a patch with all the changes:
http://users.pandora.be/blendix/blender/csg/patch_csg.txt

And a Sconscript I made for the intern/csg directory:
http://users.pandora.be/blendix/blender/csg/SConscript

> P.S. Also found a nice idea to seriously reduce the number of triangles from
> the CSG output and increasing their quality (aspect ratio) at the same time.
> All I need is a constrained delauney triangulation implementation...

I'm not sure if you're looking for an implementation in another program,
but I recently bumped into (what I think is) such an impementation in
the code of Graphite (GPL). http://www.loria.fr/~levy/Graphite/
It's in the src/packages/OGF/surface_delauney/algos/ directory of the
source distribution. (I am looking into this code to get some of its
advanced uv mapping tools integrated in Blender, but that's another
issue).

Cheers,

Brecht