[Bf-committers] CSG - Carve GPLed

Ken Hughes khughes at pacific.edu
Tue Jun 2 20:18:32 CEST 2009


I've used your script to test one of the pathological cases I had in my 
boolean refactor, and by using the --epsilon options I get good 
results.  But I did have to convert to triangles from quads as you 
noted.   I also tried the --triangulate option and that worked well in 
some cases, but I found one case (a bug report) where it runs a very 
long time (it may be hung, as it still running right now).

Ken

Campbell Barton wrote:
> Heres a test script to run the intersect command on 2 meshes and load
> back in the result into blender.
>
> # select 2 objects
>
> import bpy
> , import_obj
> , export_obj
> , os
>
>
> sce = bpy.data.scenes.active
>
>
> try:    ob1, ob2 = tuple(sce.objects.context)
>
> except: print 'select 2 objects'
>
>
> export_obj.write('a.obj', [ob1])
>
> export_obj.write('b.obj', [ob2])
>
>
> os.system('intersect --obj a.obj A_MINUS_B b.obj > c.obj')
>
>
> import_obj.load_obj('c.obj', False)
>
>
>
> The results so far are fast and good quality except I cant get OBJ's
> with quads to work properly, the result has verts at the intersection
> added but no boolean. OBJ's with Tri's only work well.
>
> On Mon, Jun 1, 2009 at 4:09 PM, Tobias Sargeant
> <tobias.sargeant at gmail.com> wrote:
>   
>> Sorry you had problems compiling it. I've committed a fix, and updated
>> the tarball.
>>
>> In src/, a file called intersect gets built.
>>
>> intersect -h will give you some help, but you can use it to do
>> arbitrary boolean operations on .ply files (and .obj and .vtk -
>> although the loaders for these formats are probably a little less
>> forgiving). the output format is selectable, but is .ply by default.
>> you can pipe the output of intersect straight into view to visualise
>> the result.
>>
>> Toby.
>>
>> On Tue, Jun 2, 2009 at 12:43 AM, Campbell Barton <ideasman42 at gmail.com> wrote:
>>     
>>> Great to see!, can you give any hints as to the fastest way to prototype this?
>>> eg - export 2 meshes in some format and run boolean then re-import the data?
>>>
>>> I did this years ago with another boolean library to see if it was
>>> better then blenders, disappointingly it wasn't, (k3d was using it for
>>> a while, now they use http://www.cgal.org it seems but I couldn't find
>>> the one I tested with, its name began with a 'g' IIRC)
>>>
>>> Tried to compile Carve but had some problems with gcc4.4 reported as a
>>> google code issue.
>>>
>>> On Mon, Jun 1, 2009 at 6:58 AM, Tobias Sargeant
>>> <tobias.sargeant at gmail.com> wrote:
>>>       
>>>> Hi,
>>>>
>>>> I just wanted to drop a small note to say that I've (finally) produced
>>>> a GPLed version of Carve, my CSG library. I originally mentioned my
>>>> intention to to this a rather long time ago. Hopefully there's still
>>>> some interest.
>>>>
>>>> The repository is here: http://code.google.com/p/carve/
>>>>
>>>> And thre's some info about Carve at: http://carve-csg.com/
>>>>
>>>> The version on code.google.com is my current development tree, so
>>>> there may be rough edges. Having said that, it's been stable for a
>>>> long time, so the only issues I think are likely crop up are in the
>>>> build system - most likely with the win32 and xcode projects, as I use
>>>> autotools for day to day work.
>>>>
>>>> Regards,
>>>> Toby.
>>>> _______________________________________________
>>>> Bf-committers mailing list
>>>> Bf-committers at blender.org
>>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>>>
>>>>         
>>>
>>> --
>>> - Campbell
>>> _______________________________________________
>>> Bf-committers mailing list
>>> Bf-committers at blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>>
>>>       
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
>>     
>
>
>
>   



More information about the Bf-committers mailing list