Geometry of Subanalytic and Semialgebraic Sets door