Hi @SandmanINV
I don't know exactly how you define over/under the plane. If its about the Z-position you can use this rule:
Dim oPlane As WorkPlane = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kWorkPlaneFilter, "Pick plane.")
Dim oPoint As WorkPoint = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kWorkPointFilter, "Pick point.")
Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
Dim oLine As Line = oTG.CreateLine(oPoint.Point, oTG.CreateVector(0, 0, 1))
Dim oIntPoint As Point = oLine.IntersectWithSurface(oPlane.Plane).Item(1)
Select Case oIntPoint.Z
Case > oPoint.Point.Z
MsgBox("Point is under plane")
Case < oPoint.Point.Z
MsgBox("Point is over plane")
Case oPoint.Point.Z
MsgBox("Point is on plane")
End Select
If it's about the planes normal, where over plane means that the point is in positive normal direction from the plane you can use this rule:
Dim oPlane As WorkPlane = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kWorkPlaneFilter, "Pick plane.")
Dim oPoint As WorkPoint = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kWorkPointFilter, "Pick point.")
Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
Dim oLine As Line = oTG.CreateLine(oPoint.Point, oPlane.Plane.Normal.AsVector)
Dim oIntPoint As Point = oLine.IntersectWithSurface(oPlane.Plane).Item(1)
If oIntPoint.IsEqualTo(oPoint.Point)
MsgBox("Point is on plane")
Else
If oIntPoint.VectorTo(oPoint.Point).AsUnitVector.IsEqualTo(oPlane.Plane.Normal)
MsgBox("Point is over plane")
Else
MsgBox("Point is under plane")
End If
End If