Rotating Wire (list of edges) around a certain point (Vertex)

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
MRx
Posts: 319
Joined: Wed Jul 08, 2020 5:59 am
Location: Tainan / Taiwan

Rotating Wire (list of edges) around a certain point (Vertex)

Post by MRx »

Hi,

is there a function to rotate wires around a given point (eg. vertex). Eg. I have a square and want to rotate it 45 degree around the first vertex.
I'm not looking for the Placement/Attachment option, the base coordinates should still stay the same.

Or should I re-calculate the target points via trigonometry in that case (wouldn't be a problem either but I don't want to duplicate fundamental code)?
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Rotating Wire (list of edges) around a certain point (Vertex)

Post by openBrain »

You can work with 'transformShape()' directly on the shape of the object.
AFAIK you cannot update shape of an object so you have to work on a copy.
MRx
Posts: 319
Joined: Wed Jul 08, 2020 5:59 am
Location: Tainan / Taiwan

Re: Rotating Wire (list of edges) around a certain point (Vertex)

Post by MRx »

That's exactly what I was looking for thanks!
Post Reply