def add_surfaces(model, builder): nb = 2 uuids = [] for i in range(nb): uuids.append(builder.add_surface()) temp_surface = model.surface(builder.add_surface()) builder.remove_surface(temp_surface) if model.nb_surfaces() != nb: raise ValueError("[Test] Section should have 2 surfaces") return uuids
def add_surfaces(model, builder): nb = 5 uuids = [] for i in range(nb): uuids.append(builder.add_surface()) builder.set_surface_name(uuids[-1], "surface" + str(len(uuids))) temp_surface = model.surface(builder.add_surface()) builder.remove_surface(temp_surface) if model.nb_surfaces() != nb: raise ValueError("[Test] BRep should have 5 surfaces") if model.surface(uuids[1]).name() != "surface2": raise ValueError("[Test] Wrong Surface name") return uuids
def test_reloaded_brep(model): if model.nb_corners() != 6: raise ValueError( "[Test] Number of Corners in reloaded BRep should be 6") if model.nb_lines() != 9: raise ValueError("[Test] Number of Lines in reloaded BRep should be 9") if model.nb_surfaces() != 5: raise ValueError( "[Test] Number of Surfaces in reloaded BRep should be 5") if model.nb_blocks() != 1: raise ValueError( "[Test] Number of Blocks in reloaded BRep should be 1") if model.nb_model_boundaries() != 3: raise ValueError( "[Test] Number of Boundaries in reloaded BRep should be 3")