> For the complete documentation index, see [llms.txt](https://docs.openbrim.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openbrim.org/developers/paramml-developer-guide/functions/custom-function/intersect-line1-line2-optional-number.md).

# intersect (Line1, Line2, optional Number)

This function calculates the intersection point of the given two lines. If the lines do not intersect, it returns the value \[-1, -1, -1].

If no plane is specified, the intersection is represented in 3-dimensional space. If the plane is set to 1, the intersection will be in the YZ plane (disregarding the X-axis of the points forming the line). If the plane is set to 2, the intersection will be in the XZ plane (disregarding the Y-axis of the points forming the line). If the plane is set to 3, the intersection will be in the XY plane (disregarding the Z-axis of the points forming the line).

**intersect(Line1, Line2, optional Number) → list of numbers**

This function designed to calculate the intersection point of the given two lines

**Example:**

```xml
<O N="intersectObject1" T="Project">
    <!-- created by ParamML Examples on 8/22/2023 -->
    <P N="Line1" V="[[0,0,0],[10,10,10]]" />
    <P N="Line2" V="[[10,0,10],[0,5,0]]" />
    <P N="Intersection1" V="intersect(Line1,Line2,3)" />
    <P N="Line3" V="[[0,0],[10,10]]" />
    <P N="Line4" V="[[10,0],[0,10]]" />
    <P N="Intersection2" V="intersect(Line3,Line4)" />
</O>
```

![](https://openbrim.atlassian.net/wiki/download/attachments/2167734346/image-20230822-130554.png?api=v2) As demonstrated, Intersection1 and Intersection2 returns to the intersection point coordinates. To view this example in the library, see (<https://openbrim.org/app/?incubator=1&author=ParamML_Examples_OpenBrIM+Platform&obj=objid5ly5tvpjppvns0s6j31rpe> )


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.openbrim.org/developers/paramml-developer-guide/functions/custom-function/intersect-line1-line2-optional-number.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
