bbi.placement¶
- class Placement¶
Bases:
object
Base class for placement strategies.
When called, Placements return a list of
Vector3
objects representing the transformed positions.Subclasses should implement the
__call__()
method, may implement additional__init__()
arguments if required.
- class RandomUniform¶
Bases:
Placement
Randomly sample from the geometry according to a uniform distribution.
Important
For points, the same point is returned quantity times.
For lines, points are sampled randomly along the line segment.
For cuboids, points are sampled randomly within the cuboid.
- class Scatter2D(size: tuple[float, float] = (1.0, 1.0))¶
Bases:
Placement
Given a Point, get scattered positions on the Point’s horizontal plane.
Uses a random normal (Gaussian) distribution with mean
origin.position
and standard deviationsize
to samplequantity
positions. The sampled positions will have the same z-value as the input Point.- Parameters:
size (tuple[float], optional) – The (x, y) extent of the scatter. This is the standard deviation of the Gaussian distribution used to sample positions. Defaults to (1.0, 1.0).
- class Scatter3D(size: tuple[float, float, float] = (1.0, 1.0, 1.0))¶
Bases:
Placement
Get scattered positions around a Point spherically in three dimensions.
Uses a random normal (Gaussian) distribution with mean
origin.position
and standard deviationsize
to samplequantity
positions.- Parameters:
size (tuple[float], optional) – The (x, y, z) extent of the scatter. This is the standard deviation of the Gaussian distribution used to sample positions. Defaults to (1.0, 1.0, 1.0).