Design rules $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#module-edea.kicad.design_rules">
Represents kicad design rules.
- class edea.kicad.design_rules.ConstraintArgType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None) $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType'">
Bases:
StrEnum
Different types of arguments used in PCB design constraints.
- annular_width = 'annular_width' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.annular_width" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.annular_width'">
Width of the annular ring in a plated through-hole.
- assertion = 'assertion' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.assertion" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.assertion'">
Custom assertion statement within a constraint.
- clearance = 'clearance' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.clearance" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.clearance'">
Minimum distance between two objects on the PCB layout.
- connection_width = 'connection_width' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.connection_width" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.connection_width'">
Width of a connection element in the design.
- courtyard_clearance = 'courtyard_clearance' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.courtyard_clearance" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.courtyard_clearance'">
Minimum distance between an object and its courtyard.
- diff_pair_gap = 'diff_pair_gap' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.diff_pair_gap" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.diff_pair_gap'">
Spacing between two traces in a differential pair.
- diff_pair_uncoupled = 'diff_pair_uncoupled' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.diff_pair_uncoupled" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.diff_pair_uncoupled'">
Diff pair is not routed together.
- disallow = 'disallow' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.disallow" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.disallow'">
Constraint that disallows a specific action or configuration.
- edge_clearance = 'edge_clearance' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.edge_clearance" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.edge_clearance'">
Minimum distance between an object and the PCB edge.
- hole_clearance = 'hole_clearance' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.hole_clearance" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.hole_clearance'">
Minimum distance between an object and a hole.
- hole_size = 'hole_size' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.hole_size" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.hole_size'">
Diameter of a drilled hole.
- hole_to_hole = 'hole_to_hole' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.hole_to_hole" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.hole_to_hole'">
Distance between two drilled holes.
- length = 'length' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.length" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.length'">
Length of a trace or other geometric element.
- min_resolved_spokes = 'min_resolved_spokes' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.min_resolved_spokes" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.min_resolved_spokes'">
Minimum number of connected spokes in a thermal relief pattern.
- physical_clearance = 'physical_clearance' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.physical_clearance" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.physical_clearance'">
Physical clearance between objects in the manufactured PCB.
- physical_hole_clearance = 'physical_hole_clearance' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.physical_hole_clearance" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.physical_hole_clearance'">
Physical clearance between an object and a drilled hole in the manufactured PCB.
- silk_clearance = 'silk_clearance' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.silk_clearance" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.silk_clearance'">
Minimum distance between an object and the silkscreen layer.
- text_height = 'text_height' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.text_height" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.text_height'">
Height of text elements on the PCB.
- text_thickness = 'text_thickness' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.text_thickness" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.text_thickness'">
Thickness of text stroke on the PCB.
- thermal_relief_gap = 'thermal_relief_gap' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.thermal_relief_gap" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.thermal_relief_gap'">
Gap between a trace and the edge of a thermal relief pattern.
- thermal_spoke_width = 'thermal_spoke_width' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.thermal_spoke_width" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.thermal_spoke_width'">
Width of spokes in a thermal relief pattern.
- track_width = 'track_width' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.track_width" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.track_width'">
Width of a conductive trace on the PCB.
- via_count = 'via_count' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.via_count" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.via_count'">
Number of vias used in a connection.
- via_diameter = 'via_diameter' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.via_diameter" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.via_diameter'">
Diameter of a via (plated through-hole).
- zone_connection = 'zone_connection' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.ConstraintArgType.zone_connection" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.ConstraintArgType.zone_connection'">
Connection between a zone and another object on the PCB.
- class edea.kicad.design_rules.Rule(name: str, constraint: tuple[ConstraintArgType, tuple[str, ...] | str] | tuple[ConstraintArgType, tuple[str, ...] | str, tuple[str, ...] | str], layer: str | None = None, severity: Severity | None = None, condition: str | None = '') $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.Rule" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.Rule'">
Bases:
KicadExpr
A design rule for a KiCad PCB layout.
- Parameters:
name – The name of the rule.
constraint – The design rule constraint.
layer – The PCB layer where the rule applies.
severity – The severity level of the rule violation.
condition – An optional KiCad expression representing a condition under which the rule applies.
- constraint: tuple[ConstraintArgType, tuple[str, ...] | str] | tuple[ConstraintArgType, tuple[str, ...] | str, tuple[str, ...] | str] $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.Rule.constraint" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.Rule.constraint'">
- kicad_expr_tag_name: ClassVar[Literal['rule']] = 'rule' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.Rule.kicad_expr_tag_name" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.Rule.kicad_expr_tag_name'">
- class edea.kicad.design_rules.DesignRuleSet(version: ~typing.Literal['1'] = '1', rules: list[~edea.kicad.design_rules.Rule] = <factory>) $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.DesignRuleSet" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.DesignRuleSet'">
Bases:
KicadExpr
A collection of design rules for a KiCad PCB layout.
- Parameters:
version – supported version of kicad_dru file.
rules – A list of Rule objects defining the individual design rules for the PCB layout.
- rules: list[Rule] $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.DesignRuleSet.rules" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.DesignRuleSet.rules'">
- kicad_expr_tag_name: ClassVar[Literal['design_rules']] = 'design_rules' $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.DesignRuleSet.kicad_expr_tag_name" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.DesignRuleSet.kicad_expr_tag_name'">
- noramlize() $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.DesignRuleSet.noramlize" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.DesignRuleSet.noramlize'">
Remove duplicate rules.
- Returns:
The ‘DesignRules’ object itself after removing duplicates.
- extend(other: DesignRuleSet) $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#edea.kicad.design_rules.DesignRuleSet.extend" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#edea.kicad.design_rules.DesignRuleSet.extend'">
Merge another set of design rules into the current one.
- Parameters:
other – Another set of design rules.
- Returns:
The extended design rules object.
- Raises:
TypeError – : If the provided argument is not a ‘DesignRules’ instance.