Stub-backed CPACS Behavior

The current package uses deterministic stand-ins from tigl_mcp.cpacs and tigl_mcp.cpacs_stubs instead of requiring full TiXI/TiGL installations.

Why this exists

  • Local development stays lightweight.

  • CI remains deterministic.

  • Tests can validate payload shapes and workflow contracts without native geometry dependencies.

What is intentionally simplified

  • Bounding boxes are derived from component index, not real geometry.

  • Sampling and intersections are synthetic but deterministic.

  • Mesh and CAD exports are format-like payloads designed for stable testing.

Utility models and parsing helpers for CPACS content.

This module offers lightweight stand-ins for TiXI/TiGL objects. The goal is to provide predictable behavior in test environments while preserving the shape of the real APIs. Geometry calculations are intentionally simplified; the focus is on producing deterministic, well-structured JSON for the MCP tools.

class tigl_mcp.cpacs.BoundingBox(xmin, xmax, ymin, ymax, zmin, zmax)[source]

Axis-aligned bounding box.

classmethod combine(boxes)[source]

Combine multiple bounding boxes into a single envelope.

classmethod from_index(index)[source]

Create a simple bounding box derived from an index.

class tigl_mcp.cpacs.CPACSConfiguration(wings, fuselages, rotors, engines)[source]

Parsed CPACS configuration used by the MCP tools.

all_components()[source]

Return all components in a single list.

bounding_box()[source]

Envelope covering all components.

find_component(uid)[source]

Locate a component by UID (exact match first, then case-insensitive).

class tigl_mcp.cpacs.ComponentDefinition(uid, name, index, type_name, symmetry, parameters, bounding_box)[source]

Description of a CPACS component.

class tigl_mcp.cpacs.TiglConfiguration(cpacs_configuration, closed=False)[source]

Lightweight TiGL configuration stub.

close()[source]

Mark the configuration as closed.

getEngineCount()[source]

Return the number of engines in the configuration.

getFuselageCount()[source]

Return the number of fuselages in the configuration.

getRotorCount()[source]

Return the number of rotors in the configuration.

getWingCount()[source]

Return the number of wings in the configuration.

class tigl_mcp.cpacs.TixiDocument(xml_content, file_name=None, closed=False)[source]

Lightweight TiXI document stub.

close()[source]

Mark the document as closed.

tigl_mcp.cpacs.build_handles(xml_content, file_name)[source]

Create TiXI/TiGL stand-ins from XML content.

tigl_mcp.cpacs.extract_metadata(xml_content, file_name)[source]

Extract common header metadata from CPACS content.

tigl_mcp.cpacs.parse_cpacs(xml_content)[source]

Parse CPACS XML content into a configuration representation.