NCF参数化建筑论坛

标题: 请教各位这种点的顺序调整怎么做到? [打印本页]

作者: sharkliang    时间: 2010-12-1 15:46
标题: 请教各位这种点的顺序调整怎么做到?
请教各位这种点的顺序调整怎么做到?
作者: 457259596    时间: 2010-12-1 16:09
汗~~~~~~~~~~~~~~~~~~·
作者: listone    时间: 2010-12-1 16:34
{:3_69:}what different/???
作者: eggplant8008    时间: 2010-12-1 17:06
顶贴争分
顺便说一句,LZ如果想求人帮忙的话,怎么办把GH原文件发上来呢
作者: 子子萧    时间: 2010-12-1 17:09
{:3_56:}{:3_53:}
作者: unfinal    时间: 2010-12-1 17:14
{:3_60:}{:3_60:}
作者: satnick    时间: 2010-12-2 09:55
这个很简单的,你先调整为竖向排列,再用一下FLATTERN
作者: sharkliang    时间: 2010-12-2 12:13
请问楼上怎样可以调整竖向排列?
作者: arvin1018    时间: 2010-12-3 14:52
請用SORT這個運算器如圖

或是使用下列語法看看


Try this:
Sub RunScript(ByVal ptList As List(Of On3dPoint))

Dim tree As New DataTree(Of On3dPoint)
Dim pathNum As Int32 = 0
Dim j As Int32 = ptList.Count() - 1

nearTwo(ptList, tree, pathNum, j)

pOut = tree

End Sub

#Region "Additional methods and Type declarations"
Sub nearTwo (ByVal ptsIn As List(Of On3dPoint), ByRef tree As DataTree(Of On3dPoint), ByRef pathNum As Int32, ByRef j As Int32)
While (j > 3)
Dim path As New EH_Path(pathNum)

Dim d1 As Double = Double.MaxValue
Dim d2 As Double = Double.MaxValue
Dim min1 As Int32 = -1
Dim min2 As Int32 = -1

For i As Int32 = 1 To j - 1
Dim d As Double = ptsIn(0).DistanceTo(ptsIn(i))

If (d < d1) Then
d1 = d
min1 = i
Else If (d < d2) Then
d2 = d
min2 = i
End If
Next

tree.Add(ptsIn(0), path)
tree.Add(ptsIn(min1), path)
tree.Add(ptsIn(min2), path)
ptsIn(0) = Nothing
ptsIn(min1) = Nothing
ptsIn(min2) = Nothing

Dim tList As New List(Of On3dPoint)
For i As Int32 = 0 To j - 1
If (ptsIn(i) <> Nothing) Then
tList.Add(ptsIn(i))
End If
Next

j = tList.Count()
pathNum += 1

'calls recursive routine
nearTwo(tList, tree, pathNum, j)

End While
End Sub

作者: TG123    时间: 2010-12-3 17:28
LZ这些点是做什么用的?
作者: linyanyu    时间: 2010-12-5 21:08
我震惊了,汗……




欢迎光临 NCF参数化建筑论坛 (http://ncf-china.com/) Powered by Discuz! X3.2