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 geometries to corresponding layers.
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 the names of all layers in the project.
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 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 whether any part was imported by a geometry update.
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 a dictionary for named selection generation, stitching one element per color.
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 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_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.
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
.