In Rhino 7 rhinoscriptsyntax the ObjectsByType(geometry_type, select, state) function is not returning a list of ids properly constrained by the State parameter. A similar bug was reported in R5 and another (slightly different) in R6. Now here we are in R7 with another different behaviour and it’s still not right.
Here are two surfaces with 4 and 6 control points on respectively. Running ObjectsByType with the geometry type set to grip returns the correct results for each of the four principal states:
Now turn off the red layer. State 0 (All objects) is correct, State 1 (Normal objects) is correct, State 4 (Hidden objects) is wrong (should show 6 grips):
Turn the red layer on again and hide (Ctrl-H) the black object. Now State 1 is incorrect (should show 6 grips) as well as State 4 (should show 4 grips):
ObjectsByTypeBugDemoObjects.3dm (35.7 KB)
ObjectsByTypeBugDemoCode.py (349 Bytes)
Regards
Jeremy