Let me teach you how to fish then. Open the scripting console and explore. Here is what I did after selecting a random THT footprint on the board
s = pcbnew.GetCurrentSelection()[0]
s
<pcbnew.BOARD_ITEM; proxy of <Swig Object of type 'BOARD_ITEM *' at 0x0000016D8DAC4720> >
s = s.Cast()
s
<pcbnew.FOOTPRINT; proxy of <Swig Object of type 'FOOTPRINT *' at 0x0000016D8DAC4630> >
p = s.Pads()[0]
p
<pcbnew.PAD; proxy of <Swig Object of type 'PAD *' at 0x0000016D8DAC4810> >
h = p.GetEffectiveHoleShape()
h
<pcbnew.SHAPE_SEGMENT; proxy of <Swig Object of type 'std::shared_ptr< SHAPE_SEGMENT > *' at 0x0000016D8DAC46F0> >
dir(h)
['BBox', 'Cast', 'Centre', 'Clone', 'Collide', 'Format', 'GetClearance', 'GetIndexableSubshapeCount', 'GetIndexableSubshapes', 'GetSeg', 'GetWidth', 'HasIndexableSubshapes', 'Is45Degree', 'IsNull', 'IsSolid', 'MIN_PRECISION_IU', 'Move', 'Parse', 'Rotate', 'SetSeg', 'SetWidth', 'Type', 'TypeName', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__swig_destroy__', '__weakref__', 'this', 'thisown']
seg = h.GetSeg()
seg
<pcbnew.SEG; proxy of <Swig Object of type 'SEG *' at 0x0000016D8DAC48A0> >
dir(seg)
['A', 'Angle', 'ApproxCollinear', 'ApproxParallel', 'ApproxPerpendicular', 'B', 'CanonicalCoefs', 'Center', 'Collide', 'Collinear', 'Contains', 'Distance', 'Index', 'Intersect', 'IntersectLines', 'Intersects', 'Length', 'LineDistance', 'LineProject', 'NearestPoint', 'Overlaps', 'ParallelSeg', 'PerpendicularSeg', 'ReflectPoint', 'Reverse', 'Reversed', 'Side', 'Square', 'SquaredDistance', 'SquaredLength', 'TCoef', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__swig_destroy__', '__weakref__', 'this', 'thisown']
seg.Center()
VECTOR2I(74190000, 72000000)
seg.Length()
0
h.GetWidth()
900000
It’s not clear from the methods of the SHAPE_SEGMENT or SEG how to get the endpoint so I open the header files and looky here, SEG has A and B points:
seg.A
VECTOR2I(99000000, 77000000)
seg.B
VECTOR2I(101000000, 77000000)