Verifies that an object is visible in a view.
rhinoscriptsyntax.IsVisibleInView (object_id, view=None)
rhinoscript.object.IsVisibleInView (object_id, view=None)
object_id |
Required. String or Guid. The identifier of an object. |
view |
Optional. String. The title of the view. If omitted, the current active view is used. |
True |
The object is visible in the specified view. |
False |
The object is not visible in the specified view. |
None |
On error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select object")
if rs.IsObject(obj):
view = rs.CurrentView()
if rs.IsVisibleInView(obj, view):
print "The object is visible in", view, "."
else:
print "The object is not visible in", view, "."