u_no_constraint = cp.solve(u0 + 1e-6) cp.eqcons["cl"] = cl u_constant_length = cp.solve(u0 + 1e-4) # 3 delete the constant length del cp.eqcons["cl"] connectivity = [(vertex, neighbors) for vertex, neighbors in zip(cp.interior_vertices, cp.cycled_neighbors.T)] print "connectivity", connectivity uf = EqConsDevelopability(cp, connectivity=connectivity) cp.eqcons["uf"] = uf # the derivatives are not correct cp.use_G_du = False u_unfoldable = cp.solve(u0 + 1e-6, acc=1e-4) # =========================================================================== # Unfolding # =========================================================================== # new_nodes = cp.get_new_nodes(u_unfoldable) cp2 = CreasePattern( nodes=new_nodes, crease_lines=cp.crease_lines, facets=cp.facets, n_steps=1, show_iter=True, z0_ratio=0.1, time_arr=np.linspace(1, 0, 10),