Align Objects vs zoom

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
6 posts • Page 1 of 1
tpjctrl
Posts: 141
Joined: Tue May 08, 2018 10:30 am

Align Objects vs zoom

Post by tpjctrl »

I have a UI which uses zooming in / out to fit the whole panel in the viewable area when the screen is resized. Whilst this seems to work fine in general, I've noticed that it can create massive issues with alignment of drawn shapes.

I'm using panel refs which are effectively lines of 1px width and custom length - these are used as conductors and have some additional code to colour them in. I can get those aligned perfectly (or what appears to be perfect) on the panel in GEDI using Layout->Align Objects->Align Left / Right etc. but as soon as the panel is zoomed in, those lines are no longer aligned and it seems that the misalignment is subpixels, so there's effectively no way to correct it (as you either go a full pixel too far or too short). I don't understand how this is even possible as the lines I'm using are all 1px wide and have whole numbers for size X / Y (I type those in).

I've also noticed that if I create two of those "line" panel refs and align them using Align Objects at 100% zoom, their position shifts slightly if I zoom to 300% and repeat the align operation. You can actually see them shift by a tiny amount after clicking the Align button. Why does that happen? surely if they are aligned, the are properly aligned at all zoom values?

Similar issues can be seen when trying to align lines which are part of panel refs with other panel refs that have lines in them (for example you have a circuit breaker with a in / out line and you are trying to "connect" it to another device with a line going into it), it's basically an impossible task as the zoom introduces tiny imperfections and the whole panel looks like you've aligned it by hand.


What's the solution here? not use zoom?

User avatar
leoknipp
Posts: 2846
Joined: Tue Aug 24, 2010 7:28 pm

Re: Align Objects vs zoom

Post by leoknipp »

If you want to connect 2 shapes by a line you can use "connector points", the shapes as a reference and the "connector" to connect the connector points.
When modifying the size of an object please always use the "Edit Points" mode in GEDI. If "Edit Points" is used it is a real resizing of objects while the normal size editing is a scaling resulting in a transformation matrix.
A transformation matrix can cause a shift in pixels as a calculation is made and floats have a limited precision (rounding errors).

Best Regards
Leopold Knipp
Senior Support Specialist

tpjctrl
Posts: 141
Joined: Tue May 08, 2018 10:30 am

Re: Align Objects vs zoom

Post by tpjctrl »

Whilst "connector points" are fine and dandy, this particular project uses lines embedded in panel refs and zoom functionality. Are you saying that zooming in / out will always introduce errors in shapes aligned using the "Align Objects" feature in GEDI?

Regards,
Tom

User avatar
kilianvp
Posts: 422
Joined: Fri Jan 16, 2015 10:29 am

Re: Align Objects vs zoom

Post by kilianvp »

tpjctrl wrote: Wed Nov 01, 2023 4:56 pm Are you saying that zooming in / out will always introduce errors in shapes aligned using the "Align Objects" feature in GEDI?
Yes is a know "bug"

tpjctrl
Posts: 141
Joined: Tue May 08, 2018 10:30 am

Re: Align Objects vs zoom

Post by tpjctrl »

OK then, assuming zooming is broken in terms of alignment (tbh I've never used a SCADA package were aligning was so hard, but lets put that aside), I've just tried using "connectors" and perhaps I'm doing something wrong, but it also seems very primitive. I was hoping to get something similar to connectors in Visio, where the connectors follow the shape you've attached them to, but it seems that in WinCC OA they can snap to mid points on a shape, but that's about it, it's just a polygon. Or am I missing something? Also how do you add "connector points"? I have a panel ref with a "connector" but if I toggle snap mode, other "connectors" don't want to snap to the end of this inside-panel-ref "connector", they just snap to the mid points / corners of the panel ref object.

Surely this is functionality that's used fairly often to draw electrical diagrams, pipes etc. am I doing something wrong, or is the rule: use Align Objects / don't use zoom / don't modify anything on a panel after aligning objects?

User avatar
leoknipp
Posts: 2846
Joined: Tue Aug 24, 2010 7:28 pm

Re: Align Objects vs zoom

Post by leoknipp »

If you draw a panel in GEDI which is then used as a reference you can add connector points by doing a "right click" in the panel.
When the connector point is inserted you can move it around by clicking on it and dragging it to the desrired position.
You can put 1-n connector points in a panel.

If then the reference is inserted in a panel and a connector shape is used to connect the connector points of two references the connector will be redrawn when one of the references is moved.

Best Regards
Leopold Knipp
Senior Support Specialist

Post Reply
6 posts • Page 1 of 1