Anim8or Community

General Category => ASL Scripts => Topic started by: dwsel on July 18, 2010, 12:06:24 pm

Title: Help with Boolean script
Post by: dwsel on July 18, 2010, 12:06:24 pm

I'm experiencing problems with cutting cylindrical hole using Kubajzz Boolean script. Edges of resulting hole seems to be very faulty. I've tried several things (rotating objects by a small angles, scaling, changing divisions of cylinder, subdividing the base mesh) but none of them are working. Cutting hole two times (first time with less divided cylinder and second time with more divided cyl) does not work too, because after first time mesh is left with open edges, so it's not suitable for another boolean operation.

Any ideas on that?
Rebuilding front faces poly by poly takes a lot of time and I'd like to avoid it definitely.

Attachments: screeen + file
Title: Re: Help with Boolean script
Post by: NickE on July 18, 2010, 03:15:23 pm

There is a different version of the booleen operations script that I wrote concurrently with Kubajzz (I never released mine).  His script and mine work by totally different methods.  All methods (in all the programs that I have studied) suffer from situations where the method fails.  The good part is that mine and Kubajzz's methods usually fail under different circumstances.

With the attached script, be sure to open it in a text editor to read the usage notes at the top.

I tested the attached script on your attached Anim8or project and it failed to construct a few faces.  When the cylinder was moved a tiny amount to the positive x direction, all faces were reconstructed.

I also am attaching a test Anim8or project that I used to get a feel for when the boolean operations script fails.  The attached jpg is a texture that will have to be put in the default texture directory.
Title: Re: Help with Boolean script
Post by: dwsel on July 18, 2010, 08:00:23 pm
Thank you for reply and for sharing your version of script.

Although in the meantime I reconstructed frontal faces by hand, it was easy and it took less time than I expected. I deleted faulty edges and polys, and using cut part of cylinder and remaining vertices I've drawn edges and filled them with triangles. Resulting output from your script closely matches the version I've done by hand.

Your version of script looks to be a bit slower, but it better preserves texture coordinates and it drew correctly almost all of faces at first try. The triangles that hasn't been drawn were the ones that had very large angle between arms, or the ones having arms of almost equal length (I don't know the method used). It's the case where vertex from the first mesh is placed near the (center of) edge of the second mesh. The script I've been using failed with some of the examples from *.an8 file you've attached (non planar faces of spiral?)

Thank you again for your time! I think that my specific case can be closed, but if you want to investigate boolean scripts, then feel free to use this topic.