intersection_llintersection_llIntersectionLlIntersectionLlintersection_ll (算子)

名称

intersection_llintersection_llIntersectionLlIntersectionLlintersection_ll — 计算两条线的交点。

警告

intersection_llintersection_llIntersectionLlIntersectionLlIntersectionLlintersection_ll 已过时,仅出于向后兼容性考虑而保留。 New applications should use the operator intersection_linesintersection_linesIntersectionLinesIntersectionLinesIntersectionLinesintersection_lines of the chapter Tools / Geometry instead.

签名

intersection_ll( : : RowA1, ColumnA1, RowA2, ColumnA2, RowB1, ColumnB1, RowB2, ColumnB2 : Row, Column, IsParallel)

Herror intersection_ll(double RowA1, double ColumnA1, double RowA2, double ColumnA2, double RowB1, double ColumnB1, double RowB2, double ColumnB2, double* Row, double* Column, Hlong* IsParallel)

Herror T_intersection_ll(const Htuple RowA1, const Htuple ColumnA1, const Htuple RowA2, const Htuple ColumnA2, const Htuple RowB1, const Htuple ColumnB1, const Htuple RowB2, const Htuple ColumnB2, Htuple* Row, Htuple* Column, Htuple* IsParallel)

void IntersectionLl(const HTuple& RowA1, const HTuple& ColumnA1, const HTuple& RowA2, const HTuple& ColumnA2, const HTuple& RowB1, const HTuple& ColumnB1, const HTuple& RowB2, const HTuple& ColumnB2, HTuple* Row, HTuple* Column, HTuple* IsParallel)

static void HMisc::IntersectionLl(const HTuple& RowA1, const HTuple& ColumnA1, const HTuple& RowA2, const HTuple& ColumnA2, const HTuple& RowB1, const HTuple& ColumnB1, const HTuple& RowB2, const HTuple& ColumnB2, HTuple* Row, HTuple* Column, HTuple* IsParallel)

static void HMisc::IntersectionLl(double RowA1, double ColumnA1, double RowA2, double ColumnA2, double RowB1, double ColumnB1, double RowB2, double ColumnB2, double* Row, double* Column, Hlong* IsParallel)

static void HOperatorSet.IntersectionLl(HTuple rowA1, HTuple columnA1, HTuple rowA2, HTuple columnA2, HTuple rowB1, HTuple columnB1, HTuple rowB2, HTuple columnB2, out HTuple row, out HTuple column, out HTuple isParallel)

static void HMisc.IntersectionLl(HTuple rowA1, HTuple columnA1, HTuple rowA2, HTuple columnA2, HTuple rowB1, HTuple columnB1, HTuple rowB2, HTuple columnB2, out HTuple row, out HTuple column, out HTuple isParallel)

static void HMisc.IntersectionLl(double rowA1, double columnA1, double rowA2, double columnA2, double rowB1, double columnB1, double rowB2, double columnB2, out double row, out double column, out int isParallel)

def intersection_ll(row_a1: MaybeSequence[Union[float, int]], column_a1: MaybeSequence[Union[float, int]], row_a2: MaybeSequence[Union[float, int]], column_a2: MaybeSequence[Union[float, int]], row_b1: MaybeSequence[Union[float, int]], column_b1: MaybeSequence[Union[float, int]], row_b2: MaybeSequence[Union[float, int]], column_b2: MaybeSequence[Union[float, int]]) -> Tuple[Sequence[float], Sequence[float], Sequence[int]]

def intersection_ll_s(row_a1: MaybeSequence[Union[float, int]], column_a1: MaybeSequence[Union[float, int]], row_a2: MaybeSequence[Union[float, int]], column_a2: MaybeSequence[Union[float, int]], row_b1: MaybeSequence[Union[float, int]], column_b1: MaybeSequence[Union[float, int]], row_b2: MaybeSequence[Union[float, int]], column_b2: MaybeSequence[Union[float, int]]) -> Tuple[float, float, int]

描述

算子 intersection_llintersection_llIntersectionLlIntersectionLlIntersectionLlintersection_ll calculates the intersection point of two lines. As input the two points on each line are expected (RowA1RowA1RowA1RowA1rowA1row_a1,ColumnA1ColumnA1ColumnA1ColumnA1columnA1column_a1, RowA2RowA2RowA2RowA2rowA2row_a2,ColumnA2ColumnA2ColumnA2ColumnA2columnA2column_a2) and (RowB1RowB1RowB1RowB1rowB1row_b1,ColumnB1ColumnB1ColumnB1ColumnB1columnB1column_b1, RowB2RowB2RowB2RowB2rowB2row_b2,ColumnB2ColumnB2ColumnB2ColumnB2columnB2column_b2). The parameters RowRowRowRowrowrow and ColumnColumnColumnColumncolumncolumn return the result of the calculation. If the lines are parallel, the values of RowRowRowRowrowrow and ColumnColumnColumnColumncolumncolumn are undefined and IsParallelIsParallelIsParallelIsParallelisParallelis_parallel is 1. Otherwise, IsParallelIsParallelIsParallelIsParallelisParallelis_parallel is 0.

注意

If the lines are parallel the values of RowRowRowRowrowrow and ColumnColumnColumnColumncolumncolumn are undefined.

执行信息

参数

RowA1RowA1RowA1RowA1rowA1row_a1 (输入控制)  point.y(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

第一条线第一点的行坐标。

ColumnA1ColumnA1ColumnA1ColumnA1columnA1column_a1 (输入控制)  point.x(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

第一条线第一点的列坐标。

RowA2RowA2RowA2RowA2rowA2row_a2 (输入控制)  point.y(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

第一条线第二点的行坐标。

ColumnA2ColumnA2ColumnA2ColumnA2columnA2column_a2 (输入控制)  point.x(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

第一条线第二点的列坐标。

RowB1RowB1RowB1RowB1rowB1row_b1 (输入控制)  point.y(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

第二条线第一点的行坐标。

ColumnB1ColumnB1ColumnB1ColumnB1columnB1column_b1 (输入控制)  point.x(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

第二条线第一点的坐标列。

RowB2RowB2RowB2RowB2rowB2row_b2 (输入控制)  point.y(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

第二条线的第二点的行坐标。

ColumnB2ColumnB2ColumnB2ColumnB2columnB2column_b2 (输入控制)  point.x(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

第二条线的第二个点的列坐标。

RowRowRowRowrowrow (输出控制)  point.y(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Row coordinate of the intersection point.

ColumnColumnColumnColumncolumncolumn (输出控制)  point.x(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Column coordinate of the intersection point.

IsParallelIsParallelIsParallelIsParallelisParallelis_parallel (输出控制)  number(-array) HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Are the two lines parallel?

示例(HDevelop)

dev_set_color ('black')
RowLine1 := 350
ColLine1 := 250
RowLine2 := 300
ColLine2 := 300
Rows := 300
Columns := 50
disp_line (WindowHandle, RowLine1, ColLine1, RowLine2, ColLine2)
n := 0
for Rows := 40 to 200 by 4
  dev_set_color ('red')
  disp_line (WindowHandle, Rows, Columns, Rows+n, Columns+n)
  intersection_ll (Rows, Columns, Rows+n, Columns+n, RowLine1, ColLine1, \
                   RowLine2, ColLine2, Row, Column, IsParallel)
  dev_set_color ('blue')
  disp_line (WindowHandle, Row, Column-2, Row, Column+2)
  disp_line (WindowHandle, Row-2, Column, Row+2, Column)
  n := n+8
endfor

示例(C)

create_tuple(&rowA1, 1);
set_i(rowA1, 8, 0);
create_tuple(&columnA1, 1);
set_i(columnA1, 7, 0);
create_tuple(&rowA2, 1);
set_i(rowA2, 15, 0);
create_tuple(&columnA2, 1);
set_i(columnA2, 11, 0);
create_tuple(&RowB1, 1);
set_i(RowB1, 2, 0);
create_tuple(&ColumnB1, 1);
set_i(ColumnB1, 4, 0);
create_tuple(&RowB2, 1);
set_i(RowB2, 6, 0);
create_tuple(&ColumnB2, 1);
set_i(ColumnB2, 10, 0);
T_intersection_ll(rowA1,columnA1,rowA2,columnA2,RowB1,ColumnB1,RowB2,
                  ColumnB2,&row_i,&column_i,&parallel);
aa_min = get_d(row_i,0);
aa_max = get_d(column_i,0);

示例(HDevelop)

dev_set_color ('black')
RowLine1 := 350
ColLine1 := 250
RowLine2 := 300
ColLine2 := 300
Rows := 300
Columns := 50
disp_line (WindowHandle, RowLine1, ColLine1, RowLine2, ColLine2)
n := 0
for Rows := 40 to 200 by 4
  dev_set_color ('red')
  disp_line (WindowHandle, Rows, Columns, Rows+n, Columns+n)
  intersection_ll (Rows, Columns, Rows+n, Columns+n, RowLine1, ColLine1, \
                   RowLine2, ColLine2, Row, Column, IsParallel)
  dev_set_color ('blue')
  disp_line (WindowHandle, Row, Column-2, Row, Column+2)
  disp_line (WindowHandle, Row-2, Column, Row+2, Column)
  n := n+8
endfor

示例(HDevelop)

dev_set_color ('black')
RowLine1 := 350
ColLine1 := 250
RowLine2 := 300
ColLine2 := 300
Rows := 300
Columns := 50
disp_line (WindowHandle, RowLine1, ColLine1, RowLine2, ColLine2)
n := 0
for Rows := 40 to 200 by 4
  dev_set_color ('red')
  disp_line (WindowHandle, Rows, Columns, Rows+n, Columns+n)
  intersection_ll (Rows, Columns, Rows+n, Columns+n, RowLine1, ColLine1, \
                   RowLine2, ColLine2, Row, Column, IsParallel)
  dev_set_color ('blue')
  disp_line (WindowHandle, Row, Column-2, Row, Column+2)
  disp_line (WindowHandle, Row-2, Column, Row+2, Column)
  n := n+8
endfor

示例(HDevelop)

dev_set_color ('black')
RowLine1 := 350
ColLine1 := 250
RowLine2 := 300
ColLine2 := 300
Rows := 300
Columns := 50
disp_line (WindowHandle, RowLine1, ColLine1, RowLine2, ColLine2)
n := 0
for Rows := 40 to 200 by 4
  dev_set_color ('red')
  disp_line (WindowHandle, Rows, Columns, Rows+n, Columns+n)
  intersection_ll (Rows, Columns, Rows+n, Columns+n, RowLine1, ColLine1, \
                   RowLine2, ColLine2, Row, Column, IsParallel)
  dev_set_color ('blue')
  disp_line (WindowHandle, Row, Column-2, Row, Column+2)
  disp_line (WindowHandle, Row-2, Column, Row+2, Column)
  n := n+8
endfor

结果

intersection_llintersection_llIntersectionLlIntersectionLlIntersectionLlintersection_ll 返回 2 ( H_MSG_TRUE )。

模块

基础