Algorithms for the shape of semialgebraic sets. A new approach