Do you use Openscad?
Import the object.
Align it to the XY plane.
Minkowski it with a cylinder(r=SMALL, h=BIG, center=true) so as to create a pseudo extrusion. This will make the projection of the horse show at Z=0, or you get no legs.
Finally create a cube([width, height, thickness], center=true) with the size of your stencil frame an subtract the horse from it.
Got it?
I am not at my computer right now, so I can't write the complete code. If you find it hard I may be able to help tomorrow.