Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5750

Rhinoscriptsyntax polysurface filter also accepts single surfaces

$
0
0

@Helvetosaur wrote:

If I run the following:

rs.GetObjects("Select a polysurface",rs.filter.polysurface)

it will also select a single surface object. The mechanism is clear, in selection.py we have:

image

Type 16 is a polysurface - but the filter accepts any brep, including a single face.

This is NOT the case with VB Rhinoscript, a type 16 excludes single faced breps.

Currently, if I want to filter correctly for a polysurface, I need to add a custom filter:

def real_ps_filt(rhino_object, geometry, component_index):
    if geometry.Faces.Count>1: return True

rs.GetObjects("Select a polysurface",rs.filter.polysurface,custom_filter=real_ps_filt)

Methinks this needs ‘adjustment’…

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5750

Trending Articles