> For the complete documentation index, see [llms.txt](https://docs.robpod.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.robpod.cloud/hmi-designer/working-examples/universal-robots/polishing-example.md).

# Polishing Example

**HMI Panel File**

<figure><img src="/files/VbSMRnQlAAAMyr46ap9y" alt=""><figcaption></figcaption></figure>

{% file src="/files/mtRCZeskONXPkp9UBTpD" %}

**Robot Program File**

```python
# variables
global step = 100
global radius = 30

# positions (can be defined also as installation variables to store their value)
global pa = p[0, 0, 0, 0, 0, 0]
global pb = p[0, 0, 0, 0, 0, 0]
global pc = p[0, 0, 0, 0, 0, 0]
global pd = p[0, 0, 0, 0, 0, 0]

# functions
def polish():
    d_ab = point_dist(pa, pb)

    repetitions = floor(d_ab / (step/1000))
    percentage_ab = (step/1000) / d_ab
    percentage_cd = 1 / repetitions

    i = 0
    while i < repetitions:
        p1 = interpolate_pose(pa, pb, i * percentage_ab)
        movel(p1, a=0.1, v=0.2, r=radius/1000)

        p2 = interpolate_pose(pc, pd, i * percentage_cd)
        movel(p2, a=0.1, v=0.2, r=radius/1000)

        p3 = interpolate_pose(pc, pd, (i + 1) * percentage_cd)
        movel(p3, a=0.1, v=0.2, r=radius/1000)

        p4 = interpolate_pose(pa, pb, (i + 1) * percentage_ab)
        movel(p4, a=0.1, v=0.2, r=radius/1000)

        i = i + 2

    end
end
```

{% file src="/files/88S0raYdfvxM72sj3h6C" %}
