> 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/3d-geometric-objects/volume.md).

# Volume

Volume objects define 3D entities by extending surface objects. To create a volume object, you need to connect two or more surface objects that have the same number of points.

**Example Syntax:**

```
...
<O T="Volume"
...
...
</O>
```

There are three methods to create a volume object:

1. By specifying a thickness value for a surface object
2. By connecting a line object and a surface object
3. By connecting two different surface objects.

**Example:**

```xml
<O N="VolumeObject1" T="Project" Category="3D Geometric Objects" TransAlignRule="Right">
    <!-- created by ParamML Examples on 01.02.2023 -->
    <O N="Prsm1" T="Surface" Thickness="20" Y="80">
        <O T="Point" X="0" Y="0" Z="0" />
        <O T="Point" X="20" Y="0" Z="0" />
        <O T="Point" X="20" Y="20" Z="0" />
        <O T="Point" X="0" Y="20" Z="0" />
    </O>
    <O N="Prsm2" T="Line" Y="50">
        <O T="Point" X="0" Y="0" Z="0" />
        <O T="Point" X="0" Y="0" Z="50" />
        <O N="Section" T="Section">
            <O T="Shape">
                <O T="Point" X="-2" Y="-2" />
                <O T="Point" X="2" Y="-2" />
                <O T="Point" X="2" Y="2" />
                <O T="Point" X="-2" Y="2" />
            </O>
        </O>
    </O>
    <O N="Prsm3" T="Volume">
        <P N="w" V="20" />
        <O T="Surface" Z="0">
            <O T="Point" X="-w" Y="-w" />
            <O T="Point" X="w" Y="-w" />
            <O T="Point" X="w" Y="w" />
            <O T="Point" X="-w" Y="w" />
        </O>
        <O T="Surface" Z="25">
            <O T="Point" X="-w/2" Y="-w/2" />
            <O T="Point" X="w/2" Y="-w/2" />
            <O T="Point" X="w/2" Y="w/2" />
            <O T="Point" X="-w/2" Y="w/2" />
        </O>
    </O>
</O>
```

![](https://openbrim.atlassian.net/wiki/download/attachments/2157969505/image-20230201-131714.png?api=v2) To view this example in the library, see (<https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&folder=3D+Geometric+Objects&obj=objid71pnngfe1y80ae039z10d>)

The order and number of points in the two surfaces are critical when creating a volume object. If the points are defined in a different order for the lower and upper surfaces, the connecting lines will form a diagonal line between the points, leading to an incorrect appearance.

It's also important to ensure that both surfaces have the same number of points. If the number of points is different, the matching points will combine, while the remaining unmatched points will be left exposed.

**Example:**

```xml
<O N="VolumeObject2" T="Project" Category="3D Geometric Objects" TransAlignRule="Right">
    <!-- created by ParamML Examples on 01.02.2023 -->
    <O N="WrongPrism1" T="Volume" Y="50">
        <O T="Surface" Z="0">
            <O T="Point" X="10" Y="-10" />
            <O T="Point" X="10" Y="10" />
            <O T="Point" X="-10" Y="10" />
            <O T="Point" X="-10" Y="-10" />
        </O>
        <O T="Surface" Z="25">
            <O T="Point" X="-5" Y="-5" />
            <O T="Point" X="5" Y="-5" />
            <O T="Point" X="5" Y="5" />
            <O T="Point" X="-5" Y="5" />
        </O>
    </O>
    <O N="WrongPrism2" T="Volume">
        <O T="Surface">
            <O T="Point" X="10" Y="-10" />
            <O T="Point" X="10" Y="10" />
            <O T="Point" X="-10" Y="10" />
            <O T="Point" X="-10" Y="0" />
            <O T="Point" X="-10" Y="-10" />
        </O>
        <O T="Surface" Z="30">
            <O T="Point" X="5" Y="-5" />
            <O T="Point" X="5" Y="5" />
            <O T="Point" X="-5" Y="5" />
            <O T="Point" X="-5" Y="-5" />
        </O>
    </O>
</O>
```

![](https://openbrim.atlassian.net/wiki/download/attachments/2157969505/image-20230201-134105.png?api=v2) To view this example in the library, see (<https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&obj=objid2geiywza70kl99birr5c9>)

**Example:**

```xml
<O N="VolumeObject3" T="Project" Category="3D Geometric Objects" TransAlignRule="Right">
    <!-- created by ParamML Examples on 01.02.2023 -->
    <P N="width" V="20" Role="Input" />
    <P N="height" V="10" Role="Input" />
    <P N="a" V="toglobal(surface1)" />
    <P N="b" V="toglobal(surface2)" />
    <P N="Global_Z_of_Surface1" V="a[0][2]" />
    <P N="Global_Z_of_Surface2" V="b[0][2]" />
    <O N="TopElevation" T="Group" Z="5">
        <O N="Volume1" T="Volume" Z="height">
            <O N="surface1" T="Surface" Z="1">
                <O T="Point" X="width" Y="-width" Z="3" />
                <O T="Point" X="width" Y="width" Z="3" />
                <O T="Point" X="-width" Y="width" Z="3" />
                <O T="Point" X="-width" Y="-width" Z="3" />
            </O>
            <O N="surface2" T="Surface" Z="12">
                <O T="Point" X="width/2" Y="-width/2" Z="8" />
                <O T="Point" X="width/2" Y="width/2" Z="8" />
                <O T="Point" X="-width/2" Y="width/2" Z="8" />
                <O T="Point" X="-width/2" Y="-width/2" Z="8" />
            </O>
        </O>
    </O>
</O>
```

If all the points on a surface have the same coordinate value, it can be represented as a common value in the brackets. This is equivalent to writing the same coordinate value for each point.

For example, since all the Z values in the first "Surface" object are 0, they can be written in a single line in the surface object definition, instead of writing them individually for each point. The hierarchy of these lines can be seen using the "toglobal" function.

The example shows that the "Group" volume contains the volumes from the outermost to the innermost, including both surface1 and surface2.

In other words, the Z value of surface1 is calculated as 3 + 1 + 10 ( height) + 5 = **Z → 19**, starting from the innermost point. The Z value of surface2 is calculated as 8 + 12 + 10 (height) + 5 = **Z → 35**. ![](https://openbrim.atlassian.net/wiki/download/attachments/2157969505/image-20230201-143850.png?api=v2) To view this example in the library, see (<https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&obj=objidntg1e8ow40d9jdlx6oj3m>)

**Example:**

```xml
<O N="VolumeObject4" T="Project" Category="3D Geometric Objects" TransAlignRule="Right">
    <!-- created by ParamML Examples on 01.02.2023 -->
    <P N="width_1" V="20" />
    <P N="width_2" V="40" />
    <P N="length_1" V="20" />
    <P N="length_2" V="20" />
    <P N="height_1" V="50" />
    <P N="height_2" V="150" />
    <P N="height_3" V="300" />
    <O T="Volume">
        <O N="TSurface1" T="Surface" Z="0">
            <O T="Point" X="-width_1/2" Y="-length_1/2" />
            <O T="Point" X="width_1/2" Y="-length_1/2" />
            <O T="Point" X="width_1/2" Y="length_1/2" />
            <O T="Point" X="-width_1/2" Y="length_1/2" />
        </O>
        <O N="Slice2" T="Surface" Extends="TSurface1" Z="height_1" />
        <O N="TSurface2" T="Surface" Z="height_1">
            <O T="Point" X="-width_2/2" Y="-length_2/2" />
            <O T="Point" X="width_2/2" Y="-length_2/2" />
            <O T="Point" X="width_2/2" Y="length_2/2" />
            <O T="Point" X="-width_2/2" Y="length_2/2" />
        </O>
        <O N="Slice4" T="Surface" Extends="TSurface2" Z="height_2" />
        <O N="Slice5" T="Surface" Extends="TSurface1" Z="height_2" />
        <O N="Slice6" T="Surface" Extends="TSurface1" Z="height_3" />
    </O>
</O>
```

![](https://openbrim.atlassian.net/wiki/download/attachments/2157969505/image-20230201-145354.png?api=v2) To view this example in the library, see (<https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&folder=3D+Geometric+Objects&obj=objidfpstzllu0051ivl56scn3j>)

**Example:**

```xml
<O N="VolumeObject5" T="Project" Category="3D Geometric Objects" TransAlignRule="Right">
    <!-- created by ParamML Examples on 01.02.2023 -->
    <P N="width" V="30" />
    <O N="TSurface1" T="Surface">
        <O T="Point" X="-width/2" Y="-width/2" />
        <O T="Point" X="width/2" Y="-width/2" />
        <O T="Point" X="width/2" Y="width/2" />
        <O T="Point" X="-width/2" Y="width/2" />
    </O>
    <O N="Column3D" T="Volume">
        <P N="step" V="30" />
        <P N="ang1" V="10" />
        <O T="Repeat" S="0" E="10" I="1" CTRL="index" index="0">
            <O N="Slice" T="Surface" Extends="TSurface1" Z="step*index" RZ="ang1*PI/180*index" />
        </O>
    </O>
</O>
```

![](https://openbrim.atlassian.net/wiki/download/attachments/2157969505/image-20230201-150940.png?api=v2) To view this example in the library, see (<https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&obj=objidy57xcqq7vucrpvtj8ujxt>)

**Parameters of Volume Object:**

\| | **Label** | **Mandatory** | **Name and Type Attributes** | **Default Description and Value Attributes** | **Other Attributes** | | --- | --- | --- | --- | --- | | 1 | Draw Face A | No | N="DrawFaceA" | D="Draw Face A?: Should graphics display face A of this volume? \[Yes=1/No=0]" V="1" | Role="Input" | | 2 | Draw Face B | No | N="DrawFaceB" | D="Draw Face B?: Should graphics display face B of this volume? \[Yes=1/No=0]" V="1" | Role="Input" | | 3 | Draw Border | No | N="DrawBorder" | D="Draw Border?: Should graphics display a border along the lines connecting the faces? \[Yes=1/No=0]" V="1" | Role="Input" | | 4 | Draw Border Around Face A | No | N="DrawFaceABorder" | D="Draw Border Around Face A?: Should graphics display a border around face A? \[Yes=1/No=0]" V="1" | Role="Input" | | 5 | Draw Border Around Face B | No | N="DrawFaceBBorder" | D="Draw Border Around Face B?: Should graphics display a border around face B? \[Yes=1/No=0]" V="1" | Role="Input" |


---

# 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/3d-geometric-objects/volume.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.
