The following doesn't work for me:

 


import rhinoscriptsyntax as rs


pt=rs.GetPlugInObject("PanelingTools")


guid = rs.GetObject("Get Surface", rs.filter.surface, True)


print pt.About()


out=pt.RandomPaneling(guid,30,True)

 


 

 

Does anybody have the same problem??

 

Cheers

 

Paolo 

I can see the output of the About() method but I get an error when I try to call other methods and I have to input the string which identifies the geometry (guid).

Views: 515

Replies to This Discussion

Paolo,
PanelingTools is not properly exported to Python yet. There is a plan to do that in the coming few months. For now, you can only script with RhinoScript.

I see, thanks for the information

The following a sample that uses Rhino Python to import PanelingTools library. I hope it helps:

# sample script to show how to import PanelingTools and use with Python
import math
import rhinoscriptsyntax as rs

#Add these 3 lines to import PanelingTools library
import clr
clr.AddReference("PanelingToolsDotNet")
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:
    rs.AddPoint(pt)

RSS

Translate

© 2019   Created by McNeel Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service