ansys_optical_automation.scdm_process package#

Submodules#

ansys_optical_automation.scdm_process.material_from_csv module#

class ansys_optical_automation.scdm_process.material_from_csv.MaterialsFromCSV(SpeosSim, SpaceClaim)[source]#

Bases: ansys_optical_automation.scdm_core.base.BaseSCDM

Provides for creating Speos materials from material CSV files.

This base class contains methods for reading a material CSV file and creating Speos materials.

Methods

apply_geo_to_layer()

Apply geometries to corresponding layers.

apply_geo_to_material()

Apply material according to the material definition.

convert_object_version(obj)

Function to convert Speos returns from latest to used API version Parameters ---------- obj : SpeosSelectedObject

create_speos_material(csv_path, work_directory)

Read a CSV file and create an OP.

get_total_layers()

Get the names of all layers in the project.

apply_geo_to_layer()[source]#

Apply geometries to corresponding layers.

apply_geo_to_material()[source]#

Apply material according to the material definition.

create_speos_material(csv_path, work_directory)[source]#

Read a CSV file and create an OP.

Parameters
csv_path: str

Full path to the CSV file.

work_directory: str

Full path to the input material folder. For example "D:\ASP_MaterialFromCsv".

get_total_layers()[source]#

Get the names of all layers in the project.

Returns
list

List of all layer names.

ansys_optical_automation.scdm_process.material_from_layers module#

class ansys_optical_automation.scdm_process.material_from_layers.SynchLayersMaterials(SpeosSim, SpaceClaim)[source]#

Bases: ansys_optical_automation.scdm_core.base.BaseSCDM

Provides for syncing information between the Speos material and CAD layer.

The class contains methods to sync information.

Methods

convert_object_version(obj)

Function to convert Speos returns from latest to used API version Parameters ---------- obj : SpeosSelectedObject

sync_op_from_layers()

Sync Speos volume optical materials based on the information of layers.

sync_op_from_layers()[source]#

Sync Speos volume optical materials based on the information of layers.

ansys_optical_automation.scdm_process.preprocessing_library module#

class ansys_optical_automation.scdm_process.preprocessing_library.PreProcessingASP(SpaceClaim)[source]#

Bases: ansys_optical_automation.scdm_core.base.BaseSCDM

Provides all methods for preprocessing Speos geometries.

Because of an API limitation, this class does not support multiple Speos sessions. Only one session can be attached at a time.

Methods

check_geometry_update()

Check whether any part was imported by a geometry update.

check_volume_conflict()

Check for volume conflict, returning two lists of conflicting bodies.

convert_object_version(obj)

Function to convert Speos returns from latest to used API version Parameters ---------- obj : SpeosSelectedObject

create_dict_by_color()

Create a dictionary for named selection generation, stitching one element per color.

create_dict_by_material()

Create a dictionary for materials defined in Catia.

create_named_selection(conversion_dict)

Create a named selection from a dictionary.

find_component(component_name)

Find all components with a given name.

geo_sets_conversion(part)

Get Catia geometrical set as a named selection.

remove_duplicates(comp)

Remove duplicated surfaces with a given component.

resolve_volume_conflict()

Resolve volume conflict based on the material definition.

stitch(conversion_dict)

Stitch all bodies based on a dictionary.

stitch_comp(comp, max_group_limit)

Stitch according to component structure.

check_geometry_update()[source]#

Check whether any part was imported by a geometry update.

check_volume_conflict()[source]#

Check for volume conflict, returning two lists of conflicting bodies.

create_dict_by_color()[source]#

Create a dictionary for named selection generation, stitching one element per color.

Returns
dict

Dictionary with an index of color codes and values for a list of bodies.

create_dict_by_material()[source]#

Create a dictionary for materials defined in Catia.

Returns
dict

Dictionary with an index of material names and values for a list of bodies.

create_named_selection(conversion_dict)[source]#

Create a named selection from a dictionary.

Parameters
conversion_dictdict

Dictionary with an index of names with a value of a list of bodies.

find_component(component_name)[source]#

Find all components with a given name.

Parameters
component_namestr

Name for searching components.

Returns
list

List of components with the given name.

geo_sets_conversion(part)[source]#

Get Catia geometrical set as a named selection.

Parameters
partSpaceClaim part

SpaceClaim part.

remove_duplicates(comp)[source]#

Remove duplicated surfaces with a given component.

Parameters
compSpaceClaim Component

SpaceClaim component.

resolve_volume_conflict()[source]#

Resolve volume conflict based on the material definition.

stitch(conversion_dict)[source]#

Stitch all bodies based on a dictionary.

Parameters
conversion_dictdict

Dictionary with values for a list of bodies.

stitch_comp(comp, max_group_limit)[source]#

Stitch according to component structure. Surfaces inside the Component provided are stitched group by group whose seize is defined by group size

Parameters
compSpaceClaim Component

SpaceClaim component.

max_group_limitint

group size

Returns

ansys_optical_automation.scdm_process.scdm_io module#

class ansys_optical_automation.scdm_process.scdm_io.ScdmIO(SpaceClaim)[source]#

Bases: ansys_optical_automation.scdm_core.base.BaseSCDM

Provides all methods for importing and exporting a SpaceClaim or Speos project.

This class does not support multiple Speos sessions.

Methods

convert_object_version(obj)

Function to convert Speos returns from latest to used API version Parameters ---------- obj : SpeosSelectedObject

get_axis_systems_under_component(component)

Get the axis system under a component.

import_part_at_axis_system(external_part, ...)

Import component at a given axis system.

get_axis_systems_under_component(component)[source]#

Get the axis system under a component.

Parameters
componentSpaceClaim component

SpaceClaim component.

Returns
list

List of axis systems that are under the component.

import_part_at_axis_system(external_part, axis_system_list, name=None, anchor=False, lock=False, internalize=False, speos_source_group=False)[source]#

Import component at a given axis system.

Parameters
external_partSpaceClaim file

SpaceClaim file to import.

axis_system_listlist

List of axis systems.

namestring, optional

Name for the group to use for grouping imported parts. The default is None.

anchorbool, optional

Whether an anchor is required. The default is False.

lockbool, optional

Whether a lock is required. The default is False.

internalizebool, optional

Whether to internalize. The default is False.

speos_source_groupbool, optional

Whether to group Speos surfaces under the imported part. The default is False.

Module contents#