ansys-edb-core 0.2.0.dev2__tar.gz → 0.2.0.dev4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/PKG-INFO +2 -2
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/pyproject.toml +2 -2
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/component_def.py +92 -1
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/component_model.py +57 -2
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/material_def.py +9 -10
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/padstack_def_data.py +5 -3
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/geometry/polygon_data.py +13 -1
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/cell_instance.py +1 -1
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/group.py +8 -4
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/pin_group.py +2 -2
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/spice_model.py +8 -1
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/structure3d.py +2 -2
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/inner/base.py +3 -1
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/inner/conn_obj.py +10 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/inner/factory.py +161 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/inner/messages.py +10 -2
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/inner/parser.py +21 -11
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/inner/rpc_info.py +219 -99
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/inner/utils.py +31 -1
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layout/cell.py +7 -3
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layout/layout.py +177 -133
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layout/mcad_model.py +5 -4
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layout/voltage_regulator.py +1 -1
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layout_instance/layout_instance.py +25 -12
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/net/net.py +10 -2
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/net/net_class.py +1 -1
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/primitive/board_bend_def.py +96 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/primitive/bondwire.py +348 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/primitive/circle.py +142 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/primitive/padstack_instance.py +458 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/primitive/path.py +259 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/primitive/polygon.py +66 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/primitive/primitive.py +185 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/primitive/primitive_instance_collection.py +119 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/primitive/rectangle.py +243 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/primitive/text.py +98 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/session.py +45 -20
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/simulation_setup/hfss_pi_simulation_settings.py +360 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/simulation_setup/hfss_pi_simulation_setup.py +37 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/simulation_setup/q3d_simulation_settings.py +342 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/simulation_setup/q3d_simulation_setup.py +37 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/simulation_setup/simulation_setup.py +87 -46
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/simulation_setup/siwave_dcir_simulation_settings.py +1 -1
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/simulation_setup/siwave_simulation_settings.py +9 -9
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/terminal/bundle_terminal.py +36 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/terminal/edge_terminal.py +170 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/terminal/padstack_instance_terminal.py +71 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/terminal/pin_group_terminal.py +60 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/terminal/point_terminal.py +69 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/terminal/terminal.py +331 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/terminal/terminal_instance.py +55 -0
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/terminal/terminal_instance_terminal.py +51 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/typing/__init__.py +4 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/utility/conversions.py +19 -13
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/utility/edb_error_manager.py +68 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/utility/heat_sink.py +29 -9
- ansys_edb_core-0.2.0.dev4/src/ansys/edb/core/utility/hfss_extent_info.py +164 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/utility/io_manager.py +6 -10
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/utility/layer_map.py +41 -20
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/utility/material_property_thermal_modifier_params.py +30 -24
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/utility/port_post_processing_prop.py +37 -25
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/utility/rlc.py +31 -25
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/utility/temperature_settings.py +22 -3
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/utility/transform.py +39 -23
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/utility/transform3d.py +67 -48
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/utility/value.py +40 -28
- ansys_edb_core-0.2.0.dev2/src/ansys/edb/core/inner/factory.py +0 -76
- ansys_edb_core-0.2.0.dev2/src/ansys/edb/core/primitive/primitive.py +0 -1852
- ansys_edb_core-0.2.0.dev2/src/ansys/edb/core/terminal/terminals.py +0 -810
- ansys_edb_core-0.2.0.dev2/src/ansys/edb/core/utility/hfss_extent_info.py +0 -153
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/LICENSE +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/README.rst +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/__init__.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/database.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/__init__.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/bondwire_def.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/component_pin.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/component_property.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/dataset_def.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/debye_model.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/die_property.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/dielectric_material_model.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/djordjecvic_sarkar_model.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/ic_component_property.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/io_component_property.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/material_property_thermal_modifier.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/multipole_debye_model.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/package_def.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/padstack_def.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/port_property.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/rlc_component_property.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/definition/solder_ball_property.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/edb_defs.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/geometry/__init__.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/geometry/arc_data.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/geometry/point3d_data.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/geometry/point_data.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/geometry/r_tree.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/geometry/triangle3d_data.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/__init__.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/component_group.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/hierarchy_obj.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/inst_array.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/layout_component.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/model.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/netlist_model.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/pin_pair_model.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/sparameter_model.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/via_group.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/inner/__init__.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/inner/decorators.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/inner/edb_logging.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/inner/exceptions.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/inner/interceptors.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/inner/layout_obj.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/inner/rpc_info_utils.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/inner/variable_server.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layer/__init__.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layer/layer.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layer/layer_collection.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layer/stackup_layer.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layer/via_layer.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layout/__init__.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layout_instance/__init__.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layout_instance/layout_instance_context.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layout_instance/layout_obj_instance.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layout_instance/layout_obj_instance_2d_geometry.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layout_instance/layout_obj_instance_3d_geometry.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/layout_instance/layout_obj_instance_geometry.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/net/__init__.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/net/differential_pair.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/net/extended_net.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/primitive/__init__.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/simulation_setup/__init__.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/simulation_setup/adaptive_solutions.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/simulation_setup/hfss_simulation_settings.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/simulation_setup/hfss_simulation_setup.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/simulation_setup/mesh_operation.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/simulation_setup/raptor_x_simulation_settings.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/simulation_setup/raptor_x_simulation_setup.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/simulation_setup/simulation_settings.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/simulation_setup/siwave_dcir_simulation_setup.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/simulation_setup/siwave_simulation_setup.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/terminal/__init__.py +0 -0
- {ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/utility/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ansys-edb-core
|
|
3
|
-
Version: 0.2.0.
|
|
3
|
+
Version: 0.2.0.dev4
|
|
4
4
|
Summary: A python wrapper for Ansys Edb service
|
|
5
5
|
Author-email: "ANSYS, Inc." <pyansys.support@ansys.com>
|
|
6
6
|
Maintainer-email: PyAnsys developers <pyansys.maintainers@ansys.com>
|
|
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
17
|
License-File: LICENSE
|
|
18
|
-
Requires-Dist: ansys-api-edb==0.2.
|
|
18
|
+
Requires-Dist: ansys-api-edb==0.2.dev6
|
|
19
19
|
Requires-Dist: protobuf>=3.19.3,<5
|
|
20
20
|
Requires-Dist: grpcio>=1.44.0
|
|
21
21
|
Requires-Dist: Django>=4.2.16
|
|
@@ -5,7 +5,7 @@ build-backend = "flit_core.buildapi"
|
|
|
5
5
|
[project]
|
|
6
6
|
# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections
|
|
7
7
|
name = "ansys-edb-core"
|
|
8
|
-
version = "0.2.0.
|
|
8
|
+
version = "0.2.0.dev4"
|
|
9
9
|
description = "A python wrapper for Ansys Edb service"
|
|
10
10
|
readme = "README.rst"
|
|
11
11
|
requires-python = ">=3.8"
|
|
@@ -25,7 +25,7 @@ classifiers = [
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
dependencies = [
|
|
28
|
-
"ansys-api-edb==0.2.
|
|
28
|
+
"ansys-api-edb==0.2.dev6",
|
|
29
29
|
"protobuf>=3.19.3,<5",
|
|
30
30
|
"grpcio>=1.44.0",
|
|
31
31
|
"Django>=4.2.16"
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
"""Component definition."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from typing import TYPE_CHECKING, List
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from src.ansys.edb.core.database import ProductIdType
|
|
8
|
+
|
|
2
9
|
from ansys.api.edb.v1.component_def_pb2_grpc import ComponentDefServiceStub
|
|
3
10
|
|
|
4
11
|
from ansys.edb.core.definition import component_model, component_pin
|
|
5
12
|
from ansys.edb.core.edb_defs import DefinitionObjType
|
|
6
13
|
from ansys.edb.core.inner import ObjBase, messages
|
|
14
|
+
from ansys.edb.core.inner.messages import (
|
|
15
|
+
edb_obj_collection_property_message,
|
|
16
|
+
edb_obj_pair_message,
|
|
17
|
+
get_product_property_ids_message,
|
|
18
|
+
get_product_property_message,
|
|
19
|
+
set_product_property_message,
|
|
20
|
+
)
|
|
7
21
|
from ansys.edb.core.inner.utils import map_list
|
|
8
22
|
from ansys.edb.core.session import StubAccessor, StubType
|
|
9
23
|
|
|
@@ -87,7 +101,7 @@ class ComponentDef(ObjBase):
|
|
|
87
101
|
This property is read-only.
|
|
88
102
|
"""
|
|
89
103
|
objs = self.__stub.GetComponentModels(self.msg).items
|
|
90
|
-
return map_list(objs, component_model.ComponentModel)
|
|
104
|
+
return map_list(objs, lambda msg: component_model.ComponentModel(msg).cast())
|
|
91
105
|
|
|
92
106
|
@property
|
|
93
107
|
def component_pins(self):
|
|
@@ -125,3 +139,80 @@ class ComponentDef(ObjBase):
|
|
|
125
139
|
Once a component model is added to one component def, it cannot be added to any other, even when removed.
|
|
126
140
|
"""
|
|
127
141
|
self.__stub.RemoveComponentModel(messages.pointer_property_message(self, value))
|
|
142
|
+
|
|
143
|
+
def reorder_pins(self, reordered_pins: List[component_pin.ComponentPin]):
|
|
144
|
+
"""Reorders the existing pins in the components definition to be in the same order \
|
|
145
|
+
as in the provided list.
|
|
146
|
+
|
|
147
|
+
Parameters
|
|
148
|
+
----------
|
|
149
|
+
reordered_pins : list of .ComponentPin
|
|
150
|
+
The component pins in the new order. These must be the same pins \
|
|
151
|
+
that already exist in the component definition.
|
|
152
|
+
"""
|
|
153
|
+
self.__stub.ReorderPins(edb_obj_collection_property_message(self, reordered_pins))
|
|
154
|
+
|
|
155
|
+
def remove_pin(self, pin_to_remove: component_pin.ComponentPin):
|
|
156
|
+
"""Remove the provided component pin from the component definition. \
|
|
157
|
+
the pin will be deleted and set to :meth:`null <.is_null>`.
|
|
158
|
+
|
|
159
|
+
Parameters
|
|
160
|
+
----------
|
|
161
|
+
pin_to_remove : .ComponentPin
|
|
162
|
+
The pin to be removed.
|
|
163
|
+
"""
|
|
164
|
+
self.__stub.RemovePin(edb_obj_pair_message(self, pin_to_remove))
|
|
165
|
+
pin_to_remove.msg = None
|
|
166
|
+
|
|
167
|
+
def get_product_property(self, prod_id: ProductIdType, attr_it: int) -> str:
|
|
168
|
+
"""Get the product property for a given product ID and attribute ID.
|
|
169
|
+
|
|
170
|
+
Parameters
|
|
171
|
+
----------
|
|
172
|
+
prod_id : .ProductIdType
|
|
173
|
+
Product ID.
|
|
174
|
+
attr_it : int
|
|
175
|
+
Attribute ID.
|
|
176
|
+
|
|
177
|
+
Returns
|
|
178
|
+
-------
|
|
179
|
+
str
|
|
180
|
+
Product property for the given product ID and attribute ID.
|
|
181
|
+
"""
|
|
182
|
+
return self.__stub.GetProductProperty(
|
|
183
|
+
get_product_property_message(self, prod_id, attr_it)
|
|
184
|
+
).value
|
|
185
|
+
|
|
186
|
+
def set_product_property(self, prod_id: ProductIdType, attr_it: int, prop_value: str):
|
|
187
|
+
"""Set the product property for the given product ID and attribute ID.
|
|
188
|
+
|
|
189
|
+
Parameters
|
|
190
|
+
----------
|
|
191
|
+
prod_id : .ProductIdType
|
|
192
|
+
Product ID.
|
|
193
|
+
attr_it : int
|
|
194
|
+
Attribute ID.
|
|
195
|
+
prop_value : str
|
|
196
|
+
New value for the product property.
|
|
197
|
+
"""
|
|
198
|
+
self.__stub.SetProductProperty(
|
|
199
|
+
set_product_property_message(self, prod_id, attr_it, prop_value)
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
def get_product_property_ids(self, prod_id: ProductIdType) -> List[int]:
|
|
203
|
+
"""Get the list of property IDs for a given property ID.
|
|
204
|
+
|
|
205
|
+
Parameters
|
|
206
|
+
----------
|
|
207
|
+
prod_id : ProductIdType
|
|
208
|
+
Product ID.
|
|
209
|
+
|
|
210
|
+
Returns
|
|
211
|
+
-------
|
|
212
|
+
list[int]
|
|
213
|
+
Attribute IDs for the given product ID.
|
|
214
|
+
"""
|
|
215
|
+
attr_ids = self.__stub.GetProductPropertyIds(
|
|
216
|
+
get_product_property_ids_message(self, prod_id)
|
|
217
|
+
).ids
|
|
218
|
+
return [attr_id for attr_id in attr_ids]
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"""Component model definition."""
|
|
2
|
+
from enum import Enum
|
|
3
|
+
|
|
4
|
+
from ansys.api.edb.v1.component_model_pb2 import ComponentModelType as pb_comp_model_Type
|
|
2
5
|
from ansys.api.edb.v1.component_model_pb2_grpc import (
|
|
3
6
|
ComponentModelServiceStub,
|
|
4
7
|
DynamicLinkComponentModelServiceStub,
|
|
@@ -10,6 +13,14 @@ from ansys.edb.core.inner import ObjBase, messages
|
|
|
10
13
|
from ansys.edb.core.session import StubAccessor, StubType
|
|
11
14
|
|
|
12
15
|
|
|
16
|
+
class ComponentModelType(Enum):
|
|
17
|
+
"""Enum representing component model types."""
|
|
18
|
+
|
|
19
|
+
N_PORT = pb_comp_model_Type.N_PORT
|
|
20
|
+
DYNAMIC_LINK = pb_comp_model_Type.DYNAMIC_LINK
|
|
21
|
+
UNKNOWN_COMPONENT_MODEL_TYPE = pb_comp_model_Type.UNKNOWN_MODEL_TYPE
|
|
22
|
+
|
|
23
|
+
|
|
13
24
|
class ComponentModel(ObjBase):
|
|
14
25
|
"""Represents a component model."""
|
|
15
26
|
|
|
@@ -42,7 +53,7 @@ class ComponentModel(ObjBase):
|
|
|
42
53
|
"""
|
|
43
54
|
return ComponentModel(
|
|
44
55
|
cls.__stub.FindByName(messages.string_property_message(comp_def, value))
|
|
45
|
-
)
|
|
56
|
+
).cast()
|
|
46
57
|
|
|
47
58
|
@classmethod
|
|
48
59
|
def find_by_id(cls, comp_def, value):
|
|
@@ -60,7 +71,51 @@ class ComponentModel(ObjBase):
|
|
|
60
71
|
ComponentModel
|
|
61
72
|
Component model that is found, ``None`` otherwise.
|
|
62
73
|
"""
|
|
63
|
-
return ComponentModel(
|
|
74
|
+
return ComponentModel(
|
|
75
|
+
cls.__stub.FindById(messages.int_property_message(comp_def, value))
|
|
76
|
+
).cast()
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def name(self) -> str:
|
|
80
|
+
""":obj:`str`: The name of the component model.
|
|
81
|
+
|
|
82
|
+
This property is read-only.
|
|
83
|
+
"""
|
|
84
|
+
return self.__stub.GetName(self.msg).value
|
|
85
|
+
|
|
86
|
+
@property
|
|
87
|
+
def component_model_type(self) -> ComponentModelType:
|
|
88
|
+
""":class:`.ComponentModelType`: The type of the component model.
|
|
89
|
+
|
|
90
|
+
This property is read-only.
|
|
91
|
+
"""
|
|
92
|
+
return ComponentModelType(self.__stub.GetType(self.msg).type)
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def component_model_id(self) -> int:
|
|
96
|
+
""":obj:`int`: The id of the component model.
|
|
97
|
+
|
|
98
|
+
This property is read-only.
|
|
99
|
+
"""
|
|
100
|
+
return self.__stub.GetId(self.msg).value
|
|
101
|
+
|
|
102
|
+
def cast(self) -> "ComponentModel":
|
|
103
|
+
"""Cast the component model object to the correct concrete type.
|
|
104
|
+
|
|
105
|
+
Returns
|
|
106
|
+
-------
|
|
107
|
+
.ComponentModel
|
|
108
|
+
"""
|
|
109
|
+
comp_model_type = (
|
|
110
|
+
ComponentModelType.UNKNOWN_COMPONENT_MODEL_TYPE
|
|
111
|
+
if self.is_null
|
|
112
|
+
else self.component_model_type
|
|
113
|
+
)
|
|
114
|
+
if comp_model_type == ComponentModelType.N_PORT:
|
|
115
|
+
return NPortComponentModel(self.msg)
|
|
116
|
+
elif comp_model_type == ComponentModelType.DYNAMIC_LINK:
|
|
117
|
+
return DynamicLinkComponentModel(self.msg)
|
|
118
|
+
return ComponentModel(self.msg)
|
|
64
119
|
|
|
65
120
|
|
|
66
121
|
class NPortComponentModel(ComponentModel):
|
|
@@ -5,6 +5,9 @@ from enum import Enum
|
|
|
5
5
|
import ansys.api.edb.v1.material_def_pb2 as pb
|
|
6
6
|
|
|
7
7
|
from ansys.edb.core.definition.dielectric_material_model import DielectricMaterialModel
|
|
8
|
+
from ansys.edb.core.definition.material_property_thermal_modifier import (
|
|
9
|
+
MaterialPropertyThermalModifier,
|
|
10
|
+
)
|
|
8
11
|
from ansys.edb.core.edb_defs import DefinitionObjType
|
|
9
12
|
from ansys.edb.core.inner import ObjBase, messages
|
|
10
13
|
from ansys.edb.core.session import MaterialDefServiceStub, StubAccessor, StubType
|
|
@@ -28,10 +31,6 @@ class MaterialProperty(Enum):
|
|
|
28
31
|
INVALID_PROPERTY = pb.INVALID_PROPERTY
|
|
29
32
|
|
|
30
33
|
|
|
31
|
-
class ThermalModifier(ObjBase):
|
|
32
|
-
"""Represents a thermal modifier model."""
|
|
33
|
-
|
|
34
|
-
|
|
35
34
|
class MaterialDef(ObjBase):
|
|
36
35
|
"""Represents a material definition."""
|
|
37
36
|
|
|
@@ -236,10 +235,10 @@ class MaterialDef(ObjBase):
|
|
|
236
235
|
|
|
237
236
|
Returns
|
|
238
237
|
-------
|
|
239
|
-
|
|
238
|
+
MaterialPropertyThermalModifier
|
|
240
239
|
Thermal modifier of the material definition.
|
|
241
240
|
"""
|
|
242
|
-
return
|
|
241
|
+
return MaterialPropertyThermalModifier(
|
|
243
242
|
self.__stub.GetThermalModifier(
|
|
244
243
|
MaterialDef._property_message(self, material_property_id)
|
|
245
244
|
)
|
|
@@ -253,7 +252,7 @@ class MaterialDef(ObjBase):
|
|
|
253
252
|
material_property_id : \
|
|
254
253
|
:class:`MaterialProperty`
|
|
255
254
|
Property ID.
|
|
256
|
-
thermal_modifier :
|
|
255
|
+
thermal_modifier : MaterialPropertyThermalModifier
|
|
257
256
|
Thermal modifier to set to the material definition.
|
|
258
257
|
"""
|
|
259
258
|
self.__stub.SetThermalModifier(
|
|
@@ -277,10 +276,10 @@ class MaterialDef(ObjBase):
|
|
|
277
276
|
|
|
278
277
|
Returns
|
|
279
278
|
-------
|
|
280
|
-
:class:`.
|
|
279
|
+
:class:`.MaterialPropertyThermalModifier`
|
|
281
280
|
Anisotropic thermal modifier of the material definition.
|
|
282
281
|
"""
|
|
283
|
-
return
|
|
282
|
+
return MaterialPropertyThermalModifier(
|
|
284
283
|
self.__stub.GetAnisotropicThermalModifier(
|
|
285
284
|
pb.MaterialDefPropertyComponentMessage(
|
|
286
285
|
materialDef=messages.edb_obj_message(self),
|
|
@@ -302,7 +301,7 @@ class MaterialDef(ObjBase):
|
|
|
302
301
|
Property ID.
|
|
303
302
|
component_id : int
|
|
304
303
|
Component ID.
|
|
305
|
-
thermal_modifier : :class:`.
|
|
304
|
+
thermal_modifier : :class:`.MaterialPropertyThermalModifier`
|
|
306
305
|
Anisotropic thermal modifier to set to the material definition.
|
|
307
306
|
"""
|
|
308
307
|
self.__stub.SetAnisotropicThermalModifier(
|
|
@@ -118,7 +118,7 @@ class PadstackDefData(ObjBase):
|
|
|
118
118
|
This property is read-only.
|
|
119
119
|
"""
|
|
120
120
|
layer_names_msg = self.__stub.GetLayerNames(self.msg).names
|
|
121
|
-
return layer_names_msg
|
|
121
|
+
return list(layer_names_msg)
|
|
122
122
|
|
|
123
123
|
@property
|
|
124
124
|
def layer_ids(self):
|
|
@@ -127,7 +127,7 @@ class PadstackDefData(ObjBase):
|
|
|
127
127
|
This property is read-only.
|
|
128
128
|
"""
|
|
129
129
|
layer_ids_msg = self.__stub.GetLayerIds(self.msg)
|
|
130
|
-
return layer_ids_msg.ids
|
|
130
|
+
return list(layer_ids_msg.ids)
|
|
131
131
|
|
|
132
132
|
def add_layers(self, names):
|
|
133
133
|
"""
|
|
@@ -189,13 +189,15 @@ class PadstackDefData(ObjBase):
|
|
|
189
189
|
Value(message.generic.offset_y),
|
|
190
190
|
Value(message.generic.rotation),
|
|
191
191
|
)
|
|
192
|
-
|
|
192
|
+
elif message.HasField("polygon"):
|
|
193
193
|
return (
|
|
194
194
|
parser.to_polygon_data(message.polygon.fp),
|
|
195
195
|
Value(message.polygon.offset_x),
|
|
196
196
|
Value(message.polygon.offset_y),
|
|
197
197
|
Value(message.polygon.rotation),
|
|
198
198
|
)
|
|
199
|
+
else:
|
|
200
|
+
return ()
|
|
199
201
|
|
|
200
202
|
def set_pad_parameters(
|
|
201
203
|
self, layer, pad_type, offset_x, offset_y, rotation, type_geom=None, sizes=None, fp=None
|
{ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/geometry/polygon_data.py
RENAMED
|
@@ -9,6 +9,7 @@ from ansys.api.edb.v1 import edb_defs_pb2, point_data_pb2, polygon_data_pb2, pol
|
|
|
9
9
|
from ansys.edb.core import session
|
|
10
10
|
from ansys.edb.core.geometry.arc_data import ArcData
|
|
11
11
|
from ansys.edb.core.inner import messages, parser
|
|
12
|
+
from ansys.edb.core.inner.utils import client_stream_iterator
|
|
12
13
|
from ansys.edb.core.utility import conversions
|
|
13
14
|
|
|
14
15
|
|
|
@@ -40,6 +41,17 @@ class IntersectionType(Enum):
|
|
|
40
41
|
class PolygonData:
|
|
41
42
|
"""Represents a polygon data object."""
|
|
42
43
|
|
|
44
|
+
@staticmethod
|
|
45
|
+
def _polygon_data_request_iterator(polys):
|
|
46
|
+
chunk_entry_creator = lambda poly: messages.polygon_data_message(poly)
|
|
47
|
+
chunk_entries_getter = lambda chunk: chunk.polygons
|
|
48
|
+
return client_stream_iterator(
|
|
49
|
+
polys,
|
|
50
|
+
polygon_data_pb2.PolygonDataListMessage,
|
|
51
|
+
chunk_entry_creator,
|
|
52
|
+
chunk_entries_getter,
|
|
53
|
+
)
|
|
54
|
+
|
|
43
55
|
__stub: polygon_data_pb2_grpc.PolygonDataServiceStub = session.StubAccessor(
|
|
44
56
|
session.StubType.polygon_data
|
|
45
57
|
)
|
|
@@ -355,7 +367,7 @@ class PolygonData:
|
|
|
355
367
|
-------
|
|
356
368
|
tuple[.PointData, .PointData]
|
|
357
369
|
"""
|
|
358
|
-
return cls.__stub.
|
|
370
|
+
return cls.__stub.GetStreamedBBox(PolygonData._polygon_data_request_iterator(polygons))
|
|
359
371
|
|
|
360
372
|
@parser.to_circle
|
|
361
373
|
def bounding_circle(self):
|
|
@@ -98,7 +98,7 @@ class CellInstance(hierarchy_obj.HierarchyObj):
|
|
|
98
98
|
|
|
99
99
|
This property is read-only.
|
|
100
100
|
"""
|
|
101
|
-
from ansys.edb.core.terminal.
|
|
101
|
+
from ansys.edb.core.terminal.terminal_instance import TerminalInstance
|
|
102
102
|
|
|
103
103
|
terms = self.__stub.GetTermInsts(self.msg).items
|
|
104
104
|
return [TerminalInstance(ti) for ti in terms]
|
{ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/group.py
RENAMED
|
@@ -6,6 +6,7 @@ from ansys.api.edb.v1.group_pb2_grpc import GroupServiceStub
|
|
|
6
6
|
from ansys.edb.core.edb_defs import LayoutObjType
|
|
7
7
|
from ansys.edb.core.hierarchy.hierarchy_obj import HierarchyObj
|
|
8
8
|
from ansys.edb.core.inner import messages
|
|
9
|
+
from ansys.edb.core.inner.utils import query_lyt_object_collection
|
|
9
10
|
from ansys.edb.core.session import StubAccessor, StubType
|
|
10
11
|
|
|
11
12
|
|
|
@@ -113,7 +114,10 @@ class Group(HierarchyObj):
|
|
|
113
114
|
|
|
114
115
|
This property is read-only.
|
|
115
116
|
"""
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
return query_lyt_object_collection(
|
|
118
|
+
self,
|
|
119
|
+
LayoutObjType.INVALID_LAYOUT_OBJ,
|
|
120
|
+
self.__stub.GetMembers,
|
|
121
|
+
self.__stub.StreamMembers,
|
|
122
|
+
False,
|
|
123
|
+
)
|
{ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/pin_group.py
RENAMED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
from ansys.edb.core.edb_defs import LayoutObjType
|
|
4
4
|
from ansys.edb.core.inner import messages
|
|
5
5
|
from ansys.edb.core.inner.conn_obj import ConnObj
|
|
6
|
-
from ansys.edb.core.primitive.
|
|
6
|
+
from ansys.edb.core.primitive.padstack_instance import PadstackInstance
|
|
7
7
|
from ansys.edb.core.session import PinGroupServiceStub, StubAccessor, StubType
|
|
8
|
-
from ansys.edb.core.terminal.
|
|
8
|
+
from ansys.edb.core.terminal.pin_group_terminal import PinGroupTerminal
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class PinGroup(ConnObj):
|
{ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/spice_model.py
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""SPICE Model."""
|
|
2
2
|
from ansys.edb.core.hierarchy.model import Model
|
|
3
|
-
from ansys.edb.core.inner import messages
|
|
3
|
+
from ansys.edb.core.inner import messages, parser
|
|
4
4
|
from ansys.edb.core.session import SpiceModelServiceStub, StubAccessor, StubType
|
|
5
5
|
|
|
6
6
|
|
|
@@ -78,3 +78,10 @@ class SPICEModel(Model):
|
|
|
78
78
|
Terminal name.
|
|
79
79
|
"""
|
|
80
80
|
self.__stub.RemoveTerminalPinPair(messages.string_property_message(self, terminal))
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
@parser.to_string_dict
|
|
84
|
+
def terminal_pin_pairs(self):
|
|
85
|
+
""":obj:`dict` of {:obj:`str` : :obj:`str`}: A dictionary showing the mapping of terminals in the layout to \
|
|
86
|
+
pins in the spice model by name."""
|
|
87
|
+
return self.__stub.GetTerminalPinPairs(self.msg)
|
{ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/hierarchy/structure3d.py
RENAMED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from enum import Enum
|
|
4
4
|
|
|
5
|
-
import ansys.api.edb.v1.
|
|
6
|
-
from ansys.api.edb.v1.
|
|
5
|
+
import ansys.api.edb.v1.structure_3d_pb2 as structure3d_pb2
|
|
6
|
+
from ansys.api.edb.v1.structure_3d_pb2_grpc import Structure3DServiceStub
|
|
7
7
|
|
|
8
8
|
from ansys.edb.core.hierarchy.group import Group
|
|
9
9
|
from ansys.edb.core.inner import messages
|
|
@@ -23,6 +23,8 @@ class ObjBase:
|
|
|
23
23
|
|
|
24
24
|
This property is read-only.
|
|
25
25
|
"""
|
|
26
|
+
if (buffer := get_buffer()) is not None:
|
|
27
|
+
buffer.flush()
|
|
26
28
|
return self.id == 0
|
|
27
29
|
|
|
28
30
|
@property
|
|
@@ -46,7 +48,7 @@ class ObjBase:
|
|
|
46
48
|
if io_mgr.is_enabled:
|
|
47
49
|
if self._is_future:
|
|
48
50
|
msg.is_future = True
|
|
49
|
-
|
|
51
|
+
io_mgr.active_request_edb_obj_msg_mgr.add_active_request_edb_obj_msg(msg)
|
|
50
52
|
return msg
|
|
51
53
|
|
|
52
54
|
@msg.setter
|
{ansys_edb_core-0.2.0.dev2 → ansys_edb_core-0.2.0.dev4}/src/ansys/edb/core/inner/conn_obj.py
RENAMED
|
@@ -3,6 +3,7 @@ from ansys.api.edb.v1 import connectable_pb2
|
|
|
3
3
|
|
|
4
4
|
from ansys.edb.core.edb_defs import LayoutObjType
|
|
5
5
|
from ansys.edb.core.inner import layout_obj, messages
|
|
6
|
+
from ansys.edb.core.inner.factory import create_lyt_obj
|
|
6
7
|
from ansys.edb.core.layout import mcad_model as mm
|
|
7
8
|
from ansys.edb.core.session import ConnectableServiceStub, StubAccessor, StubType
|
|
8
9
|
|
|
@@ -48,6 +49,15 @@ class ConnObj(layout_obj.LayoutObj):
|
|
|
48
49
|
return client_obj
|
|
49
50
|
return cls(None)
|
|
50
51
|
|
|
52
|
+
def cast(self):
|
|
53
|
+
"""Cast the ConnObj object to the correct concrete type.
|
|
54
|
+
|
|
55
|
+
Returns
|
|
56
|
+
-------
|
|
57
|
+
.ConnObj
|
|
58
|
+
"""
|
|
59
|
+
return create_lyt_obj(self.msg, self.obj_type)
|
|
60
|
+
|
|
51
61
|
@property
|
|
52
62
|
def obj_type(self):
|
|
53
63
|
""":class:`LayoutObjType <ansys.edb.core.edb_defs.LayoutObjType>`: Layout object type.
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"""This module allows for the creating of objects while avoid circular imports."""
|
|
2
|
+
|
|
3
|
+
from ansys.edb.core.edb_defs import LayoutObjType
|
|
4
|
+
|
|
5
|
+
_type_creator_params_dict = None
|
|
6
|
+
_primitive_type_creator_params_dict = None
|
|
7
|
+
_terminal_type_creator_params_dict = None
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class _CreatorParams:
|
|
11
|
+
def __init__(self, obj_type, do_cast=False):
|
|
12
|
+
self.obj_type = obj_type
|
|
13
|
+
self.do_cast = do_cast
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _initialize_type_creator_params_dict():
|
|
17
|
+
global _type_creator_params_dict
|
|
18
|
+
|
|
19
|
+
from ansys.edb.core.hierarchy.cell_instance import CellInstance
|
|
20
|
+
from ansys.edb.core.hierarchy.group import Group
|
|
21
|
+
from ansys.edb.core.hierarchy.pin_group import PinGroup
|
|
22
|
+
from ansys.edb.core.inner.conn_obj import ConnObj
|
|
23
|
+
from ansys.edb.core.layout.voltage_regulator import VoltageRegulator
|
|
24
|
+
from ansys.edb.core.net.differential_pair import DifferentialPair
|
|
25
|
+
from ansys.edb.core.net.extended_net import ExtendedNet
|
|
26
|
+
from ansys.edb.core.net.net import Net
|
|
27
|
+
from ansys.edb.core.net.net_class import NetClass
|
|
28
|
+
from ansys.edb.core.primitive.padstack_instance import PadstackInstance
|
|
29
|
+
from ansys.edb.core.primitive.primitive import Primitive
|
|
30
|
+
from ansys.edb.core.terminal.terminal import Terminal
|
|
31
|
+
from ansys.edb.core.terminal.terminal_instance import TerminalInstance
|
|
32
|
+
|
|
33
|
+
_type_creator_params_dict = {
|
|
34
|
+
LayoutObjType.PRIMITIVE: _CreatorParams(Primitive, True),
|
|
35
|
+
LayoutObjType.PADSTACK_INSTANCE: _CreatorParams(PadstackInstance),
|
|
36
|
+
LayoutObjType.TERMINAL: _CreatorParams(Terminal, True),
|
|
37
|
+
LayoutObjType.TERMINAL_INSTANCE: _CreatorParams(TerminalInstance),
|
|
38
|
+
LayoutObjType.CELL_INSTANCE: _CreatorParams(CellInstance),
|
|
39
|
+
LayoutObjType.GROUP: _CreatorParams(Group, True),
|
|
40
|
+
LayoutObjType.PIN_GROUP: _CreatorParams(PinGroup),
|
|
41
|
+
LayoutObjType.VOLTAGE_REGULATOR: _CreatorParams(VoltageRegulator),
|
|
42
|
+
LayoutObjType.NET_CLASS: _CreatorParams(NetClass),
|
|
43
|
+
LayoutObjType.EXTENDED_NET: _CreatorParams(ExtendedNet),
|
|
44
|
+
LayoutObjType.DIFFERENTIAL_PAIR: _CreatorParams(DifferentialPair),
|
|
45
|
+
LayoutObjType.NET: _CreatorParams(Net),
|
|
46
|
+
LayoutObjType.INVALID_LAYOUT_OBJ: _CreatorParams(ConnObj, True),
|
|
47
|
+
}
|
|
48
|
+
return _type_creator_params_dict
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _initialize_primitive_type_creator_params_dict():
|
|
52
|
+
global _primitive_type_creator_params_dict
|
|
53
|
+
|
|
54
|
+
from ansys.edb.core.primitive.board_bend_def import BoardBendDef
|
|
55
|
+
from ansys.edb.core.primitive.bondwire import Bondwire
|
|
56
|
+
from ansys.edb.core.primitive.circle import Circle
|
|
57
|
+
from ansys.edb.core.primitive.path import Path
|
|
58
|
+
from ansys.edb.core.primitive.polygon import Polygon
|
|
59
|
+
from ansys.edb.core.primitive.primitive import PrimitiveType
|
|
60
|
+
from ansys.edb.core.primitive.primitive_instance_collection import PrimitiveInstanceCollection
|
|
61
|
+
from ansys.edb.core.primitive.rectangle import Rectangle
|
|
62
|
+
from ansys.edb.core.primitive.text import Text
|
|
63
|
+
|
|
64
|
+
_primitive_type_creator_params_dict = {
|
|
65
|
+
PrimitiveType.BOARD_BEND: _CreatorParams(BoardBendDef),
|
|
66
|
+
PrimitiveType.BONDWIRE: _CreatorParams(Bondwire),
|
|
67
|
+
PrimitiveType.CIRCLE: _CreatorParams(Circle),
|
|
68
|
+
PrimitiveType.PATH: _CreatorParams(Path),
|
|
69
|
+
PrimitiveType.POLYGON: _CreatorParams(Polygon),
|
|
70
|
+
PrimitiveType.RECTANGLE: _CreatorParams(Rectangle),
|
|
71
|
+
PrimitiveType.TEXT: _CreatorParams(Text),
|
|
72
|
+
PrimitiveType.PRIM_INST_COLLECTION: _CreatorParams(PrimitiveInstanceCollection),
|
|
73
|
+
}
|
|
74
|
+
return _primitive_type_creator_params_dict
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def _initialize_terminal_type_creator_params_dict():
|
|
78
|
+
global _terminal_type_creator_params_dict
|
|
79
|
+
|
|
80
|
+
from ansys.edb.core.terminal.bundle_terminal import BundleTerminal
|
|
81
|
+
from ansys.edb.core.terminal.edge_terminal import EdgeTerminal
|
|
82
|
+
from ansys.edb.core.terminal.padstack_instance_terminal import PadstackInstanceTerminal
|
|
83
|
+
from ansys.edb.core.terminal.pin_group_terminal import PinGroupTerminal
|
|
84
|
+
from ansys.edb.core.terminal.point_terminal import PointTerminal
|
|
85
|
+
from ansys.edb.core.terminal.terminal import TerminalType
|
|
86
|
+
from ansys.edb.core.terminal.terminal_instance_terminal import TerminalInstanceTerminal
|
|
87
|
+
|
|
88
|
+
_terminal_type_creator_params_dict = {
|
|
89
|
+
TerminalType.BUNDLE: _CreatorParams(BundleTerminal),
|
|
90
|
+
TerminalType.EDGE: _CreatorParams(EdgeTerminal),
|
|
91
|
+
TerminalType.PADSTACK_INST: _CreatorParams(PadstackInstanceTerminal),
|
|
92
|
+
TerminalType.PIN_GROUP: _CreatorParams(PinGroupTerminal),
|
|
93
|
+
TerminalType.POINT: _CreatorParams(PointTerminal),
|
|
94
|
+
TerminalType.TERM_INST: _CreatorParams(TerminalInstanceTerminal),
|
|
95
|
+
}
|
|
96
|
+
return _terminal_type_creator_params_dict
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def _initialize_and_get_creator_dict(initializer, creator_dict):
|
|
100
|
+
return initializer() if creator_dict is None else creator_dict
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def _get_type_creator_dict():
|
|
104
|
+
return _initialize_and_get_creator_dict(
|
|
105
|
+
_initialize_type_creator_params_dict, _type_creator_params_dict
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def _get_primitive_type_creator_dict():
|
|
110
|
+
return _initialize_and_get_creator_dict(
|
|
111
|
+
_initialize_primitive_type_creator_params_dict, _primitive_type_creator_params_dict
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def _get_terminal_type_creator_dict():
|
|
116
|
+
return _initialize_and_get_creator_dict(
|
|
117
|
+
_initialize_terminal_type_creator_params_dict, _terminal_type_creator_params_dict
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def create_obj(msg, obj_type, do_cast):
|
|
122
|
+
"""Create an object from the provided message of the provided type."""
|
|
123
|
+
obj = obj_type(msg)
|
|
124
|
+
if do_cast:
|
|
125
|
+
obj = obj.cast()
|
|
126
|
+
return obj
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def create_obj_from_creator_dict(creator_dict, msg, obj_type):
|
|
130
|
+
"""Create an object from the provided message of the type corresponding to the provided object type."""
|
|
131
|
+
params = creator_dict[obj_type]
|
|
132
|
+
return create_obj(msg, params.obj_type, params.do_cast)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def create_lyt_obj(msg, lyt_obj_type):
|
|
136
|
+
"""Create a layout object from the provided message of the type corresponding to the provided layout object type."""
|
|
137
|
+
return create_obj_from_creator_dict(_get_type_creator_dict(), msg, lyt_obj_type)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def create_primitive(msg, prim_type):
|
|
141
|
+
"""Create a primitive from the provided message of the type corresponding to the provided primitive type."""
|
|
142
|
+
return create_obj_from_creator_dict(_get_primitive_type_creator_dict(), msg, prim_type)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
def create_terminal(msg, term_type):
|
|
146
|
+
"""Create a terminal from the provided message of the type corresponding to the provided terminal type."""
|
|
147
|
+
return create_obj_from_creator_dict(_get_terminal_type_creator_dict(), msg, term_type)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def create_conn_obj(msg):
|
|
151
|
+
"""Create a connection object of its derived type based on its layout object type.
|
|
152
|
+
|
|
153
|
+
Parameters
|
|
154
|
+
----------
|
|
155
|
+
msg : ansys.api.edb.v1.edb_messages_pb2.EDBObjMessage
|
|
156
|
+
|
|
157
|
+
Returns
|
|
158
|
+
-------
|
|
159
|
+
ansys.edb.core.inner.ConnObj
|
|
160
|
+
"""
|
|
161
|
+
return create_lyt_obj(msg, LayoutObjType.INVALID_LAYOUT_OBJ)
|