algorithmic modeling for Rhino
I have a problem,
I found an old vb script for gh version 0.59 but when I try the script on latest version 0.8.0010 gives me the following problem:
error: Unable to cast object of type 'Rhino.Geometry.Point3d' on type'RMA.OpenNURBS.On3dPoint'. (line: 108)
How can I fix this?
Thanks
Tags:
Hi Mirko,
It would be helpful to see a little code to be able to figure out what is going wrong.
Thanks,
-Steve
Hi Mirko,
you need to use the "legacy Vb.Net" component, because that script was written with the old SDK. You can find it in the drop-down menu.
- Giulio
_______________
giulio@mcneel.com
McNeel Europe
Yes, the calls are not the same: you need to check one-by-one all methods that were called in the old SDK and translate them in the new one.
There is unfortunately no magic wand... you can always chose to use the old SDK with the legacy component, though.
- Giulio
_____________
giulio@mcneel.com
McNeel Europe
how do I use the old SDK? Would give problems for the other components of gh?
Also, if I may decide to update the code, how can I convert the method "rhUtil.RhinoBrepClosestPoint" in new SDK?
I have tried use Rhino.Geometry.Point3d. (but does not appear closestpoint )
The old SDK is to be found in one of the old (legacy) scripting components:
> Would give problems for the other components of gh?
It should not.
> Also, if I may decide to update the code, how can I convert the method "rhUtil.RhinoBrepClosestPoint" in new SDK?
With code similar to this:
Dim b As Brep = ABrepFromSomeWhere()
Dim pt As Point3d = New Point3d(1, 1, 1)
b.ClosestPoint(p)
- Giulio
_______________
giulio@mcneel.com
McNeel Europe
mmm i'm not sure to understand :D
The out of VB component (legacy) said:
Unable to cast object of type 'rhino.geometry.Point3d' on type'RMA.OpernNurbs.On3dPoint' (line:102)
The line 102 is a call..
To make the old version work: you simply need to set the type of input in Pc as OnPoint3d in the component.
The new version has a couple of problems still, but for sure you need to initialize sup (line 118: "Dim sup As Brep = S.ToBrep()").
I'll have a look if I can discover how to make also the new version work.
- Giulio
____________
giulio@mcneel.com
McNeel Europe
Hi Giulio,
Sorry to hijack your thought process from here, but Rassul is having difficulty with a mesh in this thread would you be able to shed some light on the situation?
Danny
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by