[Bf-committers] CSG + gcc = problems

Laurence Bourn bf-committers@blender.org
Tue, 17 Feb 2004 09:26:53 +0100


Dude,
Respect! Thanks very mush for doing that, pretty impressive for a =
'rookie' if I may say so. Your patch looks good to me sprinkling all =
those typenames around more reflects my poor programming style. I should =
really define all template types and type assumptions by using typedef =
typename foo::bla bla in the template declaration instead of using the =
assumed template type directly. One other thing is whilst you are =
correct that vector<>::size_t maps to unsigned int on most platforms I'm =
not ure that it's cast in stone. Maybe better to define a top level =
typedef for this.=20

If you like I can send you the booleanops.c code so that you can see it =
working in blender. Unfortunately my windoze development box is =
seriously ill. Not even wincvs works anymore after a clean install. Time =
to reinstall the OS on this filhy virus ridden piece of junk me thinks.=20

Thanks for the Graphite link, i'll definately take a look. Although i'm =
considering doing my own implementation just because its a fairly =
interesting problem.

Thanks again,
Laurence

-----Original Message-----
From: bf-committers-admin@blender.org
[mailto:bf-committers-admin@blender.org]On Behalf Of Brecht Van Lommel
Sent: maandag 16 februari 2004 23:24
To: bf-commiters
Subject: RE: [Bf-committers] CSG + gcc =3D problems


Hi

On Mon, 2004-02-16 at 14:51, Laurence Bourn wrote:
> Hello,
>=20
> This code is still not being used by blender and can safely be ignored =
for now.=20
>=20
> 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.=20
>=20
> 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

_______________________________________________
Bf-committers mailing list
Bf-committers@blender.org
http://www.blender.org/mailman/listinfo/bf-committers