Anyway to get a notice "Object Closed you can now get yourself a beer" when surface closed?


#1

When joining surfaced to see if closed, I use the showedge(naked edge) tool opened,
but in the commandline it would be helpful if it shows that the object is closed at the
end.
Right now I need to scroll up in the command line to find that message as below:
Is there anyway to get the “Closed surface” notice where it’s more noticable?
or is it there already somewhere…?


#2

How about SelClosedPolysurface…?

You could also put the following on a toolbar button or alias:

import rhinoscriptsyntax as rs
msg="Select surface, polysurface or mesh object to check"
obj=rs.GetObject(msg,8+16+32,preselect=True)
if obj:
    closed=False
    if rs.IsMesh(obj):
        if rs.IsMeshClosed(obj): closed=True
    else:
        if rs.IsObjectSolid(obj): closed=True
    if closed:
        msg="OBJECT IS CLOSED !  Go get yourself a beer."
    else:
        msg="OBJECT IS NOT YET CLOSED !  No beer for you yet."
    rs.MessageBox(msg)

–Mitch


#3

Thanks for the script.
I think this will be good.

Is it possible for the script to run a join command then do the script you provided right after? to check in one go?


(Wim Dekeyser) #4

But… the way this is supposed to work is that when you have selected surfaces that make up a closed polysurface, the join command automatically stops. So, in theory, as long as the command is active, your object is still open.

That said, I regularly run into situations where Rhino doesn’t detect that the object is closed. I haven’t spent time trying to find out in which situations it doesn’t work and I don’t remember this issue mentioned here before…


#5

I think the way I wrote the first question was a bit confusing…
Sorry about that.

So, it’s when I have polysurface which is not close yet.
I create some surfaces, then try to join them together.
If I know for sure it is not closed and have an open area, I have showedges to direct to the open edges.

Then I create some more surfaces and use join to join them up.
If I think I had a good closed surface and the result is actually closed surface from rhino point of view, I’d like to get a note that the join command succeeded in closing the polysurface.

Currently I usually scroll the command line as the information if is valid and closed is written there. If it’s not, I’ll see valid and open polysurface, but any indication that I don’t need to scroll the command line would be nice, i.e. when the surface is valid.

…maybe it may be annoying if closing up simple surfaces. I just would like closed polysurface information to appear at the end of the command line after join command I guess… not sure what it shows now…


#6

@Helvetosaur. I love that, totally funny if the command line would say that.


(Diego Krause) #7

when you select an object, the porperties tab tells you if it is an open or closed polysurface in the Type field.


#8

Hi @Toshiaki_Takano, the _Join command deselects the result once it is closed when you picked the surfaces & polysurfaces to join one by one. A simple way to check without looking up in the commandline is to just start _Join again. If it deselects a pre-selected object, the object is closed.

_
c.


#9

@Helvetosaur That is good. Currently I use “what” but this one I do not even need to select the object…and it works for closed t-splines objects which the properties panel type field does not. Thanks. SCP = -SelClosedPolysrf is a new alias :slight_smile:

For the properties panel to tell you if a t-spline is closed it looks to me like you need to select the object, toggle the panel if it is not open and then select details. That details section looks exactly like the what command output.