VS:LineLineIntersection/ja

From Vectorworks Developer
Jump to: navigation, search

.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
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox
In other languages