Hi there,
for some reason when I add a box to a Rhino document using Rhino.AddBox() and then retrieve the box using Rhino.BoxPoints(), the resulting box has reordered points. I have never noticed this before, is this new behaviour? It seems to mess up some of my older code - if there was no change, I guess I’ll have to keep searching for other reasons.
Here’s some example code:
ReDim arrBox(7)
arrBox(0) = Array(0, 0, 0)
arrBox(1) = Array(0, 1, 0)
arrBox(2) = Array(0, 1, 1)
arrBox(3) = Array(0, 0, 1)
arrBox(4) = Array(1, 0, 0)
arrBox(5) = Array(1, 1, 0)
arrBox(6) = Array(1, 1, 1)
arrBox(7) = Array(1, 0, 1)
Dim objBox : objBox = Rhino.AddBox(arrBox)
Dim arrTestBox : arrTestBox = Rhino.BoxPoints(objBox)
Dim i, j, strPoint
For i = 0 To 7
strPoint = ""
For j = 0 To 2
strPoint = strPoint & arrTestBox(i)(j) & " "
Next
Rhino.Print strPoint
Next
The output is
0 0 1
0 1 1
1 1 1
1 0 1
0 0 0
0 1 0
1 1 0
1 0 0
The image shows the box in my original orientation, which should be valid, right?
Best,
Mathias