Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

boolean code problem

boolean code problem

anycganycgJ8A6A
Advocate Advocate
212 Views
0 Replies
Message 1 of 1

boolean code problem

anycganycgJ8A6A
Advocate
Advocate

hi 

i made this code  

this code contain good helper code

 

i modified this

this code  work process

1. make a box

2. run this code

3. draw rectangle

4. copy rectanlge ( newrect)

4. substract   = box - rectangle 

5. after that .       extrude  newrect as   box.max.z

 

but this code not work /  and boolean error 

 

pls help me again 

 


(
local rects = startObjectCreation rectangle returnNewNodes:true --newNodeCallback:OnNewNode
newrect = copy rects

problemObjs = #()
newObj = #()
for rect in rects where isValidNode rect do
(
addModifier rect (extrude amount:50000)
move rect [0,0,-200]
convertToPoly rect

for obj in objects where ( superclassof obj == GeometryClass and intersects obj rect) do
(

ProBoolean.CreateBooleanObjects obj (copy rect) 2 0 0

ProBoolean.SetPlanarEdgeRemoval obj 3

if superclassof obj == GeometryClass then
(
append newObj obj
)

)

)

StopCreating()

bigboxvalue = newObj[1].max.z

addModifier newrect (extrude amount:bigboxvalue)
gc()

)

 

0 Likes
213 Views
0 Replies
Replies (0)