Package Scientific :: Package Geometry :: Module Objects3D :: Class GeometricalObject3D

[frames] | no frames]

# Class GeometricalObject3D

Known Subclasses:
  - Circle
  - , Cone
  - , Line
  - , Plane
  - , Sphere

Geometrical object in 3D space

This is an abstract base class; to create instances, use one of the subclasses.

Instance Methods

`float`

distanceFrom(self, point) |

`bool`

hasPoint(self, point) Returns: `True` if point is in the object |

GeometricalObject3D or `NoneType`

intersectWith(self, other) Returns: the geometrical object that results from the intersection with other. |

`float` or `NoneType`

volume(self) Returns: the volume of the object. |

Method Details

### distanceFrom(self, point)

Parameters:
  - `point` (Scientific.Geometry.Vector @returns the distance of point from the closest point of the object) - a point in space
Returns: `float`

### hasPoint(self, point)

Parameters:
  - `point` (Scientific.Geometry.Vector) - a point in space
Returns: `bool`
  `True` if point is in the object

### intersectWith(self, other)

Parameters:
  - `other` (GeometricalObject3D) - another geometrical object
Returns: GeometricalObject3D or `NoneType`
  the geometrical object that results from the intersection with other. If there is no intersection, the result is `None`.

Note: Intersection is not implemented for all possible pairs of objects. A 'ValueError' is raised for combinations that haven't been implemented yet.

### volume(self)

Returns: `float` or `NoneType`
  the volume of the object. The result is `None` for unbounded objects and zero for lower-dimensional objects.