Skip to main content
Ctrl+K
ansys-speos-core 0.6.dev0 documentation - Home ansys-speos-core 0.6.dev0 documentation - Home
  • Overview
  • Getting started
  • API reference
  • Examples
  • Contribute
    • Release notes
Ctrl+K
  • GitHub
  • Overview
  • Getting started
  • API reference
  • Examples
  • Contribute
  • Release notes
Ctrl+K
  • GitHub

Section Navigation

  • ansys.speos.core
    • kernel
      • body
      • client
      • crud
      • face
      • intensity_template
      • job
      • part
      • proto_message_utils
      • scene
        • SceneLink
        • SceneStub
      • sensor_template
      • simulation_template
      • sop_template
      • source_template
      • spectrum
      • vop_template
    • workflow
    • body
    • bsdf
    • face
    • geo_ref
    • intensity
    • launcher
    • logger
    • lxp
    • opt_prop
    • part
    • project
    • proto_message_utils
    • sensor
    • simulation
    • source
    • spectrum
    • speos
  • API reference
  • The ansys.speos.core library
  • The kernel package
  • The scene.py module
  • SceneLink

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:
dbansys.speos.core.kernel.scene.SceneStub

Database to link to.

keystr

Key of the scene in the database.

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#

get

Get the datamodel from database.

set

Change datamodel in database.

delete

Remove datamodel from database.

load_file

Load speos file to fill the scene.

get_source_ray_paths

Retrieve source ray paths.

__str__

Return the string representation of the scene.

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:
datascene.Scene

New scene datamodel.

SceneLink.delete()#

Remove datamodel from database.

SceneLink.load_file(file_uri)#

Load speos file to fill the scene.

Parameters:
file_uristr

File to be loaded.

SceneLink.get_source_ray_paths(source_path, rays_nb=100, raw_data=True, display_data=False)#

Retrieve source ray paths.

Parameters:
source_pathstr

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_nbint, 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.

Returns:
Iterator[ansys.api.speos.results.v1.ray_path_pb2.RayPath]

Ray paths generated by the source.

On this page
  • ansys.speos.core.kernel.scene.SceneLink
  • Overview
  • Import detail
  • Method detail
    • __str__()
    • get()
    • set()
    • delete()
    • load_file()
    • get_source_ray_paths()
  • Show Source

© Copyright (c) 2025 ANSYS, Inc. All rights reserved.

Created using Sphinx 8.1.3.

Built with the Ansys Sphinx Theme 1.5.2.
Last updated on