RegionMagnet#

class ansys.motorcad.core.geometry.RegionMagnet(motorcad_instance=None)#

Provides the Python representation of a Motor-CAD magnet geometry region.

Methods

RegionMagnet.add_entity(entity)

Add entity to list of region entities.

RegionMagnet.add_point(point)

Add a new point into region on an existing Line/Arc.

RegionMagnet.collides(regions)

Check whether any of the specified regions collide with self.

RegionMagnet.edit_point(old_coordinates, ...)

Edit a point in the region and update entities.

RegionMagnet.find_entity_from_coordinates(...)

Search through region to find an entity with start and end coordinates.

RegionMagnet.from_coordinate_list()

Work in progress.

RegionMagnet.insert_entity(index, entity)

Insert entity to list of region entities at given index.

RegionMagnet.insert_polyline(index, polyline)

Insert polyline at given index, polyline can be made up of line/arc entities.

RegionMagnet.is_closed()

Check whether region entities create a closed region.

RegionMagnet.mirror(mirror_line[, unique_name])

Mirror region along entity.

RegionMagnet.remove_entity(entity_remove)

Remove the entity from the region.

RegionMagnet.replace(replacement_region)

Replace self with another region.

RegionMagnet.rotate(centre_point, angle)

Rotate Region around a point for a given angle.

RegionMagnet.round_corner(corner_coordinate, ...)

Round the corner of a region.

RegionMagnet.round_corners(...)

Round multiple corners of a region.

RegionMagnet.subtract(region)

Subtract region from self, returning any additional regions.

RegionMagnet.translate(x, y)

Translate Region by specified x,y distances.

RegionMagnet.unite(regions)

Unite one or more other regions with self.

RegionMagnet.update(region)

Update class fields from another region.

Attributes

RegionMagnet.area

Get the region area.

RegionMagnet.br_multiplier

Br multiplier.

RegionMagnet.br_used

Br used after applying Br multiplier.

RegionMagnet.br_value

Br value of magnet before Br multiplier applied.

RegionMagnet.br_x

X-axis component of br value.

RegionMagnet.br_y

Y-axis component of the br value.

RegionMagnet.centroid

Get the region centroid.

RegionMagnet.child_names

Get child names list.

RegionMagnet.children

Return list of child regions from Motor-CAD.

RegionMagnet.colour

Get or set region colour.

RegionMagnet.duplications

Get or set number of region duplications for the full machine.

RegionMagnet.entities

Get or set the list of entities in the region.

RegionMagnet.lamination_type

Get or set lamination type of region from Motor-CAD.

RegionMagnet.linked_region

Get or set linked duplication/unite region.

RegionMagnet.magnet_angle

Angle of the magnet in degrees.

RegionMagnet.magnet_polarity

Polarity of the magnet.

RegionMagnet.material

Get or set region material name.

RegionMagnet.mesh_length

Get or set the mesh length to use, or 0 for default.

RegionMagnet.motorcad_instance

Get or set the linked Motor-CAD instance.

RegionMagnet.name

Get or set region name.

RegionMagnet.parent

Get or set parent region from Motor-CAD.

RegionMagnet.parent_name

Get or set the region parent name.

RegionMagnet.points

Get points that exist in region.

RegionMagnet.region_coordinate

Get the reference coordinate within the region.

RegionMagnet.region_type

Get region type.

RegionMagnet.singular

Get or set if region is singular.