Texture3D#

class ansys.speos.core.component.Texture3D(project, name, description='', metadata=None, default_parameters=None, texture_3d_instance=None)#

Represent the Speos 3D texture feature.

A 3D texture repeats a pattern body on a support body of the project geometry, following a 3D mapping file.

Parameters:
projectansys.speos.core.project.Project

Project that will own the feature.

namestr

Name of the feature.

descriptionstr, optional

Description of the feature. By default, "".

metadataOptional[Mapping[str, str]], optional

Metadata of the feature. By default, {}.

default_parametersOptional[ansys.speos.core.generic.parameters.Texture3DParameters], optional

Allows to provide parameters to overwrite the default parameters. By default, None, which uses Texture3DParameters defaults.

texture_3d_instanceOptional[ansys.speos.core.kernel.scene.ProtoScene.Texture3D], optional

3D texture protobuf message retrieved from an existing scene. By default, None, which creates a new 3D texture.

Parameters:

Notes

The 3D texture feature requires a Speos server of version 2027 R1 or higher. The pattern body must not be a body of the scene root part taken in the simulation.

Overview#

create_pattern_body

Create a body in this element.

create_pattern_material

Create a new optical property applied on the 3D texture pattern body.

commit

Save the local feature data to the Speos server database.

reset

Reset local data from the Speos server database.

delete

Delete feature data from the Speos server database.

get

Get 3D texture information from its dictionary representation - read only.

name

Name of the 3D texture feature.

axis_system

Anchor of the 3D texture pattern.

support_body

Geometry path of the body supporting the 3D texture.

pattern_body

Body used as 3D texture pattern - read only.

pattern_operation

Operation applied on the support body according to the pattern.

global_scale

Global scale factor applied to the 3D texture pattern.

mapping_3d_file_uri

Uri of the 3D mapping file (.OPT3DMapping) used by this 3D texture.

pattern_materials

Materials applied on the pattern body.

__str__

Return the string representation of the 3D texture.

Import detail#

from ansys.speos.core.component import Texture3D

Property detail#

property Texture3D.name: str#

Name of the 3D texture feature.

Returns:
str

Name of the feature.

property Texture3D.axis_system: List[float]#

Anchor of the 3D texture pattern.

Twelve-element list [Ox Oy Oz Xx Xy Xz Yx Yy Yz Zx Zy Zz]. The coordinate system must be orthonormal.

Parameters:
valuelist[float]

New anchor values.

Returns:
list[float]

Current anchor values.

property Texture3D.support_body: str#

Geometry path of the body supporting the 3D texture.

Parameters:
valueUnion[str, ansys.speos.core.geo_ref.GeoRef, ansys.speos.core.body.Body]

Body supporting the 3D texture.

Returns:
str

Geometry path of the support body.

property Texture3D.pattern_body: ansys.speos.core.body.Body | None#

Body used as 3D texture pattern - read only.

Use create_pattern_body() to create it.

Returns:
Union[ansys.speos.core.body.Body, None]

Pattern body if it exists, otherwise None.

property Texture3D.pattern_operation: ansys.speos.core.generic.parameters.Texture3DPatternOperations#

Operation applied on the support body according to the pattern.

Parameters:
valueansys.speos.core.generic.parameters.Texture3DPatternOperations

New pattern operation.

Returns:
ansys.speos.core.generic.parameters.Texture3DPatternOperations

Current pattern operation.

property Texture3D.global_scale: float#

Global scale factor applied to the 3D texture pattern.

Parameters:
valuefloat

New global scale factor.

Returns:
float

Current global scale factor.

property Texture3D.mapping_3d_file_uri: str#

Uri of the 3D mapping file (.OPT3DMapping) used by this 3D texture.

Parameters:
valueUnion[str, pathlib.Path]

New 3D mapping file uri.

Returns:
str

Current 3D mapping file uri.

property Texture3D.pattern_materials: List[ansys.speos.core.opt_prop.OptProp]#

Materials applied on the pattern body.

Returns:
list[ansys.speos.core.opt_prop.OptProp]

Optical properties applied on the pattern body.

Method detail#

Texture3D.create_pattern_body()#

Create a body in this element.

Returns:
ansys.speos.core.body.Body

Body feature.

Texture3D.create_pattern_material(name, description='', metadata=None, parameters=None)#

Create a new optical property applied on the 3D texture pattern body.

The created optical property belongs to the 3D texture pattern: it is not registered as a project feature.

Parameters:
namestr

Name of the optical property.

descriptionstr, optional

Description of the optical property. By default, "".

metadataOptional[Mapping[str, str]], optional

Metadata of the optical property. By default, {}.

parametersOptional[ansys.speos.core.generic.parameters.OptPropParameters], optional

Allows to provide parameters to overwrite default parameters.

Returns:
ansys.speos.core.opt_prop.OptProp

Optical property applied on the pattern body.

Notes

Call ansys.speos.core.opt_prop.OptProp.delete() on the returned object to remove it from the 3D texture pattern, then commit the 3D texture.

Texture3D.commit()#

Save the local feature data to the Speos server database.

Returns:
ansys.speos.core.component.Texture3D

Updated 3D texture feature.

Texture3D.reset()#

Reset local data from the Speos server database.

Returns:
ansys.speos.core.component.Texture3D

Updated 3D texture feature.

Texture3D.delete()#

Delete feature data from the Speos server database.

The local object data remain available after deletion.

Returns:
ansys.speos.core.component.Texture3D

Updated 3D texture feature.

Texture3D.get(key='')#

Get 3D texture information from its dictionary representation - read only.

Parameters:
keystr, optional

Key prefix used to look up a value. By default, "", which returns the full dictionary.

Returns:
str | dict

Value found for the given key, or the full dictionary when key is empty.

Texture3D.__str__()#

Return the string representation of the 3D texture.