ladybug_geometry.util module¶
Utility functions used by several different geometry methods.
- ladybug_geometry.util.coordinates_hash(point, tolerance)[source]¶
Convert XY coordinates of a Point2D into a string useful for hashing.
Points that are co-located within the tolerance will receive the same string value from this function, which helps convert line segments that contain duplicated vertex references them into a singular network object where co-located vertices are referenced only once.
- Parameters:
point – A Point2D object.
tolerance – floating point precision tolerance.
- Returns:
A string of rounded coordinates.
- ladybug_geometry.util.coordinates_hash_3d(point, tolerance)[source]¶
Convert XY coordinates of a Point3D into a string useful for hashing.
Points that are co-located within the tolerance will receive the same string value from this function, which helps convert line segments that contain duplicated vertex references them into a singular network object where co-located vertices are referenced only once.
- Parameters:
point – A Point3D object.
tolerance – floating point precision tolerance.
- Returns:
A string of rounded coordinates.