[Bf-committers] New boolean code.

Laurence Bourn bf-committers@blender.org
Tue, 10 Feb 2004 09:56:06 +0100


This is a multi-part message in MIME format.

------_=_NextPart_001_01C3EFB3.B84A5AB8
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello, I've finally got round to finishing some new boolean code for =
blender.=20

Algorithm:
The code is based upon a much simpler algorithm described here:
<http://www.flipcode.com/cgi-bin/msg.cgi?showThread=3D13November2000-Cons=
tructiveSolidGeometry&forum=3Daskmid&id=3D-1>. It's still not perfect =
but is much simpler than the old bsp implementation and somewhat =
cleaner.=20

The code does a better job at reducing the number of polygons in the =
final model but still is not a minimal number. It is somewhat faster =
than the old bsp nonsense and more robust.

Code:
Unfortunately, I've used this task to try out some new coding techniques =
based on the generic programming style. The code is indeed pretty =
generic in that it works for anytype of vertex and face properties not =
just those found in blender. However it's also uses a lot ot C++ =
template techniques that might make it hard to understand. Now hears the =
crucial bit that I should have put at the top! I only have a Visual60 =
compiler at home and I need somebody to create a Blender makefile for =
it. There are significant differences in template compilation between =
visual60 and visual71 and later versions of gcc, and it's inevitable =
that some code tweaking will be required.=20

The code consists of 2 parts:

'C' interface and library in blender/intern/csg (follows the intern =
library style)=20
some new code to replace blender/source/src/(???)booleanops.c=20

The intern library depends on the moto and memutil libraries. And of =
course the code in booleanops.c depends on the new csg library.

License:
The code is committed under the GPL license only and I wish to maintain =
the copyright (at least for the original commit!). If the BF have a =
problem with this then please let me know today. I've adapted some AABB =
Tree code from freesolid20 so it's not possible to release under the =
GPL/BFL

Plan:
Commit code in intern/csg tonight.
Some kind soul fixes up the makefiles...
I'll commit the modifications to booleanops.c or maybe make a patch, if =
I can on wincvs??
Some kind soul II fixes up the makefiles...

Let me know what you think,
Thanks Laurence.








 =20


------_=_NextPart_001_01C3EFB3.B84A5AB8
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.6944.0">
<TITLE>New boolean code.</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=3D2 FACE=3D"Arial">Hello, I've finally got round to =
finishing some new boolean code for blender. </FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Algorithm:</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">The code is based upon a much simpler =
algorithm described here:</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;<A =
HREF=3D"http://www.flipcode.com/cgi-bin/msg.cgi?showThread=3D13November20=
00-ConstructiveSolidGeometry&forum=3Daskmid&id=3D-1">http://www.flipcode.=
com/cgi-bin/msg.cgi?showThread=3D13November2000-ConstructiveSolidGeometry=
&forum=3Daskmid&id=3D-1</A>&gt;. It's still not perfect but is much =
simpler than the old bsp implementation and somewhat cleaner. =
</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">The code does a better job at reducing =
the number of polygons in the final model but still is not a minimal =
number. It is somewhat faster than the old bsp nonsense and more =
robust.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Code:</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Unfortunately, I've used this task to =
try out some new coding techniques based on the generic programming =
style. The code is indeed pretty generic in that it works for anytype of =
vertex and face properties not just those found in blender. However it's =
also uses a lot ot C++ template techniques that might make it hard to =
understand. Now hears the crucial bit that I should have put at the top! =
I only have a Visual60 compiler at home and I need somebody to create a =
Blender makefile for it. There are significant differences in template =
compilation between visual60 and visual71 and later versions of gcc, and =
it's inevitable that some code tweaking will be required. </FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">The code consists of 2 parts:</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">'C' interface and library in =
blender/intern/csg (follows the intern library style) </FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">some new code to replace =
blender/source/src/(???)booleanops.c </FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">The intern library depends on the moto =
and memutil libraries. And of course the code in booleanops.c depends on =
the new csg library.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">License:</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">The code is committed under the GPL =
license only and I wish to maintain the copyright (at least for the =
original commit!). If the BF have a problem with this then please let me =
know today. I've adapted some AABB Tree code from freesolid20 so it's =
not possible to release under the GPL/BFL</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Plan:</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Commit code in intern/csg =
tonight.</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Some kind soul fixes up the =
makefiles...</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">I'll commit the modifications to =
booleanops.c or maybe make a patch, if I can on wincvs??</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Some kind soul II fixes up the =
makefiles...</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Let me know what you think,</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Thanks Laurence.</FONT>
</P>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">&nbsp; </FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C3EFB3.B84A5AB8--