With this code I am able to break a polygon.
Im using SET CONTEXT to make a "move polygon" function.
First, I attach the function to the wire object like this:
| SET CONTEXT wire 'Move polygon' 'run polygonmove.ulp';
At the ulp, I check if a polygon wire is grouped with this code:
|board(B) B.signals(S) S.polygons(P) if(ingroup(P))
|{
This works. But the polygon parent of the grouped wire is not completely
grouped, hence I have to help out a bit with this:
| setgroup(P); //(**)
This doesnt seem to set all the wires in the group, cause when I do:
| sprintf(tmpstr,"move (>@)");
| exit(tmpstr);
|}
The polygon breaks up. The selected wire doesnt follow the move, only
the other wires.
I tried different clrgroup before the setgroup first, like
| P.wires(W) clrgroup(W);
or
| clrgroup(P)
or even
| clrgroup(B)
But they don't seem to help.
(**) If I play around with setgroup(P,1), the polygon REALLY gets messed
up, but the originally selected wire of the polygon is still ungrouped.
I assume this is a bug, but are there any workarounds?


