Skip to content

jitx/shapes/Union

Package name: jitx/shapes/Union

Summary

Union

Union

Functions

Function Description
Union Create a union shape from a sequence of shapes and/or other nested sequences.

General Definitions

Function Description
subshapes Generate a sequence of all subshapes of the given shape.

Definitions

Union

Union

public defstruct Union <: Shape & HasMetaUtils :
    shapes: Tuple<Shape>

  • shapes: Tuple<Shape> - The shapes which comprise this union shape.

A shape formed from the joining of one or more other shapes together.

Functions

Union

Create a union shape from a sequence of shapes and/or other nested sequences.

public defn Union (elements:Seqable<Shape|Seqable>)

  • elements: Seqable<Shape|Seqable> - The sequence of shapes and/or other nested sequences to make the union shape from.

The sequence is "flattened" first to create the tuple of shapes used.

General Definitions

subshapes

Generate a sequence of all subshapes of the given shape.

public defn subshapes (s:Shape) -> Seq<Shape>

  • s: Shape - The shape whose subshapes to generate the sequence of.
  • Returns Seq<Shape>

Useful for iterating over subshapes of a union shape.

Related Packages

Forwarded by packages: jitx/shapes, jitx