7. Modify Diagram

Now we are going to modify the ForceDiagram so we will achieve the crease in the design.

Here we move the force vertices along the y-direction, so that the edge where we want the crease to show up has bigger axial forces. As long as the diagram is modified, horizontal and vertical equilibrium need to be re-calculated.

# ==============================================================================
# Modify Force Diagram
# ==============================================================================
force_y_min = min(set(force.vertices_attribute('y')))
force_y_max = max(set(force.vertices_attribute('y')))
for vkey in force.vertices():
    y = force.vertex_attribute(vkey, 'y')
    if y >= (force_y_min + force_y_max) / 2:
        force.vertex_attribute(vkey, 'y', y + 5.5)
        
# ==============================================================================
#  Recalculate Horizontal and Vertical Equilibrium
# ==============================================================================
proxy.package = 'compas_tna.equilibrium'
formdata, forcedata = proxy.horizontal_numpy_proxy(formdata, force.to_data(), kmax=kmax, alpha=alpha)
form = FormDiagram.from_data(formdata)
force = ForceDiagram.from_data(forcedata)

thrustdata, scale = proxy.vertical_from_zmax_proxy(formdata, zmax=zmax, kmax=kmax)
thrust = ThrustDiagram.from_data(thrustdata)

Congratulations! You have finished all the steps of this tutorial session. You can also try different parameters to control the vault you want to achieve.

Last updated