@Vahab wrote:
Hello,
Can anyone please help with the following code?
Just imagine there are two squares and inside each one there are two rectangles. the code is supposed to take all inner rectangles, extrude and convert them to solid objects and subtract them from their outer extruded curves.
The current result is to applyBooleanDifference
on the last selected inner curve and its bounding box only.
Thanks;`Call Main() Sub Main() Dim arrInput0, arrInput1,strObject0,strObject1,strPath,surface1,surface2 arrInput0 = Rhino.GetObjects("Select inner Curves") strPath = Rhino.GetObject("pick path") If IsArray(arrInput0) Then For Each strObject0 In arrInput0 surface1 = rhino.ExtrudeCurve(strObject0, strPath) rhino.CapPlanarHoles(surface1) Next arrInput1 = Rhino.GetObjects("Select bounding Curves") If IsArray(arrInput1) Then For Each strObject1 In arrInput1 surface2 = rhino.ExtrudeCurve(strObject1, strPath) rhino.CapPlanarHoles(surface2) Rhino.BooleanDifference surface2, surface1 Next End If End If End Sub`
Posts: 12
Participants: 4