(
        self,
        input_entity,
        translation_axis: list[float],
        rotation_axis: list[float],
        point_on_axis: list[float],
        angle: float,
        num_layers: int | list[int] | None = None,
        heights: list[float] | None = None,
        recombine: bool = False,
    )
return top, extruded, lateral
Twist (translation + rotation) of any entity along a given translation_axis,
        around a given rotation_axis, about a given angle.
Twist (translation + rotation) of any entity along a given translation_axis,
        around a given rotation_axis, about a given angle.
Twist ( translation + rotation ) of any entity along a given translation_axis around a given rotation_axis about a given angle .
def twist(
        self,
        input_entity,
        translation_axis: list[float],
        rotation_axis: list[float],
        point_on_axis: list[float],
        angle: float,
        num_layers: int | list[int] | None = None,
        heights: list[float] | None = None,
        recombine: bool = False,
    ):
        """Twist (translation + rotation) of any entity along a given translation_axis,
        around a given rotation_axis, about a given angle.
        """
        if isinstance(num_layers, int):
            num_layers = [num_layers]
        if num_layers is None:
            num_layers = []
            heights = []
        else:
            if heights is None:
                heights = []
            else:
                assert len(num_layers) == len(heights)

        assert len(point_on_axis) == 3
        assert len(rotation_axis) == 3
        assert len(translation_axis) == 3
        assert angle < math.pi
        out_dim_tags = self.env.twist(
            input_entity.dim_tags,
            *point_on_axis,
            *translation_axis,
            *rotation_axis,
            angle,
            numElements=num_layers,
            heights=heights,
            recombine=recombine,
        )
        top = Dummy(*out_dim_tags[0])
        extruded = Dummy(*out_dim_tags[1])
        lateral = [Dummy(*e) for e in out_dim_tags[2:]]
        return top, extruded, lateral
def twist ( self , input_entity , translation_axis : list [ float ] , rotation_axis : list [ float ] , point_on_axis : list [ float ] , angle : float , num_layers : int | list [ int ] | None = None , heights : list [ float ] | None = None , recombine : bool = False , ) : if isinstance ( num_layers , int ) : num_layers = [ num_layers ] if num_layers is None : num_layers = [ ] heights = [ ] else : if heights is None : heights = [ ] else : assert len ( num_layers ) == len ( heights ) assert len ( point_on_axis ) == 3 assert len ( rotation_axis ) == 3 assert len ( translation_axis ) == 3 assert angle < math . pi out_dim_tags = self . env . twist ( input_entity . dim_tags , * point_on_axis , * translation_axis , * rotation_axis , angle , numElements = num_layers , heights = heights , recombine = recombine , ) top = Dummy ( * out_dim_tags [ 0 ] ) extruded = Dummy ( * out_dim_tags [ 1 ] ) lateral = [ Dummy ( * e ) for e in out_dim_tags [ 2 : ] ] return top , extruded , lateral