Hi all,

I am trying to get PT to work in RhinoPython scripts, but have not had any success with this so far. There is an old thread from 2011 on this list:


that pretty much summarises my own experiences.  What is the state of the PT Python bindings at the moment?



Views: 268

Replies to This Discussion

Yes you can import PT library in Python for Rhino and Grasshopper. Here is a sample:

# sample script to show how to import PanelingTools and use with Python for Rhino

import math
import rhinoscriptsyntax as rs

#Add these 3 lines to import PanelingTools library
import clr
import PanelingTools as pt

#divide input curve and assign result to output # Get the curve objects
object = rs.GetObject("Select curve", rs.filter.curve, True, True)
if rs.IsCurve(object):
  arrPoints = pt.Utility.DivideCurveByChordLength(rs.coercecurve(object), 1, True,)
  for pt in arrPoints:

Here is the same sample in Grasshopper

Ah, I see--the import syntax is different.  Many thanks for your help. 

Have a great weekend




© 2021   Created by McNeel Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service