Difference between revisions of "IsSurfaceAbove"

From scripting
Jump to: navigation, search
(Created page with " Function IsSurfaceAbove(BottomObj As Variant, TopObj As Variant) As Boolean If IsUpdatable(BottomObj) = False Or IsUpdatable(TopObj) = False Then IsSurfaceAbove...")
 
(No difference)

Latest revision as of 07:03, 22 April 2017

Function IsSurfaceAbove(BottomObj As Variant, TopObj As Variant) As Boolean
If IsUpdatable(BottomObj) = False Or IsUpdatable(TopObj) = False Then
    IsSurfaceAbove = False
    Exit Function
End If
Dim BMeas
Set BMeas = TheSPAWorkbench.GetMeasurable(BottomObj)
Dim TMeas
Set TMeas = TheSPAWorkbench.GetMeasurable(TopObj)

Dim BCoord(2)
Dim TCoord(2)
BMeas.GetCOG BCoord
TMeas.GetCOG TCoord
If BCoord(2) < TCoord(2) Then
    IsSurfaceAbove = True
Else
    IsSurfaceAbove = False
End If
End Function