UserDefinedComponent#

class ansys.aedt.core.modeler.cad.components_3d.UserDefinedComponent(primitives, name=None, props=None, component_type=None)[source]#

Manages object attributes for 3DComponent and User Defined Model.

Parameters:
primitivesansys.aedt.core.modeler.cad.primitives_3d.Primitives3D

Inherited parent object.

namestr, optional

Name of the component. The default value is None.

propsdict, optional

Dictionary of properties. The default value is None.

component_typestr, optional

Type of the component. The default value is None.

Examples

Basic usage demonstrated with an HFSS design:

>>> from ansys.aedt.core import Hfss
>>> aedtapp = Hfss()
>>> prim = aedtapp.modeler.user_defined_components

Obtain user defined component names, to return a ansys.aedt.core.modeler.cad.components_3d.UserDefinedComponent.

>>> component_names = aedtapp.modeler.user_defined_components
>>> component = aedtapp.modeler[component_names["3DC_Cell_Radome_In1"]]

Methods

UserDefinedComponent.delete()

Delete the object.

UserDefinedComponent.duplicate_along_line(vector)

Duplicate the object along a line.

UserDefinedComponent.duplicate_and_mirror(...)

Duplicate and mirror a selection.

UserDefinedComponent.duplicate_around_axis(axis)

Duplicate the component around the axis.

UserDefinedComponent.edit_definition([password])

Edit 3d Definition.

UserDefinedComponent.get_component_filepath()

Get 3d component file path.

UserDefinedComponent.history()

Component history.

UserDefinedComponent.mirror(origin, vector)

Mirror a selection.

UserDefinedComponent.move(vector)

Move component from a list.

UserDefinedComponent.rotate(axis[, angle, units])

Rotate the selection.

UserDefinedComponent.update_definition([...])

Update 3d component definition.

UserDefinedComponent.update_native()

Update the Native Component in AEDT.

Attributes

UserDefinedComponent.bounding_box

Get bounding dimension of a user defined model.

UserDefinedComponent.center

Get center coordinates of a user defined model.

UserDefinedComponent.group_name

Group the component belongs to.

UserDefinedComponent.is3dcomponent

3DComponent flag.

UserDefinedComponent.layout_component

Layout component object.

UserDefinedComponent.mesh_assembly

Mesh assembly flag.

UserDefinedComponent.name

Name of the object.

UserDefinedComponent.parameters

Component parameters.

UserDefinedComponent.parts

Dictionary of objects that belong to the user-defined component.

UserDefinedComponent.target_coordinate_system

Target coordinate system.