modelica / ModelicaStandardLibrary

Free (standard conforming) library to model mechanical (1D/3D), electrical (analog, digital, machines), magnetic, thermal, fluid, control systems and hierarchical state machines. Also numerical functions and functions for strings, files and streams are included.
https://doc.modelica.org
BSD 3-Clause "New" or "Revised" License
479 stars 169 forks source link

Unify location of connectors in Electrical libraries #2215

Closed christiankral closed 7 years ago

christiankral commented 7 years ago

The electrical libraries use sometimes connector locations which are not in line with the general look and feel experience of other packages of the MSL

I propose to unify then location of connectors to give the icons a more professional look. This issue is somehow also related to #2031 and #2210, as the change of connector locations could also enable a unification of the inductor icons. I will create a new branch to provide a pull request.

christiankral commented 7 years ago

The %name is also slightly displaced from on model to another.

christiankral commented 7 years ago

Some components have a connector size slightly deviating from the standard size; this will be corrected, too.

dietmarw commented 7 years ago

@christiankral some comments:

  1. Yes it would be good to unify all this but according to which guidelines? You should provide proper guidelines at the same time that also other then can follow. Otherwise we get new models by other people that use their personal taste that might (and probably will) deviate from what you consider best.
    1. Rather then creating branches here at the upstream repository it would be better (and is the normal way) that you create a branch for the pull-request in your fork. That way the main repository does not get "cluttered" with lots of branches where people try out things to work in etc.
christiankral commented 7 years ago

Created branch https://github.com/modelica/Modelica/tree/christiankral_Connectors%232215 where I tried to unify

In general the icon size was rather extended to the full available space such that the icons and their texts improve readability.

I will double check my proposal before providing a pull request, but you may already have look to check whether you like these unifications: @kristinmajetta @AHaumer @dietmarw @beutlich

beutlich commented 7 years ago
  1. The icons of Modelica.Electrical.MultiPhase.Ideal.IdealDiode, Modelica.Electrical.MultiPhase.Ideal.IdealThyristor and Modelica.Electrical.MultiPhase.Ideal.IdealGTOThyristor have a black diode though I recently changed Modelica.Electrical.Spice3.Semiconductors.D_DIODE from black to blue. Which one is to prefer?
  2. Should the icons of Modelica.Electrical.QuasiStationary.SinglePhase.Sources.* also be light blue instead of black?
  3. Should the icons of Modelica.Electrical.QuasiStationary.MultiPhase.Sources.* also be light blue instead of black?
christiankral commented 7 years ago

I changed the of color from black to blue of the Analog library in https://github.com/modelica/Modelica/tree/christiankral_Connectors%232215

I also unified the colors of QuasiStationary components...

I am also planning to propose guidelines for icons, as Dietmar suggested. Work in progress...

christiankral commented 7 years ago

The unification of icon connectors also includes the unification of the entire icon design. So I added "Icon Design" guidelines in Modelica.UsersGuide.Conventions.Icons. I tried to make the guidelines simple and I did not want to entirely change the existing icon design. The proposed guidelines are a compromise but overall straighten the look and feel experience.

In addition to the "Icon Design" guidelines I provided re-designed icons of these libraries in https://github.com/modelica/Modelica/tree/christiankral_Connectors%232215:

christiankral commented 7 years ago

I am done with my proposal for now. So I am mainly asking the library officers @kristinmajetta @AHaumer and others to have a look and initiate discussion. Please provide you feedback.

beutlich commented 7 years ago

There is a typo in the User's Guide: siginifcant -> significant

christiankral commented 7 years ago

Fixed typo in a09ef10

dietmarw commented 7 years ago

One thing that always puzzles me how to get right is the placement and size of the text. It would be nice to have some proper placement and size, preferable with coordinates that are symmetrically and perhaps starting and ending on a multiple of 10 of the grid. Would be nice if this can be taking into consideration.

beutlich commented 7 years ago

I'd propose an extent height of 40 and black color for the text. Currently it is different in every library.

beutlich commented 7 years ago

@christiankral Is #2117 also addressed by your proposed changes?

christiankral commented 7 years ago

Yes, the multi phase power sensor is included in my proposal.

christiankral commented 7 years ago

@dietmarw I included guidelines for the icon design which includes, text size, text location etc. in Modelica.UsersGuide.Conventions.Icons. Do you think this is sufficient?

dietmarw commented 7 years ago

@christiankral Perhaps change the grid resolution to 10 for the screen shots so that the names don't look floating (even though they are on the 10 res grid positioned).

dietmarw commented 7 years ago

Also, maybe centre align the figures and the captions ?

christiankral commented 7 years ago

@dietmarw

dietmarw commented 7 years ago

OK

beutlich commented 7 years ago

Just another typo: Comonent -> Component

christiankral commented 7 years ago

Fixed typo in 65488df.

beutlich commented 7 years ago
beutlich commented 7 years ago

Those very long (default) names for components do not look that nice and also different between tools, see e.g., Modelica.Electrical.Analog.Ideal.ControlledIdealIntermediateSwitch.

simx dymola mworks sysplorer

I see two solutions

christiankral commented 7 years ago
christiankral commented 7 years ago

Default component names: I am very much in favor of applying a default component name such as "switch" as we have different icons to distinguish the classes. I think that extending the text field does not really improve readability, as there is always one name too long. An additional drawback of extended text fields is, that the overall icon size gets bigger, which is rather a drawback considering "limited" drawing space.

beutlich commented 7 years ago

There is a odd sentence in Modelica.UsersGuide.Conventions.ModelicaCode.

Additionally some format UsersGuide are stated.

beutlich commented 7 years ago

In Modelica.UsersGuide.Conventions.ModelicaCode.Naming, sixth bullet there could be a link from "icon layer" to Modelica.UsersGuide.Conventions.Icons.

beutlich commented 7 years ago

Looks good to me. Thank you for your contribution!

beutlich commented 7 years ago

@christiankral Ready to merge, beside the shorter default component name?

christiankral commented 7 years ago

@beutlich Yes its OK from my side.

christiankral commented 7 years ago

I will apply the default component names (also to magnetic components) at a later time.

christiankral commented 7 years ago

@beutlich Could you do the merge, please? Thanks in advance.

christiankral commented 7 years ago

The proposed suggestions specifically also matter to @kristinmajetta

@kristinmajetta: Please check whether you agree to this proposal or not, as many icon changes in the Analog package have been implemented.

beutlich commented 7 years ago

I squashed your commits to master, deleted the dev branch and also informed @kristinmajetta again about the progress.