CompositeShape¶
- class CompositeShape(shape1: Shape, shape2: Shape, op: Callable)¶
A composition of 2 shapes using some operator (and, or, xor…)
This shape is usually not created directly but present the result of applying logical or arithmetic operators on other shapes.
- Parameters:
- shape1, shape2_cpp.Shape
The shapes which shall be composed.
- opCallable
A logical operator (and, or, xor…) to use for the composition.
Attributes
lattice_offset
vertices
Methods
contains
(x, y, z)Return
True
if the given position is located within the shapeplot
([resolution])Plot a lightly shaded silhouette of the composite shape
with_offset
(vector)Return a copy that's offset by the given vector
- contains(x: numpy.ndarray[numpy.float64[m, 1]], y: numpy.ndarray[numpy.float64[m, 1]], z: numpy.ndarray[numpy.float64[m, 1]])¶
Return
True
if the given position is located within the shapeGiven arrays as input the return type is a boolean array.
- Parameters:
- x, y, zarray_like
Positions to test against the shape.