SceneLink
#
- class ansys.speos.core.kernel.scene.SceneLink(db, key)#
Bases:
ansys.speos.core.kernel.crud.CrudItem
Link object for a scene in database.
- Parameters:
- db
ansys.speos.core.kernel.scene.SceneStub
Database to link to.
- key
str
Key of the scene in the database.
- db
- Parameters:
key (str)
Examples
>>> from ansys.speos.core.speos import Speos >>> from ansys.speos.core.kernel.scene import ProtoScene >>> speos = Speos(host="localhost", port=50098) >>> sce_db = speos.client.scenes() >>> sce_link = sce_db.create(message=ProtoScene(name="Empty_Scene"))
Overview#
Import detail#
from ansys.speos.core.kernel.scene import SceneLink
Method detail#
- SceneLink.__str__()#
Return the string representation of the scene.
- SceneLink.get()#
Get the datamodel from database.
- Returns:
scene.Scene
Scene datamodel.
- SceneLink.set(data)#
Change datamodel in database.
- Parameters:
- data
scene.Scene
New scene datamodel.
- data
- SceneLink.delete()#
Remove datamodel from database.
- SceneLink.load_file(file_uri)#
Load speos file to fill the scene.
- Parameters:
- file_uri
str
File to be loaded.
- file_uri
- SceneLink.get_source_ray_paths(source_path, rays_nb=100, raw_data=True, display_data=False)#
Retrieve source ray paths.
- Parameters:
- source_path
str
Path to the source in the Scene : “
” for a specific source in the current scene, or “ / ” for a specific source in a specific sub scene. - rays_nb
int
,optional
Number of rays generated by the source. By default,
100
.- raw_data: bool, optional
If
True
, get the wavelengths in response stream.- display_data: bool, optional
If
True
, get the colors (RGB24 format) in response stream.
- source_path
- Returns:
Iterator
[ansys.api.speos.results.v1.ray_path_pb2.RayPath
]Ray paths generated by the source.