ed.shape¶
Classes¶
Represents shape properties |
|
Represents a right prism, i.e., a prism in which the joining edges and faces are perpendicular to the base |
Functions¶
Creates a shape from the convex_hull, z_min and z_max of the EntityInfo object. If no convex hull is present, |
Module Contents¶
- class ed.shape.Shape[source]¶
Bases:
ed.util.equal_hash_mixin.EqualHashMixin
Represents shape properties
- property convex_hull: List[PyKDL.Vector]¶
- Return type:
List[PyKDL.Vector]
- class ed.shape.RightPrism(convex_hull, z_min, z_max)[source]¶
Bases:
Shape
Represents a right prism, i.e., a prism in which the joining edges and faces are perpendicular to the base faces. This is typical for the shapes resulting from the convex hull, z min and z max of EntityInfo
Constructor
- Parameters:
convex_hull (List[PyKDL.Vector]) – list with vectors representing the vertices of the convex hull. N.B.: these should only contain x and y values, the z-values are not relevant (the height information is contained in the z_min and z_max parameters).
z_min (float) – Minimum height [m] w.r.t. the center of the corresponding Entity
z_max (float) – Maximum height [m] w.r.t. the center of the corresponding Entity
- _convex_hull¶
- _z_min¶
- _z_max¶
- _calc_convex_hull()[source]¶
- Return type:
List[PyKDL.Vector]
- _calc_size()[source]¶
Calculate the rough size of a shape >>> RightPrism([kdl.Vector(0, 0, 0), kdl.Vector(0, 1, 0), kdl.Vector(1, 1, 0), kdl.Vector(1, 0, 0)], z_min=0, z_max=1).size 1.0 >>> RightPrism([kdl.Vector(0, 0, 0), kdl.Vector(0, 2, 0), kdl.Vector(2, 2, 0), kdl.Vector(2, 0, 0)], z_min=0, z_max=2).size 8.0
- Return type: