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)
Change History (17)
by , 7 years ago
Attachment: | BugConnection.mo added |
---|
by , 7 years ago
Attachment: | BugConnection.svg added |
---|
comment:1 by , 7 years ago
Milestone: | Future → 1.13.0 |
---|---|
Priority: | high → blocker |
comment:2 by , 7 years ago
Summary: | Badly visualization in OMEdit in a simple case → Badly wrong visualization in OMEdit in a simple case |
---|
comment:3 by , 7 years ago
Cc: | added |
---|---|
Component: | *unknown* → OMEdit |
Owner: | changed from | to
comment:4 by , 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:6 by , 7 years ago
Milestone: | 1.13.0 → 2.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:8 by , 6 years ago
Milestone: | 2.0.0 → 1.14.0 |
---|
Now that we have 1.14.0 planned, I propose to switch this to this version.
comment:9 by , 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:11 by , 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 , 5 years ago
Milestone: | 1.14.0 → 2.0.0 |
---|
comment:13 by , 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 , 5 years ago
Attachment: | BugConnection2.png added |
---|
The problem in this case is that the connection between
resistor1.plug_n
andsineVoltage.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:
I guess as soon as Adeel is back from his vacation, he can give a look at that.