Operator Reference

intersection_segment_circleintersection_segment_circleIntersectionSegmentCircleIntersectionSegmentCircleintersection_segment_circle (Operator)

intersection_segment_circleintersection_segment_circleIntersectionSegmentCircleIntersectionSegmentCircleintersection_segment_circle — Calculate the intersection points of a segment and a circle or circular arc

Signature

Herror intersection_segment_circle(double SegmentRow1, double SegmentColumn1, double SegmentRow2, double SegmentColumn2, double CircleRow, double CircleColumn, double CircleRadius, double CircleStartPhi, double CircleEndPhi, const char* CirclePointOrder, double* Row, double* Column)

Herror T_intersection_segment_circle(const Htuple SegmentRow1, const Htuple SegmentColumn1, const Htuple SegmentRow2, const Htuple SegmentColumn2, const Htuple CircleRow, const Htuple CircleColumn, const Htuple CircleRadius, const Htuple CircleStartPhi, const Htuple CircleEndPhi, const Htuple CirclePointOrder, Htuple* Row, Htuple* Column)

void IntersectionSegmentCircle(const HTuple& SegmentRow1, const HTuple& SegmentColumn1, const HTuple& SegmentRow2, const HTuple& SegmentColumn2, const HTuple& CircleRow, const HTuple& CircleColumn, const HTuple& CircleRadius, const HTuple& CircleStartPhi, const HTuple& CircleEndPhi, const HTuple& CirclePointOrder, HTuple* Row, HTuple* Column)

def intersection_segment_circle(segment_row_1: Union[float, int], segment_column_1: Union[float, int], segment_row_2: Union[float, int], segment_column_2: Union[float, int], circle_row: Union[float, int], circle_column: Union[float, int], circle_radius: Union[float, int], circle_start_phi: float, circle_end_phi: float, circle_point_order: str) -> Tuple[Sequence[float], Sequence[float]]

def intersection_segment_circle_s(segment_row_1: Union[float, int], segment_column_1: Union[float, int], segment_row_2: Union[float, int], segment_column_2: Union[float, int], circle_row: Union[float, int], circle_column: Union[float, int], circle_radius: Union[float, int], circle_start_phi: float, circle_end_phi: float, circle_point_order: str) -> Tuple[float, float]

Description

intersection_segment_circleintersection_segment_circleIntersectionSegmentCircleIntersectionSegmentCircleintersection_segment_circle calculates the intersection point of a segment and a circle or circular arc. The segment is defined by its endpoints (SegmentRow1SegmentRow1SegmentRow1segmentRow1segment_row_1,SegmentColumn1SegmentColumn1SegmentColumn1segmentColumn1segment_column_1) and (SegmentRow2SegmentRow2SegmentRow2segmentRow2segment_row_2,SegmentColumn2SegmentColumn2SegmentColumn2segmentColumn2segment_column_2). The circle is defined by its center (CircleRowCircleRowCircleRowcircleRowcircle_row,CircleColumnCircleColumnCircleColumncircleColumncircle_column) and its radius CircleRadiusCircleRadiusCircleRadiuscircleRadiuscircle_radius. In addition to that, a circular arc is characterized by the angle of the start point CircleStartPhiCircleStartPhiCircleStartPhicircleStartPhicircle_start_phi, the angle of the end point CircleEndPhiCircleEndPhiCircleEndPhicircleEndPhicircle_end_phi, and the point order CirclePointOrderCirclePointOrderCirclePointOrdercirclePointOrdercircle_point_order along the boundary. If CirclePointOrderCirclePointOrderCirclePointOrdercirclePointOrdercircle_point_order is set to 'positive'"positive""positive""positive""positive", the circular arc is defined counterclockwise. If CirclePointOrderCirclePointOrderCirclePointOrdercirclePointOrdercircle_point_order is set to 'negative'"negative""negative""negative""negative", the circular arc is defined clockwise. The intersection points, if any, are returned in (RowRowRowrowrow,ColumnColumnColumncolumncolumn).

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

Parameters

SegmentRow1SegmentRow1SegmentRow1segmentRow1segment_row_1 (input_control)  point.y HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Row coordinate of the first point of the segment.

SegmentColumn1SegmentColumn1SegmentColumn1segmentColumn1segment_column_1 (input_control)  point.x HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Column coordinate of the first point of the segment.

SegmentRow2SegmentRow2SegmentRow2segmentRow2segment_row_2 (input_control)  point.y HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Row coordinate of the second point of the segment.

SegmentColumn2SegmentColumn2SegmentColumn2segmentColumn2segment_column_2 (input_control)  point.x HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Column coordinate of the second point of the segment.

CircleRowCircleRowCircleRowcircleRowcircle_row (input_control)  circle.center.y HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Row coordinate of the center of the circle or circular arc.

CircleColumnCircleColumnCircleColumncircleColumncircle_column (input_control)  circle.center.x HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Column coordinate of the center of the circle or circular arc.

CircleRadiusCircleRadiusCircleRadiuscircleRadiuscircle_radius (input_control)  circle.radius HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Radius of the circle or circular arc.

CircleStartPhiCircleStartPhiCircleStartPhicircleStartPhicircle_start_phi (input_control)  angle.rad HTuplefloatHTupleHtuple (real) (double) (double) (double)

Angle of the start point of the circle or circular arc [rad].

Default: 0.0

CircleEndPhiCircleEndPhiCircleEndPhicircleEndPhicircle_end_phi (input_control)  angle.rad HTuplefloatHTupleHtuple (real) (double) (double) (double)

Angle of the end point of the circle or circular arc [rad].

Default: 6.28318

CirclePointOrderCirclePointOrderCirclePointOrdercirclePointOrdercircle_point_order (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Point order along the circle or circular arc.

Default: 'positive' "positive" "positive" "positive" "positive"

List of values: 'negative'"negative""negative""negative""negative", 'positive'"positive""positive""positive""positive"

RowRowRowrowrow (output_control)  point.y(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Row coordinates of the intersection points.

ColumnColumnColumncolumncolumn (output_control)  point.x(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Column coordinates of the intersection points.

Result

If the parameters are valid, the operator intersection_segment_circleintersection_segment_circleIntersectionSegmentCircleIntersectionSegmentCircleintersection_segment_circle returns the value 2 ( H_MSG_TRUE) .

Alternatives

intersection_circle_contour_xldintersection_circle_contour_xldIntersectionCircleContourXldIntersectionCircleContourXldintersection_circle_contour_xld

See also

intersection_line_circleintersection_line_circleIntersectionLineCircleIntersectionLineCircleintersection_line_circle

Module

Foundation