Model.hm_findtangentpointoncircle#
- Model.hm_findtangentpointoncircle(px, py, pz, cx, cy, cz, cnx, cny, cnz, radius)#
From a point, this function finds the coordinates corresponding to two tangent points on a circle.
- Parameters:
px (double) – Defines the x coordinate of a point.
py (double) – Defines the y coordinate of a point.
pz (double) – Defines the z coordinate of a point.
cx (double) – Defines the x coordinate of a circle center.
cy (double) – Defines the y coordinate of a circle center.
cz (double) – Defines the z coordinate of a circle center.
cnx (double) – Defines the x component of a circle normal.
cny (double) – Defines the y component of a circle normal.
cnz (double) – Defines the z component of a circle normal.
radius (double) – Defines circle radius.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:coord1 (numpy.ndarray)
coord2 (numpy.ndarray)
Example#
Get coordinates of two tangent points on the circle#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_findtangentpointoncircle(px=2.0, py=0.0, pz=0.0, cx=0.0, cy=0.0, cz=0.0, cnx=0.0, cny=0.0, cnz=1.0,radius=1.0) print("coord1", result.coord1) print("coord2", result.coord2)