> 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/core-objects/finite-elements-objects/femeshsurface/meshdirection.md).

# MeshDirection

By default, the direction of the mesh is determined by the surface of the polygon. If the surface is not a rectangle, the mesh lines may not be perpendicular. For example, in the figure, the mesh lines are created parallel to the red arrows.

To control the direction of the mesh lines, the MeshDirection parameter can be used. This parameter requires the definition of three points that represent two lines.

For instance, in the FEM1 object, the MeshDirection parameter is set to "\[\[0,0,0],\[1,0,0],\[1,1,0]]", which creates mesh lines that are parallel to the global X and Y axes.

**Example:**

```xml
<O N="FEMeshObject3" T="Project" Category="FEM Objects" TransAlignRule="Right">
    <!-- created by ParamML Examples on 08.02.2023 -->
    <O N="FEM1" T="FEMeshSurface" CX="15" CY="60" ConstraintPts="[]" Material="@NULL\|Material" Surface="@NULL\|Surface" CoorSys="@NULL\|CoorSys" Group="@NULL\|FEGroup" IsConstraint="1">
        <O T="Surface">
            <O T="Point" X="70" Y="70" />
            <O T="Point" X="150" Y="0" />
            <O T="Point" X="200" Y="240" />
            <O T="Point" X="155" Y="360" />
            <O T="Point" X="0" Y="240" />
        </O>
    </O>
    <O N="FEM2" T="FEMeshSurface" CX="15" CY="60" ConstraintPts="[]" MeshDirection="[[0,0,0],[1,0,0],[1,1,0]]" Material="@NULL\|Material" Surface="@NULL\|Surface" CoorSys="@NULL\|CoorSys" Group="@NULL\|FEGroup" IsConstraint="1">
        <O T="Surface" X="300">
            <O T="Point" X="70" Y="70" />
            <O T="Point" X="150" Y="0" />
            <O T="Point" X="200" Y="240" />
            <O T="Point" X="155" Y="360" />
            <O T="Point" X="0" Y="240" />
        </O>
    </O>
    <O N="FEM3" T="FEMeshSurface" CX="15" CY="60" ConstraintPts="[]" MeshDirection="[[1,1,1],[0,0,1],[1,0,1]]" Material="@NULL\|Material" Surface="@NULL\|Surface" CoorSys="@NULL\|CoorSys" Group="@NULL\|FEGroup" IsConstraint="1">
        <O T="Surface" X="600">
            <O T="Point" X="70" Y="70" />
            <O T="Point" X="150" Y="0" />
            <O T="Point" X="200" Y="240" />
            <O T="Point" X="155" Y="360" />
            <O T="Point" X="0" Y="240" />
        </O>
    </O>
</O>
```

![](https://openbrim.atlassian.net/wiki/download/attachments/2164752389/image-20230208-125318.png?api=v2) To view this example in the library, see (<https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&obj=objid2x5w4b5d1jh7unbava7gn6&folder=FEM+Objects>)

Please proceed to the next page.


---

# 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/core-objects/finite-elements-objects/femeshsurface/meshdirection.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.
