Grasshopper

algorithmic modeling for Rhino

Hi all,

sorry for my english

if I want to convert RhinoScriptSyntax geometry to RhinoCommon, I use the  rs.coerceXXX() 

how can I convert RhinoCommon  to RhinoScriptSyntax ?

thank you.

Views: 1182

Replies to This Discussion

You can't. RhinoCommon geometry doesn't exist in any shared model and thus cannot be accessed by RSC which assumes all geometry is part of a document.

Why would you want to go in that direction at all though? If you're already writing code in RhinoCommon, it's a step back to revert to the RSC wrapper methods.

help please

How can I solve this problem

import rhinoscriptsyntax as rs
import Rhino as rc

Curve_A=rs.coercecurve(x)
Curve_B=rs.coercecurve(y)


Curve_S=rc.Geometry.Curve.CreateTweenCurves(Curve_A,Curve_B,5)
Project=map(lambda i: rc.Geometry.Curve.ProjectToPlane(i,rs.WorldXYPlane()) , Curve_S)
Ext=[rs.ExtendCurve(i,0,0,Curve_C) for i in Project]


a=Curve_S

b=Project

Runtime error (TypeErrorException): Parameter must be a Guid or string representing a Guid
Traceback:
line 468, in coerceguid, "C:\Users\Vega\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\utility.py"
line 1681, in ExtendCurve, "C:\Users\Vega\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\curve.py"
line 10, in script

Attachments:
You can bake it in the doc for temping,then after useing script delete it--

Hi  Borisov 

    Please Check the attached files"

Attachments:

thank you 筑梦NARUTO

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service