Oasys.D3PLOT.Image class¶
Constants¶
3D (D3PLOT viewer types¶
- Image.GLBU¶
Uncompressed GLB animation file
3D (D3PLOT viewer) types¶
- Image.GLB¶
GLB animation file
image types¶
movie types¶
resolution¶
state selection¶
- Image.ALL_STATES¶
Use all states
Static methods¶
- classmethod Image.Write3D(name, options=Oasys.gRPC.defaultArg)¶
Writes a 3D (GLB) file
- Parameters:
name (string) – Filename for the movie
options (dict) –
Optional. Dictionary containing options for writing movie. Can be any of:
- anonymise:
(boolean) Anonymise part tree (default = false)
- format:
(constant) The format for the 3D file. Either
Image.GLB
(default) orImage.GLBU
- frameRate:
(integer) The frame rate if multiple states are written (default = 25)
- graphicsWindow:
(
GraphicsWindow
) An individualGraphicsWindow
to write 3D data for. If not given (default) all the windows on the current page will be written- state:
(integer) The state number to write or
Image.ALL_STATES
(default)- Returns:
No return value
- Return type:
None
Example
To write a 3D file “example.glb” for graphics window gw:
Oasys.D3PLOT.Image.Write3D("example.glb", { 'graphicsWindow': gw } )
- classmethod Image.WriteImage(name, options=Oasys.gRPC.defaultArg)¶
Writes a static image file
- Parameters:
name (string) – Filename for the image
options (dict) –
Optional. Dictionary containing options for writing image. Can be any of:
- dither:
(boolean) Whether to dither 8 bit images or not (default is false)
- format:
(constant) The format for the image. One of
Image.BMP8C
,Image.BMP8
,Image.BMP
,Image.JPEG
,Image.PPM
,Image.PNG
(default),Image.PNG8
orImage.GIF
- graphicsWindow:
(
GraphicsWindow
) An individualGraphicsWindow
to write image for. If not given (default) all the windows on the current page will be written- optimise:
(boolean) Whether to optimise the colour palette for 8 bit images or not (default is true)
- quality:
(integer) The quality for JPEG images (1 - 100) (default = 90)
- resolution:
(constant) The resolution for the image. One of
Image.SCREEN
(default),Image.X2
orImage.X4
- Returns:
No return value
- Return type:
None
Example
To write an image “example.png”
Oasys.D3PLOT.Image.WriteImage("example.png")
- classmethod Image.WriteMovie(name, options=Oasys.gRPC.defaultArg)¶
Writes a movie file
- Parameters:
name (string) – Filename for the movie
options (dict) –
Optional. Dictionary containing options for writing movie. Can be any of:
- aviFormat:
(constant) The AVI format for the movie if writing an AVI file. One of
Image.JPEG
(default),Image.BMP8C
,Image.BMP8
orImage.BMP
- dither:
(boolean) Whether to dither 8 bit images or not (default is false)
- format:
(constant) The format for the movie. One of
Image.MP4
(default),Image.AVI
orImage.AGIF
- frameRate:
(integer) The frame rate (default = 25)
- graphicsWindow:
(
GraphicsWindow
) An individualGraphicsWindow
to write movie for. If not given (default) all the windows on the current page will be written- quality:
(integer) The quality for AVI MJPEG images (1 - 100) (default = 90)
- repeat:
(integer) The number of repeats for the movie. 0 is infinite (default = 0)
- Returns:
No return value
- Return type:
None
Example
To write a movie “example.mp4”:
Oasys.D3PLOT.Image.WriteMovie("example.mp4")