Skip to content

Commit b9cddc5

Browse files
GITBOOK text below images.
1 parent a63d0c0 commit b9cddc5

File tree

1 file changed

+17
-27
lines changed

1 file changed

+17
-27
lines changed

gitbook/next-steps/materialization.md

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ If you want to directly run all scripts of this page, you can download them from
1212

1313
## Rhino Script Editor and RhinoVault Session
1414

15-
<figure><img src="../.gitbook/assets/materialization_pattern.gif" alt=""><figcaption></figcaption></figure>
16-
1715
Create a folder where you will store the `rhinovault_session.json` file as well as python example files. Then open Rhino Script Editor. Add a new python file named `000.pattern.py`. Then run the code below that extracts the 2D mesh pattern from the session file.
1816

1917
The session file employs the compas.scene data structure for storing: Pattern, FormDiagram, ThrustDiagram, and ForceDiagram. It also stores general settings for drawing and thrust-network analysis. We will use two attributes: Pattern and ThrustDiagram for mesh transformation into solid blocks. The scene also helps to visualize COMPAS items (geometry & data structures).
2018

2119
The first three comments are specific to Python in Rhino, indicating: a) `python3` specifies the language used, b) the code is written in the `brg-csd` environment, and c) `compas_rv` is a library requirement that must be installable from the Python Package Index (PyPI).
2220

21+
<figure><img src="../.gitbook/assets/materialization_pattern.gif" alt=""><figcaption></figcaption></figure>
2322

2423
```python
2524
#! python3
@@ -156,10 +155,9 @@ scene.draw()
156155

157156
## 2. Remesh
158157

159-
<figure><img src="../.gitbook/assets/materialization_remesh.png" alt=""><figcaption></figcaption></figure>
160-
161158
The thrust mesh is remeshed to achieve a uniform triangulated topology and obtain a 3-valence mesh for the dual. If we were to create a dual mesh from the original quad mesh, the result would be a quad mesh, which is unsuitable for our chosen fabrication method. Three-valence meshes are easier to assemble and may have fewer tolerance issues when multiple blocks meet at the same edge or corner. Originally the mesh was remeshed using CGAL library in Visual Studio Code, but for the purpose of demonstration we are using COMPAS remesh method in Rhino ScripEditor.
162159

160+
<figure><img src="../.gitbook/assets/materialization_remesh.png" alt=""><figcaption></figcaption></figure>
163161

164162
```python
165163
#! python3
@@ -250,10 +248,10 @@ scene.draw()
250248

251249
## 3. Dual
252250

253-
<figure><img src="../.gitbook/assets/materialization_dual.png" alt=""><figcaption></figcaption></figure>
254-
255251
The dual is created from a triangular mesh. Note the boundary faces with an additional 2-valence boundary vertex. This vertex is removed in the next step to achieve cleaner polygonal blocks.
256252

253+
<figure><img src="../.gitbook/assets/materialization_dual.png" alt=""><figcaption></figcaption></figure>
254+
257255
```python
258256
#! python3
259257
# venv: brg-csd
@@ -381,10 +379,9 @@ scene.draw()
381379

382380
## 5. Dual Simplification
383381

384-
<figure><img src="../.gitbook/assets/materialization_dual_simplification.png" alt=""><figcaption></figcaption></figure>
385-
386382
This script processes a dual mesh by identifying and collapsing unnecessary 2-valent boundary edges. It iterates through the boundary vertices, checking if they have exactly two neighbors. If the angle between the two edges is close to 180°, the vertex is removed, merging the edges while ensuring that any "corner" attributes are preserved.
387383

384+
<figure><img src="../.gitbook/assets/materialization_dual_simplification.png" alt=""><figcaption></figcaption></figure>
388385

389386
```python
390387

@@ -454,10 +451,9 @@ scene.draw()
454451

455452
## 6. Dual Boundary Smoothing
456453

457-
<figure><img src="../.gitbook/assets/materialization_boundary_smoothing.png" alt=""><figcaption></figcaption></figure>
458-
459454
This script performs boundary smoothing on a dual mesh. It begins by loading the original (001_mesh.json) and dual (005_mesh.json) meshes. It then identifies corner vertices and segments the boundary into separate borders. For each border, a NURBS curve is generated using interpolation to create a smoother boundary shape. The script then adjusts the positions of boundary vertices by snapping them to the closest points on their respective curves.
460455

456+
<figure><img src="../.gitbook/assets/materialization_boundary_smoothing.png" alt=""><figcaption></figcaption></figure>
461457

462458
```python
463459

@@ -552,10 +548,9 @@ scene.draw()
552548

553549
## 7. Dual Edge Collapse
554550

555-
<figure><img src="../.gitbook/assets/materialization_dual_edge_collapse.png" alt=""><figcaption></figcaption></figure>
556-
557551
This script performs edge collapse operations on a dual mesh to simplify its boundary. It identifies boundary edges that are not connected to corner vertices and checks if they belong to quadrilateral faces. If so, it selects pairs of opposite edges for collapse. The selected edges are collapsed, reducing the number of boundary edges while maintaining the mesh structure.
558552

553+
<figure><img src="../.gitbook/assets/materialization_dual_edge_collapse.png" alt=""><figcaption></figcaption></figure>
559554

560555
```python
561556

@@ -645,10 +640,9 @@ scene.draw()
645640

646641
## 8. Dual Borders
647642

648-
<figure><img src="../.gitbook/assets/materialization_dual_borders.png" alt=""><figcaption></figcaption></figure>
649-
650643
This script processes the borders of a dual mesh by identifying and marking support edges. It detects corner vertices to segment the boundary into smaller borders. If a border has fewer than five vertices, its vertices and edges are marked as "supports." The identified support edges are visualized as green cylinders in the scene.
651644

645+
<figure><img src="../.gitbook/assets/materialization_dual_borders.png" alt=""><figcaption></figcaption></figure>
652646

653647
```python
654648

@@ -735,10 +729,9 @@ scene.draw()
735729

736730
## 9. Dual Thickness Data
737731

738-
<figure><img src="../.gitbook/assets/materialization_dual_thickness_data.png" alt=""><figcaption></figcaption></figure>
739-
740732
This script interpolates and assigns thickness values to a dual mesh using a grid-based method. It starts by loading the original (001_mesh.json) and dual (008_mesh.json) meshes. Key support points and midspan vertices are identified based on height, with predefined thickness values assigned to them. Using SciPy's griddata, thickness values are interpolated for all dual mesh vertices. The updated thickness values are stored in the mesh, and the result is visualized with red spheres representing the assigned thickness at each vertex.
741733

734+
<figure><img src="../.gitbook/assets/materialization_dual_thickness_data.png" alt=""><figcaption></figcaption></figure>
742735

743736
```python
744737

@@ -832,10 +825,9 @@ scene.draw()
832825

833826
## 10. Blocks
834827

835-
<figure><img src="../.gitbook/assets/materialization_blocks.png" alt=""><figcaption></figcaption></figure>
836-
837828
This script generates 3D block representations of a dual mesh by extruding its faces based on thickness values. It iterates through its faces to construct block geometries. For each face, vertex normals and thickness values are used to create bottom and top surfaces, with the top surface adjusted to fit a best-fit plane. The sides of the block are then generated to enclose the volume. Support attributes are assigned to relevant faces, and top and bottom frames are computed for each block. The blocks are visualized with color-coded support faces and frame markers.
838829

830+
<figure><img src="../.gitbook/assets/materialization_blocks.png" alt=""><figcaption></figcaption></figure>
839831

840832
```python
841833

@@ -938,10 +930,9 @@ scene.draw()
938930

939931
## 11. Chamfer
940932

941-
<figure><img src="../.gitbook/assets/materialization_chamfer.png" alt=""><figcaption></figcaption></figure>
942-
943933
This script applies chamfering to the edges of a dual mesh to refine its geometry. It iterates through internal vertices, identifying neighboring edges and checking their angles. If the angle between adjacent edges is below a set threshold (145°), a chamfering operation is applied using a cutting plane offset by 2 units. The modified blocks replace the original ones. The final result is visualized, displaying the adjusted blocks.
944934

935+
<figure><img src="../.gitbook/assets/materialization_chamfer.png" alt=""><figcaption></figcaption></figure>
945936

946937
```python
947938

@@ -1022,13 +1013,12 @@ scene.draw()
10221013

10231014
```
10241015

1025-
10261016
## 12. Shear Keys
10271017

1028-
<figure><img src="../.gitbook/assets/materialization_shear_keys.png" alt=""><figcaption></figcaption></figure>
1029-
10301018
This script modifies a dual mesh by adding spherical joinery at edge intersections between adjacent blocks. It first converts each face block into a Brep for more stable Boolean operations. Then, for each edge shared by two faces, it creates two spheres along the edge at 30% and 70% of its length. The first set of spheres (2.5 radius) is subtracted from one block, while a slightly smaller set (2.3 radius) is added to the other, forming a complementary joinery system. Finally, the updated blocks are visualized along with the dual mesh.
10311019

1020+
<figure><img src="../.gitbook/assets/materialization_shear_keys.png" alt=""><figcaption></figcaption></figure>
1021+
10321022
```python
10331023

10341024
#! python3
@@ -1102,10 +1092,10 @@ scene.draw()
11021092

11031093
## 13. Index and Packing
11041094

1105-
<figure><img src="../.gitbook/assets/materialization_index_and_packing.png" alt=""><figcaption></figcaption></figure>
1106-
11071095
This script generates 3D index labels for each block, displaying their positions directly in Rhino. Additionally, it packs the blocks into a grid layout, making them easier to visualize, organize, and manufacture. The result is a structured, fabrication-ready representation of the geometry. The joinery is regenerated in this script because serialization to a JSON file is not currently supported for BRep—only the STEP format allows it.
11081096

1097+
<figure><img src="../.gitbook/assets/materialization_index_and_packing.png" alt=""><figcaption></figcaption></figure>
1098+
11091099
```python
11101100

11111101
#! python3
@@ -1276,10 +1266,10 @@ scene.draw()
12761266

12771267
## 14. Scaffolding Mesh
12781268

1279-
<figure><img src="../.gitbook/assets/materialization_scaffolding_mesh.png" alt=""><figcaption></figcaption></figure>
1280-
12811269
This script demonstrates how to extract the bottom mesh using the mesh vertex thickness attribute. The extracted bottom mesh can then be used to generate scaffolding for assembling the structure.
12821270

1271+
<figure><img src="../.gitbook/assets/materialization_scaffolding_mesh.png" alt=""><figcaption></figcaption></figure>
1272+
12831273
```python
12841274

12851275
#! python3

0 commit comments

Comments
 (0)