main
John Lauer Publish 1.0.0 a587bac
# adom-aiflow rules: adom-3rdpartyfab 4L (from adom/pcb-design-rules)
(version 1)

# 3rd party fab 4-layer design rules (standard process)
# 
# Min trace width: 0.09 mm (3.54 mil) - 1 oz copper, multilayer
# Min spacing: 0.09 mm (3.54 mil) - 1 oz copper, multilayer, different nets; 3 mil acceptable in BGA fan-outs
# Min drill: 0.15 mm (5.91 mil)
# Min via: 0.15 mm hole / 0.25 mm pad
# Annular ring: via 0.1 mm, pad 0.18 mm
# Copper to board edge: 0.2 mm
# Hole to hole: 0.2 mm
# Drill range: 0.15 mm to 6.3 mm
# Board thickness options: 1.6 mm
# Copper weight options: 1 oz, 2 oz
# 
# BGA pad diameter >= 0.25 mm. BGA pad to trace clearance min 0.09 mm. Vias can be placed within BGA pads using filled and plated-over vias. Finished surface copper: 1 oz standard; 2 oz on request (John Lauer, 2026-10-12). Existing weight-conditioned DRC limits remain for 1 oz; confirm 2 oz DFM before use. Hole-barrel plating and thickness tolerances are not specified by this confirmation.
# 
# Sources:
# - adom/fusion-bridge addin/AdomBridge/resources/dru/Adom-3rdPartyFab-4-Layer.edru (read 2026-09-03)
# - https://wiki.adom.inc/adom/pcb-design-rules/files/docs/3rdpartyfab-finished-copper.md (read 2026-10-12)

(rule "min-track-width"
  (constraint track_width (min 0.20mm))
  (layer "*.Cu")
  (condition "A.type == 'track'"))

(rule "min-clearance"
  (constraint clearance (min 0.20mm))
  (condition "A.type == 'track' && B.type == 'track'"))

(rule "min-hole"
  (constraint hole (min 0.15mm))
  (condition "A.type == 'pad' || A.type == 'via'"))

(rule "min-via-diameter"
  (constraint via_diameter (min 0.25mm))
  (condition "A.type == 'via'"))

(rule "min-edge-clearance"
  (constraint edge_clearance (min 0.2mm))
  (condition "A.type == 'track'"))

# 3rdPartyFab prints 0.5 mm silkscreen text.
(rule "min-silk-text-height"
  (constraint text_height (min 0.3mm))
  (layer "*.SilkS")
  (condition "A.type == 'text'"))

# interface spec section 6.5: 60 V coated board and coating-mask boundaries.
(rule "P6 HV60 coated minimum"
 (condition "A.hasNetclass('HV60') || B.hasNetclass('HV60')")
 (constraint clearance (min 0.25mm)))
(rule "P6 HV60 near coating-mask area"
 (condition "(A.hasNetclass('HV60') || B.hasNetclass('HV60')) && (A.insideArea('HV60_MASK_*') || B.insideArea('HV60_MASK_*'))")
 (constraint clearance (min 0.6mm)))

# Package-internal exception: U3, LTC4359 80 V operating.
(rule "P6 rated package U3 own pads only"
 (condition "A.Type == 'Pad' && B.Type == 'Pad' && A.memberOfFootprint('U3') && B.memberOfFootprint('U3')")
 (constraint clearance (min 0.2mm)))

# Package-internal exception: U10, INA293 110 V common-mode maximum.
(rule "P6 rated package U10 own pads only"
 (condition "A.Type == 'Pad' && B.Type == 'Pad' && A.memberOfFootprint('U10') && B.memberOfFootprint('U10')")
 (constraint clearance (min 0.2mm)))

# Package-internal exception: Q1, 100 V MOSFET.
(rule "P6 rated package Q1 own pads only"
 (condition "A.Type == 'Pad' && B.Type == 'Pad' && A.memberOfFootprint('Q1') && B.memberOfFootprint('Q1')")
 (constraint clearance (min 0.2mm)))

# Package-internal exception: Q2, 100 V MOSFET.
(rule "P6 rated package Q2 own pads only"
 (condition "A.Type == 'Pad' && B.Type == 'Pad' && A.memberOfFootprint('Q2') && B.memberOfFootprint('Q2')")
 (constraint clearance (min 0.2mm)))

# Package-internal exception: Q3, 100 V MOSFET.
(rule "P6 rated package Q3 own pads only"
 (condition "A.Type == 'Pad' && B.Type == 'Pad' && A.memberOfFootprint('Q3') && B.memberOfFootprint('Q3')")
 (constraint clearance (min 0.2mm)))

# Package-internal exception: Q4, 160 V transistor.
(rule "P6 rated package Q4 own pads only"
 (condition "A.Type == 'Pad' && B.Type == 'Pad' && A.memberOfFootprint('Q4') && B.memberOfFootprint('Q4')")
 (constraint clearance (min 0.2mm)))

# Bourns CR0402 50 V working; gate series / three-resistor voltage division. Own lands only.
(rule "P6 rated resistor R1 own pads only" (condition "A.Type == 'Pad' && B.Type == 'Pad' && A.memberOfFootprint('R1') && B.memberOfFootprint('R1')") (constraint clearance (min 0.25mm)))

# Bourns CR0402 50 V working; gate series / three-resistor voltage division. Own lands only.
(rule "P6 rated resistor R2 own pads only" (condition "A.Type == 'Pad' && B.Type == 'Pad' && A.memberOfFootprint('R2') && B.memberOfFootprint('R2')") (constraint clearance (min 0.25mm)))

# Bourns CR0402 50 V working; gate series / three-resistor voltage division. Own lands only.
(rule "P6 rated resistor R63 own pads only" (condition "A.Type == 'Pad' && B.Type == 'Pad' && A.memberOfFootprint('R63') && B.memberOfFootprint('R63')") (constraint clearance (min 0.25mm)))

# Bourns CR0402 50 V working; gate series / three-resistor voltage division. Own lands only.
(rule "P6 rated resistor R64 own pads only" (condition "A.Type == 'Pad' && B.Type == 'Pad' && A.memberOfFootprint('R64') && B.memberOfFootprint('R64')") (constraint clearance (min 0.25mm)))

# Bourns CR0402 50 V working; gate series / three-resistor voltage division. Own lands only.
(rule "P6 rated resistor R65 own pads only" (condition "A.Type == 'Pad' && B.Type == 'Pad' && A.memberOfFootprint('R65') && B.memberOfFootprint('R65')") (constraint clearance (min 0.25mm)))

# Bourns CR0402 50 V working; gate series / three-resistor voltage division. Own lands only.
(rule "P6 rated resistor R66 own pads only" (condition "A.Type == 'Pad' && B.Type == 'Pad' && A.memberOfFootprint('R66') && B.memberOfFootprint('R66')") (constraint clearance (min 0.25mm)))

# Bourns CR0402 50 V working; gate series / three-resistor voltage division. Own lands only.
(rule "P6 rated resistor R67 own pads only" (condition "A.Type == 'Pad' && B.Type == 'Pad' && A.memberOfFootprint('R67') && B.memberOfFootprint('R67')") (constraint clearance (min 0.25mm)))

# Bourns CR0402 50 V working; gate series / three-resistor voltage division. Own lands only.
(rule "P6 rated resistor R68 own pads only" (condition "A.Type == 'Pad' && B.Type == 'Pad' && A.memberOfFootprint('R68') && B.memberOfFootprint('R68')") (constraint clearance (min 0.25mm)))

# Conservative whole-polygon HV zone clearance
(rule "P6 HV60 zone margin" (condition "(A.hasNetclass('HV60') || B.hasNetclass('HV60')) && (A.Type == 'Zone' || B.Type == 'Zone')") (constraint clearance (min 0.61mm)))

# P6: DS-4L-1.6-H per interface speca; 0.20mm fabrication trace/space minima enforced, stricter HV rules preserved. Confirm final build before ordering.