mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Add drill shape to padstack API
This commit is contained in:
parent
b44015e204
commit
732f03753d
@ -284,6 +284,14 @@ message PadStackOuterLayer
|
||||
SolderPasteOverrides solder_paste_settings = 4;
|
||||
}
|
||||
|
||||
enum DrillShape
|
||||
{
|
||||
DS_UNKNOWN = 0;
|
||||
DS_CIRCLE = 1;
|
||||
DS_OBLONG = 2;
|
||||
DS_UNDEFINED = 3;
|
||||
}
|
||||
|
||||
message DrillProperties
|
||||
{
|
||||
// Lowest (closest to F_Cu) layer this drill exists on.
|
||||
@ -295,6 +303,8 @@ message DrillProperties
|
||||
// The diameter, in x and y, of the pad's drilled hole, if this pad has a hole.
|
||||
// x and y will be the same value if the hole is round.
|
||||
kiapi.common.types.Vector2 diameter = 3;
|
||||
|
||||
DrillShape shape = 4;
|
||||
}
|
||||
|
||||
// A pad stack definition for a multilayer pad or via.
|
||||
|
@ -62,6 +62,34 @@ PAD_ATTRIB FromProtoEnum( types::PadType aValue )
|
||||
}
|
||||
}
|
||||
|
||||
template<>
|
||||
types::DrillShape ToProtoEnum( PAD_DRILL_SHAPE aValue )
|
||||
{
|
||||
switch( aValue )
|
||||
{
|
||||
case PAD_DRILL_SHAPE::CIRCLE: return types::DrillShape::DS_CIRCLE;
|
||||
case PAD_DRILL_SHAPE::OBLONG: return types::DrillShape::DS_OBLONG;
|
||||
case PAD_DRILL_SHAPE::UNDEFINED: return types::DrillShape::DS_UNDEFINED;
|
||||
default:
|
||||
wxCHECK_MSG( false, types::DrillShape::DS_UNKNOWN,
|
||||
"Unhandled case in ToProtoEnum<PAD_DRILL_SHAPE>");
|
||||
}
|
||||
}
|
||||
|
||||
template<>
|
||||
PAD_DRILL_SHAPE FromProtoEnum( types::DrillShape aValue )
|
||||
{
|
||||
switch( aValue )
|
||||
{
|
||||
case types::DrillShape::DS_CIRCLE: return PAD_DRILL_SHAPE::CIRCLE;
|
||||
case types::DrillShape::DS_OBLONG: return PAD_DRILL_SHAPE::OBLONG;
|
||||
case types::DrillShape::DS_UNDEFINED: return PAD_DRILL_SHAPE::UNDEFINED;
|
||||
default:
|
||||
wxCHECK_MSG( false, PAD_DRILL_SHAPE::UNDEFINED,
|
||||
"Unhandled case in FromProtoEnum<types::DrillShape>" );
|
||||
}
|
||||
}
|
||||
|
||||
template<>
|
||||
types::PadStackShape ToProtoEnum( PAD_SHAPE aValue )
|
||||
{
|
||||
|
@ -171,6 +171,11 @@ BOOST_AUTO_TEST_CASE( PadStackType )
|
||||
testEnums<PADSTACK::MODE, kiapi::board::types::PadStackType>();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( DrillShape )
|
||||
{
|
||||
testEnums<PAD_DRILL_SHAPE, kiapi::board::types::DrillShape>();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( UnconnectedLayerRemoval )
|
||||
{
|
||||
testEnums<PADSTACK::UNCONNECTED_LAYER_MODE, kiapi::board::types::UnconnectedLayerRemoval>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user