# Extracting point coordinates using triangular patches

**URL:** <https://community.materialise.com/t/extracting-point-coordinates-using-triangular-patches/2195>\
**Category:** MIS - Scripting Forum\
**Created:** [September 22, 2026, 2:48am UTC](https://community.materialise.com/t/extracting-point-coordinates-using-triangular-patches/2195 "2026-09-22T02:48:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ximo](https://avatars.discourse-cdn.com/v4/letter/x/57b2e6/32.png) [@ximo](https://community.materialise.com/u/ximo)\
**Post date:** [September 22, 2026, 2:48am UTC](https://community.materialise.com/t/extracting-point-coordinates-using-triangular-patches/2195/1 "2026-09-22T02:48:24Z")

</div>

Now I have used the “wave” command in 3-matic to select the triangular faces in the acetabular area. Now I want to extract the point coordinates of the point cloud using the selected triangular faces. So, does 3-matic have these commands, or are there any script commands that can help me achieve this function? Please note that I don’t want to use the “point” command. Instead, I want to do it by manually selecting points. **strong text**

---

<div class="post-metadata">

**Author:** ![zack\_struczewski](https://avatars.discourse-cdn.com/v4/letter/z/b4bc9f/32.png) [@zack\_struczewski](https://community.materialise.com/u/zack_struczewski)\
**Post date:** [September 30, 2026, 3:29pm UTC](https://community.materialise.com/t/extracting-point-coordinates-using-triangular-patches/2195/2 "2026-09-30T15:29:38Z")

</div>

Hi! You can use the “.get\_triangles” function of the “marked\_triangles” object to retrieve the coordinates of each triangle. Let me know if this is what you are looking for!

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/materialiseacademy/original/1X/9f97f20f7d9ba5b7ba88ed3d05e0f2af90dece58.png)

---

<div class="post-metadata">

**Author:** ![manniblaq](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.materialise.com/manniblaq/32/146_2.png) [@manniblaq](https://community.materialise.com/u/manniblaq)\
**Post date:** [October 1, 2026, 2:20am UTC](https://community.materialise.com/t/extracting-point-coordinates-using-triangular-patches/2195/3 "2026-10-01T02:20:55Z")

</div>

_Try this:_

```python
import trimatic

all_parts = trimatic.find_parts(regex=".\*")

for part in all_parts:
if getattr(part, "number_of_marked_triangles", 0) <= 0:
continue

sel = part.get_marked_triangles()

if not sel:
    continue

points, triangles = sel.get_triangles()

i = 1

for triangle in triangles:
    p1 = points[triangle[0]]
    p2 = points[triangle[1]]
    p3 = points[triangle[2]]

    print("Triangle {}: [{}, {}, {}]".format(i, p1, p2, p3))
    print()

    i += 1

```
