Hello @kng_ito,
I agree that it is odd, or as you nicely put it, unkind. The problem is also that the meaning of segments in the context of a SplineObject (the data count of the Tsegment tag) and a LineObject (the data count of its Tline tag) is being mixed up.
B(Cache).GetSegmentCount() = 2 <- A LineObject instance.
B(Cache).GetTags() = [
<c4d.VariableTag object called with ID 5712 ... <- The Tline tag.
<c4d.VariableTag object called with ID 5680 ...
<c4d.SegmentTag object called with ID 5672 ... <- The Tsegment tag for the host.
<c4d.PointTag object called with ID 5600 ...
]
The problem of this design is that LineObject.GetSegmentCount returns the segment count in the sense of its host object, the SplineObject, as the number of disjunct curve sections in the spline (segment tag). The segments in the sense of a LineObject, the number of line segments the hosting spline object has been quantized into in the LineObject (line tag), is only indirectly accessible over getting the Tline tag of that object. Which in turn might confuse users why they cannot get a specific segment as you wanted to.
But this design was apparently intentional and aims at minimizing the number of tags in the traverseable scene-graph (things inside caches are out of sight so to speak and not a problem). It is therefore unlikely that we will change this. The best I can do for now, is adding a note to LineObject.GetSegmentCount and SplineObject.GetSegmentCount which hints at the problem.
Cheers,
Ferdinand