def rotate(self, rotationPoint, angle): """ this method must be defined for rotation """ from kernel.geoutil.geolib import Vector from kernel.geoentity.point import Point v=Vector(rotationPoint,self) v.rotate(angle) p=rotationPoint+v.point self.__x=p.x self.__y=p.y
def rotate(self, rotationPoint, angle): """ this method must be defined for rotation """ from kernel.geoutil.geolib import Vector from kernel.geoentity.point import Point for key in self: if isinstance(self[key] , Point): v=Vector(rotationPoint,self[key] ) v.rotate(angle) self[key]=rotationPoint+v.point