Grasshopper

algorithmic modeling for Rhino

Dear, David

I'm now try to debug my code, but grasshopper VB.net solution was not possible to debug.

 

So, I tried to convert it to rhinocommon plug-in.

But, some problems..

 

as is my code,..

it does not work when I debug...

 

Dim filter As Rhino.DocObjects.ObjectType = Rhino.DocObjects.ObjectType.Curve
Dim objref As Rhino.DocObjects.ObjRef = Nothing
Dim rc1 As Rhino.Commands.Result = Rhino.Input.RhinoGet.GetOneObject("Select ACurve", False, filter, objref)
If rc1 <> Rhino.Commands.Result.Success OrElse objref Is Nothing Then
Return rc1
End If

Dim crvA As Rhino.Geometry.Curve = objref.Curve()
If crvA Is Nothing OrElse crvA.IsShort(Rhino.RhinoMath.ZeroTolerance) Then
Return Rhino.Commands.Result.Failure
End If
Dim rc2 As Rhino.Commands.Result = Rhino.Input.RhinoGet.GetOneObject("Select BCurve", False, filter, objref)
If rc2 <> Rhino.Commands.Result.Success OrElse objref Is Nothing Then
Return rc2
End If

Dim crvB As Rhino.Geometry.Curve = objref.Curve()
If crvB Is Nothing OrElse crvB.IsShort(Rhino.RhinoMath.ZeroTolerance) Then
Return Rhino.Commands.Result.Failure
End If
Dim rc3 As Rhino.Commands.Result = Rhino.Input.RhinoGet.GetOneObject("Select Bcurve", False, filter, objref)
If rc3 <> Rhino.Commands.Result.Success OrElse objref Is Nothing Then
Return rc3
End If

Dim crviB As Rhino.Geometry.Curve = objref.Curve()
If crviB Is Nothing OrElse crviB.IsShort(Rhino.RhinoMath.ZeroTolerance) Then
Return Rhino.Commands.Result.Failure
End If
Dim filterPt As Rhino.DocObjects.ObjectType = Rhino.DocObjects.ObjectType.Point
Dim Pot As Rhino.Geometry.Point = objref.Point
Dim rc4 As Rhino.Commands.Result = Rhino.Input.RhinoGet.GetOneObject("Select Point", False, filter, objref)
If rc4 <> Rhino.Commands.Result.Success OrElse objref Is Nothing Then
Return rc4
End If
Dim Pt As Rhino.Geometry.Point3d
Pt = Pot.Location

Views: 576

Replies to This Discussion

Hi Daniel,

 

how are you loading your gha file? Are you moving/renaming it by hand? Did you disable the 'Memory load...' option in _GrasshopperDeveloperSettings?

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Dear, David,

I copied the component file to the "components folder",..

Please, where is 'Memory load... ' option?..

I tried to search SDK help, but It is not easy to find one...

(I use vb.net VS2010 professional version)

Dear, David

I found 'Memory Load ..' option in _grasshopperDeveloperSettings..

and Disabled the Memory Load,...

and add the path to the project's bin(debug fold)

But,, stil not easy..

Should I have to start debug using 'dll file? or 'gha file?

is it possible to debug in VS2010 or I have to open in Grasshopper manually,..

What is Debugging start in the SDK manual?

Would you explain me about debugging 'gha step by step?

 

''''''

It is not possible to directly debug a Grasshopper Component Library, since it must be loaded by Grasshopper, which in turn must be loaded by Rhinoceros. So, in order to debug a *.gha file you must first start Rhino. This is called a Debug Start Action and VS Express does not allow you to set one via its own UI.

TODO, Finish this topic...

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service