LineLine intersection

Hi, there (‐^▽^‐)
I’m trying rhino’s functions to consider introduction of rhino.
For a kickoff, I’m trying to calculate a line-line intersection point, cause I’m ultra begginer.
To this end, I used rhino.geometry.intersect.intersection.LineLine function.

#My code in python
a=0.0
b=0.0
list=[]
list=rhino.geometry.intersect.intersection.LineLine function(line1, line2, a, b)

I unfortunately got an error, " Message: expected Line, got list".

Plese help ゚゚(´O`)°゚

@Takeshi_Fujiat,

you might get started with this example in the python help. Note that rs.LineLineIntersection() treats lines as infinite lines:

import rhinoscriptsyntax as rs

lineA_id = rs.AddLine((1,1,0), (5,0,0)) 
lineB_id = rs.AddLine((1,3,0), (5,5,0))
point = rs.LineLineIntersection(lineA_id, lineB_id)
if point:
    rs.AddPoint(point[0])

To treat them not infinite, you might use rs.CurveCurveIntersection() instead.

_
c.

It works well.
Thank you very much, c. -san o(^▽^)o