Rs.FlipSurface wonky?


#1

I dont understand rs.FlipSurface. I feel like it should return a flipped surface. Is it flipping the surface I pass in? I cant seem to get it to work. @@

Thanks in advance.


#2

Hi Jake,

below seems to work over here if the surface has not been flipped already:

import rhinoscriptsyntax as rs

surf = rs.GetObject("Select object", rs.filter.surface)
if surf:
    flip = rs.FlipSurface(surf, True)

if it is flipped, i can change its flipped state back using:

flip = rs.FlipSurface(surf, False)

do you see something different ? (Tip: In your display mode, assign a different backface color to quickly see if it worked)

c.


#3

Hi Jake.

Try this:

if (rs.FlipSurface(surf, False)):
    pass
else:
    rs.FlipSurface(surf, True)

EDIT: Again did not refresh the page. I owe you a beer for this Clement.


#4

i love it ! :wink:


#5

The beer? :smiley:
Thanks


#6

yeah…and the script to toggle the flipped state without knowing it :wink:


#7

I see I was trying to make it do something else. I’ll post what I am trying to do in a new post so it will be easier to search. Thanks guys.