Skip to content

Commit

Permalink
Switch colormaps from menu CGX
Browse files Browse the repository at this point in the history
  • Loading branch information
imirzov committed Apr 18, 2021
1 parent 1409f9f commit 1a0a264
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ You may also need libraries:
# What's new in future v0.9.0

- CalculiX 2.17.1. Linux version of CGX has 'cmap' command and [custom colormaps](https://github.com/calculix/cgx/releases/tag/v2.17.cmap): classic, viridis, inferno and turbo.
- Switch colormaps from menu CGX.

- Significantly improved INP importer algorithm. Now parser supports keyword line continuation. Tested on over 20 000 INP files, including Abaqus models.
- Add buttons to select paths in Settings dialog
- Using external python packages ccx2paraview and unv2ccx.
Expand Down
42 changes: 41 additions & 1 deletion config/Window.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ p, li { white-space: pre-wrap; }
<x>0</x>
<y>0</y>
<width>600</width>
<height>31</height>
<height>19</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
Expand Down Expand Up @@ -187,6 +187,10 @@ p, li { white-space: pre-wrap; }
<addaction name="action_cgx_paint_surfaces"/>
<addaction name="action_cgx_inp"/>
<addaction name="action_cgx_frd"/>
<addaction name="action_cgx_cmap_classic"/>
<addaction name="action_cgx_cmap_inferno"/>
<addaction name="action_cgx_cmap_turbo"/>
<addaction name="action_cgx_cmap_viridis"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuJob"/>
Expand Down Expand Up @@ -533,6 +537,42 @@ p, li { white-space: pre-wrap; }
<string>Paint surfaces</string>
</property>
</action>
<action name="action_cgx_cmap_classic">
<property name="icon">
<iconset>
<normaloff>../img/action_cgx_cmap_classic.png</normaloff>../img/action_cgx_cmap_classic.png</iconset>
</property>
<property name="text">
<string>cmap Classic</string>
</property>
</action>
<action name="action_cgx_cmap_inferno">
<property name="icon">
<iconset>
<normaloff>../img/action_cgx_cmap_inferno.png</normaloff>../img/action_cgx_cmap_inferno.png</iconset>
</property>
<property name="text">
<string>cmap Inferno</string>
</property>
</action>
<action name="action_cgx_cmap_turbo">
<property name="icon">
<iconset>
<normaloff>../img/action_cgx_cmap_turbo.png</normaloff>../img/action_cgx_cmap_turbo.png</iconset>
</property>
<property name="text">
<string>cmap Turbo</string>
</property>
</action>
<action name="action_cgx_cmap_viridis">
<property name="icon">
<iconset>
<normaloff>../img/action_cgx_cmap_viridis.png</normaloff>../img/action_cgx_cmap_viridis.png</iconset>
</property>
<property name="text">
<string>cmap Viridis</string>
</property>
</action>
</widget>
<resources/>
<connections/>
Expand Down
Binary file added img/action_cgx_cmap_classic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/action_cgx_cmap_inferno.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/action_cgx_cmap_turbo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/action_cgx_cmap_viridis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ def actions(p, s, w, m, t, j, i):
lambda: gui.cgx.paint_surfaces(w, m))
w.action_cgx_inp.triggered.connect(lambda: gui.cgx.open_inp(w, j.inp, len(m.Mesh.nodes)))
w.action_cgx_frd.triggered.connect(lambda: gui.cgx.open_frd(w, j.frd))
w.action_cgx_cmap_classic.triggered.connect(lambda: w.wc.post('cmap classic'))
w.action_cgx_cmap_inferno.triggered.connect(lambda: w.wc.post('cmap inferno'))
w.action_cgx_cmap_turbo.triggered.connect(lambda: w.wc.post('cmap turbo'))
w.action_cgx_cmap_viridis.triggered.connect(lambda: w.wc.post('cmap viridis'))

# Help actions
w.action_help_readme.triggered.connect(
Expand Down

0 comments on commit 1a0a264

Please sign in to comment.