You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-4Lines changed: 21 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,20 +141,37 @@ Adding these components to your system will then allow for corners, tees, etc. t
141
141
142
142
143
143
# Icons
144
-
ModelingToolkitDesigner.jl comes with icons for the ModelingToolkitStandardLibrary.jl pre-loaded. For custom components, icons are loaded from the `path` variable supplied to `ODESystemDesign()`. To find the path ModelingToolkitDesign.jl is searching, pass the system of interest to `ODESystemDesign()` and replace the `.toml` with `.png`. For example if we want to make an icon for the `sys.vol` component, we can find the path by running...
144
+
ModelingToolkitDesigner.jl comes with icons for the ModelingToolkitStandardLibrary.jl pre-loaded. For custom components, icons are loaded from either the `path` variable supplied to `ODESystemDesign()` or from an `icons` folder of the package namespace. To find the paths ModelingToolkitDesign.jl is searching, run the following on the component of interest (for example `sys.vol`)
Placing a "FixedVolume.png" file in this location will load that icon.
153
+
The first file location comes from the `path` variable. The second is looking for a folder `icons` in the component parent package, in this case `ModelingToolkitStandardLibrary`, and the third path is from the `icons` folder of this `ModelingToolkitDesigner` package. The first real file is the chosen icon load path. Feel free to contribute icons here for any other public component libraries.
154
+
155
+
## Icon Rotation
156
+
The icon rotation is controlled by the `wall` atribute in the saved `.toml` design file. Currently this must be edited by hand. The default direction is "E" for east. The image direciton can change to any "N","S","E","W". For example, to rotate the capacitor icon by -90 degrees (i.e. from "E" to "N") simply edit the design file as
157
+
158
+
```
159
+
[capacitor]
160
+
n = "S"
161
+
x = 0.51
162
+
y = 0.29
163
+
wall = "N"
164
+
```
152
165
153
166
# Colors
154
167
ModelingToolkitDesigner.jl colors the connections based on `ModelingToolkitDesigner.design_colors`. Colors for the ModelingToolkitStandardLibrary.jl are already loaded. To add a custom connector color, simply use `add_color(system::ODESystem, color::Symbol)` where `system` is a reference to the connector (e.g. `sys.vol.port`) and `color` is a named color from [Colors.jl](https://juliagraphics.github.io/Colors.jl/stable/namedcolors/).
155
168
156
169
# TODO
157
170
- Finish adding icons for the ModelingToolkitStandardLibrary.jl
171
+
- Rotate image feature
172
+
- Improve text positioning and fontsize
173
+
- How to include connection equations automatically, maybe implement the `input` macro
174
+
- Provide `PassThru`'s without requiring user to add `PassThru` components to ODESystem
0 commit comments