Geometry#

class pinnx.geometry.Geometry(dim, bbox, diam)[source]#

Base class for defining geometries.

Parameters:
  • dim (int) – The dimension of the geometry.

  • bbox (Sequence) – The bounding box of the geometry.

  • diam (float) – The diameter of the geometry.

difference(other)[source]#

CSG Difference.

Parameters:

other – The other geometry object.

intersection(other)[source]#

CSG Intersection.

Parameters:

other – The other geometry object.

uniform_boundary_points(n)[source]#

Compute the equi-spaced point locations on the boundary.

Parameters:

n – The number of points.

Return type:

ndarray

uniform_points(n, boundary=True)[source]#

Compute the equi-spaced point locations in the geometry.

Parameters:
  • n – The number of points.

  • boundary (bool) – If True, include the boundary points.

Return type:

ndarray

union(other)[source]#

CSG Union.

Parameters:

other – The other geometry object.