tion and the points array that follow. I was used to the Rhino.EvaluateSurface(Strobj, ArrParam) to pick pints on a surface.
Then I understand that points are identified with var pt and added with function pt_list.Add(pt) . But can't understand the whole syntax. This code is supposed to create hexagons!
Dim lines As New List(Of OnPolyline)()
'Point Culling
Dim ptArr As New On3dPointArray()
Dim pt_list As New List(Of On3dPoint)
For i As Int32 = 0 To u - 2 Step 2
For j As Int32 = 0 To v - 3 Step 4
ptArr.Append(arrPt(i + 1, j).x, arrPt(i + 1, j).y, arrPt(i + 1, j).z)
ptArr.Append(arrPt(i + 2, j + 1).x, arrPt(i + 2, j + 1).y, arrPt(i + 2, j + 1).z)
ptArr.Append(arrPt(i + 2, j + 2).x, arrPt(i + 2, j + 2).y, arrPt(i + 2, j + 2).z)
ptArr.Append(arrPt(i + 1, j + 3).x, arrPt(i + 1, j + 3).y, arrPt(i + 1, j + 3).z)
ptArr.Append(arrPt(i, j + 2).x, arrPt(i, j + 2).y, arrPt(i, j + 2).z)
ptArr.Append(arrPt(i, j + 1).x, arrPt(i, j + 1).y, arrPt(i, j + 1).z)
ptArr.Append(arrPt(i + 1, j).x, arrPt(i + 1, j).y, arrPt(i + 1, j).z)
Dim pline As New OnPolyline(ptArr)
lines.Add(pline)
Dim pt As New On3dPoint((arrPt(i + 1, j).x + arrPt(i + 1, j + 3).x) / 2, (arrPt(i + 1, j).y + arrPt(i + 1, j + 3).y) / 2, (arrPt(i + 1, j).z + arrPt(i + 1, j + 3).z) / 2)
pt_list.Add(pt)
ptArr.destroy
Next
Next…
Added by Jon Malkovich at 7:16pm on November 3, 2009
≈ 4.8 " as " x= 4.8 ± a ", do you know what is the min and max for "a"?
and second, i had tried the "round" function, but i faced problem with it too! for example:
if the input is a series as {0.0, 0.5, 1, 1.5, 2, 2.5, ...}
the output for Round(x, 0.5) is : {0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 6, ... }
and for Round(x, 2) the output is : {0.0, 0.5, 1, 1.5, 2, 2.5, ... }
i can't understand the logic that lies behind this function, i think
for Round(x, 0.5) the output must be {0.0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, ... }
and for Round(x, 2) it must be {0.0, 0.0, 2, 2, 2, 2, 4, 4, 4, 4, ... }
so, is there any problem with it, or I misendestood the logic ?…
n the SetA lenght there could be a boolean to toggle an append function.
SetA = {U, V, W, X, Y, Z} ,
SetB = {1, 2, 3}
Imap = {10}
Append = True >> Result = {U, V, W, X, Y, Z, 1, 2, 3}
Append = False >> Result = {U, V, W, X, Y, Z}
This is different from the "list insert" component that you wrote but I find it more intuitive. Maybe I just have a problem with the name, I would understand it better if it was called "Item insert"... I'm no english expert so I may be completely wrong.
Perhaps there could be two components one "Item Insert" and another "List Insert"...
ReplaceItem would also be very useful.…
Added by Frane Zilic at 1:57pm on September 10, 2010