Trigorilla 2560: can I use d2 and d3 to output 12v?

Consult tab "9" and the left tab signed as "mega 2560"

You can use D2 and D3 as 5V outputs to switch a 12v circuit if you aren't using them for X-axis limit switches. You will need a relay or MOSFET to do the switching.

If you want an existing 12V output, use Heat Bed (D8), Heater 1 (D45), Heater 0 (D10), Fan 0 (D9), Fan 1 (D7), or Fan 2 (D44).