Line#
- class ansys.motorcad.core.geometry.Line(start, end)#
Python representation of Motor-CAD line entity based upon start and end coordinates.
- Parameters:
- start
Coordinate
Start coordinate.
- end
Coordinate
End coordinate.
- start
Methods
Line.coordinate_on_entity
(coordinate)Get if a coordinate exists on this line.
Get intersection Coordinates of line with an arc.
Line.get_coordinate_from_distance
(ref_coordinate)Get the coordinate at the specified distance along the line from the reference.
Get the coordinate at a fractional distance along the line from the reference coord.
Line.get_intersection
(entity)Get intersection Coordinate of entity with another entity.
Get intersection Coordinate of line with another line.
Line.mirror
(mirror_line)Mirror line about a line.
Reverse Entity class.
Line.rotate
(centre_point, angle)Rotate entity around a point for a given angle.
Line.translate
(x, y)Translate Entity by specified x,y distances.
Attributes
Get angle of line vector.
Get gradient of line - A in equation (y = Ax + B).
Check whether line is horizontal.
Check whether line is vertical.
Get length of line.
Get midpoint of Line.
Get y intercept of line - B in equation (y = Ax + B).