Can anyone please help with this?
sub ExtB in this code takes curves with some closed curves inside them and simply makes them extruded and solid.
Having attempted to avoid
Rhino.Command as much as possible, I wrote
It does not seem to be efficient as it is currently working on 4 curves only.
Here is the code:
Option Explicit Call Main() Sub main() ExtA ExtB End Sub Sub ExtA Dim arrObjects,strObject,strExt Dim arrLst() Dim i i = 0 arrObjects = Rhino.GetObjects("Pick curves") If Not IsNull(arrObjects) Then ReDim arrLst (Ubound(arrObjects)) For Each strObject In arrObjects strExt = Rhino.ExtrudeCurveStraight(strObject, array(0, 0, 20)) Rhino.CapPlanarHoles strExt arrLst(i) = strExt i = i + 1 Next End If Rhino.BooleanDifference arrlst(0), arrLst(1) Rhino.BooleanDifference arrlst(2), arrLst(3) End Sub Sub ExtB Dim arrObjects arrObjects = Rhino.GetObjects("Pick curves") Rhino.SelectObjects arrObjects Rhino.Command "ExtrudeCrv S=Yes 20" Rhino.UnselectAllObjects End Sub