Skip to content

intersection_segment_lineIntersectionSegmentLineIntersectionSegmentLineintersection_segment_lineintersection_segment_line🔗

Short description🔗

intersection_segment_lineIntersectionSegmentLineIntersectionSegmentLineintersection_segment_lineintersection_segment_line — Calculate the intersection point of a segment and a line

Signature🔗

intersection_segment_line( point.y SegmentRow1, point.x SegmentColumn1, point.y SegmentRow2, point.x SegmentColumn2, point.y LineRow1, point.x LineColumn1, point.y LineRow2, point.x LineColumn2, out point.y Row, out point.x Column, out integer IsOverlapping )void IntersectionSegmentLine( const HTuple& SegmentRow1, const HTuple& SegmentColumn1, const HTuple& SegmentRow2, const HTuple& SegmentColumn2, const HTuple& LineRow1, const HTuple& LineColumn1, const HTuple& LineRow2, const HTuple& LineColumn2, HTuple* Row, HTuple* Column, HTuple* IsOverlapping )static void HOperatorSet.IntersectionSegmentLine( HTuple segmentRow1, HTuple segmentColumn1, HTuple segmentRow2, HTuple segmentColumn2, HTuple lineRow1, HTuple lineColumn1, HTuple lineRow2, HTuple lineColumn2, out HTuple row, out HTuple column, out HTuple isOverlapping )def intersection_segment_line( segment_row_1: Union[float, int], segment_column_1: Union[float, int], segment_row_2: Union[float, int], segment_column_2: Union[float, int], line_row_1: Union[float, int], line_column_1: Union[float, int], line_row_2: Union[float, int], line_column_2: Union[float, int] ) -> Tuple[Sequence[float], Sequence[float], int]

def intersection_segment_line_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], line_row_1: Union[float, int], line_column_1: Union[float, int], line_row_2: Union[float, int], line_column_2: Union[float, int] ) -> Tuple[float, float, int]Herror intersection_segment_line( double SegmentRow1, double SegmentColumn1, double SegmentRow2, double SegmentColumn2, double LineRow1, double LineColumn1, double LineRow2, double LineColumn2, double* Row, double* Column, Hlong* IsOverlapping )

Herror T_intersection_segment_line( const Htuple SegmentRow1, const Htuple SegmentColumn1, const Htuple SegmentRow2, const Htuple SegmentColumn2, const Htuple LineRow1, const Htuple LineColumn1, const Htuple LineRow2, const Htuple LineColumn2, Htuple* Row, Htuple* Column, Htuple* IsOverlapping )

Description🔗

intersection_segment_lineIntersectionSegmentLine calculates the intersection point of a segment and a line. The segment is defined by its endpoints (SegmentRow1segmentRow1segment_row_1,SegmentColumn1segmentColumn1segment_column_1) and (SegmentRow2segmentRow2segment_row_2,SegmentColumn2segmentColumn2segment_column_2). The line is defined by the two points (LineRow1lineRow1line_row_1,LineColumn1lineColumn1line_column_1) and (LineRow2lineRow2line_row_2,LineColumn2lineColumn2line_column_2). The intersection point, if it exists, is returned in (Rowrowrow,Columncolumncolumn). If the segment and the line have a part in common, IsOverlappingisOverlappingis_overlapping returns the value 1, otherwise 0 is returned. In this case the endpoints of the mutual segment are returned in (Rowrowrow,Columncolumncolumn).

Execution information🔗

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🔗

SegmentRow1segmentRow1segment_row_1 (input_control) point.y → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)

Row coordinate of the first point of the segment.

SegmentColumn1segmentColumn1segment_column_1 (input_control) point.x → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)

Column coordinate of the first point of the segment.

SegmentRow2segmentRow2segment_row_2 (input_control) point.y → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)

Row coordinate of the second point of the segment.

SegmentColumn2segmentColumn2segment_column_2 (input_control) point.x → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)

Column coordinate of the second point of the segment.

LineRow1lineRow1line_row_1 (input_control) point.y → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)

Row coordinate of the first point of the line.

LineColumn1lineColumn1line_column_1 (input_control) point.x → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)

Column coordinate of the first point of the line.

LineRow2lineRow2line_row_2 (input_control) point.y → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)

Row coordinate of the second point of the line.

LineColumn2lineColumn2line_column_2 (input_control) point.x → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)

Column coordinate of the second point of the line.

Rowrowrow (output_control) point.y(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Row coordinate of the intersection point.

Columncolumncolumn (output_control) point.x(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Column coordinate of the intersection point.

IsOverlappingisOverlappingis_overlapping (output_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Do the segment and the line have a part in common?

Result🔗

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

Combinations with other operators🔗

Combinations

Alternatives

intersection_line_contour_xldIntersectionLineContourXld

See also

intersection_segmentsIntersectionSegments, intersection_linesIntersectionLines, intersection_segment_contour_xldIntersectionSegmentContourXld, intersection_contours_xldIntersectionContoursXld

Module🔗

Foundation