def test_close_already_closed(caplog):

    dsets = hdf5.load_datasets(Path(stores_dir) / "with_4sided_cell.hf5")
    mono = Monolayer("4", dsets)
    cell = mono.cell_df.query("num_faces != 4").index[0]
    close_cell(mono, cell)
    assert caplog.record_tuples[-1][2] == "cell %s is already closed" % cell
Beispiel #2
0
def test_compute_gradient():
    h5store = os.path.join(stores_dir, "small_hexagonal.hf5")
    datasets = load_datasets(h5store, data_names=["face", "vert", "edge"])
    specs = config.geometry.cylindrical_sheet()

    sheet = Sheet("emin", datasets, specs)
    nondim_specs = config.dynamics.quasistatic_sheet_spec()
    dim_model_specs = model.dimensionalize(nondim_specs)
    sheet.update_specs(dim_model_specs)

    geom.update_all(sheet)

    sheet.edge_df["is_active"] = sheet.upcast_srce("is_active") * sheet.upcast_face(
        "is_alive"
    )

    nrj_norm_factor = sheet.specs["settings"]["nrj_norm_factor"]
    print("Norm factor: ", nrj_norm_factor)
    ((grad_t, _), (grad_c, _), (grad_v_srce, grad_v_trgt)) = model.compute_gradient(
        sheet, components=True
    )
    grad_t_norm = np.linalg.norm(grad_t, axis=0).sum() / nrj_norm_factor
    assert_almost_equal(grad_t_norm, 0.22486850242320636, decimal=DECIMAL)

    grad_c_norm = np.linalg.norm(grad_c, axis=0).sum() / nrj_norm_factor
    assert_almost_equal(grad_c_norm, 0.49692791, decimal=DECIMAL)

    grad_vs_norm = np.linalg.norm(grad_v_srce.dropna(), axis=0).sum() / nrj_norm_factor
    assert_almost_equal(grad_vs_norm, 0.30281367249952407, decimal=DECIMAL)

    grad_vt_norm = np.linalg.norm(grad_v_trgt.dropna(), axis=0).sum() / nrj_norm_factor
    assert_almost_equal(grad_vt_norm, 0.27732035134768285, decimal=DECIMAL)
def test_solver():

    h5store = os.path.join(stores_dir, "small_hexagonal.hf5")
    datasets = load_datasets(h5store, data_names=["face", "vert", "edge"])
    specs = config.geometry.cylindrical_sheet()

    sheet = Sheet("emin", datasets, specs)
    nondim_specs = config.dynamics.quasistatic_sheet_spec()
    dim_model_specs = model.dimensionalize(nondim_specs)

    sheet.update_specs(dim_model_specs)
    # sheet.vert_df.is_active = 1
    # grad_err = solver.check_grad(sheet, geom, model)
    # grad_err /= sheet.vert_df.size
    # assert_almost_equal(grad_err, 0.0, DECIMAL)

    settings = {
        "minimize": {
            "options": {
                "disp": False,
                "ftol": 1e-4,
                "gtol": 1e-4
            }
        }
    }

    res = solver.find_energy_min(sheet, geom, model, **settings)
    assert res["success"]

    new_solver = QSSolver(with_collisions=True, with_t1=True, with_t3=True)
    res = new_solver.find_energy_min(sheet, geom, model,
                                     **settings["minimize"])
    assert res["success"]
Beispiel #4
0
def test_execute_constriction():
    h5store = os.path.join(stores_dir, "small_hexagonal.hf5")
    datasets = load_datasets(h5store, data_names=["face", "vert", "edge"])
    specs = config.geometry.cylindrical_sheet()
    sheet = Sheet("emin", datasets, specs)
    geom.update_all(sheet)
    sheet.settings["constriction"] = {
        "contractile_increase": 5,
        "critical_area": 5,
        "max_traction": 10,
    }
    sheet.face_df["id"] = sheet.face_df.index.values
    init_nb_cells = len(sheet.face_df)

    sheet.face_df["is_mesoderm"] = 0
    sheet.vert_df["radial_tension"] = 0
    manager = EventManager("face")
    face_id = 17
    sheet.face_df.loc[face_id, "is_mesoderm"] = 1

    sheet.settings["constriction"].update({"face_id": face_id})
    initial_cell_event = (constriction, sheet.settings["constriction"])
    manager.current.append(initial_cell_event)
    manager.execute(sheet)
    manager.update()
    assert len(manager.current) > 0

    for i in range(20):
        manager.execute(sheet)
        manager.update()
    if len(sheet.face_df) == init_nb_cells:
        assert len(manager.current) > 0
def test_execute_constriction():
    h5store = os.path.join(stores_dir, 'small_hexagonal.hf5')
    datasets = load_datasets(h5store, data_names=['face', 'vert', 'edge'])
    specs = config.geometry.cylindrical_sheet()
    sheet = Sheet('emin', datasets, specs)
    geom.update_all(sheet)
    sheet.settings['constriction'] = {
        'contractile_increase': 5,
        'critical_area': 5,
        'max_traction': 10
    }
    sheet.face_df['id'] = sheet.face_df.index.values
    init_nb_cells = len(sheet.face_df)

    sheet.face_df['is_mesoderm'] = 0
    sheet.vert_df['radial_tension'] = 0
    manager = EventManager('face')
    face_id = 17
    sheet.face_df.loc[face_id, 'is_mesoderm'] = 1

    sheet.settings['constriction'].update({'face_id': face_id})
    initial_cell_event = (constriction, sheet.settings['constriction'])
    manager.current.append(initial_cell_event)
    manager.execute(sheet)
    manager.update()
    assert len(manager.current) > 0

    for i in range(20):
        manager.execute(sheet)
        manager.update()
    if len(sheet.face_df) == init_nb_cells:
        assert len(manager.current) > 0
def single_sim(args):
    l, g, dirname, nb_dir = args
    print('Parsing' + dirname, nb_dir)

    data_file = os.path.join(nb_dir, '../data/hf5/before_apoptosis.hf5')
    datasets = hdf5.load_datasets(data_file)
    with open(os.path.join(nb_dir, 'specs.json'), 'r') as sp_file:
        specs = json.load(sp_file)
    sheet2 = Sheet('fold', datasets, specs)
    res = solver.find_energy_min(sheet2, geom, model, **min_settings)
    print('starting {}'.format(dirname))
    try:
        os.mkdir(dirname)
    except IOError:
        pass
    settings = {
        'shrink_steps': 10,
        'rad_tension': l,
        'contractile_increase': g,
        'contract_span': 3
    }
    apopto_cells = get_apopto_cells(sheet2)
    sheet2.settings['apoptosis'] = settings
    run_sim(sheet2, apopto_cells, geom, model, dirname)

    print('{} done'.format(dirname))
    print('~~~~~~~~~~~~~~~~~~~~~\n')
    return args
Beispiel #7
0
def test_close_cell():
    dsets = hdf5.load_datasets(Path(stores_dir) / "with_4sided_cell.hf5")
    mono = Monolayer("4", dsets)
    cell = mono.cell_df.query("num_faces != 4").index[0]
    Nfi = mono.cell_df.loc[cell, "num_faces"]
    Nei = mono.Ne
    edges = mono.edge_df.query(f"cell == {cell}")
    face = edges["face"].iloc[0]
    face_edges = edges.query(f"face == {face}").index
    Nsi = len(face_edges)
    mono.face_df.drop(face, axis=0, inplace=True)
    mono.edge_df.drop(face_edges, axis=0, inplace=True)
    mono.reset_index()
    mono.reset_topo()

    assert mono.cell_df.loc[cell, "num_faces"] == Nfi - 1
    assert mono.Ne == Nei - Nsi

    res = close_cell(mono, cell)
    MonolayerGeometry.update_all(mono)
    mono.reset_index()
    mono.reset_topo()
    assert not res
    assert mono.validate()
    assert mono.cell_df.loc[cell, "num_faces"] == Nfi
    assert mono.Ne == Nei
Beispiel #8
0
def initiate_ellipsoid(dataset_path, json_path):
    """
    Create ellipsoid tissue as a sheet with mesodermal cells

    dataset_path: initial hf45 file
    json_path: json spec file
    """
    dsets = hdf5.load_datasets(dataset_path,
                               data_names=['vert', 'edge', 'face'])

    with open(json_path, 'r+') as fp:
        specs = json.load(fp)

    sheet = Sheet('ellipse', dsets, specs)

    # Modify some initial value
    sheet.settings['threshold_length'] = 1e-3
    sheet.settings['vitelline_space'] = 0.2
    sheet.vert_df['radial_tension'] = 0.
    sheet.settings['lumen_prefered_vol'] = 4539601.384437251
    sheet.settings['lumen_vol_elasticity'] = 3.e-6
    sheet.edge_df.cell = np.nan

    # Define mesoderm and relaxating cells
    define_mesoderm(sheet, 145, 40)
    define_relaxation_cells(sheet, 140, 33, 145, 40)

    return sheet
Beispiel #9
0
def test_rod_update_height():

    pth = os.path.join(stores_dir, "rod_sheet.hf5")
    datasets = load_datasets(pth)
    specs = config.geometry.rod_sheet()
    sheet = Sheet("rod", datasets, specs)
    SheetGeometry.update_all(sheet)

    assert (sheet.vert_df.rho.mean() - 0.96074585429756632)**2 < TOLERANCE
Beispiel #10
0
def test_rod_update_height():

    pth = os.path.join(CURRENT_DIR, '../../stores/rod_sheet.hf5')
    datasets = load_datasets(pth)
    specs = config.geometry.rod_sheet()
    sheet = Sheet('rod', datasets, specs)
    SheetGeometry.update_all(sheet)

    assert (sheet.vert_df.rho.mean() - 0.7895479495559642)**2 < TOLERANCE
Beispiel #11
0
def test_t1_transition():

    h5store = os.path.join(stores_dir, "small_hexagonal.hf5")
    datasets = load_datasets(h5store, data_names=["face", "vert", "edge"])
    specs = cylindrical_sheet()
    sheet = Sheet("emin", datasets, specs)
    geom.update_all(sheet)
    face = sheet.edge_df.loc[84, "face"]
    type1_transition(sheet, 84)
    assert sheet.edge_df.loc[84, "face"] != face
Beispiel #12
0
def main():

    # --------- Chargement d'un fichier HDF5 --------- #
    dsets = hdf5.load_datasets("data/with_collisions.hf5",
                               data_names=["vert", "edge", "face"])

    specs = config.geometry.cylindrical_sheet()
    sheet = Sheet("ellipse", dsets, specs)
    SheetGeometry.update_all(sheet)
    list_intersected_facesolve_intersection(sheet)
def test_fix_pinch():
    dsets = hdf5.load_datasets(Path(stores_dir) / "with_pinch.hf5")
    pinched = Monolayer("pinched", dsets)
    assert not pinched.validate()
    fix_pinch(pinched)
    assert pinched.validate()
    edf = pinched.edge_df[["srce", "trgt", "face", "cell"]].copy()
    # Nothing happens here
    fix_pinch(pinched)
    assert pinched.validate()
    assert np.all(pinched.edge_df[["srce", "trgt", "face", "cell"]] == edf)
Beispiel #14
0
def test_execute_apoptosis():
    h5store = os.path.join(stores_dir, "small_hexagonal.hf5")
    datasets = load_datasets(h5store, data_names=["face", "vert", "edge"])
    specs = config.geometry.cylindrical_sheet()
    sheet = Sheet("emin", datasets, specs)
    geom.update_all(sheet)
    sheet.settings["apoptosis"] = {
        "contractile_increase": 2.0,
        "critical_area": 0.1
    }
    sheet.face_df["id"] = sheet.face_df.index.values
    init_nb_faces = len(sheet.face_df)
    manager = EventManager("face")
    face_id = 17
    face_area = sheet.face_df.loc[face_id, "area"]
    initial_nbsides = sheet.face_df.loc[face_id, "num_sides"]

    sheet.settings["apoptosis"].update({"face_id": face_id})
    initial_cell_event = (apoptosis, sheet.settings["apoptosis"])

    manager.current.append(initial_cell_event)
    manager.execute(sheet)
    manager.update()
    assert len(manager.current) > 0
    manager.execute(sheet)
    manager.update()

    sheet.settings["apoptosis"] = {
        "contractile_increase": 2.0,
        "critical_area": 2 * face_area,
    }
    manager.current.clear()
    sheet.settings["apoptosis"].update({"face_id": face_id})
    modified_cell_event = (apoptosis, sheet.settings["apoptosis"])

    manager.current.append(modified_cell_event)
    manager.execute(sheet)
    manager.update()
    next_nbsides = sheet.face_df.loc[sheet.idx_lookup(face_id, "face"),
                                     "num_sides"]
    i = 1
    while next_nbsides > 4:
        assert next_nbsides == initial_nbsides - i
        assert len(manager.current) > 0
        i = i + 1
        manager.execute(sheet)
        manager.update()
        next_nbsides = sheet.face_df.loc[sheet.idx_lookup(face_id, "face"),
                                         "num_sides"]
        if i > 20:
            raise RecursionError
    manager.execute(sheet)
    manager.update()
    assert len(sheet.face_df) < init_nb_faces
Beispiel #15
0
def test_get_phis():
    pth = os.path.join(stores_dir, "rod_sheet.hf5")
    datasets = load_datasets(pth)
    specs = config.geometry.rod_sheet()
    sheet = Sheet("rod", datasets, specs)
    SheetGeometry.update_all(sheet)
    sheet.edge_df["sphi"] = SheetGeometry.get_phis(sheet)

    assert np.all(
        sheet.edge_df.sort_values(["face", "sphi"]).groupby("face").apply(
            lambda df: np.roll(df["trgt"], 1) == df["srce"]))
Beispiel #16
0
def test_model():

    h5store = os.path.join(stores_dir, "small_hexagonal.hf5")
    datasets = load_datasets(h5store, data_names=["face", "vert", "edge"])
    specs = config.geometry.cylindrical_sheet()
    sheet = Sheet("emin", datasets, specs)
    model_tester(sheet, model)
    model_tester(sheet, PlanarModel)
    flat = Sheet.planar_sheet_2d("flat", 5, 5, 1, 1)
    flat.sanitize()
    PlanarGeometry.update_all(flat)
    model_tester(flat, PlanarModel)
def test_detection():
    sheet = Sheet("crossed",
                  hdf5.load_datasets(Path(stores_dir) / "sheet6x5.hf5"))
    sheet.vert_df.z = 5 * sheet.vert_df.x**2
    # sheet.vert_df[sheet.coords] += np.random.normal(scale=0.001, size=(sheet.Nv, 3))
    SheetGeometry.update_all(sheet)

    sheet.vert_df.x -= 35 * (sheet.vert_df.x / 2)**3
    SheetGeometry.update_all(sheet)
    colliding_edges = set(collisions.self_intersections(sheet).flatten())
    expected = {32, 1, 34, 9, 35}
    assert colliding_edges == expected
Beispiel #18
0
def get_ventral_patch(fname):

    sim_dsets = hdf5.load_datasets(fname)
    sheet = Sheet('morph', sim_dsets, config.geometry.flat_sheet())
    to_crop = sheet.cut_out(
        [[-300, 300], [sheet.vert_df.y.max() - 22,
                       sheet.vert_df.y.max() + 1], [-300, 300]], )

    sheet.remove(to_crop)
    sheet.vert_df[['x', 'y', 'z']] = sheet.vert_df[['x', 'z', 'y']]
    SheetGeometry.update_all(sheet)
    return sheet
def test_execute_apoptosis():
    h5store = os.path.join(stores_dir, 'small_hexagonal.hf5')
    datasets = load_datasets(h5store, data_names=['face', 'vert', 'edge'])
    specs = config.geometry.cylindrical_sheet()
    sheet = Sheet('emin', datasets, specs)
    geom.update_all(sheet)
    sheet.settings['apoptosis'] = {
        'contractile_increase': 2.0,
        'critical_area': 0.1
    }
    sheet.face_df['id'] = sheet.face_df.index.values
    init_nb_faces = len(sheet.face_df)
    manager = EventManager('face')
    face_id = 17
    face_area = sheet.face_df.loc[face_id, 'area']
    initial_nbsides = sheet.face_df.loc[face_id, 'num_sides']

    sheet.settings['apoptosis'].update({'face_id': face_id})
    initial_cell_event = (apoptosis, sheet.settings['apoptosis'])

    manager.current.append(initial_cell_event)
    manager.execute(sheet)
    manager.update()
    assert len(manager.current) > 0
    manager.execute(sheet)
    manager.update()

    sheet.settings['apoptosis'] = {
        'contractile_increase': 2.0,
        'critical_area': 2 * face_area
    }
    manager.current.clear()
    sheet.settings['apoptosis'].update({'face_id': face_id})
    modified_cell_event = (apoptosis, sheet.settings['apoptosis'])

    manager.current.append(modified_cell_event)
    manager.execute(sheet)
    manager.update()
    next_nbsides = sheet.face_df.loc[sheet.idx_lookup(face_id, 'face'),
                                     'num_sides']
    i = 1
    while next_nbsides > 4:
        assert next_nbsides == initial_nbsides - i
        assert len(manager.current) > 0
        i = i + 1
        manager.execute(sheet)
        manager.update()
        next_nbsides = sheet.face_df.loc[sheet.idx_lookup(face_id, 'face'),
                                         'num_sides']
    manager.execute(sheet)
    manager.update()
    assert len(sheet.face_df) < init_nb_faces
Beispiel #20
0
def test_face_rotation():

    h5store = os.path.join(stores_dir, "small_hexagonal.hf5")
    datasets = load_datasets(h5store, data_names=["face", "vert", "edge"])
    specs = config.geometry.cylindrical_sheet()

    sheet = Sheet("emin", datasets, specs)
    sgeom.update_all(sheet)
    face = 17
    normal = sheet.edge_df[sheet.edge_df["face"] == face][sheet.ncoords].mean()
    rot = sgeom.face_rotation(sheet, face, 0)
    rotated = np.dot(rot, normal)
    np.testing.assert_allclose(rotated[:2], np.zeros(2), atol=1e-7)
def test_close_two_holes():
    dsets = hdf5.load_datasets(Path(stores_dir) / "small_ellipsoid.hf5")
    mono = Monolayer("4", dsets)
    cell = mono.cell_df.query("num_faces != 4").index[0]
    edges = mono.edge_df.query(f"cell == {cell}")
    faces = edges["face"].iloc[[0, 8]]
    face_edges = edges[edges["face"].isin(faces)].index
    mono.face_df.drop(faces, axis=0, inplace=True)
    mono.edge_df.drop(face_edges, axis=0, inplace=True)
    mono.reset_index()
    mono.reset_topo()
    with pytest.raises(ValueError):
        close_cell(mono, cell)
Beispiel #22
0
def test_remove_cell():
    dsets = hdf5.load_datasets(Path(stores_dir) / "with_4sided_cell.hf5")
    mono = Monolayer("4", dsets)
    Nci = mono.Nc
    cell = mono.cell_df.query("num_faces == 4").index[0]
    res = remove_cell(mono, cell)
    MonolayerGeometry.update_all(mono)
    assert not res
    assert mono.validate()
    assert mono.Nc == Nci - 1
    with pytest.warns(UserWarning):
        cell = mono.cell_df.query("num_faces != 4").index[0]
        res = remove_cell(mono, cell)
        assert mono.validate()
Beispiel #23
0
def test_extra_indices_hexabug():
    # GH #192

    with pytest.raises(AssertionError):
        h5store = os.path.join(stores_dir, "small_hexagonal_snaped.hf5")

        datasets = load_datasets(h5store)
        specs = config.geometry.cylindrical_sheet()
        sheet = Sheet("emin", datasets, specs)

        SheetGeometry.update_all(sheet)
        sheet.sanitize()
        sheet.get_extra_indices()

    h5store = os.path.join(stores_dir, "small_hexagonal.hf5")

    datasets = load_datasets(h5store)
    specs = config.geometry.cylindrical_sheet()
    sheet = Sheet("emin", datasets, specs)

    SheetGeometry.update_all(sheet)
    sheet.sanitize()
    sheet.get_extra_indices()
def test_solving():

    sheet = Sheet("crossed",
                  hdf5.load_datasets(Path(stores_dir) / "sheet6x5.hf5"))
    sheet.vert_df.z = 5 * sheet.vert_df.x**2
    SheetGeometry.update_all(sheet)
    positions_buffer = sheet.vert_df[sheet.coords].copy()

    sheet.vert_df.x -= 35 * (sheet.vert_df.x / 2)**3
    SheetGeometry.update_all(sheet)
    colliding_edges = collisions.self_intersections(sheet)
    boxes = solvers.CollidingBoxes(sheet, positions_buffer, colliding_edges)
    boxes.solve_collisions(shyness=0.01)
    assert collisions.self_intersections(sheet).size == 0
    assert sheet.vert_df.loc[[22, 12], "x"].diff().loc[12] == 0.01
Beispiel #25
0
def init_tissue(hf5_filename='superegg_final.hf5',
                json_filename='superegg_final.json'):
    """
    Initialisation of the superegg tissue
    """
    dsets = hdf5.load_datasets('../examples/' + hf5_filename,
                               data_names=['vert', 'edge', 'face'])

    with open('../examples/' + json_filename, 'r+') as fp:
        specs = json.load(fp)

    sheet = Sheet('spherical', dsets, specs)

    modify_some_initial_settings(sheet)

    return sheet
Beispiel #26
0
def test_division():

    h5store = os.path.join(stores_dir, "small_hexagonal.hf5")

    datasets = load_datasets(h5store, data_names=["face", "vert", "edge"])
    specs = cylindrical_sheet()
    sheet = Sheet("emin", datasets, specs)
    geom.update_all(sheet)

    Nf, Ne, Nv = sheet.Nf, sheet.Ne, sheet.Nv

    cell_division(sheet, 17, geom)

    assert sheet.Nf - Nf == 1
    assert sheet.Nv - Nv == 2
    assert sheet.Ne - Ne == 6
Beispiel #27
0
def test_check_tri_faces():
    h5store = os.path.join(stores_dir, "small_hexagonal.hf5")
    datasets = load_datasets(h5store, data_names=["face", "vert", "edge"])
    specs = config.geometry.cylindrical_sheet()
    sheet = Sheet("emin", datasets, specs)
    initial_nb_cells = len(sheet.face_df)
    nb_tri_cells = len(sheet.face_df[(sheet.face_df["num_sides"] < 4)])
    geom.update_all(sheet)
    sheet.face_df["id"] = sheet.face_df.index.values
    manager = EventManager("face")
    manager.current.append((check_tri_faces, {}))
    manager.execute(sheet)
    manager.update()

    manager.execute(sheet)
    manager.update()
    assert len(sheet.face_df) == initial_nb_cells - nb_tri_cells
def test_iso_solver():

    pth = os.path.join(stores_dir, "rod_sheet.hf5")
    datasets = load_datasets(pth)
    specs = config.geometry.rod_sheet()
    sheet = Sheet("rod", datasets, specs)
    geom.reset_scafold(sheet)
    geom.update_all(sheet)

    dyn_specs = config.dynamics.quasistatic_sheet_spec()
    dyn_specs["vert"]["basal_shift"] = 0.0
    dyn_specs["face"]["prefered_vol"] = 1.0

    sheet.update_specs(dyn_specs, reset=True)
    geom.update_all(sheet)
    res = bruteforce_isotropic_relax(sheet, geom, model)
    assert_almost_equal(res["x"], 1.6001116383)
Beispiel #29
0
def test_x_and_y_boundary_celldiv():
    dsets = hdf5.load_datasets(
        Path(stores.stores_dir) / "planar_periodic8x8.hf5")
    specs = config.geometry.planar_sheet()
    specs["settings"]["boundaries"] = {"x": [-0.1, 8.1], "y": [-0.1, 8.1]}
    sheet = Sheet("periodic", dsets, specs)
    coords = ["x", "y"]
    draw_specs = config.draw.sheet_spec()
    PlanarGeometry.update_all(sheet)
    Nf = sheet.Nf
    # arbitrarily choose a cells on x_boundary and y_boundary to divide
    div_cell = sheet.face_df.index[(sheet.face_df["at_x_boundary"] == True)
                                   &
                                   (sheet.face_df["at_y_boundary"] == True)][0]
    daughter = cell_division(sheet, div_cell, PlanarGeometry, angle=0.6)
    assert sheet.validate()
    assert sheet.Nf == Nf + 1
def test_already():
    # GH111
    sheet = Sheet("crossed",
                  hdf5.load_datasets(Path(stores_dir) / "sheet6x5.hf5"))
    sheet.vert_df.z = 5 * sheet.vert_df.x**2
    SheetGeometry.update_all(sheet)

    sheet.vert_df.x -= 35 * (sheet.vert_df.x / 2)**3
    SheetGeometry.update_all(sheet)
    positions_buffer = sheet.vert_df[sheet.coords].copy()
    sheet.vert_df.x -= 0.1 * (sheet.vert_df.x / 2)**3
    SheetGeometry.update_all(sheet)
    colliding_edges = collisions.self_intersections(sheet)
    boxes = solvers.CollidingBoxes(sheet, positions_buffer, colliding_edges)
    res = boxes.solve_collisions(shyness=0.01)
    colliding_edges = collisions.self_intersections(sheet)
    assert len(colliding_edges) == 0