download studio_utility_1_0.py
studio_utility_1_0.py ユーティリティモジュールを更新しました。
新しい関数は、渋谷さんのプロジェクトで必要そうなものです。
木を配置→ヴォロノイダイアグラムを描く→ghpc.Voronoi(self.treepoints)ヴォロノイセル毎にポリラインが返ってくる→ポリラインを線に分解(su.explodeRsPolyline)→線の重複を除去(su.delDupLineInList)→一筆書きのエッジ組み合わせを作る(オイラー経路を調べること!)→グラフを作る
def explodeRsPolyline(pl, delete_input = False):
"""
explode Polyline
pl: PolyLine
delete_input:
True: delete original polyline
False: keep original polyline
(option)
return:
list of Line
"""
def delDupLineInList(lineList, precision = 0.1):
"""
delete duplication, lineList must be purely line list (do not contain other type objects
lineList: list of line
precision:
precision of point(start / end) matching
(option)
return:
it returns nothing, original lineList would be modified
"""
def extendLineListWODup(llist1, llist2, precision = 0.1):
"""
extend 2 line Lists without dulplication, be purely line list (do not contain other type objects)
llist1: line to add
llist2: line list to extend
precision:
precision of point(start / end) matching
(option)
return:
returns extended line list
"""
def convertRSLinesToRGLines(rslines):
"""
cnvert lines
rslines: line list to convert (lines from rhinoscriptsyntax)
return:
returns list of Rhinog.Geometry.line
"""
def convertRGLinesToRSLines(rglines):
"""
cnvert lines
rglines: line list to convert (Rhinog.Geometry.line)
return:
returns list of line (from rhinoscriptsyntax)
"""
Comments are closed.