add_magnet_region_xy#

MotorCAD.add_magnet_region_xy(x, y, region_name, magnet_material, br_angle, br_multiplier, polarity_code)#

Add a magnet region to the Motor-CAD geometry with an x, y coordinate system.

If a region already exists, this method overwrites the existing region.

Use degrees for angles.

Parameters:
xfloat

Region position for the x coordinate.

yfloat

Region position for the y coordinate.

region_namestr

Name of the region.

magnet_materialstr

Magnet material.

br_anglefloat

Magnet angle in degrees.

br_multiplierfloat, optional

Magnet Br multiplier. The default is 1.

polarity_codeinteger

Magnet polarity, where 0 is north and 1 is south.

.. deprecated:: 0.6.0

add_magnet_region_xy will be removed with Motor-CAD 2025R2 (tentative). Functionality replaced by adaptive templates.