PDA

View Full Version : Boolean Script?


kiranr
02-18-2009, 03:36 AM
Is there any way that i can make an object perform a B-A subtraction Boolean whenever it intersects another object

Is this possible through scripting since i have heard a lot about its powers!

ZeBoxx2
02-18-2009, 03:43 AM
it is possible...

either via the old-style booleaning methods:

objectA + objectB -- boolean union between the two objects
objectA - objectB -- boolean subtraction
objectA * objectB -- boolean intersecton


Or via the Boolean2 (the Boolean compound object) methods; see: "Boolean2 : GeometryClass"

Or via the PolyBoolean (the ProBoolean compound object) interface; see: "Interface: PolyBoolean".

kiranr
02-18-2009, 08:56 AM
it is possible...

either via the old-style booleaning methods:

objectA + objectB -- boolean union between the two objects
objectA - objectB -- boolean subtraction
objectA * objectB -- boolean intersecton


Or via the Boolean2 (the Boolean compound object) methods; see: "Boolean2 : GeometryClass"

Or via the PolyBoolean (the ProBoolean compound object) interface; see: "Interface: PolyBoolean".


I want the Boolean to be performed automatically WHENEVER the object interects another object (not manually picking both objects each time when needed)!

Is that possible?

ZeBoxx2
02-18-2009, 02:37 PM
Well you could try 'intersects objectA objectB' to check if the bounding boxes of the two objects intersect and, if they do, perform a boolean then (and then still check whether there's any change to determine if the meshes themselves intersected; can do this programmatically to an extent by firing rays if you were so inclined).

You'd stick that inside a loop that checks all objects for intersection first, collecting the ones that intersect into separate arrays, then sets out to booleaning the objects in those arrays together.

kiranr
02-19-2009, 03:14 AM
Well you could try 'intersects objectA objectB' to check if the bounding boxes of the two objects intersect and, if they do, perform a boolean then (and then still check whether there's any change to determine if the meshes themselves intersected; can do this programmatically to an extent by firing rays if you were so inclined).

You'd stick that inside a loop that checks all objects for intersection first, collecting the ones that intersect into separate arrays, then sets out to booleaning the objects in those arrays together.

That seems to be complicated

is therea simpler way
or could you possibly guide me as to how i could achieve this?

j-man
02-19-2009, 05:01 PM
Hi Kiranr,

I think you need to explain a little more what you're trying to achieve. ZeBoxx2 has provided two MXS possibilities, but from what I can tell boolean already does what you're asking.

"Is there any way that i can make an object perform a B-A subtraction Boolean whenever it intersects another object"

that's what boolean does! < : what exactly do you mean? do you have large amounts of objects? are they animated? why can't you use the tools as they are now?

Regards,

Josh.

kiranr
02-20-2009, 02:44 AM
Hi Kiranr,

I think you need to explain a little more what you're trying to achieve. ZeBoxx2 has provided two MXS possibilities, but from what I can tell boolean already does what you're asking.

"Is there any way that i can make an object perform a B-A subtraction Boolean whenever it intersects another object"

that's what boolean does! < : what exactly do you mean? do you have large amounts of objects? are they animated? why can't you use the tools as they are now?

Regards,

Josh.



well,basically i have created a custom door that can open and close like the max door and i have to place a large number of these.But it doesn't seem viable to perform Boolean for each of them individually.So i was thinking whether there is some way that i could just place the door and the door would perform the Boolean itself!(dont know if that is too much to wish for!)

CGTalk Moderation
02-20-2009, 02:44 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.