ladybug_geometry.intersection3d module

Utility functions for computing intersections between geometry in 3D space.

Taken mostly from the euclid package available at https://pypi.org/project/euclid/

ladybug_geometry.intersection3d.closest_point3d_between_line3d_plane(line_ray, plane)[source]

Get the two closest Point3D between a LineSegment3D/Ray3D and a Plane.

Parameters:
  • line_ray – A LineSegment3D or Ray3D object along which the closest point will be determined.

  • plane – A Plane object on which a closest point will be determined.

Returns:

Two Point3D objects representing

  1. The point on the line_ray that is closest to the plane.

  2. The point on the plane that is closest to the line_ray.

Will be None if there is an intersection between line_ray and the plane

ladybug_geometry.intersection3d.closest_point3d_on_line3d(point, line_ray)[source]

Get the closest Point3D on a LineSegment3D or Ray3D to the input point.

Parameters:
  • point – A Point3D object.

  • line_ray – A LineSegment3D or Ray3D object along which the closest point will be determined.

Returns:

Point3D for the closest point on line_ray to point.

ladybug_geometry.intersection3d.closest_point3d_on_line3d_infinite(point, line_ray)[source]

Get the closest Point3D on an infinite extension of a LineSegment3D or Ray3D.

Parameters:
  • point – A Point3D object.

  • line_ray – A LineSegment3D or Ray3D object along which the closest point will be determined.

Returns:

Point3D for the closest point on the line_ray to the point.

ladybug_geometry.intersection3d.closest_point3d_on_plane(point, plane)[source]

Get the closest Point3D on a Plane to the input point.

Parameters:
  • point – A Point3D object.

  • plane – A Plane object in which the closest point will be determined.

Returns:

Point3D for the closest point on the plane to point.

ladybug_geometry.intersection3d.intersect_line3d_plane(line_ray, plane)[source]

Get the intersection between a Ray3D/LineSegment3D and a Plane.

Parameters:
  • line_ray – A LineSegment3D or Ray3D object.

  • plane – A Plane object to intersect.

Returns:

Point3D of intersection if it exists. None if no intersection exists.

ladybug_geometry.intersection3d.intersect_line3d_plane_infinite(line_ray, plane)[source]

Get the intersection between a Plane and Ray2D/LineSegment2D extended infinitely.

Parameters:
  • line_ray – ALineSegment2D or Ray2D that will be extended infinitely for intersection.

  • plane – A Plane object to intersect.

Returns:

Point3D of intersection if it exists. None if no intersection exists.

ladybug_geometry.intersection3d.intersect_line3d_sphere(line_ray, sphere)[source]

Get the intersection between this Sphere object and a Ray2D/LineSegment2D.

Parameters:
  • line_ray – A LineSegment3D or Ray3D for intersection.

  • sphere – A Sphere to intersect.

Returns:

Two Point3D objects if a full intersection exists. A Point3D if a point of tangency exists. Will be None if no intersection exists.

ladybug_geometry.intersection3d.intersect_plane_plane(plane_a, plane_b)[source]

Get the intersection between two Plane objects.

Parameters:
  • plane_a – A Plane object.

  • plane_b – Another Plane object to intersect.

Returns:

Two objects that define the intersection between two planes

  1. A Point3D that lies along the intersection of the two planes.

  2. A Vector3D that describes the direction of the intersection.

Will be None if no intersection exists (planes are parallel).

ladybug_geometry.intersection3d.intersect_plane_sphere(plane, sphere)[source]

Get the intersection of a plane with this Sphere object

Parameters:
  • plane – A Plane object.

  • sphere – A Sphere to intersect.

Returns:

If a full intersection exists

  1. A Point3D that represents the center of the intersection circle.

  2. A Vector3D that represents the normal of the intersection circle.

  3. A number that represents the radius of the intersection circle.

A Point3D Object if a point of tangency exists. None if no intersection exists.