ECADComponent#
- class ansys.aedt.core.modeler.advanced_cad.mcad_assembly.ECADComponent(*, component_type: Literal['ecad', 'mcad'] | None='ecad', name: str = '', model: str, use_pin_mapping: bool = False, placement_pin_mapping: PlacementPinMapping | None = <factory>, target_coordinate_system: str = 'Global', arranges: list[Arrange] = <factory>, password: str | None = None, mcad_sub_components: dict[str, ~ansys.aedt.core.modeler.advanced_cad.mcad_assembly.MCADComponent]=<factory>, ecad_sub_components: dict[str, ~ansys.aedt.core.modeler.advanced_cad.mcad_assembly.ECADComponent]=<factory>, geometry_parameters: dict[str, str | float | int] | None=None, reference_coordinate_system: str = 'Global', layout_coordinate_systems: list[str] | None = <factory>, assembly_all_from_library: bool = False, model_libraries: list[str] = <factory>)#
Describe an ECAD (PCB layout) component in an MCAD assembly.
Extends
MCADComponentwith ECAD-specific properties for managing PCB layouts and their integration with 3D models. This class handles layout coordinate systems, library-based component population, and pin mapping for automatic placement of 3D models based on PCB component references.Examples
Create an ECAD component with layout coordinate systems:
>>> pcb = ECADComponent(name="main_board", model="MainPCB") >>> pcb.layout_coordinate_systems = ["USB_Port", "Antenna_Mount"] >>> pcb.reference_coordinate_system = "PCB_Origin"
Add 3D components from a library based on PCB reference designators:
>>> pcb.add_sub_mcad_component_from_library( ... library_path="path/to/library", reference_designators=["U1", "U2", "J1"] ... )
Methods
ECADComponent.add_arrange_move([vector])Add a translation transformation to the component.
ECADComponent.add_arrange_rotate([axis, angle])Add a rotation transformation to the component.
ECADComponent.add_sub_ecad_component(name, model)Add a child ECAD (layout) subcomponent.
ECADComponent.add_sub_mcad_component(name, model)Add a child MCAD (3D) subcomponent.
Register 3D component library entries for automatic assembly.
ECADComponent.construct([_fields_set])ECADComponent.copy(*[, include, exclude, ...])Returns a copy of the model.
ECADComponent.dict(*[, include, exclude, ...])ECADComponent.json(*[, include, exclude, ...])ECADComponent.model_construct([_fields_set])Creates a new instance of the Model class with validated data.
ECADComponent.model_copy(*[, update, deep])!!! abstract "Usage Documentation"
ECADComponent.model_dump(*[, mode, include, ...])!!! abstract "Usage Documentation"
ECADComponent.model_dump_json(*[, indent, ...])!!! abstract "Usage Documentation"
ECADComponent.model_json_schema(by_alias, ...)Generates a JSON schema for a model class.
Compute the class name for parametrizations of generic classes.
ECADComponent.model_post_init(context, /)This function is meant to behave like a BaseModel method to initialize private attributes.
ECADComponent.model_rebuild(*[, force, ...])Try to rebuild the pydantic-core schema for the model.
ECADComponent.model_validate(obj, *[, ...])Validate a pydantic model instance.
ECADComponent.model_validate_json(json_data, *)!!! abstract "Usage Documentation"
Validate the given object with string data against the Pydantic model.
ECADComponent.parse_file(path, *[, ...])ECADComponent.parse_raw(b, *[, ...])ECADComponent.preprocess(data)Normalize and validate component configuration formats.
ECADComponent.schema([by_alias, ref_template])ECADComponent.schema_json(*[, by_alias, ...])ECADComponent.update_forward_refs(**localns)ECADComponent.validate(value)Attributes
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Get extra fields set during validation.
Returns the set of fields that have been explicitly set on this model instance.
Return a combined dictionary of all child subcomponents.