>So if it’s a.toComp([0,0,0]) I get that [0,0,0] is the top-left corner of the comp
No, a.toComp([0,0,0]) would translate layer a’s upper left corner (usually) into comp coordinates. It’s useful if you want to position another layer (let’s say layer b) over a specific point on layer a for which you have the coordinates in layer a’s coordinate system. So the Position expression to put layer b on layer a’s upper left corner would be:
a = thisComp.layer("a");
a.toComp([0,0,0])
To put layer b over layer a’s anchor point:
a = thisComp.layer("a");
a.toComp(a.anchorPoint)
To put layer b over the Bulge Center of layer a’s Bulge effect:
a = thisComp.layer("a");
a.toComp(a.effect("Bulge")("Bulge Center"))
The thing that these three examples have in common is that the parameter provided to toComp() is always a point relative to layer a’s upper left corner and the result is always in the comp’s coordinate system. Note that you need the a. prefix of a.toComp to tell the expression engine that you’re providing a point in layer a’s coordinate system. If you leave that out, it will assume you’re referring the layer space of the layer with the expression (layer b in these examples), which would probably not be useful. Hope that helps.