Add regression test and example rule.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18142
This commit is contained in:
parent
bc3ae8ca51
commit
855c972156
|
@ -298,12 +298,19 @@ For the latter use a `(layer "layer_name")` clause in the rule.
|
|||
(rule "Plated through-hole size"
|
||||
(constraint hole_size (min 0.2mm) (max 6.35mm))
|
||||
(condition "A.isPlated() && A.Hole_Size_X == A.Hole_Size_Y"))
|
||||
|
||||
(rule "Plated slot size"
|
||||
(constraint hole_size (min 0.5mm))
|
||||
(condition "A.isPlated() && A.Hole_Size_X != A.Hole_Size_Y"))
|
||||
|
||||
|
||||
# Allow blind/buried to micro-via hole-to-hole violations when it is known that
|
||||
# the fab will mechanically drill blind/buried via holes -before- laser drilling
|
||||
# micro-vias.
|
||||
(rule hole_to_hole_uvia_exclusion
|
||||
(condition "A.Via_Type == 'Blind/buried' && B.Via_Type == 'Micro'")
|
||||
(constraint hole_to_hole)
|
||||
(severity ignore))
|
||||
|
||||
### Documentation
|
||||
|
||||
For the full documentation see [https://docs.kicad.org](https://docs.kicad.org/GetMajorMinorVersion/en/pcbnew/pcbnew.html#custom_design_rules).
|
|
@ -299,12 +299,19 @@ _HKI( "### Top-level Clauses\n"
|
|||
" (rule \"Plated through-hole size\"\n"
|
||||
" (constraint hole_size (min 0.2mm) (max 6.35mm))\n"
|
||||
" (condition \"A.isPlated() && A.Hole_Size_X == A.Hole_Size_Y\"))\n"
|
||||
"\n"
|
||||
" (rule \"Plated slot size\"\n"
|
||||
" (constraint hole_size (min 0.5mm))\n"
|
||||
" (condition \"A.isPlated() && A.Hole_Size_X != A.Hole_Size_Y\"))\n"
|
||||
"\n"
|
||||
"\n"
|
||||
" # Allow blind/buried to micro-via hole-to-hole violations when it is known that\n"
|
||||
" # the fab will mechanically drill blind/buried via holes -before- laser drilling \n"
|
||||
" # micro-vias.\n"
|
||||
" (rule hole_to_hole_uvia_exclusion\n"
|
||||
" (condition \"A.Via_Type == 'Blind/buried' && B.Via_Type == 'Micro'\")\n"
|
||||
" (constraint hole_to_hole)\n"
|
||||
" (severity ignore))\n"
|
||||
"\n"
|
||||
"### Documentation\n"
|
||||
"\n"
|
||||
"For the full documentation see [https://docs.kicad.org](https://docs.kicad.org/GetMajorMinorVersion/en/pcbnew/pcbnew.html#custom_design_rules)." );
|
||||
|
|
|
@ -0,0 +1,442 @@
|
|||
(kicad_pcb
|
||||
(version 20240225)
|
||||
(generator "pcbnew")
|
||||
(generator_version "8.99")
|
||||
(general
|
||||
(thickness 0.5854)
|
||||
(legacy_teardrops no)
|
||||
)
|
||||
(paper "A4")
|
||||
(title_block
|
||||
(title "Optimistic Proteus")
|
||||
(date "2024-01-23")
|
||||
(rev "0.6.0")
|
||||
(company "epyMetrics AG")
|
||||
(comment 1 "CONFIDENTIAL")
|
||||
)
|
||||
(layers
|
||||
(0 "F.Cu" signal)
|
||||
(1 "In1.Cu" signal)
|
||||
(2 "In2.Cu" signal)
|
||||
(3 "In3.Cu" signal)
|
||||
(4 "In4.Cu" signal)
|
||||
(31 "B.Cu" signal)
|
||||
(32 "B.Adhes" user "B.Adhesive")
|
||||
(33 "F.Adhes" user "F.Adhesive")
|
||||
(34 "B.Paste" user)
|
||||
(35 "F.Paste" user)
|
||||
(36 "B.SilkS" user "B.Silkscreen")
|
||||
(37 "F.SilkS" user "F.Silkscreen")
|
||||
(38 "B.Mask" user)
|
||||
(39 "F.Mask" user)
|
||||
(40 "Dwgs.User" user "User.Drawings")
|
||||
(41 "Cmts.User" user "User.Comments")
|
||||
(42 "Eco1.User" user "User.Eco1")
|
||||
(43 "Eco2.User" user "User.Eco2")
|
||||
(44 "Edge.Cuts" user)
|
||||
(45 "Margin" user)
|
||||
(46 "B.CrtYd" user "B.Courtyard")
|
||||
(47 "F.CrtYd" user "F.Courtyard")
|
||||
(48 "B.Fab" user)
|
||||
(49 "F.Fab" user)
|
||||
(50 "User.1" user "Nearby Mechanical Objects")
|
||||
(51 "User.2" user "Coil Surface Declaration")
|
||||
(52 "User.3" user "Rigid Area")
|
||||
(53 "User.4" user "Non-bending flex Area")
|
||||
(54 "User.5" user "Impedance Control F")
|
||||
(55 "User.6" user "Impedance Control B")
|
||||
(58 "User.9" user "Bending lines")
|
||||
)
|
||||
(setup
|
||||
(stackup
|
||||
(layer "F.SilkS"
|
||||
(type "Top Silk Screen")
|
||||
)
|
||||
(layer "F.Paste"
|
||||
(type "Top Solder Paste")
|
||||
)
|
||||
(layer "F.Mask"
|
||||
(type "Top Solder Mask")
|
||||
(thickness 0.0127)
|
||||
)
|
||||
(layer "F.Cu"
|
||||
(type "copper")
|
||||
(thickness 0.035)
|
||||
)
|
||||
(layer "dielectric 1"
|
||||
(type "prepreg")
|
||||
(color "Polyimide")
|
||||
(thickness 0.067)
|
||||
(material "Polyimide")
|
||||
(epsilon_r 3.2)
|
||||
(loss_tangent 0.004)
|
||||
)
|
||||
(layer "In1.Cu"
|
||||
(type "copper")
|
||||
(thickness 0.035)
|
||||
)
|
||||
(layer "dielectric 2"
|
||||
(type "core")
|
||||
(color "Polyimide")
|
||||
(thickness 0.068)
|
||||
(material "Polyimide")
|
||||
(epsilon_r 3.2)
|
||||
(loss_tangent 0.004)
|
||||
)
|
||||
(layer "In2.Cu"
|
||||
(type "copper")
|
||||
(thickness 0.035)
|
||||
)
|
||||
(layer "dielectric 3"
|
||||
(type "prepreg")
|
||||
(color "FR4 natural")
|
||||
(thickness 0.08)
|
||||
(material "FR4")
|
||||
(epsilon_r 4.5)
|
||||
(loss_tangent 0.02)
|
||||
)
|
||||
(layer "In3.Cu"
|
||||
(type "copper")
|
||||
(thickness 0.035)
|
||||
)
|
||||
(layer "dielectric 4"
|
||||
(type "core")
|
||||
(color "Polyimide")
|
||||
(thickness 0.068)
|
||||
(material "Polyimide")
|
||||
(epsilon_r 3.2)
|
||||
(loss_tangent 0.004)
|
||||
)
|
||||
(layer "In4.Cu"
|
||||
(type "copper")
|
||||
(thickness 0.035)
|
||||
)
|
||||
(layer "dielectric 5"
|
||||
(type "prepreg")
|
||||
(color "Polyimide")
|
||||
(thickness 0.067)
|
||||
(material "Polyimide")
|
||||
(epsilon_r 3.2)
|
||||
(loss_tangent 0.004)
|
||||
)
|
||||
(layer "B.Cu"
|
||||
(type "copper")
|
||||
(thickness 0.035)
|
||||
)
|
||||
(layer "B.Mask"
|
||||
(type "Bottom Solder Mask")
|
||||
(thickness 0.0127)
|
||||
)
|
||||
(layer "B.Paste"
|
||||
(type "Bottom Solder Paste")
|
||||
)
|
||||
(layer "B.SilkS"
|
||||
(type "Bottom Silk Screen")
|
||||
)
|
||||
(copper_finish "None")
|
||||
(dielectric_constraints no)
|
||||
)
|
||||
(pad_to_mask_clearance 0)
|
||||
(allow_soldermask_bridges_in_footprints no)
|
||||
(aux_axis_origin 145 85)
|
||||
(grid_origin 145 0)
|
||||
(pcbplotparams
|
||||
(layerselection 0x0000020_7fffffe0)
|
||||
(plot_on_all_layers_selection 0x0021000_00000000)
|
||||
(disableapertmacros no)
|
||||
(usegerberextensions no)
|
||||
(usegerberattributes yes)
|
||||
(usegerberadvancedattributes yes)
|
||||
(creategerberjobfile yes)
|
||||
(dashed_line_dash_ratio 12.000000)
|
||||
(dashed_line_gap_ratio 3.000000)
|
||||
(svgprecision 4)
|
||||
(plotframeref no)
|
||||
(viasonmask no)
|
||||
(mode 1)
|
||||
(useauxorigin no)
|
||||
(hpglpennumber 1)
|
||||
(hpglpenspeed 20)
|
||||
(hpglpendiameter 15.000000)
|
||||
(pdf_front_fp_property_popups yes)
|
||||
(pdf_back_fp_property_popups yes)
|
||||
(pdf_metadata yes)
|
||||
(dxfpolygonmode yes)
|
||||
(dxfimperialunits yes)
|
||||
(dxfusepcbnewfont yes)
|
||||
(psnegative no)
|
||||
(psa4output no)
|
||||
(plotreference yes)
|
||||
(plotvalue yes)
|
||||
(plotfptext yes)
|
||||
(plotinvisibletext no)
|
||||
(sketchpadsonfab no)
|
||||
(plotpadnumbers no)
|
||||
(subtractmaskfromsilk no)
|
||||
(outputformat 5)
|
||||
(mirror no)
|
||||
(drillshape 0)
|
||||
(scaleselection 1)
|
||||
(outputdirectory "")
|
||||
)
|
||||
)
|
||||
(net 0 "")
|
||||
(net 1 "/core/FLASH_QSPI_IO3")
|
||||
(gr_rect
|
||||
(start 152.874 89.281)
|
||||
(end 155.541 91.44)
|
||||
(stroke
|
||||
(width 0.01)
|
||||
(type default)
|
||||
)
|
||||
(fill none)
|
||||
(layer "Edge.Cuts")
|
||||
(uuid "168ac014-89d2-47f2-9418-3a060907c3f1")
|
||||
)
|
||||
(segment
|
||||
(start 154.375 90.35)
|
||||
(end 154.375 90.125)
|
||||
(width 0.1)
|
||||
(layer "F.Cu")
|
||||
(net 1)
|
||||
(uuid "5c4a9f0b-7e15-4ca9-9afa-b93eab8ede8f")
|
||||
)
|
||||
(segment
|
||||
(start 154.375 90.125)
|
||||
(end 154.6 89.9)
|
||||
(width 0.1)
|
||||
(layer "F.Cu")
|
||||
(net 1)
|
||||
(uuid "e2497a47-4894-405c-8d2b-b8a3f1193582")
|
||||
)
|
||||
(via micro
|
||||
(at 154.375 90.35)
|
||||
(size 0.225)
|
||||
(drill 0.1)
|
||||
(layers "F.Cu" "In2.Cu")
|
||||
(teardrops
|
||||
(best_length_ratio 0.2)
|
||||
(max_length 1)
|
||||
(best_width_ratio 1)
|
||||
(max_width 2)
|
||||
(curve_points 0)
|
||||
(filter_ratio 0.9)
|
||||
(enabled yes)
|
||||
(allow_two_segments yes)
|
||||
(prefer_zone_connections yes)
|
||||
)
|
||||
(net 1)
|
||||
(uuid "1cffc1d1-fb40-4d2c-9862-4cc74f080ebb")
|
||||
)
|
||||
(segment
|
||||
(start 154.328717 90.35)
|
||||
(end 154.240717 90.438)
|
||||
(width 0.1)
|
||||
(layer "In2.Cu")
|
||||
(net 1)
|
||||
(uuid "5022bf5b-2165-4254-bf12-9b859e53d93b")
|
||||
)
|
||||
(segment
|
||||
(start 154.375 90.35)
|
||||
(end 154.328717 90.35)
|
||||
(width 0.1)
|
||||
(layer "In2.Cu")
|
||||
(net 1)
|
||||
(uuid "f01ae2d9-9cac-4701-9bc1-60686c429052")
|
||||
)
|
||||
(via blind
|
||||
(at 154.240717 90.438)
|
||||
(size 0.3)
|
||||
(drill 0.15)
|
||||
(layers "In2.Cu" "In3.Cu")
|
||||
(teardrops
|
||||
(best_length_ratio 0.2)
|
||||
(max_length 1)
|
||||
(best_width_ratio 1)
|
||||
(max_width 2)
|
||||
(curve_points 0)
|
||||
(filter_ratio 0.9)
|
||||
(enabled yes)
|
||||
(allow_two_segments yes)
|
||||
(prefer_zone_connections yes)
|
||||
)
|
||||
(net 1)
|
||||
(uuid "2c92c4e6-da90-4131-b404-e5624703e566")
|
||||
)
|
||||
(segment
|
||||
(start 154.240717 90.438)
|
||||
(end 154.187 90.438)
|
||||
(width 0.1)
|
||||
(layer "In3.Cu")
|
||||
(net 1)
|
||||
(uuid "87dd36cf-1e37-48ff-bd29-eb9af93a006d")
|
||||
)
|
||||
(segment
|
||||
(start 154.187 90.438)
|
||||
(end 153.907762 90.717238)
|
||||
(width 0.1)
|
||||
(layer "In3.Cu")
|
||||
(net 1)
|
||||
(uuid "fe454a03-5137-4866-b063-1566ba7f2e98")
|
||||
)
|
||||
(zone
|
||||
(net 1)
|
||||
(net_name "/core/FLASH_QSPI_IO3")
|
||||
(layer "F.Cu")
|
||||
(uuid "57fd00dd-207e-4e91-8811-c29c74d3bf3a")
|
||||
(name "$teardrop_padvia$")
|
||||
(hatch full 0.1)
|
||||
(priority 30004)
|
||||
(attr
|
||||
(teardrop
|
||||
(type padvia)
|
||||
)
|
||||
)
|
||||
(connect_pads yes
|
||||
(clearance 0)
|
||||
)
|
||||
(min_thickness 0.0254)
|
||||
(filled_areas_thickness no)
|
||||
(fill yes
|
||||
(thermal_gap 0.5)
|
||||
(thermal_bridge_width 0.5)
|
||||
(island_removal_mode 1)
|
||||
(island_area_min 10)
|
||||
)
|
||||
(polygon
|
||||
(pts
|
||||
(xy 154.425 90.1925) (xy 154.325 90.1925) (xy 154.271064 90.306948) (xy 154.375 90.351) (xy 154.478936 90.306948)
|
||||
)
|
||||
)
|
||||
(filled_polygon
|
||||
(layer "F.Cu")
|
||||
(pts
|
||||
(xy 154.425852 90.195927) (xy 154.428163 90.199212) (xy 154.473747 90.295937) (xy 154.474174 90.304882)
|
||||
(xy 154.468151 90.311509) (xy 154.467729 90.311697) (xy 154.379566 90.349064) (xy 154.370611 90.349138)
|
||||
(xy 154.370434 90.349064) (xy 154.28227 90.311697) (xy 154.27599 90.305314) (xy 154.276064 90.296359)
|
||||
(xy 154.276231 90.295982) (xy 154.321837 90.199212) (xy 154.328464 90.193189) (xy 154.332421 90.1925)
|
||||
(xy 154.417579 90.1925)
|
||||
)
|
||||
)
|
||||
)
|
||||
(zone
|
||||
(net 1)
|
||||
(net_name "/core/FLASH_QSPI_IO3")
|
||||
(layer "In2.Cu")
|
||||
(uuid "23416a56-5775-4547-aed0-cf24ca2aeaeb")
|
||||
(name "$teardrop_padvia$")
|
||||
(hatch full 0.1)
|
||||
(priority 30013)
|
||||
(attr
|
||||
(teardrop
|
||||
(type padvia)
|
||||
)
|
||||
)
|
||||
(connect_pads yes
|
||||
(clearance 0)
|
||||
)
|
||||
(min_thickness 0.0254)
|
||||
(filled_areas_thickness no)
|
||||
(fill yes
|
||||
(thermal_gap 0.5)
|
||||
(thermal_bridge_width 0.5)
|
||||
(island_removal_mode 1)
|
||||
(island_area_min 10)
|
||||
)
|
||||
(polygon
|
||||
(pts
|
||||
(xy 154.375 90.4) (xy 154.375 90.3) (xy 154.240717 90.288) (xy 154.239717 90.438) (xy 154.390717 90.438)
|
||||
)
|
||||
)
|
||||
(filled_polygon
|
||||
(layer "In2.Cu")
|
||||
(pts
|
||||
(xy 154.253373 90.289131) (xy 154.364342 90.299047) (xy 154.372277 90.303197) (xy 154.375 90.310701)
|
||||
(xy 154.375 90.399999) (xy 154.384028 90.421828) (xy 154.384023 90.430783) (xy 154.377688 90.437112)
|
||||
(xy 154.373216 90.438) (xy 154.251496 90.438) (xy 154.243223 90.434573) (xy 154.239796 90.4263)
|
||||
(xy 154.239796 90.426222) (xy 154.240319 90.347638) (xy 154.240632 90.300706) (xy 154.244114 90.292457)
|
||||
(xy 154.25241 90.289085)
|
||||
)
|
||||
)
|
||||
)
|
||||
(zone
|
||||
(net 1)
|
||||
(net_name "/core/FLASH_QSPI_IO3")
|
||||
(layer "In2.Cu")
|
||||
(uuid "cc66d48f-6013-4e6c-b24e-2b9d80482755")
|
||||
(name "$teardrop_padvia$")
|
||||
(hatch full 0.1)
|
||||
(priority 30011)
|
||||
(attr
|
||||
(teardrop
|
||||
(type padvia)
|
||||
)
|
||||
)
|
||||
(connect_pads yes
|
||||
(clearance 0)
|
||||
)
|
||||
(min_thickness 0.0254)
|
||||
(filled_areas_thickness no)
|
||||
(fill yes
|
||||
(thermal_gap 0.5)
|
||||
(thermal_bridge_width 0.5)
|
||||
(island_removal_mode 1)
|
||||
(island_area_min 10)
|
||||
)
|
||||
(polygon
|
||||
(pts
|
||||
(xy 154.209737 90.39827) (xy 154.280447 90.46898) (xy 154.375 90.4625) (xy 154.375707 90.349293)
|
||||
(xy 154.29545 90.27045)
|
||||
)
|
||||
)
|
||||
(filled_polygon
|
||||
(layer "In2.Cu")
|
||||
(pts
|
||||
(xy 154.303828 90.278962) (xy 154.305506 90.280329) (xy 154.372175 90.345823) (xy 154.375676 90.354065)
|
||||
(xy 154.375676 90.354242) (xy 154.375067 90.451642) (xy 154.371588 90.459894) (xy 154.364167 90.463242)
|
||||
(xy 154.285756 90.468616) (xy 154.277268 90.465762) (xy 154.276683 90.465216) (xy 154.216537 90.40507)
|
||||
(xy 154.21311 90.396797) (xy 154.215091 90.390284) (xy 154.287595 90.282162) (xy 154.295048 90.2772)
|
||||
)
|
||||
)
|
||||
)
|
||||
(zone
|
||||
(net 1)
|
||||
(net_name "/core/FLASH_QSPI_IO3")
|
||||
(layer "In3.Cu")
|
||||
(uuid "0926c658-2cbf-4086-88c9-b2ce72f1e1ec")
|
||||
(name "$teardrop_padvia$")
|
||||
(hatch full 0.1)
|
||||
(priority 30002)
|
||||
(attr
|
||||
(teardrop
|
||||
(type padvia)
|
||||
)
|
||||
)
|
||||
(connect_pads yes
|
||||
(clearance 0)
|
||||
)
|
||||
(min_thickness 0.0254)
|
||||
(filled_areas_thickness no)
|
||||
(fill yes
|
||||
(thermal_gap 0.5)
|
||||
(thermal_bridge_width 0.5)
|
||||
(island_removal_mode 1)
|
||||
(island_area_min 10)
|
||||
)
|
||||
(polygon
|
||||
(pts
|
||||
(xy 154.035354 90.518936) (xy 154.106064 90.589646) (xy 154.240717 90.588) (xy 154.241424 90.437293)
|
||||
(xy 154.102135 90.380597)
|
||||
)
|
||||
)
|
||||
(filled_polygon
|
||||
(layer "In3.Cu")
|
||||
(pts
|
||||
(xy 154.112305 90.384736) (xy 154.234098 90.434311) (xy 154.240468 90.440603) (xy 154.241386 90.445202)
|
||||
(xy 154.24077 90.576496) (xy 154.237304 90.584753) (xy 154.229213 90.58814) (xy 154.110993 90.589585)
|
||||
(xy 154.102679 90.58626) (xy 154.102577 90.586159) (xy 154.04123 90.524812) (xy 154.037803 90.516539)
|
||||
(xy 154.038966 90.511453) (xy 154.097361 90.390486) (xy 154.104042 90.384527)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
File diff suppressed because it is too large
Load Diff
|
@ -139,6 +139,7 @@ BOOST_FIXTURE_TEST_CASE( DRCFalseNegativeRegressions, DRC_REGRESSION_TEST_FIXTUR
|
|||
{ "issue12109", 8 }, // Pads fail annular width test
|
||||
{ "issue14334", 2 }, // Thermal spoke to otherwise unconnected island
|
||||
{ "issue16566", 6 }, // Pad_Shape vs Shape property
|
||||
{ "issue18142", 1 }, // blind/buried via to micro-via hole-to-hole
|
||||
{ "reverse_via", 3 }, // Via/track ordering
|
||||
{ "intersectingzones", 1 }, // zones are too close to each other
|
||||
{ "fill_bad", 1 }, // zone max BBox was too small
|
||||
|
|
Loading…
Reference in New Issue