# `GSGlyph decomposeAndCleanupError:ignoreIncompatible:`

*Instance Method*

Prepares selected interpolation layers for TrueType curve conversion.

## Declaration

```swift
func decomposeAndCleanupError(_ error: NSErrorPointer, ignoreIncompatible: Bool) -> Bool
```

```objc
- (BOOL) decomposeAndCleanupError:(NSError **) error ignoreIncompatible:(BOOL) ignoreIncompatible;
```

```python
decomposeAndCleanupError_ignoreIncompatible_(ignoreIncompatible: bool) -> tuple[bool, NSError]
```

## Parameters

- `error` — On return, an error caused by invalid path structure.
- `ignoreIncompatible` — Whether to omit layers whose shapes are incompatible with the default master.

## Return Value

Whether the selected layers were compatible and preparation succeeded.

## Discussion

Components that cannot remain compatible are decomposed, component anchors are materialized when needed, and paths are cleaned up and validated. Hints are retained for the subsequent conversion. Layers incompatible with the default master are omitted when `ignoreIncompatible` is `YES`.

## See Also

### Curve Conversion

- [`GSGlyph convertToCompatibleTrueTypeWithError:ignoreIncompatible:error:`](/Core/GlyphsCore/GSGlyph/convertToCompatibleTrueTypeWithError:ignoreIncompatible:error:) — Converts the glyph’s compatible interpolation layers to quadratic curves.
- [`GSGlyph convertToCompatibleTrueType:curveError:error:`](/Core/GlyphsCore/GSGlyph/convertToCompatibleTrueType:curveError:error:) — Converts specified compatible layers to quadratic curves.
- [`GSGlyph convertPath:toTrueTypeWithError:error:`](/Core/GlyphsCore/GSGlyph/convertPath:toTrueTypeWithError:error:) — Converts cubic segments that can be approximated within a tolerance to quadratic segments.
- [`GSGlyph decomposeAndCleanupError:`](/Core/GlyphsCore/GSGlyph/decomposeAndCleanupError:) — Prepares compatible interpolation layers for TrueType curve conversion.
- [`GSGlyph decomposeBracketLayersSubstitutions:error:`](/Core/GlyphsCore/GSGlyph/decomposeBracketLayersSubstitutions:error:) — Separates Alternative layer groups into glyphs for variable-font substitution.

