bbi.placement¶
- class Placement¶
Bases:
objectBase class for placement strategies.
When called, Placements return a list of
Vector3objects representing the transformed positions.Subclasses should implement the
__call__()method, may implement additional__init__()arguments if required.
- class RandomUniform¶
Bases:
PlacementRandomly 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:
PlacementGiven a Point, get scattered positions on the Point’s horizontal plane.
Uses a random normal (Gaussian) distribution with mean
origin.positionand standard deviationsizeto samplequantitypositions. 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:
PlacementGet scattered positions around a Point spherically in three dimensions.
Uses a random normal (Gaussian) distribution with mean
origin.positionand standard deviationsizeto samplequantitypositions.- 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).