Added: Footprint fanout force and torque constraints

This commit is contained in:
Daniel Treffenstädt 2025-02-06 15:25:06 +01:00
parent 1a4617f201
commit b20b970826
No known key found for this signature in database
GPG Key ID: 3D92CAF477537F3E
7 changed files with 29 additions and 1 deletions

View File

@ -56,6 +56,8 @@ thermal_spoke_width
track
track_angle
pad_fanout_ratio
footprint_fanout_force
footprint_fanout_torque
track_width
track_segment_length
version

View File

@ -272,6 +272,8 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|| token == wxT( "track_angle" )
|| token == wxT( "track_segment_length" )
|| token == wxT( "pad_fanout_ratio" )
|| token == wxT( "footprint_fanout_force" )
|| token == wxT( "footprint_fanout_torque" )
|| token == wxT( "via_count" )
|| token == wxT( "via_diameter" )
|| token == wxT( "zone_connection" );
@ -494,6 +496,8 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
"track_angle|"
"track_segment_length|"
"pad_fanout_ratio|"
"footprint_fanout_force|"
"footprint_fanout_torque|"
"via_count|"
"via_diameter|"
"zone_connection" );

View File

@ -28,6 +28,8 @@
| `track_angle` | min/opt/max | Checks the angle between two connected track segments. An error will be generated for each connected pair with an angle below the `min` value (if specified) or above the `max` value (if specified).<br> |
| `track_segment_length` | min/max | Checks the length of track and arc segments. An error will be generated for each segment that has a length below the `min` value (if specified) or above the `max` value (if specified).<br> |
| `pad_fanout_ratio` | max | Checks the width of the fanout for a pad stated as a percentage. An error will be generated for each connected track with a width above the `max` value (if specified).<br> |
| `footprint_fanout_force` | max | Checks whether the fanout from a footprint is linearly symmetric in each quadrant. Each connection to the pad creates a force equal to its width along its axis. The sum of all forces on the footprint is checked here. Creates an error if the maximum force is exceeded. Units of mm. <br> |
| `footprint_fanout_torque` | max | Checks whether the fanout from a footprint is rotationally symmetric in each quadrant. Each connection to the pad creates a torque equal to its width along its axis with a lever from the footprint center. The sum of all moments on the footprint is checked here. Creates an error if the maximum moment is exceeded. Units of mm. <br> |
| `via_count` | max | Counts the number of vias on every net matched by the rule condition. If that number exceeds the constraint `max` value on any matched net, an error will be generated for that net.<br> |
| `via_dangling` | | Checks for vias that are unconnected or connected on only one layer. This constraint does not take a min/opt/max value. In combination with a severity clause, this constraint can be used to allow or disallow dangling vias in various conditions.<br> |
| `zone_connection` | `solid`<br>`thermal_reliefs`<br>`none` | Specifies the connection to be made between a zone and a pad.<br> |

View File

@ -133,6 +133,14 @@ DRC_ITEM DRC_ITEM::padFanoutRatio( DRCE_PAD_FANOUT_RATIO,
_( "Pad fanout ratio" ),
wxT( "pad_fanout_ratio" ) );
DRC_ITEM DRC_ITEM::footprintFanoutForce( DRCE_FOOTPRINT_FANOUT_FORCE,
_( "Footprint fanout force" ),
wxT( "footprint_fanout_force" ) );
DRC_ITEM DRC_ITEM::footprintFanoutTorque( DRCE_FOOTPRINT_FANOUT_TORQUE,
_( "Footprint fanout torque" ),
wxT( "footprint_fanout_torque" ) );
DRC_ITEM DRC_ITEM::annularWidth( DRCE_ANNULAR_WIDTH,
_HKI( "Annular width" ),
wxT( "annular_width" ) );
@ -322,6 +330,8 @@ std::vector<std::reference_wrapper<RC_ITEM>> DRC_ITEM::allItemTypes(
DRC_ITEM::trackAngle,
DRC_ITEM::trackSegmentLength,
DRC_ITEM::padFanoutRatio,
DRC_ITEM::footprintFanoutForce,
DRC_ITEM::footprintFanoutTorque,
DRC_ITEM::annularWidth,
DRC_ITEM::drillTooSmall,
DRC_ITEM::microviaDrillTooSmall,
@ -408,6 +418,8 @@ std::shared_ptr<DRC_ITEM> DRC_ITEM::Create( int aErrorCode )
case DRCE_TRACK_ANGLE: return std::make_shared<DRC_ITEM>( trackAngle );
case DRCE_TRACK_SEGMENT_LENGTH: return std::make_shared<DRC_ITEM>( trackSegmentLength );
case DRCE_PAD_FANOUT_RATIO: return std::make_shared<DRC_ITEM>( padFanoutRatio );
case DRCE_FOOTPRINT_FANOUT_FORCE: return std::make_shared<DRC_ITEM>( footprintFanoutForce );
case DRCE_FOOTPRINT_FANOUT_TORQUE: return std::make_shared<DRC_ITEM>( footprintFanoutTorque );
case DRCE_ANNULAR_WIDTH: return std::make_shared<DRC_ITEM>( annularWidth );
case DRCE_DRILL_OUT_OF_RANGE: return std::make_shared<DRC_ITEM>( drillTooSmall );
case DRCE_VIA_DIAMETER: return std::make_shared<DRC_ITEM>( viaDiameter );

View File

@ -56,6 +56,8 @@ enum PCB_DRC_CODE {
DRCE_TRACK_ANGLE, // Angle between two connected tracks is too small or too large
DRCE_TRACK_SEGMENT_LENGTH, // Track segment is too short or too long
DRCE_PAD_FANOUT_RATIO, // The fanout width from a pad is too large as a percentage of pad width
DRCE_FOOTPRINT_FANOUT_FORCE, // The fanout from a footprint should by symmetric.
DRCE_FOOTPRINT_FANOUT_TORQUE, // The fanout from a footprint should by symmetric.
DRCE_ANNULAR_WIDTH, // Via size and drill leave annular ring too small
DRCE_CONNECTION_WIDTH, // Net connection too small
DRCE_DRILL_OUT_OF_RANGE, // Too small via or pad drill
@ -202,6 +204,8 @@ private:
static DRC_ITEM trackAngle;
static DRC_ITEM trackSegmentLength;
static DRC_ITEM padFanoutRatio;
static DRC_ITEM footprintFanoutForce;
static DRC_ITEM footprintFanoutTorque;
static DRC_ITEM annularWidth;
static DRC_ITEM drillTooSmall;
static DRC_ITEM viaDiameter;

View File

@ -80,7 +80,9 @@ enum DRC_CONSTRAINT_T
CONNECTION_WIDTH_CONSTRAINT,
TRACK_ANGLE_CONSTRAINT,
VIA_DANGLING_CONSTRAINT,
PAD_FANOUT_RATIO_CONSTRAINT
PAD_FANOUT_RATIO_CONSTRAINT,
FOOTPRINT_FANOUT_FORCE_CONSTRAINT,
FOOTPRINT_FANOUT_TORQUE_CONSTRAINT
};

View File

@ -519,6 +519,8 @@ void DRC_RULES_PARSER::parseConstraint( DRC_RULE* aRule )
case T_track_angle: c.m_Type = TRACK_ANGLE_CONSTRAINT; break;
case T_track_segment_length: c.m_Type = TRACK_SEGMENT_LENGTH_CONSTRAINT; break;
case T_pad_fanout_ratio: c.m_Type = PAD_FANOUT_RATIO_CONSTRAINT; break;
case T_footprint_fanout_force: c.m_Type = FOOTPRINT_FANOUT_FORCE_CONSTRAINT; break;
case T_footprint_fanout_torque: c.m_Type = FOOTPRINT_FANOUT_TORQUE_CONSTRAINT; break;
case T_connection_width: c.m_Type = CONNECTION_WIDTH_CONSTRAINT; break;
case T_annular_width: c.m_Type = ANNULAR_WIDTH_CONSTRAINT; break;
case T_via_diameter: c.m_Type = VIA_DIAMETER_CONSTRAINT; break;