VCollab Image Generator - Linux
VCollab Image Generator allows users to generate a single image file as well as multiple image files from CAX.
File Layout
Supported File Formats
Single Image File Generation
Multiple Image Files Generation
Configuration for Headless Server
Log Files
File Layout
The files of the VCollab Image Generator can be located under the directory /usr/local. It consists of the following files and folders.
VCollabImageGenerator: This application and its dependency library files are available in /usr/local/lib64/VCollab/VCollabImageGenerator folder. This is the batch mode application and it allows to create image files from CAX files.
Shortcut: The shortcut file for VCollabImageGenerator is available in /usr/local/bin folder. This can be used to run the VCollabImageGenerator application.
Samples: The sample CAX files are available in /usr/local/lib64/VCollab/Samples/CAX folder.
Help: The help documentation can be found in /usr/local/share/doc/VCollabImageGenerator folder.
License: This license file for VCollabImageGenerator should be available in /usr/local/share/licenses folder.
Supported Image Formats
VCollab Image Generator supports the following image formats to generate from CAX files.
BMP
JPG
PNG
TIF
wCAX
3DPDF
JT
Note
The support for 3DPDF and JT needs an additional license.
Single Image File Generation
Syntax:
>VCollabImageGenerator [input] [output] [Image Dimension] [Model View] [Background Color] [Legend State] [Result Name] [Instance Name] [Derived Result Name]
Where,
[input] |
input cax file path. |
[output] |
output image file path. (Supported Formats: bmp, jpg, tif, png, wcax, pdf (3d) and jt) |
[Image Dimension] |
width and height of image. A space is required between width and height values. |
[Model View] |
any one of the following views{ “Front”, “Rear”, “Top”, “Bottom”, “Left”, “Right”, “Iso”, “FrontMesh”, “RearMesh”, “TopMesh”, “BottomMesh”, “LeftMesh”, “RightMesh”, “IsoMesh”,”FrontWire”, “RearWire”, “TopWire”, “BottomWire”, “LeftWire”, “RightWire”, “IsoWire”,”FrontHiddenLine”, “RearHiddenLine”, “TopHiddenLine”, “BottomHiddenLine”, “LeftHiddenLine”, “RightHiddenLine”, “IsoHiddenLine” } |
[Background Color] |
Three values with space between them. Each value should be in the interval [0,1]. |
[Legend State] |
“LegendON” or “LegendOFF”. |
[Result Name] |
CAE result name. e.g., “Displacement”. |
[Instance Name] |
CAE result instance name. e.g., “L1M3”. |
[Derived Result Name] |
CAE result derived name. e.g., “Translational Magnitude”. |
Example:
“/usr/local/lib64/VCollab/Samples/CAX/Airbag.cax” “/home/test/images/Airbag.jpg” 600 400 “Iso” 1 1 1 “LegendON” “Displacement” “L1M1” “Translational Magnitude”
where,
param[0] = “VCollabImagepplicationName” : application
param[1] = “/usr/local/lib64/VCollab/Samples/CAX/Airbag.cax” : input data File
param[2] = “/home/test/images/Airbag.jpg” : output jpg image File; bmp, jpg, tif & png are supported formats
The following are OPTIONAL parameters, but has to be in the same order
param[3] = 600 : width of the image; Default is 600
param[4] = 400 : height of the image; Default is 500n”);
param[5] = “Front” :to set Frontview and Shaded display mode; “FrontWire” :to set Frontview and Wireframe display mode; Default is “Iso”
param[6] = 1 : Back ground color red field [range 0-1]; Default is 0
param[7] = 0.5 : Back ground color green field [ range 0-1]; Default is 0
param[8] = 0.2 : Back ground color blue field [range 0-1]; Default is 0
param[9] = LegendOFF : Legend display is ‘Off’; Defalut is “LegendON”
param[10] = “ResultName” : Result Name; Default is First result in the cax
param[11] = “Instance” : Instance Name; Default is First instance in the result
param[12] = “Derived Result Name” : Derived Result Name; Default is “Translational Magnitude” for vector type and “Von Mises Stress” for tensor type
Note
Set param[6] = -1, param[7] = -1, param[8] = -1 to ignore this background color. Instead, it uses the VCollab default background color.
>VCollabImageGenerator “/usr/local/lib64/VCollab/Samples/CAX/Airbag.cax” “/home/test//Airbag.wcax” 600 400 “Iso” -1 -1 -1 “LegendON” “Displacement” “L1M1” “Translational Magnitude” Here, The viewer windows size param[3] and param[4] don’t have any imapact in wcax, pdf (3d) and jt files.
As Background parameters are set as -1, it ignores this color and sets the background color from the first viewpoint of CAX file, if available. Otherwise, it sets the VCollab’s default background color. The other parameters are applied and saved it in wcax.
Note
To set other standard views, use param[5] as “Front” for front view “Rear” for rear view…
Multiple Image Files Generation
Syntax:
>VCollabImageGenerator [“-v”] [input] [output] [Image Format] [Image Dimension] [CreateDir] [View Path] [vpt File Path]
Where,
[“-v”] |
Use “-v” for generating multiple image files from Viewpoints and all CAE results. |
[input] |
input CAX file path. |
[output] |
output image Dir path. |
[Image Format] |
“jpg” or “bmp” or “png” or “tif”. |
[Image Dimension] |
width and height of image. A space is required between width and height values. |
[CreateDir] |
createDir=0 or createDir=1. ‘CreateDir’=1 creates directories inside ‘OutputDir’ for each ‘viewpath’ in ‘vpt’ file. ‘CreateDir’=0 makes all image files written in ‘OutputDir’ |
[View Path] |
viewPath =”viewPathName”. Images will be generated for all viewpoints of this path. If path is empty, then images for all available viewpaths inside the vpt file. or To Generate images for CAE results set, ViewPath==”@CAE” or “@CAE@AllInstance” or “@CAE@AllDerived” or “@CAE@AllInstance@AllDerived” or “@CAE@AllDerived@AllInstance” inputs. This will help to generate multiple images of all CAE results. @CAE : To generate images for all CAE results, with default instance (first) and default derived type. @CAE@AllInstance : To generate images for all CAE results and all Instances, with default derived type. @CAE@AllDerived : To generate images for all CAE results and all derived types, with default instance. @CAE@AllInstance@AllDerived” or “@CAE@AllDerived@AllInstance” : To generate images for all CAE result’s All instances with all derived types. |
[vpt File Path] |
vpt file path. vptFile=”vptFilePath”. Note If viewpath is one of @CAE type then vptfilePath can be ignored or can be used to set std views by passing one of the following “Front/Rear/Top/Bottom/Left/Right/Iso” |
E.g.
>VCollabImageGenerator -v “bracket.cax” “/home/test/images/” “png” 600 500 1 “(blank)” “bracket.vpt”
Where,
Inputcaxfile=”bracket.cax” outputdir=”/home/test/images/” ImageFormat=”png” width=600 height=500 createDir=1 viewPath=”” vptFile=”bracket.vpt”
Note
‘OutputDir’ must exist.
‘CreateDir’=1 creates directories inside ‘OutputDir’ for each ‘viewpath’ in ‘vpt’ file.
‘CreateDir’=0 makes all image files written in ‘OutputDir’
ViewPath’ is data inside .vpt file. Set this field with proper value to generate images for that particular viewpath. To generate all viewpath images, Set this value as “ “.(a space that inside 2 double quotes). But the field should not be ignored.
The option ‘-v’ is to generate images from Viewpoints.
Configuration for Headless Server
VCollabImageGenerator uses OpenGL for rendering the images in the graphics hardware (or frame buffer) and export them into image files. This, in turn, requires an X windows server running on the system. On headless systems with no X windows server is installed, Xvfb in-memory display server is required to run VCollabImageGenerator.
Prerequisites for Headless Server – SUSE Linux Enterprise Server
The following package should be installed on a Headless server environment in order to make VCollabImageGenerator work.
xorg-x11-server
The xorg-x11-server installs the following required packages. If there is an issue in running VCollabImageGenerator on Headless server even after installing the above package, make sure to check if the below packages are avaiable on the machine.
Mesa-libGL1
libGLU1
Mesa-dri
libglut3
libXi6
libXpm4
libXrandr2
libXrender1
libfreetype6
libfontconfig
Prerequisites for Headless Server – Red Hat Enterprise Linux
The following package should be installed on a Headless server environment in order to make VCollabImageGenerator work.
xorg-x11-server-Xvfb
The xorg-x11-server-Xvfb installs the following required packages. If there is an issue in running VCollabImageGenerator on Headless server even after installing the above package, make sure to check if the below packages are avaiable on the machine.
mesa-libGL
mesa-libGLU
mesa-dri-drivers
freeglut
libXi
libXpm
libXrandr
libXrender
FreeType
fontconfig
libdrm
Usage syntax for Xvfb:
>/usr/local/bin/VCollabImageGenerator -xvfb “/usr/local/lib64/VCollab/Samples/CAX/Airbag.cax” “/home/test/images/Airbag.jpg” 600 400 “Iso” 1 1 1
Xvfb Configuration
How to check if Xvfb is installed:
rpm -qa | grep Xvfb
This above command lists the Xvfb version that is installed on the machine
How to check if Xvfb is running:
ps -ef | grep Xvfb
This above command lists the process details about Xvfb that is currently running on the machine
How to configure Xvfb for the Automatic startup:
Edit the rc.local file to start the server automatically on boot, then start the server. After the package is installed, add the following line to the /etc/rc.local file to start the server on boot:
Xvfb :1234 -screen 0 1280x1024x24 -nolisten inet6 &
Either reboot the system to start the Xvfb server or manually run the following command to start the Xvfb server without rebooting the system:
Xvfb :1234 -screen 0 1280x1024x24 -nolisten inet6 &
Note
The xorg-x11-server-Xvfb version depends on the graphics driver version installed on the headless server. If VCollabImageGenerator still doesn’t work after the installation of Xvfb, you may need to try installing the latest versions of Xvfb.
Log Files
VCollabImageGenerator generates log files during each translation. Users can find the following log files after each VCollabImageGenerator run.
CollabImageGenerator.log
Ogre.log
The above files are written in a folder of the following format
VCollabImageGenerator-YYYY-MM-DD-HH-MM-SS-PID
That is, VCollabImageGenerator creates a folder in the above format for each instance and writes the log files into the folder. The folder with log files is generally written into a folder represented by VCOLLAB_TEMP_PATH environment variable. In the case of the non-existence of VCOLLAB_TEMP_PATH, the log files folder is written into /tmp folder.
In case of errors during the VCollabImageGenerator usage, the users are requested to communicate the errors along with these log files generated by VCollabImageGenerator to VCollab support (support@vcollab.com). The log files are designed to help the VCollab development and support teams understand the issues better and faster and provide fixes or workarounds to the user.