VS:LineLineIntersection/ja: Difference between revisions
Jump to navigation
Jump to search
m (1 revision: Japanese Reference for 2016) |
No edit summary |
||
Line 11: | Line 11: | ||
<def> | <def> | ||
<funcDef lang="vs"> | <funcDef lang="vs"> | ||
PROCEDURE LineLineIntersection(l1start: | PROCEDURE LineLineIntersection(l1start:POINT; l1end:POINT; l2start:POINT; l2end:POINT; VAR parallel:BOOLEAN; VAR intOnLines:BOOLEAN; VAR sectpt:POINT); | ||
</funcDef> | </funcDef> | ||
<funcDef lang="py"> | <funcDef lang="py"> | ||
Line 24: | Line 24: | ||
<line> | <line> | ||
l1start | l1start | ||
POINT | |||
線分1の始点座標 | 線分1の始点座標 | ||
</line> | </line> | ||
<line> | <line> | ||
l1end | l1end | ||
POINT | |||
線分1の終点座標 | 線分1の終点座標 | ||
</line> | </line> | ||
<line> | <line> | ||
l2start | l2start | ||
POINT | |||
線分2の始点座標 | 線分2の始点座標 | ||
</line> | </line> | ||
<line> | <line> | ||
l2end | l2end | ||
POINT | |||
線分2の終点座標 | 線分2の終点座標 | ||
</line> | </line> | ||
Line 54: | Line 54: | ||
<line> | <line> | ||
sectpt | sectpt | ||
POINT | |||
交点の座標 | 交点の座標 | ||
</line> | </line> |
Latest revision as of 07:43, 28 April 2016
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
2つの線分の交点座標を返します。
PROCEDURE LineLineIntersection(
l1start :POINT;
l1end :POINT;
l2start :POINT;
l2end :POINT;
VAR parallel :BOOLEAN;
VAR intOnLines :BOOLEAN;
VAR sectpt :POINT);
def vs.LineLineIntersection(l1start, l1end, l2start, l2end): return (parallel, intOnLines, sectpt)
Parameters
l1start POINT 線分1の始点座標 l1end POINT 線分1の終点座標 l2start POINT 線分2の始点座標 l2end POINT 線分2の終点座標 parallel BOOLEAN 平行な場合はTRUE intOnLines BOOLEAN 交差している場合はTRUE sectpt POINT 交点の座標
Example
PROCEDURE Example; VAR pt1, pt2, pt3, pt4, pt5 :POINT; parallel, intOnLines :BOOLEAN; BEGIN CallTool(-201); GetSegPt1(FSActLayer, pt1.x, pt1.y); GetSegPt2(FSActLayer, pt2.x, pt2.y); CallTool(-201); GetSegPt1(FSActLayer, pt3.x, pt3.y); GetSegPt2(FSActLayer, pt4.x, pt4.y); LineLineIntersection(pt1, pt2, pt3, pt4, parallel, intOnLines, pt5); Locus(pt5.x, pt5.y); END; RUN(Example);
Version
利用可能バージョン: VectorWorks10.0