7. Symmetry

7.1. Symmetric components

Many components are symmetric, e.g. the left and the right side of a wing. Instead of storing both sides, such a component can be described once and mirrored with the @symmetry attribute:

<wing uID="mainWing" symmetry="x-z-plane">
    ...
</wing>
Symmetry attribute applied to a wing

The attribute can take the following values; the documentation of each element states which of them are allowed:

Value Meaning
x-y-plane, x-z-plane, y-z-plane The component is mirrored at this plane of the CPACS coordinate system, i.e. at a plane through its origin. Mirroring creates a second component: the component described by the data (defined side) is complemented by its mirror image (mirrored side), which is a component of its own.
inherit The component takes the symmetry of its parent component (<parentUID>); a component without parent is not mirrored. This is the default, i.e. it also applies if the attribute is not set.
none The component is not mirrored, even if its parent component is.

Components with a @symmetry attribute are e.g. wings, fuselages, ducts, engines, engine pylons, fuel tanks, landing gears, rotors and generic geometric components.

Because the symmetry is inherited along the <parentUID> hierarchy, it can be passed on, switched off and set anew. The following example shows four wings, each the parent of the next:

<wings>
    <wing uID="wing1" symmetry="x-z-plane">
        <name>Wing 1</name>
        ...
    </wing>
    <wing uID="wing2" symmetry="none">
        <name>Wing 2</name>
        <parentUID>wing1</parentUID>
        ...
    </wing>
    <wing uID="wing3" symmetry="x-y-plane">
        <name>Wing 3</name>
        <parentUID>wing2</parentUID>
        ...
    </wing>
    <wing uID="wing4">
        <name>Wing 4</name>
        <parentUID>wing3</parentUID>
        ...
    </wing>
</wings>
Symmetry set, switched off and inherited along the parentUID hierarchy
Four wings seen from behind, defined sides in blue and mirrored sides in amber, with the x-z and x-y planes of the CPACS coordinate system: wing1 with symmetry x-z-plane lies in the x-y plane and is mirrored to the left; wing2 with symmetry none stands upright at its tip and has no mirrored side; wing3 with symmetry x-y-plane continues outwards from the top of wing2 and is mirrored below the x-y plane; wing4 without symmetry attribute goes down from the tip of wing3 to the x-y plane and, inheriting the symmetry of wing3, is mirrored below it

The figure shows the four wings from behind, with their translations and their rotations about the x-axis, which the excerpt omits. wing1 and its mirrored side lie in the x-y plane, wing2 stands upright at its tip and exists only once, and wing3 continues outwards from the top of wing2. The mirrored sides of wing3 and wing4 lie below the x-y plane, so that wing4 and its mirrored side form one upright strut. The planes are those of the CPACS coordinate system: wing3 is mirrored at the x-y plane through the origin, not at a plane through its parent.

7.2. References to symmetric components

Elements that reference a component by its @uID (stringUIDBaseType, e.g. <parentUID>) refer to both components created by a symmetry, i.e. to the defined and the mirrored side. The @symmetry attribute of the reference selects a single side instead:

Value Referenced part of the component
def defined side only
symm mirrored side only
full both sides, i.e. the defined and the mirrored component (default)

The attribute is only used in references to components with a @symmetry attribute.

Top view of a wing mirrored at the x-z plane with an engine pylon referencing it: with symmetry def the pylon is on the defined side only, with symm on the mirrored side only, with full on both sides

The figure shows an engine pylon whose <parentUID> references the main wing, mirrored at the x-z plane. With def, the pylon belongs to the defined side of the wing only, with symm to the mirrored side only, and with full to both sides.

<enginePylons>
    <enginePylon uID="pylon">
        <parentUID symmetry="symm">mainWing</parentUID>
        ...
    </enginePylon>
</enginePylons>
Engine pylon located only on the mirrored side of the wing

Older datasets often append the side to the referenced @uID instead, e.g. mainWing_symm for the mirrored side of the wing mainWing or engine1_def for the defined side of engine1. This is not intended and must not be used: the string does not match the @uID of the referenced element. Reference the @uID unchanged and select the side with the @symmetry attribute, as in the example above.

<enginePylons>
    <enginePylon uID="pylon">
        <parentUID>mainWing_symm</parentUID>
        ...
    </enginePylon>
</enginePylons>
Not intended: side appended to the referenced uID (do not use)