A computationally efficient semi-analytical model for the dust environment of comets and asteroids