Rayfront currently doesn't support running sequential simulations on the same machine through the GUI. Here's how to do it anyway.
The most difficult trick is to set up the correct environment. The file "rfcgf.bat" does exactly this. You may need to change the INSTDIR setting at the beginning, the rest is all derived from that:
REM # CONFIGURE THIS to fit your installation. REM # The installation directory of Rayfront. REM # REM # ****** MODIFY THE NEXT LINE ****** set INSTDIR=c:\program files\Rayfront REM # DO NOT EDIT the following. REM # Which system we are running on. set PLATFORM=win32 set PYLIBBASE=%INSTDIR%\pylib set PLATDIR=%INSTDIR%\platform\%PLATFORM% set PLATBINDIR=%PLATDIR%\bin set PLATLIBDIR=%PLATDIR%\lib set PYTHONLIBDIR=%INSTDIR%\lib\python1.5 set PYTHONPLATDIR=%PYTHONLIBDIR%\Plat-Win set PYWINEXTDIR=%PLATLIBDIR%\pywin32 rem # the ones we really need. set PYTHONPATH=%PYLIBBASE%;%PLATLIBDIR%;%PYWINEXTDIR% set PYTHONPATH=%PYTHONPATH%;%PYTHONLIBDIR%;%PYTHONPLATDIR% set PATH=%PLATBINDIR%;%PATH% set RAYPATH=.;%INSTDIR%\raylib set BINDIR=%PLATBINDIR% set DISPLAY_GAMMA=2.3 set RFCORE=%PLATBINDIR%\rfcore.exe -O -u set PROCWRAP=%PYLIBBASE%\server\procwrap.pyo
You can use the "call" command to execute this file from any other script, and after it returns, the environment will be set correctly in the parent script. After that, you need to start the Python interpreter included with Rayfront with the right arguments.
The %RFCORE% variable contains the full file name of the interpreter, %PROCWRAP% is the Python program that starts the further processing. The remaining four arguments are as follows:
%RFCORE% %PROCWRAP% <variation> <subvar> <simtype> <runmode> <variation> Name of the variation (without file extension) <subvar> Name of the view or measuring field <simtype> Simulation type, one of: rview start interactive preview rpict run image simulation in batch mode numeric run numeric simulation in batch mode octree generate final octree (<subvar> is ignored) <runmode> String of five flag characters, case significant R run simulation, always use this. r don't run (used internally by Rayfront) P use parameters as given in rif (QUALITY etc.) p use default parameters for rpict/rview/rtrace M run mkillum if needed (or mktis for Raydirect) m don't run mkillum/mktis A use ambient file a don't use ambient file T currently ignored t currently ignored
Below an example batch file that first runs a low quality preview using the view "side", and then a high quality numeric simulation using the measuring field "room_1". You may have to change the path to the "rfcfg.bat" file. The example assumes that it is placed in the binaries folder of a default Rayfront installation.
The executing batch file resides in the project directory, and must be run from there:
@echo off setlocal REM import environment call "c:\program files\Rayfront\platform\win32\bin\rfcfg.bat" REM low quality preview %RFCORE% %PROCWRAP% variation_1 side rview Rpmat REM high quality numeric simulation %RFCORE% %PROCWRAP% variation_1 room_1 numeric RPMAt endlocal echo on
You will see no output from this script in the DOS box, use the Rayfront process information windows instead
Doing the same thing on a unix system will be straightforward with any shell. The procedure remains unchanged from the Windows batch files.