Verifies that an object is visible in a view.
rhinoscript.object.IsVisibleInView (object_id, view=None)
strObject |
Required.字符串。The identifier of an object. |
strView |
可选参数。字符串。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. |
Null |
On error. |
Dim strObject, strView
strObject = Rhino.GetObject("Select object")
If Rhino.IsObject(strObject) Then
strView = Rhino.CurrentView
If Rhino.IsVisibleInView(strObject, strView) Then
Rhino.Print "The object is visible in " & strView & "."
Else
Rhino.Print "The object is not visible in " & strView & "."
End If
End If