Hello!
I am trying to reverse the U and V coordinates of a surface with grasshopper, but it's not possible.
So i'm trying to do it with VB script in Grasshopper but i am not very good with the script.
Is some one could help me?
There is the function : "OnSurface.Reverse(Dir As Int) As Bool
If Dir=0 it's "s" if Dir=1 it's "t"
i don't know what "s" and "t" mean, and i don't know how to write the code !!!
s=U ... t=v ... its just some different variables that get used here and there...
Code this shouldn't be this complicated. With 3 variables, one for the surface (srf), one boolean for the U direction, and another for V, it would look something like below.
If U Then srf.Reverse(0)
If V Then srf.Reverse(1)
A = srf
Ho yes please, could you send me a GH file?
because i am a beginer with the grasshopper's VB. It took me time to understand that grasshopper's VB wasn't the same functions of Rhino's VB Script. And if i use rhino's script a little, i am lost with grasshopper's VB.
I have this probleme, i just want to reverse U and V of a surface because, i would like to trim my surface with isocurve in U and V and keep only one surface on two.
If it's not the good direction of U and V, it doesn't work because, i have two surfaces at the end who are the same.
I want : "surface" "no surface" "surface" "no surface"
And i have : "surface" "no surface" "surface"
It will be more easy to understand with the jpeg file.
Ok it works, but it is not that i would like to do. I am wrong with the word because i don't want to reverse U and V, but i want to exchange U by V and vice versa !!!
So it's not "OnSurface.Reverse()" but something else....
Permalink Reply by to] on October 23, 2009 at 10:44am
hi brice
you just have to think about a other workflow for your problem
so divide your surface in u and v then use the subsetcomponent and cull your surfaces with the right cull-logic and you will get your sketched image
trimming is not the right way for that
-to]
Ok, thank you.
i have understood the beginning. I didn't know that i could connect a surface with an interval². It's "fast and furious(4)" than i did!
But for the next and your "logic cull".....with a serie....I don't bealieve that it works because we need only one number or two max.
Permalink Reply by to] on October 23, 2009 at 12:26pm
so due to your case than you need it changing from the first row to the next you need series with intervals for the right indexes
but you can also achieve it with a true false logic but i would recommend you the first version
just try what you prefer best
I am sorry but i don't really understand what you mean.
and my difficult in englih doesn't facilitate the exercise !
You replace "Cull" with double series ?
If you have time later, i am interrested in what you say but i bealieve i need a gh file in order to understand what you really mean.
thanks