Open modelica-trac-importer opened 7 years ago
Modified by dietmarw on 20 Dec 2011 11:46 UTC
Comment by hansolsson on 20 Dec 2011 11:48 UTC I am not clear about exactly what is meant with changing the icon size in the first issue.
Does this refer to:
For the second case it would work for minor changes in size – but when you shrink it more the connectors would overlap. Handling that becomes messy, and instead of manually changing sizes of icons it seems better to modify the default size of the icon. This is partially standarized in Modelica using the attribute initialScale.
So to me the remaining part of standardization for that is to more fully specify initialScale and note that changing initialScale should be viewed as changing the drawing area of the icon (as discussed above).
Comment by leo.gall on 20 Dec 2011 12:30 UTC I like Michael Tiller's proposal. Possibly it could be used to solve two issues I have with connector graphics:
Visualization of vectorized connections
This could be done by an alternative connector icon, which appears for vectorized connections.
Use case 1: connection to the vectorized heat port of a discretized pipe model. Currently, there is no indication on the diagram, that there is a vector of connects.
Use case 2: connectors like Modelica.Fluid.Interfaces.FluidPorts_a. This connector could become obsolete and be replaced by a version of Modelica.Fluid.Interfaces.FluidPort_a which changes appearance.
Visualization of connections which do not have graphical annotations
There are good reasons for mixing graphical and textual modeling. For example for-loops of connects. The annoying part is, that there is no graphical hint on connects which do not have graphical annotations. As far as I understood, this point was also on the list of requirements of japanese car manufactures presented at Design Meeting 73.
One solution could be an annotation for connect equations like "markConnectionsOnDiagram". If markConnectionsOnDiagram=true, the affected connectors could change to a representation making clear that there are connections happening.
Comment by mtiller on 20 Dec 2011 13:29 UTC I have a comment on my comment. :-)
I think we need to take a step back and look at our requirements here. We already have the ability to have a different location in both the icon and diagram layer. I proposed that we have the ability to specify appearance for both connected and unconnected connectors. Leo points out two additional use cases, vectorized connectors and appearance related to non-graphical connections. I would extend Leo's second use case to include things like "connections in layers" (to avoid having all connections crossing over a diagram at once) or "translucent" connections that are translucent normally but opaque if you mouse over them or even "from-goto" style connections. These are in some ways all variations on a theme.
Is there a way to capture all these use cases in a consistent way. Yes, we could define different annotations like "diagramWhenConnected", "diagramWhenNotConnected", "iconWhenConnected" "iconWhenNotConnected", "diagramWhenVectorConnected", "diagramWhenVectorNotConnected", etc.
But hopefully everyone sees the potential issue with that. So here are my comments:
Perhaps the simplest thing for now is to have this be one new optional annotation for now and address the wide range of use cases with something like item 5 above in Modelica 4?
In the Modelica Standard Library (MSL) we have even cases of different sizes of input and output connectors:
integerPassThrough
connector size of most block in the MSLtriggeredAdd
one Integer input has a different size than the other Interger input and the Boolean inputsrising
the input and the output connectors are bigger than the standard size@HansOlsson Beside the inconsistent appearance in current MSL, there are so many valuable proposals and use-cases on connect lines and connector icons that this issue rather belongs to the Modelica language specification.
@HansOlsson Beside the inconsistent appearance in current MSL, there are so many valuable proposals and use-cases on connect lines and connector icons that this issue rather belongs to the Modelica language specification.
Ok, but I don't see that we will be able to handle them quickly. Note that we also must consider the user-interaction in these cases; even if the output connector isn't drawn you should still be able to connect as if it were there (connecting to the existing connection line is a possibility in e.g. Dymola; but it is not as convenient).
Modified by dietmarw on 20 Dec 2011 11:46 UTC The input icons in Blocks.Interfaces are much larger than the output icons. The reason for this according to Martin Otter is to resemble how it looks like in Simulink, where the output connector is removed when the connection is made.
Alternative solutions copied from email-conversation- Johan Andreasson): A bit off the original topic: I guess an alternative way to achieve Simulink look-alike would be to have small icons for both input and output, and have the connection line as arrow instead. This would make scaling when mixing smaller and larger blocks much nicer (especially when the block are not scaled proportionally in x and y). Maybe it could be similar to how (at least) Dymola let you affect the thickness and color of the connection line. The directions would then have to be handled.
(copied from email-conversation- Martin Otter):
(copied from email-conversation - Mike Tiller) For the first point, one could define two annotations for a connector. One representing the unconnected appearance and the other representing its appearance if there is at least one connection made to it. It seems like this could be generally useful (particularly for connectors that MUST be connected) and it would be mostly backward compatible as well.
Reported by petar on 20 Dec 2011 11:42 UTC The input icons in Blocks.Interfaces are much larger than the output icons. The reason for this according to Martin Otter is to resemble how it looks like in Matlab, where the output connector is removed when the connection is made.
Alternative solutions copied from email-conversation- Johan Andreasson): A bit off the original topic: I guess an alternative way to achieve Simulink look-alike would be to have small icons for both input and output, and have the connection line as arrow instead. This would make scaling when mixing smaller and larger blocks much nicer (especially when the block are not scaled proportionally in x and y). Maybe it could be similar to how (at least) Dymola let you affect the thickness and color of the connection line. The directions would then have to be handled.
(copied from email-conversation- Martin Otter):
(copied from email-conversation - Mike Tiller) For the first point, one could define two annotations for a connector. One representing the unconnected appearance and the other representing its appearance if there is at least one connection made to it. It seems like this could be generally useful (particularly for connectors that MUST be connected) and it would be mostly backward compatible as well.
Migrated-From: https://trac.modelica.org/Modelica/ticket/671