Grasshopper

algorithmic modeling for Rhino

Reverse U and V with the VB's function : OnSurface.Reverse

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 !!!

Views: 1105

Replies are closed for this discussion.

Replies to This Discussion

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

Let me know if you need an actual GH file.
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.

(i bealive that my english is very bad !!!! ).

Thank you for your answer!
Attachments:
Sorry, I was quite busy yesterday. Below is a definition that will reverse the U and V direction of the surface.
Attachments:
thank you but i bealive it doesn't work.
I have tried and....
I give you the file !!!
Attachments:
I don't know if "reverse" is the good word because i would like to exchange U with V coordinate !!!!
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....
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]
Tu parles pas francais par hasard ?? Parceque j'ai rien compris !!!!
Do you speak french? because i have understood nothing !! LOL

I divide my surface in u and v....until this, it's ok!
but use subsetcomponent ??? is it "Logic-List-Sublist" ???
I don't see what you mean !!
hi brice

nop no french
below a system drawing hope it helps

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.
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

-to]
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

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service