I am using the read file component to read in a text file (Grashopper Version 0.8.0066). I originally had the text file on the local hard drive and it only takes the component a few milliseconds to complete. However the files recently moved to a network drive and it now takes 4 minutes to complete (according to the profiler). It is a very small (2kb) text file and opens up in a program like notepad very quickly from the network location. Is there something about the component function that…See More
"Ideally value types should not have methods that change the type variables. Ideally Unitize() should return a unitized vector rather than changing the xyz values of the vector itself. However we decided to not adhere to this guideline for…"
"Thank you for explaining that the .Item() call returns a copy. Explains why the .length property call worked in the previous line for what I was using it for and the .Unitize() method didn't work, which was why I was so confused.…"
"Vectors are value types, when you call:
S_MidVector.Item(i), you get a copy of the vector that's inside the list. Unitizing this copy won't affect the original vector. What you need to do:
Dim vec As Vector3d =…"
I have the following code in a grasshopper VB.Net Script component: Private Sub RunScript(ByVal S_Vector As List(Of Vector3d), ByRef S_Mid As Object) Dim S_MidVector As New List(Of Vector3d) Dim i As IntegerFor i = 0 To S_Vector.Count - 2 S_MidVector.Add((S_Vector.Item(i) / S_Vector.Item(i).length) + (S_Vector.Item(i +_ 1) /S_Vector.Item(i + 1).length)) S_MidVector.Item(i) = S_MidVector.Item(i).Unitize() NextS_Mid = S_MidVectorEnd SubI get an error saying that type…See More
I have a VB script component that opens an excel spreadsheet, populates some cells with data and then calls a macro to run. This all works fine except that I get a warning box with the following message a few seconds into the macro running on excel (the excel macro isn't complete yet when the message comes up, but does continue to completion). …See More
Thanks for reply and explanation.
I was thinking that RhinoCommon was only for V5 and I am still using grasshopper with V4. However after checking the RhinoCommon wiki page, I realized the implementation in…"
it's been so long since I used the Legacy SDK that I'm totally rusty. Any reason you can't switch to RhinoCommon?
To answer your question, an OnBrep is an IOnBrep. IOnBrep is an interface, OnBrep is a class…"
I am trying to write a vb.net component (using the vb.net compatibility version of the component) that does the solid intersection function. I am having trouble understanding how to take the input Breps and convert them to IOnBreps for use in the RhinoBooleanIntersection command. Below is my code so far: Private Sub RunScript(ByVal BR1 As OnBrep, ByVal BR2 As OnBrep, ByRef A As Object) Dim bresult As Boolean = False'Code here to take BR1 and BR2 and create IOnBreps to pass to boolean…See More
"I dont have the chops to work out the math, but here's an idea that you may not have tried yet for an analytical formulation. Since you are finding the bisector here, the problem is analogous to a reflection problem for light…"