Opened 7 years ago

Closed 9 months ago

#4839 closed defect (fixed)

Badly wrong visualization in OMEdit in a simple case

Reported by: massimo ceraolo Owned by: Adeel Asghar
Priority: blocker Milestone: 2.0.0
Component: OMEdit Version:
Keywords: Cc: Adrian Pop, sjolund.se

Description

Using only graphical operations on OMEdit I got to the enclosed BugConnection.mo.
Strangely, the visual representation does not correspond to the code.
Indeed, in the code resistor1.plug_n is connected to sineVoltage.plug_p, which does not correspond to the diagram (BugConnection.svg).

I think this correspondence should be restored ASAP. Once this is done, maybe I can report better how and when the wrong code is generated.

Tested with OMEdit v1.13.0-dev-95-g4eb7a19 (64-bit-Win)
Connected to v1.13.0-dev-380-g8b177b9 (64-bit-Win)

Attachments (3)

BugConnection.mo (2.3 KB ) - added by massimo ceraolo 7 years ago.
BugConnection.svg (85.2 KB ) - added by massimo ceraolo 7 years ago.
BugConnection2.png (7.5 KB ) - added by massimo ceraolo 5 years ago.

Download all attachments as: .zip

Change History (17)

by massimo ceraolo, 7 years ago

Attachment: BugConnection.mo added

by massimo ceraolo, 7 years ago

Attachment: BugConnection.svg added

comment:1 by massimo ceraolo, 7 years ago

Milestone: Future1.13.0
Priority: highblocker

comment:2 by massimo ceraolo, 7 years ago

Summary: Badly visualization in OMEdit in a simple caseBadly wrong visualization in OMEdit in a simple case

comment:3 by Francesco Casella, 7 years ago

Cc: Adrian Pop sjolund.se added
Component: *unknown*OMEdit
Owner: changed from somebody to Adeel Asghar

The problem in this case is that the connection between resistor1.plug_n and sineVoltage.plug_p is partially covered by the other two connections of the resistor and by the resistor itself, so it's not visible.

If I am not mistaken, we have already discussed a related issue, though unfortunately I can't trace the ticket or the e-mail thread.

I remember one proposed solution was to first draw the components and then the connections, which would ensure in this case that you see the connect line passing on top of the resistor and connecting to the negative plug. I remember there was an issue about how to correctly render the graphical appearence of the connection line close to the connector icon, and that I proposed a solution for that, i.e. ending the white strip around the connection line a bit earlier than the connection point, to avoid spoiling it, as well as what should be the ideal thickness of the white strip surrounding the connection line.

@adrpo, @sjolund.se, do you remember where this was?

Anyway, to summarize I think a good solution is to:

  • first draw the components, then the connections
  • draw slightly shorter white lines behind connection lines to avoid spoiling the connector icons

I guess as soon as Adeel is back from his vacation, he can give a look at that.

comment:4 by massimo ceraolo, 7 years ago

We discussed this regarding diodes (#4645).
Since the diode symbol has a line connecting the two pins, an overlaid external line would be not visible. In that case I thought that the line was not visible just because superimposed to diode symbol.

Here the situation is much worse: no-one can suspect that a line exists behind the resistor symbol!

comment:5 by massimo ceraolo, 7 years ago

Any news about this ticket (and #4645)? Any plans to work on it?

comment:6 by Francesco Casella, 7 years ago

Milestone: 1.13.02.0.0

I discussed this with @adeas31. Fixing this issue requires to carry out some work, which is also needed to fix other pending issues in a proper way.

Adeel is currently busy on the OMSimulator project, so he can't do this in time for 1.13.0. We agreed to have it done in 2.0.0

comment:7 by massimo ceraolo, 7 years ago

Ok. Thanks for the update.

comment:8 by massimo ceraolo, 6 years ago

Milestone: 2.0.01.14.0

Now that we have 1.14.0 planned, I propose to switch this to this version.

comment:9 by massimo ceraolo, 6 years ago

I have an even worse example of this bad behaviour.
Today a student of mine created the model "asma0BAD" enclosed.
the model works well, except that the torqueSensor output is always zero.
If we move around all the submodels, all connections seem to be rightly in place.
Only after studying the code, I could envisage that the student had connected the machine's flange to the wrong flange of torque sensor.

The student "went crazy" in trying to understand what was bad.
I think this example gives new evidence on the fact that this issue should be corrected soon.
Looking at this model within Dymola shows immediately what the issue is.

comment:10 by Francesco Casella, 6 years ago

@adeas31, can you take care of this?

comment:11 by Adeel Asghar, 6 years ago

This is basically the same as #4645. I suggest we should take it in 2.0
Doing this change so close to 1.14 is not a good idea.

comment:12 by Francesco Casella, 5 years ago

Milestone: 1.14.02.0.0

comment:13 by massimo ceraolo, 5 years ago

The behaviour is totally changed with NF and OpenModelica v1.14.0-dev.beta1 (64-bit): see BugConnection2.png, probably because of #5662

by massimo ceraolo, 5 years ago

Attachment: BugConnection2.png added

comment:14 by massimo ceraolo, 9 months ago

Resolution: fixed
Status: newclosed

Fixed (see #4645)

Note: See TracTickets for help on using tickets.