Update generated custom DRC rules help files, required for Weblate.

This commit is contained in:
Alex Shvartzkop 2025-08-05 14:37:17 +03:00
parent 188e0fc545
commit f4c356a4f8
3 changed files with 151 additions and 141 deletions

View File

@ -2,7 +2,7 @@
_HKI( "### Constraints\n" _HKI( "### Constraints\n"
"\n" "\n"
"| Constraint type | Argument type | Description |\n" "| Constraint type | Argument type | Description |\n"
"|---------------------------|-----------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n" "|---------------------------|-----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n"
"| `annular_width` | min/opt/max | Checks the width of annular rings on vias.<br> |\n" "| `annular_width` | min/opt/max | Checks the width of annular rings on vias.<br> |\n"
"| `assertion` | \"&lt;expression>\" | Checks the given expression.<br> |\n" "| `assertion` | \"&lt;expression>\" | Checks the given expression.<br> |\n"
"| `clearance` | min | Specifies the **electrical** clearance between copper objects of different nets. (See `physical_clearance` if you wish to specify clearance between objects regardless of net.)<br><br>To allow copper objects to overlap (collide), create a `clearance` constraint with the `min` value less than zero (for example, `-1`).<br> |\n" "| `clearance` | min | Specifies the **electrical** clearance between copper objects of different nets. (See `physical_clearance` if you wish to specify clearance between objects regardless of net.)<br><br>To allow copper objects to overlap (collide), create a `clearance` constraint with the `min` value less than zero (for example, `-1`).<br> |\n"
@ -20,6 +20,9 @@ _HKI( "### Constraints\n"
"| `physical_hole_clearance` | min | Checks the clearance between a drilled hole in a pad or via and another object, regardless of net. The clearance is measured from the diameter of the hole, not its center.<br><br>This can also be thought of as the \"drilling tolerance\" as it only includes **round** holes (see `edge_clearance` for the milling tolerance).<br> |\n" "| `physical_hole_clearance` | min | Checks the clearance between a drilled hole in a pad or via and another object, regardless of net. The clearance is measured from the diameter of the hole, not its center.<br><br>This can also be thought of as the \"drilling tolerance\" as it only includes **round** holes (see `edge_clearance` for the milling tolerance).<br> |\n"
"| `silk_clearance` | min/opt/max | Checks the clearance between objects on silkscreen layers and other objects.<br> |\n" "| `silk_clearance` | min/opt/max | Checks the clearance between objects on silkscreen layers and other objects.<br> |\n"
"| `skew` | max | Checks the total skew for the nets that match the rule condition, that is, the difference between the length of each net and the average of all the lengths of each net that is matched by the rule. If the absolute value of the difference between that average and the length of any one net is above the constraint `max` value, an error will be generated.<br> |\n" "| `skew` | max | Checks the total skew for the nets that match the rule condition, that is, the difference between the length of each net and the average of all the lengths of each net that is matched by the rule. If the absolute value of the difference between that average and the length of any one net is above the constraint `max` value, an error will be generated.<br> |\n"
"| `solder_mask_expansion` | opt | Specifies the solder mask expansion for pads, shapes and tracks. |\n"
"| `solder_paste_abs_margin` | opt | Specifies the absolute solder paste clearance for pads. Usually negative to inset the paste.<br><br>The final solder paste clearace will be the absolute clearance plus the relative clearance. |\n"
"| `solder_paste_rel_margin` | opt | Specifies the relative solder paste clearance for pads. Usually negative to inset the paste.<br><br>The final solder paste clearace will be the absolute clearance plus the relative clearance. |\n"
"| `thermal_relief_gap` | min | Specifies the width of the gap between a pad and a zone with a thermal-relief connection.<br> |\n" "| `thermal_relief_gap` | min | Specifies the width of the gap between a pad and a zone with a thermal-relief connection.<br> |\n"
"| `thermal_spoke_width` | opt | Specifies the width of the spokes connecting a pad to a zone with a thermal-relief connection.<br> |\n" "| `thermal_spoke_width` | opt | Specifies the width of the spokes connecting a pad to a zone with a thermal-relief connection.<br> |\n"
"| `track_width` | min/opt/max | Checks the width of track and arc segments. An error will be generated for each segment that has a width below the `min` value (if specified) or above the `max` value (if specified).<br> |\n" "| `track_width` | min/opt/max | Checks the width of track and arc segments. An error will be generated for each segment that has a width below the `min` value (if specified) or above the `max` value (if specified).<br> |\n"

View File

@ -1,118 +1,113 @@
// Do not edit this file, it is autogenerated by CMake from the .md file // Do not edit this file, it is autogenerated by CMake from the .md file
_HKI( "### Expression functions\n" _HKI( "### Expression functions\n"
"\n" "\n"
"All function parameters support simple wildcards (`*` and `?`).\n" "All function parameters support simple wildcards (`*` and `?`).\n"
"<br><br>\n" "<br><br>\n"
"\n" "\n"
" A.enclosedByArea('<zone_name>')\n" " A.enclosedByArea('<zone_name>')\n"
"True if all of `A` lies within the given zone's outline.\n" "True if all of `A` lies within the given zone's outline.\n"
"\n" "\n"
"NB: this is potentially a more expensive call than `intersectsArea()`. Use " "NB: this is potentially a more expensive call than `intersectsArea()`. Use `intersectsArea()`\n"
"`intersectsArea()`\n" "where possible.\n"
"where possible.\n" "<br><br>\n"
"<br><br>\n" "\n"
"\n" " A.existsOnLayer('<layer_name>')\n"
" A.existsOnLayer('<layer_name>')\n" "True if `A` exists on the given layer. The layer name can be\n"
"True if `A` exists on the given layer. The layer name can be\n" "either the name assigned in Board Setup > Board Editor Layers or\n"
"either the name assigned in Board Setup > Board Editor Layers or\n" "the canonical name (ie: `F.Cu`).\n"
"the canonical name (ie: `F.Cu`).\n" "\n"
"\n" "NB: this returns true if `A` is on the given layer, independently\n"
"NB: this returns true if `A` is on the given layer, independently\n" "of whether or not the rule is being evaluated for that layer.\n"
"of whether or not the rule is being evaluated for that layer.\n" "For the latter use a `(layer \"layer_name\")` clause in the rule.\n"
"For the latter use a `(layer \"layer_name\")` clause in the rule.\n" "<br><br>\n"
"<br><br>\n" "\n"
"\n" " A.fromTo('x', 'y')\n"
" A.fromTo('x', 'y')\n" "True if the object exists on the copper path between the given \n"
"True if the object exists on the copper path between the given \n" "pads. `x` and `y` are the full names of pads in the design, such as \n"
"pads. `x` and `y` are the full names of pads in the design, such as \n" "`R1-Pad1`.\n"
"`R1-Pad1`.\n" "<br><br>\n"
"<br><br>\n" "\n"
"\n" " A.getField('<field_name>')\n"
" A.getField('<field_name>')\n" "The value of the given field. Only footprints have fields, so a field is only returned if\n"
"The value of the given field. Only footprints have fields, so a field is only returned if\n" "`A` is a footprint.\n"
"`A` is a footprint.\n" "<br><br>\n"
"<br><br>\n" "\n"
"\n" " A.hasComponentClass('<component_class_name>')\n"
" A.hasComponentClass('<component_class_name>')\n" "True if the set of component classes assigned to `A` contains the named \n"
"True if the set of component classes assigned to `A` contains the named \n" "component class.\n"
"component class.\n" "<br><br>\n"
"<br><br>\n" "\n"
"\n" " A.hasNetclass('<netclass_name>')\n"
" A.hasNetclass('<netclass_name>')\n" "True if `A` has had the given netclass assigned to it, either by an explicit netclass label\n"
"True if `A` has had the given netclass assigned to it, either by an explicit netclass " "or through a pattern match assignment.\n"
"label\n" "<br><br>\n"
"or through a pattern match assignment.\n" "\n"
"<br><br>\n" " A.inDiffPair('<net_name>')\n"
"\n" "True if `A` has a net that is part of the specified differential pair.\n"
" A.inDiffPair('<net_name>')\n" "`<net_name>` is the base name of the differential pair. For example, `inDiffPair('/CLK')`\n"
"True if `A` has a net that is part of the specified differential pair.\n" "matches items in the `/CLK_P` and `/CLK_N` nets.\n"
"`<net_name>` is the base name of the differential pair. For example, `inDiffPair('/CLK')`\n" "<br><br>\n"
"matches items in the `/CLK_P` and `/CLK_N` nets.\n" "\n"
"<br><br>\n" " A.intersectsArea('<zone_name>')\n"
"\n" "True if any part of `A` lies within the given zone's outline.\n"
" A.intersectsArea('<zone_name>')\n" "<br><br>\n"
"True if any part of `A` lies within the given zone's outline.\n" "\n"
"<br><br>\n" " A.intersectsCourtyard('<footprint_identifier>')\n"
"\n" "True if any part of `A` lies within the given footprint's principal courtyard.\n"
" A.intersectsCourtyard('<footprint_identifier>')\n" "<br><br>\n"
"True if any part of `A` lies within the given footprint's principal courtyard.\n" "\n"
"<br><br>\n" " A.intersectsFrontCourtyard('<footprint_identifier>')\n"
"\n" "True if any part of `A` lies within the given footprint's front courtyard.\n"
" A.intersectsFrontCourtyard('<footprint_identifier>')\n" "<br><br>\n"
"True if any part of `A` lies within the given footprint's front courtyard.\n" "\n"
"<br><br>\n" " A.intersectsBackCourtyard('<footprint_identifier>')\n"
"\n" "True if any part of `A` lies within the given footprint's back courtyard.\n"
" A.intersectsBackCourtyard('<footprint_identifier>')\n" "<br><br>\n"
"True if any part of `A` lies within the given footprint's back courtyard.\n" "\n"
"<br><br>\n" "The `footprint_identifier` listed above can be one of the following:\n"
"\n" "\n"
"The `footprint_identifier` listed above can be one of the following:\n" "1. A reference designator, possibly containing wildcards `*` and `?`\n"
"\n" "2. A footprint library identifier such as `LibName:FootprintName`. In this case,\n"
"1. A reference designator, possibly containing wildcards `*` and `?`\n" " the library identifier must contain the `:` character to separate the library\n"
"2. A footprint library identifier such as `LibName:FootprintName`. In this case,\n" " name from the footprint name, and either name may contain wildcards.\n"
" the library identifier must contain the `:` character to separate the library\n" "3. A component class, in the form `${Class:ClassName}`. The keyword `Class` is not\n"
" name from the footprint name, and either name may contain wildcards.\n" " case-sensitive, but component class names are case-sensitive.\n"
"3. A component class, in the form `${Class:ClassName}`. The keyword `Class` is not\n" "\n"
" case-sensitive, but component class names are case-sensitive.\n" "<br>\n"
"\n" "\n"
"<br>\n" " A.isBlindBuriedVia()\n"
"\n" "True if `A` is a blind/buried via.\n"
" A.isBlindBuriedVia()\n" "<br><br>\n"
"True if `A` is a blind/buried via.\n" "\n"
"<br><br>\n" " AB.isCoupledDiffPair()\n"
"\n" "True if `A` and `B` are members of the same diff pair.\n"
" AB.isCoupledDiffPair()\n" "<br><br>\n"
"True if `A` and `B` are members of the same diff pair.\n" "\n"
"<br><br>\n" " A.isMicroVia()\n"
"\n" "True if `A` is a microvia.\n"
" A.isMicroVia()\n" "<br><br>\n"
"True if `A` is a microvia.\n" "\n"
"<br><br>\n" " A.isPlated()\n"
"\n" "True if `A` has a hole which is plated.\n"
" A.isPlated()\n" "<br><br>\n"
"True if `A` has a hole which is plated.\n" "\n"
"<br><br>\n" " A.memberOfGroup('<group_name>')\n"
"\n" "True if `A` is a member of the given group. The name can contain wildcards.\n"
" A.memberOfGroup('<group_name>')\n" "Includes nested membership.\n"
"True if `A` is a member of the given group. The name can contain wildcards.\n" "<br><br>\n"
"Includes nested membership.\n" "\n"
"<br><br>\n" " A.memberOfFootprint('<footprint_identifier>')\n"
"\n" "True if `A` is a member of a given footprint (for example, a pad or graphic shape defined\n"
" A.memberOfFootprint('<footprint_identifier>')\n" "inside that footprint). The various ways of specifying `footprint_identifier` are described above.\n"
"True if `A` is a member of a given footprint (for example, a pad or graphic shape defined\n" "<br><br>\n"
"inside that footprint). The various ways of specifying `footprint_identifier` are " "\n"
"described above.\n" " A.memberOfSheet('<sheet_path>')\n"
"<br><br>\n" "True if `A` is a member of the given schematic sheet. The sheet path can contain wildcards.\n"
"\n" "<br><br>\n"
" A.memberOfSheet('<sheet_path>')\n" "\n"
"True if `A` is a member of the given schematic sheet. The sheet path can contain " " A.memberOfSheetOrChildren('<sheet_path>')\n"
"wildcards.\n" "True if `A` is a member of the given schematic sheet, or any of its child hierarchical sheets. The sheet path can \n"
"<br><br>\n" "contain wildcards.\n"
"\n" "<br><br>\n"
" A.memberOfSheetOrChildren('<sheet_path>')\n" "\n"
"True if `A` is a member of the given schematic sheet, or any of its child hierarchical " "" );
"sheets. The sheet path can \n"
"contain wildcards.\n"
"<br><br>\n"
"\n"
"" );

View File

@ -136,4 +136,16 @@ _HKI( "### More Examples\n"
" (constraint hole_to_hole)\n" " (constraint hole_to_hole)\n"
" (severity ignore))\n" " (severity ignore))\n"
"\n" "\n"
"\n"
" # No solder mask expansion for vias.\n"
" (rule \"no mask expansion on vias\"\n"
" (constraint solder_mask_expansion (opt 0mm))\n"
" (condition \"A.type == via\"))\n"
"\n"
"\n"
" # Remove solder paste from DNP footprints.\n"
" (rule remove_solder_paste_from_DNP\n"
" (constraint solder_paste_abs_margin (opt -50mm))\n"
" (condition \"A.Do_not_Populate\"))\n"
"\n"
"" ); "" );