← Back to XCS Module

XCS File Format Specification

VANTAGE-ALPHA Baseline | Locked 2026-03-18

This document defines the strictly required structure for .xcs (xTool Creative Space) files to ensure full compatibility with the xTool F2 hardware system.

Root Metadata & Hierarchy

Every XCS project must follow a specific top-level node hierarchy to be recognized by the F2 system.

1. Laser Source & Unit Mapping

The xTool F2 hardware switches between two distinct laser sources. The XCS format handles this via specific string keys and internal mappings.

Hardware Constants

Source Wavelength Spot Size XCS Key (processingLightSource)
IR Laser 1064nm (Fiber) 0.03mm (Circular) "red" or "ir"
Blue Laser 455nm (Diode) 0.08 x 0.06mm (Rect) "blue"

Parameter Definitions

2. Shape-to-Parameter Mapping

XCS links geometry (on the canvas) to processing settings (in the device tree) using a strict three-point synchronization logic.

canvasId
canvas[0].id
device.data.value[canvasId]

Individual shapes are linked via their unique GUIDs:

3. Mandatory Processing Structure

UI Integrity Rule: For the xTool F2 user interface to function correctly (showing power/speed sliders), every shape in the device tree MUST include all four operation nodes, even if they are empty or inactive.

Operation Keys (Processing Types)

Key Type Description
COLOR_FILL_ENGRAVE Fill Standard area engrave. Uses 1:1 LPCM mapping. Includes scanAngle and bitmapScanMode.
VECTOR_ENGRAVING Score Outlines / line-following. Used for "Score" in UI.
VECTOR_CUTTING Cut High-power cutting operations.
BITMAP_ENGRAVING Image Specific to BITMAP types. Uses dpi and dotDuration.
RELIEF 3D Advanced depth mode. Includes sliceNumber (usually 256) and zAxisMove.
INTAGLIO 3D Relief and deep engraving operations.

4. Text Object Specification

Text objects are the most complex node in XCS. For the F2 system (which often processes offline), the file must contain baked glyph paths.

Mandatory Text Fields

Anchoring & Layout

XCS uses a Left-Baseline anchor for text. The exporter must manually calculate positions for alignment.

Scenario Anchor (x, y) Growth Direction
Horizontal (0°) Left-edge Baseline Grows Right (+X)
Vertical (-90°) Top-edge Baseline Grows Down (+Y)
Centering Manual Offset Required x = targetX - (width/2)

5. Layer Sequencing & Processing Order

Sequencing is controlled by layer metadata combined with global path planning flags.

Layer Metadata

Located in canvas[0].layerData[HEX_COLOR].order.
Note: Processing typically occurs from Highest Order to Lowest Order.

Global Sequencing Config

Path: device.data.value[canvasId].data.LASER_PLANE

6. Integrity Rules (Validation)

7. Unknown & Unverified Details

The following aspects of the XCS format have been observed but their exact behavioral impact or implementation details remain unverified:

########################################
# !!! REMINDER: Hard Refresh (Cmd+Shift+R) !!! #
########################################