# Use the calculation result increasing the thickness

**URL:** <https://forum.compas-framework.org/t/use-the-calculation-result-increasing-the-thickness/533>\
**Category:** RhinoVAULT\
**Created:** [November 24, 2021, 4:56am UTC](https://forum.compas-framework.org/t/use-the-calculation-result-increasing-the-thickness/533 "2021-11-24T04:56:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wilden94](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/wilden94/32/319_2.png) [@Wilden94](https://forum.compas-framework.org/u/Wilden94)\
**Post date:** [November 24, 2021, 4:56am UTC](https://forum.compas-framework.org/t/use-the-calculation-result-increasing-the-thickness/533/1 "2021-11-24T04:56:45Z")

</div>

Hi I’m learning to use RhinoVault2 and Python,  
I have a question RhinoVault1 has Python syntax that can use the calculation results to increase the thickness,  
But the Website Tutorial Seems to be closer to a direct offset,  
I want to know Did RhinoVault2 Python has the same syntax?

---

<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 26, 2021, 7:52am UTC](https://forum.compas-framework.org/t/use-the-calculation-result-increasing-the-thickness/533/2 "2021-11-26T07:52:34Z")

</div>

hi,

could you provide a short code snippet outlining what you are trying to accomplish?

is this the tutorial you are referring to?

> **[Materialisation](https://blockresearchgroup.gitbook.io/rv2/examples-design/advanced-accessing-data)**

tom

---

<div class="post-metadata">

**Author:** ![Wilden94](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/wilden94/32/319_2.png) [@Wilden94](https://forum.compas-framework.org/u/Wilden94)\
**Post date:** [November 26, 2021, 8:27am UTC](https://forum.compas-framework.org/t/use-the-calculation-result-increasing-the-thickness/533/3 "2021-11-26T08:27:07Z")

</div>

Hi,thanks for your reply  
I learned Rhino Vault1 about a year ago,I watched this video: [#09 Tutorial for RhinoVAULT – Basic Scripting and Grasshopper from Block Research Group on Vimeo](https://player.vimeo.com/video/85180679)  
and trying to complete the modeling . Each blocks has a difference in thickness .  
I am currently writing a paper on digital manufacturing.  
Mainly research geometry and manufacturing process.  
I want to understand the difference between the two in the calculation results  
I want to know this RV2 " Materialisation’’ tutorial the difference between RV1 and RV2 ?  
I think the RV2 tutorial seems to be closer to a direct Normal offset .  
Sorry i’m a Taiwanese student.My English is not very good, hope you can understand what I mean .

---

<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 26, 2021, 9:29am UTC](https://forum.compas-framework.org/t/use-the-calculation-result-increasing-the-thickness/533/4 "2021-11-26T09:29:54Z")

</div>

hi,

yes, in the example it is indeed a constant offset, because we first do the offset of the entire surface (with a constant value) and then “cut” this into blocks.

you could also compute individual offsets and then cut into blocks using those values to accomplish what i think you are after…

something like this  
(i just wrote something here, so you might have to debug a bit…)

```python
import random
from collections import defaultdict
from compas.geometry import Point, Vector

# other imports
# and all the usual stuff for loading the mesh data

# ...

# keep track of the offset per vertex for ever face connected to that vertex
vertex_face_offset = defaultdict(dict)

# compute the offset of each face at each vertex
# every face/block has a different offset
# i use a random value here
# but you could compute something more meaningful based on the forces in the diagram
for vertex in mesh.vertices():
    for face in mesh.vertex_faces(vertex):
        vertex_face_offset[vertex][face] = 0.1 * random.random()

# make blocks
blocks = []
for face in mesh.faces():
    bottom = []
    top = []
    
    for vertex in mesh.face_vertices(face):
        point = Point(* mesh.vertex_coordinates(vertex))
        normal = Vector(* mesh.vertex_normal(vertex))
        offset = vertex_face_offset[vertex][face]

        bottom.append(point - normal * 0.5 * offset)
        top.append(point + normal * 0.5 * offset)   

    vertices = top + bottom

    f = len(top)
    faces = []
    for i in range(len(a) - 1):
        faces.append([i, i + 1, i + 1 + f, i + f]) # the side faces
    faces.append([f - 1, 0, f, 2 * f - 1]) # the closing side face
    faces.append(list(range(f))) # the top face
    faces.append(list(range(2 * f - 1, f - 1, -1))) # the bottom face
    
    block = Mesh.from_vertices_and_faces(vertices, faces)
    blocks.append(block)
 

```

---

<div class="post-metadata">

**Author:** ![Wilden94](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/wilden94/32/319_2.png) [@Wilden94](https://forum.compas-framework.org/u/Wilden94)\
**Post date:** [December 13, 2021, 8:05am UTC](https://forum.compas-framework.org/t/use-the-calculation-result-increasing-the-thickness/533/5 "2021-12-13T08:05:52Z")

</div>

Hi! Sorry to reply to your message late,and thank you for your reply, this forum makes my study very heartwarming, I will try to use this, thank you
