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?
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 rhinoscriptsyntax as rs
#Add these 3 lines to import PanelingTools library
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)
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