geometry#

This module defines the generic Geometry superclass, which equips derived classes with the coordinate transformation capabilities of the Coords class.

The Geometry class is typically not used directly. Instead, users usually work with subclasses such as Mesh, or with Coords objects themselves.

Classes#

Geometry

A virtual base class for all geometry classes in HelloTriangle.

Property methods#

Geometry.xyz

Return the xyz property of the coords attribute of the Geometry object.

Geometry.x

Return the x property of the coords attribute of the Geometry object.

Geometry.y

Return the y property of the coords attribute of the Geometry object.

Geometry.z

Return the z property of the coords attribute of the Geometry object.

Geometry.xy

Return the xy property of the coords attribute of the Geometry object.

Geometry.yz

Return the yz property of the coords attribute of the Geometry object.

Geometry.xz

Return the xz property of the coords attribute of the Geometry object.

Geometry.fields

Return the Fields dict of the Geometry.

Geometry information#

Geometry.bounding_box

Call the bounding_box method on the Geometry object's coords.

Geometry.bounding_box_point

Call the bounding_box_point method on the Geometry object's coords.

Geometry.bounding_box_points

Call the bounding_box_points method on the Geometry object's coords.

Geometry.bounding_boxes

Call the bounding_boxes method on the Geometry object's coords.

Geometry.center

Call the center method on the Geometry object's coords.

Geometry.average

Call the average method on the Geometry object's coords.

Geometry.centroid

Call the centroid method on the Geometry object's coords.

Geometry.sizes

Call the sizes method on the Geometry object's coords.

Geometry.max_size

Call the max_size method on the Geometry object's coords.

Geometry.diag_size

Call the diag_size method on the Geometry object's coords.

Geometry.bounding_sphere

Call the bounding_sphere method on the Geometry object's coords.

Geometry.central_coordsys

Call the central_coordsys method on the Geometry object's coords.

Geometry.directional_size

Call the directional_size method on the Geometry object's coords.

Geometry.directional_extremes

Call the directional_extremes method on the Geometry object's coords.

Geometry.directional_width

Call the directional_width method on the Geometry object's coords.

Affine transformations#

Geometry.scale

Apply the scale transformation to the Geometry object.

Geometry.resized

Apply the resized transformation to the Geometry object.

Geometry.translate

Apply the translate transformation to the Geometry object.

Geometry.centered

Apply the centered transformation to the Geometry object.

Geometry.align

Apply the align transformation to the Geometry object.

Geometry.rotate

Apply the rotate transformation to the Geometry object.

Geometry.rotate_x

Apply the rotate_x transformation to the Geometry object.

Geometry.rotate_y

Apply the rotate_y transformation to the Geometry object.

Geometry.rotate_z

Apply the rotate_z transformation to the Geometry object.

Geometry.shear

Apply the shear transformation to the Geometry object.

Geometry.reflect

Apply the reflect transformation to the Geometry object.

Geometry.affine

Apply the affine transformation to the Geometry object.

Geometry.to_coordsys

Apply the to_coordsys transformation to the Geometry object.

Geometry.from_coordsys

Apply the from_coordsys transformation to the Geometry object.

Geometry.transform_coordsys

Apply the transform_coordsys transformation to the Geometry object.

Geometry.position

Apply the position transformation to the Geometry object.

Non-affine transformations#

Geometry.cylindrical_to_cartesian

Apply the cylindrical_to_cartesian transformation to the Geometry object.

Geometry.hyper_cylindrical

Apply the hyper_cylindrical transformation to the Geometry object.

Geometry.cartesian_to_cylindrical

Apply the cartesian_to_cylindrical transformation to the Geometry object.

Geometry.spherical_to_cartesian

Apply the spherical_to_cartesian transformation to the Geometry object.

Geometry.super_spherical

Apply the super_spherical transformation to the Geometry object.

Geometry.cartesian_to_spherical

Apply the cartesian_to_spherical transformation to the Geometry object.

Geometry.spiral

Apply the spiral transformation to the Geometry object.

Geometry.circulize

Apply the circulize transformation to the Geometry object.

Geometry.bump

Apply the bump transformation to the Geometry object.

Geometry.flare

Apply the flare transformation to the Geometry object.

Geometry.map

Apply the map transformation to the Geometry object.

Geometry.add_noise

Apply the add_noise transformation to the Geometry object.

Distance#

Geometry.distance_to_point

Call the distance_to_point method on the Geometry object's coords.

Geometry.distance_to_line

Call the distance_to_line method on the Geometry object's coords.

Geometry.distance_to_plane

Call the distance_to_plane method on the Geometry object's coords.

Projection#

Geometry.project_on_plane

Apply the project_on_plane transformation to the Geometry object.

Geometry.project_on_sphere

Apply the project_on_sphere transformation to the Geometry object.

Geometry.project_on_cylinder

Apply the project_on_cylinder transformation to the Geometry object.

Geometry.project_on_surface

Apply the project_on_surface transformation to the Geometry object.

Inertia#

Geometry.inertia

Call the inertia method on the Geometry object's coords.

Geometry.principal_coordsys

Call the principal_coordsys method on the Geometry object's coords.

Geometry.principal_sizes

Call the principal_sizes method on the Geometry object's coords.

Geometry.dimensions

Call the dimensions method on the Geometry object's coords.

Axes manipulation#

Geometry.copy_axes

Apply the copy_axes transformation to the Geometry object.

Geometry.permute_axes

Apply the permute_axes transformation to the Geometry object.

Geometry.swap_axes

Apply the swap_axes transformation to the Geometry object.

Geometry.roll_axes

Apply the roll_axes transformation to the Geometry object.

Operations on property numbers#

Geometry.set_prop

Create or destroy the property array for the Geometry.

Geometry.to_prop

Create a valid set of properties for the object.

Geometry.max_prop

Return the highest property value used.

Geometry.prop_set

Return a list with unique property values in use.

Geometry.prop_dict

Return a dict with the elements grouped per prop value.

Geometry.where_prop

Find the elements having some property value.

Entity selection#

Geometry.select

Select some element(s) from a Geometry.

Geometry.remove_selected

Return the Geometry with the selected elements removed.

Geometry.clip

Return a Geometry only containing the selected elements.

Geometry.select_prop

Select elements by their property value.

Geometry.remove_selected_prop

Return an object without the elements with property value(s).

Geometry.split_prop

Partition a Geometry according to the values in prop.

Operations on fields#

Geometry.add_field

Add Field data to the Geometry.

Geometry.get_field

Get the data field with the specified name.

Geometry.del_field

Delete the Field with the specified name.

Geometry.convert_field

Convert the data field with the specified name to another type.

Geometry.field_report

Return a short report of the stored fields

Other#

Geometry.points

Call the points method on the Geometry object's coords.

Geometry.closest_to_point

Call the closest_to_point method on the Geometry object's coords.

Geometry.adjust

Apply the adjust transformation to the Geometry object.

Geometry.copy

Return a deep copy of the Geometry object.