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:
- project
ansys.speos.core.project.Project Project that will own the feature.
- name
str Name of the feature.
- description
str,optional Description of the feature. By default,
"".- metadata
Optional[Mapping[str,str]],optional Metadata of the feature. By default,
{}.- default_parameters
Optional[ansys.speos.core.generic.parameters.Texture3DParameters],optional Allows to provide parameters to overwrite the default parameters. By default,
None, which usesTexture3DParametersdefaults.- texture_3d_instance
Optional[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.
- project
- Parameters:
project (Texture3D.__init__.project)
name (str)
description (str)
default_parameters (Optional[ansys.speos.core.generic.parameters.Texture3DParameters])
texture_3d_instance (Optional[ansys.speos.core.kernel.ProtoScene.Texture3D])
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 a body in this element. |
|
Create a new optical property applied on the 3D texture pattern body. |
|
Save the local feature data to the Speos server database. |
|
Reset local data from the Speos server database. |
|
Delete feature data from the Speos server database. |
|
Get 3D texture information from its dictionary representation - read only. |
Name of the 3D texture feature. |
|
Anchor of the 3D texture pattern. |
|
Geometry path of the body supporting the 3D texture. |
|
Body used as 3D texture pattern - read only. |
|
Operation applied on the support body according to the pattern. |
|
Global scale factor applied to the 3D texture pattern. |
|
Uri of the 3D mapping file ( |
|
Materials applied on the pattern body. |
Return the string representation of the 3D texture. |
Import detail#
from ansys.speos.core.component import Texture3D
Property detail#
- 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.
- property Texture3D.support_body: str#
Geometry path of the body supporting the 3D texture.
- Parameters:
- value
Union[str,ansys.speos.core.geo_ref.GeoRef,ansys.speos.core.body.Body] Body supporting the 3D texture.
- value
- Returns:
strGeometry 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:
- value
ansys.speos.core.generic.parameters.Texture3DPatternOperations New pattern operation.
- value
- Returns:
ansys.speos.core.generic.parameters.Texture3DPatternOperationsCurrent pattern operation.
- property Texture3D.mapping_3d_file_uri: str#
Uri of the 3D mapping file (
.OPT3DMapping) used by this 3D texture.- Parameters:
- value
Union[str,pathlib.Path] New 3D mapping file uri.
- value
- Returns:
strCurrent 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.BodyBody 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:
- name
str Name of the optical property.
- description
str,optional Description of the optical property. By default,
"".- metadata
Optional[Mapping[str,str]],optional Metadata of the optical property. By default,
{}.- parameters
Optional[ansys.speos.core.generic.parameters.OptPropParameters],optional Allows to provide parameters to overwrite default parameters.
- name
- Returns:
ansys.speos.core.opt_prop.OptPropOptical 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.Texture3DUpdated 3D texture feature.
- Texture3D.reset()#
Reset local data from the Speos server database.
- Returns:
ansys.speos.core.component.Texture3DUpdated 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.Texture3DUpdated 3D texture feature.
- Texture3D.get(key='')#
Get 3D texture information from its dictionary representation - read only.
- Texture3D.__str__()#
Return the string representation of the 3D texture.