Fix bugs in diffPair hole-to-hole logic and add rule resolution.
Fixes https://gitlab.com/kicad/code/kicad/issues/7697
This commit is contained in:
parent
2c009906e5
commit
caa18c8e16
|
@ -535,7 +535,7 @@ bool DIFF_PAIR_PLACER::FindDpPrimitivePair( NODE* aWorld, const VECTOR2I& aP, IT
|
||||||
int DIFF_PAIR_PLACER::viaGap() const
|
int DIFF_PAIR_PLACER::viaGap() const
|
||||||
{
|
{
|
||||||
return std::max( m_sizes.DiffPairViaGap(),
|
return std::max( m_sizes.DiffPairViaGap(),
|
||||||
m_sizes.GetHoleToHole() + m_viaDrill - m_viaDiameter );
|
m_sizes.GetHoleToHole() + m_sizes.ViaDrill() - m_sizes.ViaDiameter() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -485,7 +485,16 @@ bool PNS_KICAD_IFACE_BASE::ImportSizes( PNS::SIZES_SETTINGS& aSizes, PNS::ITEM*
|
||||||
aSizes.SetDiffPairGap( diffPairGap );
|
aSizes.SetDiffPairGap( diffPairGap );
|
||||||
aSizes.SetDiffPairViaGap( diffPairViaGap );
|
aSizes.SetDiffPairViaGap( diffPairViaGap );
|
||||||
|
|
||||||
aSizes.SetHoleToHole( bds.m_HoleToHoleMin );
|
int holeToHoleMin = bds.m_HoleToHoleMin;
|
||||||
|
PNS::VIA dummyVia;
|
||||||
|
|
||||||
|
if( m_ruleResolver->QueryConstraint( PNS::CONSTRAINT_TYPE::CT_HOLE_TO_HOLE, &dummyVia,
|
||||||
|
&dummyVia, UNDEFINED_LAYER, &constraint ) )
|
||||||
|
{
|
||||||
|
holeToHoleMin = constraint.m_Value.Min();
|
||||||
|
}
|
||||||
|
|
||||||
|
aSizes.SetHoleToHole( holeToHoleMin );
|
||||||
|
|
||||||
aSizes.ClearLayerPairs();
|
aSizes.ClearLayerPairs();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue