Geometry objects and functions#

Geometry functions are used to define and modify the Motor-CAD Adaptive Templates geometry using PyMotorCAD. More information on Adaptive Templates is available in the User guide under Motor-CAD adaptive templates scripting.

Geometry objects#

Region([motorcad_instance])

Python representation of Motor-CAD geometry region.

RegionMagnet([motorcad_instance])

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

Coordinate(x, y)

Provides the Python representation of a coordinate in two-dimensional space.

Entity(start, end)

Generic parent class for geometric entities based upon a start and end coordinate.

EntityList([iterable])

Generic class for list of Entities.

Line(start, end)

Python representation of Motor-CAD line entity based upon start and end coordinates.

Arc(start, end[, centre, radius])

Python representation of Motor-CAD arc entity based upon start, end, (centre or radius).

Geometry functions#

get_entities_have_common_coordinate(...)

Check whether region entities create a closed region.

xy_to_rt(x, y)

Convert Motor-CAD Cartesian coordinates to polar coordinates in degrees.

rt_to_xy(radius, theta)

Convert Motor-CAD polar coordinates to Cartesian coordinates in degrees.