Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5791

Boolean Difference in Rhino Script

$
0
0

@Vahab wrote:

Hello,
Can anybody please let me know why the following Boolean Difference is not working?
It still requires 2 arrInputs as Rhino Objects, but I cant figure out why my objects (cp & cp2) are not.

 Call Main()
 Sub main()

Dim strcr,ext,cp
strcr = Rhino.getobject("pick 1st")
ext = Rhino.ExtrudeCurveStraight(strcr, Array(0, 0, 0), Array(0, 0, 10))
cp = Rhino.CapPlanarHoles(ext)

   If Rhino.IsObjectSolid(cp) Then
	Rhino.print("THIS IS SOLID.")
	Dim cp2
	strcr = Rhino.getobject("pick 2nd")
	ext = Rhino.ExtrudeCurveStraight(strcr, Array(0, 0, 0), Array(0, 0, 10))
	cp2 = Rhino.CapPlanarHoles(ext)

	If Rhino.IsObjectSolid(cp2) Then
		Rhino.Print("THIS IS SOLID AS WELL.")
		Rhino.BooleanDifference cp, cp2
	End If
  Else
	Rhino.Print("The object is not Solid")
End If

End Sub

Posts: 8

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 5791

Trending Articles