Computer aided design of gating systems in foundry using solid modeling