# Rotating rectangles

6 messages
Open this post in threaded view
|

## Rotating rectangles

 Good evening everyone! I use the "Load Command File" to import simple rectangles in the format: rect;-122.5,-50;@-9,-4 rect;-118.5,-54.5;@-7,-3 rect;-126.5,-54.5;@-7,-3 rect;-96.5,-57.5;@-7,-3 rect;-118.5,-57.5;@-7,-3 rect;-126.5,-57.5;@-7,-3 rect;-96.5,-60.5;@-7,-3 Is there any way to rotate the rectangles, say, to 37° on importing? Many thanks. Charles
Open this post in threaded view
|

## Re: Rotating rectangles

 Administrator Hi Charles, you can use line instead of rectangle and relative polar coordinates. For the first rectangle rotated e.g. use: ```li;-122.5,-50;@9<180+37;@4<270+37;@9<0+37;@4<90+37 ```If it is required that the rectangle is a single entity, you can use polyline: ```pl;-122.5,-50;@9<180+37;@4<270+37;@9<0+37;close ```I used e.g. <180+37 to make the origin direction and the rotation angle visible. LibreCAD does the math for you. For reference see https://docs.librecad.org/en/latest/ref/fundamentals.html?#polarArmin investing less than half an hour into Search function can save hours or days of waiting for a solution
Open this post in threaded view
|

## Re: Rotating rectangles

 Hello Armin Many thanks, again, for a very helpful answer. I will give it a try. Cheers. Charles
Open this post in threaded view
|

## Re: Rotating rectangles

 In reply to this post by LordOfBikes Hello Armin I have had a look at this, and it is not doing exactly what I had hoped. The method you proposed does rotate the rectangle, but it rotates it around the top right corner. I had hoped to rotate it around the rectangles centre. Is there an easy way to achieve that? Thanks in advance. Charles