Notifications
Clear all

[Closed] Boolean Script?

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!

6 Replies

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”.

1 Reply
(@kiranr)
Joined: 11 months ago

Posts: 0

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?

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.

1 Reply
(@kiranr)
Joined: 11 months ago

Posts: 0

That seems to be complicated

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

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.

1 Reply
(@kiranr)
Joined: 11 months ago

Posts: 0

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!)