Distance calculation by projection method
Hello,
I wanted to find out the distance between the point on a horizontal line and the ceiling( having slope) so i used following code-
IList<Reference> ceilreferences = HostObjectUtils.GetBottomFaces(ceil);
Face lface=null;
foreach (Reference myRef in ceilreferences)
{
lface = ceil.GetGeometryObjectFromReference(myRef) as Face;
}
IntersectionResult faceIntersectResult = lface.Project(point);
double distanceFromPointToCeil = faceIntersectResult .Distance;
But this code is not giving me exact distance between point and ceiling (having slope). At starting of slope this difference between distance is very less and as you proceed along X direction difference increases.
Please find attached image.
Please let me know if there is any other method to find this.
Thanks.