algorithmic modeling for Rhino
I am trying to implement the ShrinkSurface command from within the VB component but am getting an error.
The component is set up like this:
I get the same error when the component type is set to "surface". I have no idea how to make this seemingly simple problem go away. I suspect the trimmed surfaces are creating issues for me with the unroll command later down the line, I would like each panel to be a discrete surface so I am able to reference the center of each panel to nest and number them.
Any insight?
-dallas
Tags:
where you've seen this method? The brepFacelist class has ShrinkFaces() method, perhaps this?
Dim x As New brep
x.Faces.ShrinkFaces()
You can look at the sdk to find all methods of rhino classes.
I got the bits I tried from this thread: http://www.grasshopper3d.com/forum/topics/shrink-trimed-surface-to-...
I'm not knowledgeable with code , how does the bit you reference there go into the script?
This is what I tried:
This thread is of 2009. Ok, you have:
Private Sub RunScript(ByVal x as Brep, ByRef A as object)
End sub
You are saying, set me an input with item access, of type brep and named "x". The data plugged in that input, inside your code will be accesed with "x". Then, "x" is your brep (a reference of it). If you write "x." (x and dot) and you will see the methods and properties of the brep class. So:
A = x.Faces.Shr...
Sorry, my fault. Is:
x.Faces.ShrinkFaces()
A = x
the ShrinkFaces return booleans, true when the method was successful. The x (the brep) is different in the next line of code.
oh wait... there are holes in the surfaces...
<facepalm>
Lol
I'm sorry but I'm talking about writing the code. I've never used that method so I dont know what it does, and I do not know what you're trying to do.
Search on the SDK, or better, ask in the mcneel forum to help.
The () only means that this method not contains/needs arguments. Arguments are the "parameters" like: Private Sub RunScript(ByVal x as brep, ByRef A as object).
The process is:
-Gh reads VB Script.
- the reading reaches the method RunScript, which is set with an argument x as input (and as brep) and A as output (and as object).
- Read next line: x.Faces.ShrinkFaces(). This produce a boolean as result, but in this case we not collect the result. However make some change in "x".
- Read next line: A = x. The modified brep is returned in A.
- ...
If the 'holes' are the only trimmings, then ShrinkFaces method is of no use here.
Also note that the method is supposed to result in trimmed surfaces. (maybe you mistakenly expected untrimmed surfaces??).
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