pyaedt.modeler.Primitives2D.Primitives2D#

class pyaedt.modeler.Primitives2D.Primitives2D[source]#

Manages primitives in 2D tools.

This class is inherited in the caller application and is accessible through the primitives variable part of the modeler object (for example, hfss.modeler or icepak.modeler).

Examples

Basic usage demonstrated with a Q2D or Maxwell 2D design:

>>> from pyaedt import Q2d
>>> aedtapp = Q2d()
>>> prim = aedtapp.modeler

Methods

Primitives2D.add_new_objects()

Add objects that have been created in the modeler by previous operations.

Primitives2D.add_new_user_defined_component()

Add 3D components and user-defined models that have been created in the modeler by previous operations.

Primitives2D.cleanup_objects()

Clean up objects that no longer exist in the modeler because they were removed by previous operations.

Primitives2D.create_circle(position, radius)

Create a circle.

Primitives2D.create_ellipse(position, ...[, ...])

Create an ellipse.

Primitives2D.create_object_from_edge(edge)

Create a line object from an edge ID or from an pyaedt.modeler.Object3d.EdgePrimitive object.

Primitives2D.create_object_from_face(face)

Create an object from a face.

Primitives2D.create_polyline(position_list)

Draw a polyline object in the 3D modeler.

Primitives2D.create_rectangle(position, ...)

Create a rectangle.

Primitives2D.create_region([pad_percent])

Create an air region.

Primitives2D.create_regular_polygon(...[, ...])

Create a rectangle.

Primitives2D.create_spiral_on_face(face, ...)

Create a Spiral Polyline inside a face.

Primitives2D.create_udp(udp_dll_name, ...[, ...])

Create a user-defined primitive (UDP).

Primitives2D.delete([objects])

Delete objects or groups.

Primitives2D.delete_objects_containing(...)

Delete all objects with a given prefix.

Primitives2D.does_object_exists(object)

"Check to see if an object exists.

Primitives2D.find_closest_edges(start_obj, ...)

Retrieve the two closest edges that are not perpendicular for two objects.

Primitives2D.find_new_objects()

Find any new objects in the modeler that were created by previous operations.

Primitives2D.get_bodynames_from_position(...)

Retrieve the names of the objects that are in contact with a given point.

Primitives2D.get_closest_edgeid_to_position(...)

Get the edge ID closest to a given position.

Primitives2D.get_edge_length(edgeID)

Get the length of an edge.

Primitives2D.get_edge_midpoint(partID)

Retrieve the midpoint coordinates of a given edge ID or edge name.

Primitives2D.get_edge_vertices(edgeID)

Retrieve the vertex IDs of a given edge ID or edge name.

Primitives2D.get_edgeid_from_position(position)

Get an edge ID from a position.

Primitives2D.get_edgeids_from_vertexid(...)

Retrieve edge IDs for a vertex ID.

Primitives2D.get_edges_for_circuit_port(face_id)

Retrieve two edge IDs suitable for the circuit port.

Primitives2D.get_edges_for_circuit_port_from_sheet(sheet)

Retrieve two edge IDs that are suitable for a circuit port from a sheet.

Primitives2D.get_edges_on_bounding_box(sheets)

Retrieve the edges of the sheets passed in the input that are lying on the bounding box.

Primitives2D.get_equivalent_parallel_edges(...)

Create two new edges that are parallel and equal to the smallest edge given a parallel couple of edges.

Primitives2D.get_existing_polyline(object)

Retrieve a polyline object to manipulate it.

Primitives2D.get_face_area(face_id)

Retrieve the area of a given face ID.

Primitives2D.get_face_center(face_id)

Retrieve the center position for a given planar face ID.

Primitives2D.get_face_edges(partId)

Retrieve the edge IDs of a given face name or face ID.

Primitives2D.get_face_vertices(face_id)

Retrieve the vertex IDs of a given face ID or face name.

Primitives2D.get_faceid_from_position(position)

Retrieve a face ID from a position.

Primitives2D.get_mid_points_on_dir(sheet, ...)

Retrieve midpoints on a given axis direction.

Primitives2D.get_model_bounding_box()

Retrieve the model's bounding box.

Primitives2D.get_obj_id(objname)

Return the object ID from an object name.

Primitives2D.get_object_edges(partId)

Retrieve the edge IDs of a given object ID or object name.

Primitives2D.get_object_faces(partId)

Retrieve the face IDs of a given object ID or object name.

Primitives2D.get_object_from_name(objname)

Return the object from an object name.

Primitives2D.get_object_vertices(partID)

Retrieve the vertex IDs of a given object name or object ID.

Primitives2D.get_objects_by_material(...)

Retrieve a list of the IDs for objects of a specified material.

Primitives2D.get_objects_w_string(stringname)

Retrieve all objects with a given string in their names.

Primitives2D.get_vertex_position(vertex_id)

Retrieve a vector of vertex coordinates.

Primitives2D.refresh()

Refresh this object.

Primitives2D.refresh_all_ids()

Refresh all IDs.

Primitives2D.remove_point(name)

Remove a point.

Primitives2D.update_object(obj)

Update any pyaedt.modeler.Object3d.Object3d derivatives that have potentially been modified by a modeler operation.

Primitives2D.update_udp(object_name, ...)

Update an existing geometrical object that was originally created using a user-defined primitive (UDP).

Primitives2D.value_in_object_units(value)

Convert one or more strings for numerical lengths to floating point values.

Attributes

Primitives2D.defaultmaterial

Default material.

Primitives2D.line_names

List of the names of all line objects.

Primitives2D.line_objects

List of all line objects.

Primitives2D.logger

Logger.

Primitives2D.model_consistency_report

Summary of detected inconsistencies between the AEDT modeler and PyAEDT structures.

Primitives2D.model_objects

List of the names of all model objects.

Primitives2D.model_units

Model units.

Primitives2D.modeler

Modeler.

Primitives2D.non_model_objects

List of names of all non-model objects.

Primitives2D.object_list

List of all objects.

Primitives2D.object_names

List of the names of all objects.

Primitives2D.plane2d

Create a 2D plane.

Primitives2D.points

List of points.

Primitives2D.points_by_name

Dictionary containing all points where the keys are the name of the points.

Primitives2D.sheet_names

List of the names of all sheet objects.

Primitives2D.sheet_objects

List of all sheet objects.

Primitives2D.solid_names

List of the names of all solid objects.

Primitives2D.solid_objects

List of all solid objects.

Primitives2D.unclassified_names

List of the names of all unclassified objects.

Primitives2D.unclassified_objects

List of all unclassified objects.

Primitives2D.user_defined_component_names

List of the names of all 3D component objects.

Primitives2D.version

Version.