# KiBot output for generating Position file in CSV format for JLCPCB
# https://kibot.readthedocs.io/en/latest/configuration/outputs/position.html

kibot:
  version: 1

filters:
  - name: fix_rotation
    comment: Adjust rotation for JLCPCB
    type: rot_footprint
    negative_bottom: false
    mirror_bottom: true

outputs:
  - name: @NAME@
    comment: '@COMMENT@'
    type: position
    category: '@DIR@'
    dir: '@DIR@'
    options:
      format: 'CSV'
      output: '%f-cpl%I%v.%x'
      separate_files_for_front_and_back: false
      units: millimeters
      only_smd: true
      include_virtual: false
      exclude_filter: @EXCLUDE_FILTER@
      pre_transform: '_rot_footprint_jlcpcb'
      columns:
        - id: Ref
          name: Designator
        - Val
        - Package
        - id: PosX
          name: "Mid X"
        - id: PosY
          name: "Mid Y"
        - id: Rot
          name: Rotation
        - id: Side
          name: Layer

...
definitions:
  NAME: jlcpcb_cpl
  COMMENT: Component Placement for JLCPCB
  DIR: mfg/assembly/jlcpcb
  EXCLUDE_FILTER: only_lcsc_parts
