Blender Git Loki

Git Commits -> Revision 12966ae

Revision 12966ae by Laurence (master)
February 10, 2004, 20:16 (GMT)
Ok here is the new CSG library that implements boolean operations for blender through the 'C' api in csg/extern/CSG_Interface.h.

As mentioned earlier on bf-commiters mailing list, there is no current *nix make file only an msvc60 project file. I only have a linux box at work and to be honest I want to avoid doing any commits from there! So if some kind soul could sort it out that would be great.

Dependencies:
This code only depends on other stuff in the intern library, moto and memutils the CSG lib needs to have their include paths to compile. Other than that its completely self contained.

Acknowledgements:
To speed up the polygon-polygon intersection queries I've used some code (under the GPL) from freesolid2.0 this clearly marked in the appropriate files and Gino van den Bergen still owns the copyright to that material. The algorithm I used in based on one from Paul Nettle described on flipcode (www.flipcode.com) and I think his work was a derivative of the "Laidlaw algorithm"

There is also some basic 'ear clipping' triangulation code that unfortunately remains unatributable. I have no right to publish this code under the GPL nor BPL for that matter as I have no idea who the original authors are. Its just one of those random bits of internet code.

Warning!
The stuff used a lot of C++ template features, which on one hand makes it very generic but on the other means that some work will need to be done to get working with other compilters. The msvc60 compiler is not very compliant to the C++ standards with respect to templates so its very difficult to say if this code will compile out of the box on other platforms.

I still haven't committed modifications to booleanops.c in the blender code as without a working library to link to it will break the current build. This needs to be done first!

Improvements
This code is much simpler than the previous bsp implementation see intern/bsp and this old code should be deprectated/removed. However, whilst this implementation produces less triangles in the output than the bps algo, its still not an optimal solution. This is just hard to do and beyond my humble skills.

License:
Just to make it clear this stuff for the reasons mentioned above and for the fact I'm to mean to give the copyright away to BF is licensed under the GPL only.

Cheers,
Laurence.

Commit Details:

Full Hash: 12966aed05460bcf513f9599ee01211619a6d40f
SVN Revision: 2069
Parent Commit: 7c7ede0
Lines Changed: +5122, -0

39 Added Paths:

/intern/csg/extern/CSG_Interface.h (+434, -0) (View)
/intern/csg/intern/blender/CSG_BlenderMesh.h (+45, -0) (View)
/intern/csg/intern/blender/CSG_BlenderVProp.cpp (+35, -0) (View)
/intern/csg/intern/blender/CSG_CsgOp.cpp (+257, -0) (View)
/intern/csg/intern/blender/CSG_CsgOp.h (+59, -0) (View)
/intern/csg/intern/blender/CSG_IndexDefs.h (+22, -0) (View)
/intern/csg/intern/blender/CSG_Interface.cpp (+193, -0) (View)
/intern/csg/intern/blender/CSG_Iterator.h (+199, -0) (View)
/intern/csg/intern/blender/CSG_MeshBuilder.h (+123, -0) (View)
/intern/csg/intern/blender/CSG_PropArray.h (+126, -0) (View)
/intern/csg/intern/blender/CSG_SimpleProp.cpp (+4, -0) (View)
/intern/csg/intern/blender/CSG_SimpleProp.h (+58, -0) (View)
/intern/csg/intern/CSG_BBox.h (+206, -0) (View)
/intern/csg/intern/CSG_BBoxTree.cpp (+125, -0) (View)
/intern/csg/intern/CSG_BBoxTree.h (+135, -0) (View)
/intern/csg/intern/CSG_BlenderVProp.h (+94, -0) (View)
/intern/csg/intern/CSG_BooleanOp.h (+88, -0) (View)
/intern/csg/intern/CSG_BooleanOp.inl (+235, -0) (View)
/intern/csg/intern/CSG_ConnectedMesh.h (+95, -0) (View)
/intern/csg/intern/CSG_ConnectedMeshWrapper.inl (+210, -0) (View)
/intern/csg/intern/CSG_CVertex.h (+104, -0) (View)
/intern/csg/intern/CSG_GeometryBinder.h (+72, -0) (View)
/intern/csg/intern/CSG_IndexDefs.h (+42, -0) (View)
/intern/csg/intern/CSG_Math.h (+152, -0) (View)
/intern/csg/intern/CSG_Math.inl (+362, -0) (View)
/intern/csg/intern/CSG_Mesh.h (+66, -0) (View)
/intern/csg/intern/CSG_MeshCopier.h (+45, -0) (View)
/intern/csg/intern/CSG_MeshWrapper.h (+110, -0) (View)
/intern/csg/intern/CSG_MeshWrapper.inl (+150, -0) (View)
/intern/csg/intern/CSG_Polygon.h (+93, -0) (View)
/intern/csg/intern/CSG_SplitFunction.h (+188, -0) (View)
/intern/csg/intern/CSG_TreeQueries.h (+158, -0) (View)
/intern/csg/intern/CSG_Triangulate.h (+96, -0) (View)
/intern/csg/intern/CSG_Triangulate.inl (+232, -0) (View)
/intern/csg/intern/CSG_Vertex.h (+56, -0) (View)
/intern/csg/intern/MT_Line3.cpp (+81, -0) (View)
/intern/csg/intern/MT_Line3.h (+109, -0) (View)
/intern/csg/make/msvc60/csg.dsp (+234, -0) (View)
/intern/csg/make/msvc60/csg.dsw (+29, -0) (View)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021