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.

Coordinate(x, y)

Python representation of 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 and 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.

draw_regions(regions)

WILL BE DEPRECATED SOON - USE geometry_drawing.draw_objects() instead.