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)#
Retrieve source ray paths.
- Parameters:
- Returns:
Iterator
[ansys.api.speos.results.v1.ray_path_pb2.RayPath
]Ray paths generated by the source.