Usage : Features : Download : Internals : Related
Thrup’ny is a free, open-source multi-platform viewer for VRML 3-D models, designed for both anatomy teaching and finite-element pre- and post-processing.
Quick start: Use .wrl
file, then
click and drag to manipulate the model.
Use the Esc key to switch between
the viewing and pointing modes.
To view VRML models with a Web browser, configure your browser
to use Thrup’ny as a helper application for
.wrl
files.
^O
]
to open local files; the default directory is taken
from the most recently opened file (if any) or from the
HOME
environment variable (if any), or
is the root directory.
Remote files
can currently be opened only by typing an exact URL into
the text-edit box.
^R
]
to render the current view into an image file
(a .rgb
file in
the same directory as the model).
(It may be necessary to
decrease the level of graphics hardware acceleration
to make this work under MS Windows.)
The .rgb
file
can be converted to other formats using, for example,
ImageMagick:
convert -geometry widthxheight
name.rgb name.png
.
The width
and
height
parameters specify the size
of the Thrupn’y display area in pixels. The size
can be set using
.
Shift-^R
]
to render a set of views into image files.
Dialogue boxes come up asking how many rotation steps to make
about the x and y axes. The set of image
files can be used to create an interface like
this example.
The files can also be used to create an animation,
using ImageMagick commands like the following, for example:
convert -adjoin -geometry width -delay ticks *.rgb animation.gif
.
recentFiles
under HKEY_CURRENT_USER ►
Software ► AudiLab ► Thrupny
,
under Linux it’s stored in ~/.config/AudiLab/Thrupny.conf
.
^Q
]
^S
]
for fast but ugly rendering of transparency
^B
]
for prettier rendering of transparency that
may be slower and may also display some structures
at the wrong depth
^C O
]
for a camera with no perspective adjustments, so
parallel lines stay parallel
^C P
]
for a normal perspective camera
Shift-^H
]
^H
]
^D
]
^W
]
In the list above, the underlined characters are accelerator keys,
invoked initially using the ^
denoting a control key, that is, holding down the Control
key while pressing the indicated key. Note that the shortcut keys
involve pairs of keys in some cases, such as Ctrl-C
followed by P
to invoke a perspective camera.
The Esc
(Escape) key can be used to toggle between the
viewing mode and the pointing mode:
To change the centre of rotation,
press the S
key and then
left click on some structure within the model. The view will zoom in
on that structure, which will be centred in the window and will
become the centre of rotation. (After this, the displayed orientation
will no longer be correct; this is a bug.)
After the model has been rotated
by means of the thumbwheels or buttons,
the current orientation is displayed in the status bar
as a set of 3 rotations, in degrees,
corresponding to sequential rotations about the z,
y and x axes, in that order. If the rotation
is performed by dragging the model itself, the displayed orientation
is not automatically updated; it can be updated at any time by
using the ^D
).
(Here I do not distinguish between zooming, for an orthographic camera, and dollying, for a perspective camera).
To unselect an object, shift and left click on it, or left click on another object, or left click on the background.
If you shift-left-click on an unselected object, it will be highlighted in addition to previously selected objects, and its label will be displayed. If you make a deletion, only the most recently selected object will be deleted.
(Selection only works for objects which are ‘children’ of VRML ‘anchor’ nodes. The goal is to use right clicking for pointing, rather than having two separate modes. For now, right clicking on the display will bring up a menu for adjusting various things; this menu is not meant to be used, and some of its functions are not enabled.)
The toolbar contains two dropdown lists, one for locations (URL’s) and one for viewpoints. For each, a check-mark button can be used to invoke the currently displayed item.
To invoke a URL, select it from the Location drop-down list so it
is displayed in the box, or type a new one into the box, and then
press the check-mark button (or press the Return
key).
The Viewpoints list displays the names of any viewpoints that are predefined in the model definition. A viewpoint can be invoked by highlighting it in the drop-down list. To return to the last-selected viewpoint (the name of which is currently displayed in the Viewpoints box) click on the check-mark button.
Segmentation fault
under Linux.
I first observed this in 2021 Jun in VirtualBox.
It was not consistent. On Jun 4 it was not working on my Windows laptop;
at first it was not working on a student’s Mac laptop
but then apparently it started working.
As of 2021 Jul 15, it was consistently working for me
(Debian 10, fully updated)
but not for the student.
In 2024 Dec the crashing happened sometimes for two students, one using it
under native Linux and one using it in VirtualBox.
Thrup’ny will
The items in the list above have been implemented or partially implemented, or have not yet been implemented.
Thrup’ny is licensed under the GNU General Public Licence. GPL implies that the source code is available, but it is not linked to on this page – contact me if you want it. If I am not properly complying with the GPL, please let me know.
Thrup’ny for Windows consists of an executable file,
thrupny.exe
, and several DLL files.
Below are downloads of the files in three alternative forms.
Once you have all of the files in a single directory
(e.g., C:\Program Files\Thrupny\
),
double-click on thrupny.exe
to run it.
Create a shortcut in the Start menu or elsewhere if you wish.
If Thrup’ny fails with a message saying that OpenGL
doesn’t work, it may be trying to use a less-powerful integrated
graphics processor rather than a more-powerful specialized one.
Try right-clicking on thrupny.exe
and look for
in the menu
that pops up. It may provide a choice of processors and indicate which
one is used by default. It may also provide an option to
.
If there is a choice, try running Thrup’ny with a
graphics processor other than the default one. If that works, consider
changing the default, either globally or just for Thrup’ny.
Download one of these files into some folder and then double-click on it. It will extract the Thrup’ny executable and the DLL’s into the folder that it’s in or into a folder that you specify.
Download this .zip file and
use an Unzip utility to extract thrupny.exe
and the DLL’s into some folder.
Download all of the following files into the same directory. The DLL files are local copies of required third-party libraries, for convenience; they are all subject to the GPL or similar licences.
thrupny.exe
in order to upgrade it.
If you are running Linux in VirtualBox under MS Windows as the host operating system, you may get better performance by running the Windows version of Thrup’ny rather than the Linux version. The Linux version sometimes crashes.
Download thrupny.zip
and extract its contents into some directory
(e.g., ~/bin/thrupny/
).
Alternatively, download thrupny
, thrupny_run
and each of the required lib*
files (see below)
to wherever you like, as long as they’re all in the same directory.
Use cd
to get into the directory where you have stored
the files
(e.g., cd ~/bin/thrupny/
)
and do chmod u+x thrupny*
to make
thrupny
and thrupny_run
executable.
The latter is a script
that causes thrupny
to look in its own directory for its libraries.
To run Thrup’ny, use cd
to get into the directory
where you have stored the files and do
./thrupny_run&
.
Required files:
Names starting with Q
are from QT,
those starting with So
are from Coin3D.
The C++ source files include:
thrupny.cpp
:
The main programme, consisting of just a few lines
to establish the QT application object;
call BrowserWindow()
(in thrupny_window.cpp
);
and enter the main event loop.
thrupny_loader.cpp
:
Called by thrupny_viewer.cpp
to set up a VRML Loader
which
calls loadURL
in thrupny_viewer.cpp
.
I’m not really clear about how this works.
thrupny_viewer.cpp
:
Includes
Browser()
and ~Browser()
loadFile()
and loadURL()
made_selection()
deleteObject()
and undeleteObject()
viewpointJump()
and viewpointReturnToCurrent()
setSceneGraph()
, setBaseLocation()(
,
resetLocation()
, unsetBaseLocation()
setDefaultScene()
, getDefaultScene()
prequalify_cb()
VRMLAnchorCB
, VRMLInlineCB()
xyzRot()
.
getOrientation()
to compute equivalent
rotation values corresponding to current view.
osRender()
and osRenderMult()
to render to .rgb
file(s).
thrupny_window.cpp
:
Set up Thrup’ny window with central widget, actions, menus,
toolbars, status bar, spin boxes, thumbwheels.
Implement functions for displaying orientation,
displaying messages and object labels.
Implement loadFile
and saveFile
.
Thrup’ny is based on the free-and-open-source Coin3D (in particular, Coin and SoQt) and Qt. It is being developed under Debian GNU/Linux and MS Windows and should be portable to other operating systems.
Thrup’ny is based in part on code and advice generously provided by Sylvain Carette.
floatable
property
so they also can now be undocked. However, a difference
remains in that Qt Designer 4.4 will add only actions
to a toolbar, although widgets can still be added
outside Qt Designer, using addWidget()
.
Another difference is that dock windows have title
bars but toolbars don’t. The dock-window title
bar can be modified (or removed [?]) using the
setTitleBarWidget() function (introduced in 4.3) and the
space it takes up can be reduced using the
DockWidgetVerticalTitleBar feature.
Also note the
following in the documentation for version 4.4:
‘When a QToolBar is not a child of a QMainWindow,
it [loses] the ability to populate the extension pop up
with widgets added to the toolbar using addWidget().
Please use widget actions created by inheriting QWidgetAction
and implementing QWidgetAction::createWidget() instead.
This is a known issue which will be fixed in a future release.’
[ref]