setPointA error on CollisionSegment

I got a CollisionSegment parented to a source node. When I do

print source.find("BeamCNode").node().getSolids()

i get

[segment, a (4.64052 3.29193 0), b (6.91851 7.1307 0)]

But this code

beamcoll = source.find("BeamCNode").node().getSolid(0)
beamcoll.setPointA(gunpoint)
beamcoll.setPointB(endpos)

throws

TypeError: Cannot call CollisionSegment.setPointA() on a const object.

What am I doing wrong?

Use modifySolid(0) instead of getSolid(0).

David