master
AdityaAngajala Preserve source for molecule-publish-3.0.0 33f54d8
{
  "schema": "adom.molecule-pins/2",
  "version": 2,
  "designators": {
    "machinePin": { "pattern": "^MP[1-4]$" },
    "machinePinNumbered": { "pattern": "^MP[0-9]+$" },
    "extraMachinePin": { "pattern": "^MS[1-9][0-9]*$" },
    "machineContact": { "pattern": "^MC[1-9][0-9]*$" },
    "testPoint": { "pattern": "^TP[1-9][0-9]*$" },
    "nearMiss": { "pattern": "^(MP|MC)[0-9]+$", "flags": "i" }
  },
  "machinePinCounts": [2, 4],
  "extraPinRule": "MP1 to MP4 are the outermost corner machine pins. Any other machine pin is named extraMachinePin (MS<n>, a tentative name): it is not one of the published machine pins, has the size and length of the others, and no MS<n> pin lies further out than the MP<n> pins toward any corner (compared along the four diagonals, within cornerToleranceMm).",
  "cornerToleranceMm": 0.01,
  "contactRule": "a single-pad through-hole part on a contact-bucket hole named MC<n> is a machine contact; one that fits the hole and not the name, or the name and not the hole, is not a contact and is warned about",
  "adomParts": ["MachinePinMediumShort", "MachinePinMediumStandard", "MachinePinLargeShort", "MachinePinLargeStandard", "MachineContactMedium", "MachineContactLarge"],
  "furniturePackages": ["MACH_PIN_*", "CONTACT_MED", "CONTACT_LRG", "PIN_MED*", "ADOM_*_PIN*", "ADOM_*_CONTACT*", "MpinContact*", "MachinePin*", "MachineContact*"],
  "furnitureMatch": "glob, case ignored, against the footprint name after its last ':' and against the file name of the KiCad 3D model path",
  "drillBucketsMm": { "mediumContact": [0.78], "mediumPin": [1.20], "largeContact": [2.62], "largePin": [3.45] },
  "drillToleranceMm": 0.001,
  "drillRule": "A hole is a pin or contact hole when it matches a drill bucket within drillToleranceMm, as the importer matches it; a looser match moves the machine pin. Older library drills (1.10, 1.12 and 1.0922 mm pins, 0.81 mm and 2.72 mm contacts) are not buckets. A part named MP<n> or MC<n> on a round hole that matches no bucket is refused (hole-sizes); a part packaged as a pin or contact and named otherwise, on such a hole, is warned about.",
  "lengthWords": { "short": ["short", "sht"], "standard": ["standard", "std"] },
  "libraryModelLengths": {
    "note": "Adom library 3D models whose file name carries no length word, by file name (case ignored), with the length the model itself names. A pin hole whose footprint hint has no length word takes its length from here when its 3D model file is listed.",
    "models": { "LargeMachinePin v3.step": "standard" }
  },
  "heightsMm": { "medium-short": 2.8, "medium-standard": 5.6, "large-short": 5.6, "large-standard": 8.4 },
  "step": {
    "note": "R1 and R2 as molecule_anchor.py in the toolchain image has them. The image does not read this block; test/registry/molecule-pins-copies.test.mjs holds it to the copy test/registry/fixtures/occt/molecule_anchor.py, extracted from the image by digest.",
    "marker": {
      "rule": "R1",
      "kind": "function",
      "source": "molecule_anchor.py:196-219 _is_marker_name, with _MARKER_PREFIX (40)",
      "text": "A node name, trimmed and lower-cased, is a marker when it holds no 'contact' and either starts with 'mp', has at most 5 characters and holds a digit, or its part after the last ':' starts with 'mp', has at most 4 characters and holds a digit while the part before that ':' holds 'pin'.",
      "prefix": "mp",
      "exclude": "contact",
      "nameMaxLength": 5,
      "suffixMaxLength": 4,
      "suffixBaseContains": "pin",
      "functionSha256": "8afa11f107ad2767b8b05fcc1a053051b23fd92ce29d3cd605b12d44fe4e10bd",
      "minMarkers": 3,
      "examples": {
        "MP1": true,
        "mp2:1": true,
        "MP101": true,
        "MP1000": false,
        "MACH_PIN_LRG_SHORT:MP3": true,
        "MachinePin:MP12": true,
        "U1:MP3": false,
        "CONTACT_MED:MP9": false,
        "MpinContact_Medium v6": false,
        "MC1": false,
        "MP": false
      }
    },
    "alias": {
      "rule": "R2",
      "kind": "regex",
      "source": "molecule_anchor.py:46-48 _ALIAS_RE, _ALIAS_EXCLUDE_RE, _ALIAS_PREFER_RE",
      "pattern": "machine[\\s_-]*pin|mach[\\s_-]*pin",
      "exclude": "contact|(^|[^a-z0-9])mc\\d",
      "prefer": "large|lrg",
      "flags": "i",
      "minMarkers": 3,
      "preferMinMarkers": 3
    }
  },
  "normalize": {
    "anchor": { "pattern": "(^|[^a-z0-9])MP[1-9][0-9]*($|[^a-z0-9])|machine\\s*pin|machinepin|mach_pin", "flags": "i" },
    "anchorExclude": { "pattern": "contact|(^|[^a-z0-9])MC[1-9]", "flags": "i" },
    "gold": { "pattern": "(^|[^a-z])m\\s*pin|(^|[^a-z])mach[\\s_-]*pin|machine[\\s_-]*(pin|contact)|(^|[^a-z0-9])M[PC][1-9][0-9]*($|[^a-z0-9])", "flags": "i" }
  },
  "messages": {
    "refusalEnd": "Until this is fixed the registry builds no model for this page.",
    "boardRead": "The board file {file} could not be read: {reason}.",
    "duplicate": "{count} parts are named {name} (at {places}). Designators must be unique.",
    "census": "The board census and the metadata importer disagree on {count} attachments: {parts}. This is a registry defect; report the page.",
    "censusOne": "The board census and the metadata importer disagree on 1 attachment: {parts}. This is a registry defect; report the page.",
    "groups": "{count} multi-pad parts have contact-sized holes and are not machine contacts: {parts}. A jumper or socket connects to the molecule through MC<n> contacts.",
    "groupsOne": "1 multi-pad part has contact-sized holes and is not a machine contact: {parts}. A jumper or socket connects to the molecule through MC<n> contacts.",
    "testPoints": "{count} test points are not imported: {parts}. Test points are read from KiCad boards only; this board is {format}.",
    "testPointsOne": "1 test point is not imported: {parts}. Test points are read from KiCad boards only; this board is {format}.",
    "ignored": "{count} parts have machine-pin-sized holes but are not named or packaged as machine pins, so the importer leaves them out: {parts}.",
    "ignoredOne": "1 part has a machine-pin-sized hole but is not named or packaged as a machine pin, so the importer leaves it out: {parts}.",
    "pinCount": "This board has {count} machine pins ({parts}). A molecule has two or four machine pins, named MP1 to MP4. {fix}",
    "pinCountOne": "This board has 1 machine pin ({parts}). A molecule has two or four machine pins, named MP1 to MP4. {fix}",
    "pinNone": "No machine pins found. A molecule has two or four machine pins: parts named MP1 to MP4 with a machine-pin footprint. {found}",
    "pinNumber": "{count} machine pins are numbered outside MP1 to MP4: {parts}. MP1 to MP4 are the outermost corner machine pins; name any other machine pin MS1, MS2, ... in the board and the schematic and export again.",
    "pinNumberOne": "1 machine pin is numbered outside MP1 to MP4: {parts}. MP1 to MP4 are the outermost corner machine pins; name any other machine pin MS1, MS2, ... in the board and the schematic and export again.",
    "cornerPins": "MP1 to MP4 must be the outermost corner machine pins: {parts}. Name the corner pins MP1 to MP4 and the others MS1, MS2, ... and export again.",
    "extraPins": "{count} extra machine pins are named MS<n> and are not published as machine pins: {parts}.",
    "extraPinsOne": "1 extra machine pin is named MS<n> and is not published as a machine pin: {parts}.",
    "designatorCase": "{count} designators are not in capitals: {parts}. Name machine pins MP<n> and machine contacts MC<n>, in capitals, and export again.",
    "designatorCaseOne": "1 designator is not in capitals: {parts}. Name machine pins MP<n> and machine contacts MC<n>, in capitals, and export again.",
    "pinNameOnContact": "{count} parts on machine-contact holes are named as machine pins: {parts} (package {package}). Machine contacts are named MC<n>: rename them MC1, MC2, ... in the board and the schematic and export again.",
    "pinNameOnContactOne": "1 part on a machine-contact hole is named as a machine pin: {parts} (package {package}). Machine contacts are named MC<n>: rename it to an unused MC<n> in the board and the schematic and export again.",
    "pinsUniform": "The machine pins differ: {groups}. Every machine pin on a molecule has the same size and length. Use one machine-pin part for all of them and export again.",
    "notPins": "{count} parts fit the machine-pin standard only in part and are not treated as machine pins: {parts}. A machine pin is named MP1 to MP4 (MS<n> beyond the four corner pins) and uses a machine-pin footprint ({suggest}) on a {holes} mm hole.",
    "notPinsOne": "1 part fits the machine-pin standard only in part and is not treated as a machine pin: {parts}. A machine pin is named MP1 to MP4 (MS<n> beyond the four corner pins) and uses a machine-pin footprint ({suggest}) on a {holes} mm hole.",
    "notContacts": "{count} parts fit the machine-contact standard only in part and are not treated as machine contacts: {parts}. A machine contact is a one-pad part named MC<n> on a {holes} mm hole.",
    "notContactsOne": "1 part fits the machine-contact standard only in part and is not treated as a machine contact: {parts}. A machine contact is a one-pad part named MC<n> on a {holes} mm hole.",
    "holeSizes": "{count} machine pins and contacts are drilled off the standard sizes: {parts}. Machine pins are drilled {pins} and machine contacts {contacts}, within {tol} mm. Change the drill in the board to the standard size and export again.",
    "holeSizesOne": "1 machine pin or contact is drilled off the standard sizes: {parts}. Machine pins are drilled {pins} and machine contacts {contacts}, within {tol} mm. Change the drill in the board to the standard size and export again.",
    "testPointNames": "{count} test-point footprints are not named TP<n> and are not imported: {parts}.",
    "testPointNamesOne": "1 test-point footprint is not named TP<n> and is not imported: {parts}."
  }
}