How to use the Boolean Commands for Splines in Maxscript

How to use the Boolean Commands for Splines in Maxscript

diepreyeYRJFU
Explorer Explorer
619 Views
1 Reply
Message 1 of 2

How to use the Boolean Commands for Splines in Maxscript

diepreyeYRJFU
Explorer
Explorer

I am currently working on a plugin using MaxScript and I need to perform some Boolean operations to some splines I generated. After searching, I only came across a way to do it using the mouse pointer by doing these steps:

1. Attach the splines in question together

2. Enter the Spline selection mode and select the first Spline.

3. Choose the Boolean operation you need, union, and select the other Splines you want to include in the operation.

4. Finally, exit the Boolean operation mode.

 

This way works perfectly and simulates exactly what I'm looking to do but I'm trying to automate this process in the plugin I'm developing. Does anyone have any idea how I can possibly replicate this in MaxScript or another way I can achieve the same results?

0 Likes
620 Views
1 Reply
Reply (1)
Message 2 of 2

MehdiZangenehBar
Advocate
Advocate

You can use shape boolean (3dsMax 2019 and above), no need to attach.

obj_a = circle pos:[15,0,0] wirecolor:red name:"obj_a"
obj_b = circle pos:[-15,0,0] wirecolor:green name:"obj_b"
obj_boolean = splineshape wirecolor:yellow name:"obj_boolean"
select obj_boolean
startObjectCreation ShapeBooleanObject
obj_boolean.AppendOperand obj_boolean obj_a true
obj_boolean.AppendOperand obj_boolean obj_b true