CompositeShape¶

class
CompositeShape
(shape1, shape2, op)¶ 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.
 op : Callable
A logical operator (and, or, xor…) to use for the composition.
Methods
contains
(x, 1]], y, 1]], z, 1]])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[float32[m, 1]], y: numpy.ndarray[float32[m, 1]], z: numpy.ndarray[float32[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, z : array_like
Positions to test against the shape.

plot
(resolution=(1000, 1000), **kwargs)¶ Plot a lightly shaded silhouette of the composite shape
Parameters:  resolution : Tuple[int, int]
The (x, y) pixel resolution of the generated image.
 **kwargs
Forwarded to
matplotlib.pyplot.imshow()
.

with_offset
(vector)¶ Return a copy that’s offset by the given vector