Perpendicular collar

OK. Point a) is solved with Fintools plugin (WISH: "Flange" tool - #25 by pascal).

So please help me with b) - case with collar parallel to XY plane.