Rotate a many devices

Rotate a many devices

banksysan
Advocate Advocate
1,176 Views
3 Replies
Message 1 of 4

Rotate a many devices

banksysan
Advocate
Advocate

I have a matrix of LEDs.

banksysan_0-1637699299759.png

I'd like to rotate them all 90° clockwise.  I know I can click on them in turn, rotating them.  It seems I can select them all and rotate the group around a single pivot.  I can list all the devices in the CLI and use the rotate command 

rotate R90 D1 D2 D3 D4...
  1. Can I rotate them each around their individual pivots in one go?
  2. Can I use a pattern to match the devices I want to apply the command to e.g.
    rotate R90 D[1..16]
Reply
Reply
0 Likes
Accepted solutions (1)
1,177 Views
3 Replies
Replies (3)
Message 2 of 4

jorge_garcia
Autodesk
Autodesk

Hi @banksysan ,

 

I hope you're doing well. I'll answer your questions directly

 

1) Yes, the only way to do this is actually using the Inspector. Form a group and then in the inspector change the Angle. This is the only workflow that will cause the devices to rotate about their individual origins.

 

2) Currently pattern will not be able to perform this type of operation.

 

Let me know if there's anything else I can do for you.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
Reply
Reply
0 Likes
Message 3 of 4

mtl_asm
Collaborator
Collaborator
Accepted solution

hi banksysan

 

you can do what your talking about with a simple ulp. here i made an example for you. first group the items you want to rotate, then call it by typing 

run rotate_in_place <angle>

and it will rotate all the parts in the group about their respective origins. if you supply <angle> it will use that angle but if you don't pass an angle it uses 90 as the default.

 

note that on schematic view you can only use orthogonal angles ie 90 180 270 etc (eagle limitation, not mine)

 

#usage "rotates items in a group about the individual elements origin."

// scott monk
// updated nov 25 2021
// ver 0.1
real rotation;
if(argc == 1){
	rotation = 90; //default
}else if(argc == 2){
	rotation = strtod(argv[1]);
}

string cmd;
string temp;
if(schematic){
	schematic(S){
		S.parts(P){
			P.instances(I){
				if(ingroup(I)){
					sprintf(temp, "rotate R%f '%s' ;", rotation, I.name);
					cmd += temp;
				}
			}
		}
	}
}else{
	if(board){
		board(B){
			B.elements(E){
				if(ingroup(E)){
					sprintf(temp, "rotate R%f '%s' ;", rotation, E.name);
					cmd += temp;
				}
			}
		}
	}
}
exit(cmd);

 

Reply
Reply
0 Likes
Message 4 of 4

banksysan
Advocate
Advocate
That worked perfectly. Thanks.
Reply
Reply