# Getting started mesh viewer

**URL:** <https://forum.compas-framework.org/t/getting-started-mesh-viewer/398>\
**Category:** getting started\
**Created:** [November 12, 2020, 1:14am UTC](https://forum.compas-framework.org/t/getting-started-mesh-viewer/398 "2020-11-12T01:14:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![twisteddog99](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@twisteddog99](https://forum.compas-framework.org/u/twisteddog99)\
**Post date:** [November 12, 2020, 1:14am UTC](https://forum.compas-framework.org/t/getting-started-mesh-viewer/398/1 "2020-11-12T01:14:51Z")

</div>

Hey guys,  
I’m trying to wrap my head around the mesh data structure as well as the compas\_rhino faces conduit to make a little script that allows me to select a rhino mesh, and then have it displayed for a few seconds by the faces conduit.  
Here is my code:

```auto
import compas_rhino
from compas_rhino.geometry import RhinoMesh
from compas_rhino.conduits import FacesConduit
guid = compas_rhino.select_mesh()
mesh = RhinoMesh.from_guid(guid).to_compas()

def meshToConduit(mesh):
    polygons = []
    faces = [list(mesh.vertices())]
    vertices = mesh.vertices_attributes('xyz',keys=None)
    return FacesConduit(vertices,faces,(100,100,100))

conduit = meshToConduit(mesh)

with conduit.enabled():
    for i in range(0,1000):
        conduit.redraw()

```

The mesh appears, but has holes and faces seem to be angled inwards in places. I can tell the order of something is not right, but am super confused about faces/vertices and their indices within the FacesConduit().  
If anyone could give a hand that would be great.  
cheers  
T

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [November 17, 2020, 12:40pm UTC](https://forum.compas-framework.org/t/getting-started-mesh-viewer/398/2 "2020-11-17T12:40:33Z")

</div>

there might be other things wrong, but most certainly the face information is wrong. try something like

```python
vertices, faces = mesh.to_vertices_and_faces()

```
