Filters -> Alphabetical -> Programmable Filter 로 들어가서,
Script에 다음 코드를 작성
pdi = self.GetPolyDataInput()
pdo = self.GetPolyDataOutput()
numPoints = pdi.GetNumberOfPoints()
pdo.Allocate()
for i in range(0, numPoints-1):
points = [i, i+1]
# VTK_LINE is 3
pdo.InsertNextCell(3, 2, points)출처 :
https://stackoverflow.com/
https://public.kitware.com/