Lesson 5 - Meshes#

Tags: Meshes, Patterns, Rendering

Authors: Anne van den Dool
Last Edited: 14/02/2024
Edited by: Dieter van Dortmont

๐Ÿ‘ฉโ€๐Ÿซ 5.1 Introduction (5 min)#


๐Ÿ“‘๐Ÿ–ฑ๏ธ5.2 Mesh geometry (5 min)#

๐Ÿ“Œ What: Explanation mesh geometry (reading) and exploration of mesh tools in Rhino (exercise)

๐Ÿ™‹ For Whom: Intermediate in Rhino/Grasshopper

โŒ› Time: 10 minutes

5.2.1 ๐Ÿ“‘Mesh vs. Surface geometry#

A mesh is a type of geometry that consists of points and faces. It can be used for similar purposes as a Brep geometry, but works in a fundamentally different way. A Brep datatype is a mathematical representation of the object, while a mesh datatype only is a collection of points and its connectivity data. In the image below you can see a comparison between a NURB surface and a mesh. When changing the control point on a curved surface, the surface is recalculated and remains smooth. When you change a point in a mesh, this only affects the face that are directly connected to that point.

5.2.1a_SurfacevsMesh.gif

The points in a mesh are called vertices and the surfaces that are created by connecting these points are called faces. Each mesh face also has a normal direction. If a mesh is a closed shape, it is considered a solid object and all the normals will point outwards.

5.2.1b_MeshGeometry.png

Meshes take less computational power to visualize, but since meshes only consist of points and faces, curved shapes will never look completely smooth. The higher the resolution of your mesh, the higher the amount of faces and the smoother it will look. You can export meshes from Rhino as STL or OBJ file for digital fabrication.

5.2.1c_MeshResolution.png

5.2.2 ๐Ÿ“‘Mesh structure#

There are two common types of meshes: triangle meshes and quad meshes. As the names suggest, a triangle mesh is a mesh with triangular faces (connecting 3 vertices) and a quad mesh is a mesh with rectangular faces (connecting 4 vertices). A combination of triangle faces and quad faces in a mesh is also possible.

5.2.2a_MeshTypes.png

Imagine you want to create a triangle mesh based on 5 points. As you can see in the animation below, there are many ways to connect these points in to faces. In Grasshopper, you can describe a triangle face with the index numbers of the vertices that are connected by the face. For example, a face that connects point 0, 1 and 2 would be describes as T{0;1;2}. The T stands for triangle face. In a similar way, you can describe a quad face with four numbers, for example Q{0;1;2;3}. In tutorial 5.3 we will further explore how to build a mesh by connecting a collection of points.

5.2.2b_MeshFaces.gif

5.2.2c_GrasshopperMeshGeometry.png

5.2.3 ๐Ÿ–ฑ๏ธMesh tools in Rhino#

๐Ÿ–ฑ๏ธ Exercise

Mesh files like 3D scans often need some repairing or editing. You can use specialized software like Meshmixer, but you can also find some mesh tools in Rhino.

๐Ÿ–ฑ๏ธOpen Rhino and go to the [Mesh Tools] menu. Experiment with the toolbar on the left to create some basic mesh shapes. You can combine shapes by using Mesh Boolean commands, for example by typing in [MeshBooleanUnion] or [MeshBooleanDifference]. You can also select these tools from the mesh toolbar.

๐Ÿ–ฑ๏ธCreate a flat surface and position it through your mesh shape. Select the surface and use [MeshTrim] to remove a part of your mesh. This can be very useful when you are working with a large scan and you only want to work with a certain part. You can use the command [Cap] to close your mesh, but this will only work if the gap in the mesh is planar.

๐Ÿ–ฑ๏ธUse the [PointsOn] command to visualize and manipulate individual points on you mesh. You can select them and use the gumball to move them around. Use the [PointsOff] command to switch the points off again.

๐Ÿ–ฑ๏ธOnce you have created an interesting shape, select it and use the [ReduceMesh] command to change the resolution of the mesh. You can specify how many face you would like your mesh to have, or specify a percentage to reduce by.

๐Ÿ–ฑ๏ธSelect your mesh and run the [MeshRepair] command. In the pop-up window, select Check Mesh. You will now receive a analysis of your mesh. If your mesh has issues, like open edges (naked edges) you can try to repair them with this tool. Click on Repair Mesh to automatically repair, or click on Next to select which issues you want to repair. If you want to use your mesh for digital production, you need to make sure your mesh is a valid closed mesh.

Gitlab

๐Ÿ“บ 5.3 Building a custom mesh (25 min)#

๐Ÿ“Œ What: Understanding mesh geometry (tutorial)

๐Ÿ™‹ For Whom: Intermediate in Rhino/Grasshopper

โŒ› Time: 25 minutes

๐Ÿ“บ Tutorial
Download starting file and material file here
๐Ÿ“Ž During the tutorial we will create a custom mesh, using a list of faces. You can type them out, or copy the list below into your grasshopper definition.
0;1;3
1;2;5
1;5;4
1;4;3
3;7;6
3;4;7
4;5;7
5;8;7
๐Ÿ’กTip: Switching files

If you already have Rhino and Grasshopper open and you want to open another Grasshopper file, like the render materials, simply drag and drop the GH file into Rhino. You can switch between Grasshopper files by clicking on the file name in the top right corner.

Gitlab


๐Ÿ“บ 5.4 Morphing (30 min)#

๐Ÿ“Œ What:Building mesh patterns and morphing onto a surface (tutorial)

๐Ÿ™‹ For Whom: Intermediate in Rhino/Grasshopper

โŒ› Time: 30 minutes

๐Ÿ–ฑ๏ธ Exercise

Plugins mentioned in the video:
Weaverbird Plugin
Grasshopper Docs


๐Ÿ’ป 5.5 Assignment lesson 5 (max 2 hours)#

๐Ÿ’ป Assignment
Gitlab
๐Ÿ’ป Model a glass with a pattern on part of it. Use the Box Morph component in Grasshopper to morph the pattern onto your product. You can choose if you want to model the glass fully in Grasshopper, or use Rhino for part of the process. The pattern can be any shape you like. Use custom materials to create a nice render of your final product.