> 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/toglobal-object.md).

# toglobal (Object)

**toglobal (object) → number**

It shows the global coordinates of points within objects ("Surface," "Volume," "Line," etc.) that contain only point objects and have no other intermediate objects. It accumulates local values hierarchically and converts point coordinates from local to global values.

* Global coordinates are universally applicable and provide a common reference for multiple objects within a larger context.
* Local coordinates are specific to individual objects and are used to define their properties and transformations within their own reference frame.

For example, in a 3D graphics, global coordinates might be used to position objects within a scene, while local coordinates would define an object's shape and how it is transformed within the scene.

**Example:**

```xml
<O N="toglobalObject1" T="Project" Category="Functions" TransAlignRule="1">
    <!-- created by ParamML Examples on 8/24/2023 -->
    <P N="GlobalCoordinates" V="toglobal(Line1)" />
    <P N="GlobalCoordinates_R1_Z" V="GlobalCoordinates[0][2]" />
    <P N="LocalCoordinates_R1_Z" V="Line1.R1.Z" />
    <O T="Group" X="5" Y="14" Z="12">
        <O N="Line1" T="Line" X="2" Y="3" Z="6">
            <O N="R1" T="Point" X="5" Y="10" Z="20" />
            <O N="R2" T="Point" X="-5" Y="-10" Z="-20" />
        </O>
    </O>
</O>
```

![](https://openbrim.atlassian.net/wiki/download/attachments/2167898183/image-20230824-141942.png?api=v2) In the example above, the "Line1" object contains points with local coordinates \[5,10,20] for R1 and \[-5,-10,-20] for R2. When considering the Z value of the R1 point, its local Z coordinate is recorded as LocalCoordinates\_R1\_Z=20. Correspondingly, when accounting for the same point's global Z value within the hierarchical context of the "Group" object, the sum of 12, 6, and 20 yields a GlobalCoordinates\_R1\_Z=38. To view this example in the library, see (<https://openbrim.org/app/?incubator=1&author=ParamML_Examples_OpenBrIM+Platform&obj=objidbytucev4obd1o7gn1fio2p> )


---

# 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/toglobal-object.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.
