From b94f39a5e245d961d1a276debebe35692b74c904 Mon Sep 17 00:00:00 2001 From: meganrm Date: Fri, 26 Jan 2024 14:08:35 -0800 Subject: [PATCH] change extended to true --- cellpack/autopack/Compartment.py | 2 +- examples/packing-configs/debug.json | 2 +- examples/recipes/v2/nested.json | 7 +- examples/recipes/v2/spheres_in_a_box.json | 88 +++++++++++++++++++++++ 4 files changed, 95 insertions(+), 4 deletions(-) create mode 100644 examples/recipes/v2/spheres_in_a_box.json diff --git a/cellpack/autopack/Compartment.py b/cellpack/autopack/Compartment.py index 6d93c80f7..41e1003e2 100644 --- a/cellpack/autopack/Compartment.py +++ b/cellpack/autopack/Compartment.py @@ -1367,7 +1367,7 @@ def BuildGrid_trimesh( off_grid_surface_points = surface_points_in_bounding_box - ex = False # True if nbGridPoints == len(idarray) else False + ex = True # True if nbGridPoints == len(idarray) else False surfacePoints, surfacePointsNormals = self.extendGridArrays( nbGridPoints, diff --git a/examples/packing-configs/debug.json b/examples/packing-configs/debug.json index 2e4cbc0ef..4ce4583a2 100644 --- a/examples/packing-configs/debug.json +++ b/examples/packing-configs/debug.json @@ -1,7 +1,7 @@ { "name": "debug", "format": "simularium", - "inner_grid_method": "raytrace", + "inner_grid_method": "trimesh", "live_packing": false, "ordered_packing": false, "out": "out/", diff --git a/examples/recipes/v2/nested.json b/examples/recipes/v2/nested.json index c78a23b2b..bac4bc55f 100644 --- a/examples/recipes/v2/nested.json +++ b/examples/recipes/v2/nested.json @@ -19,7 +19,6 @@ "type": "single_sphere", "jitter_attempts": 10, "packing_mode": "random", - "place_method": "jitter", "available_regions": { "interior": {}, "surface": {} @@ -84,7 +83,11 @@ "object": "red_sphere", "count": 40 } - ] + ], + "surface": [{ + "object": "green_sphere", + "count": 40 + }] } }, "inner_sphere": { diff --git a/examples/recipes/v2/spheres_in_a_box.json b/examples/recipes/v2/spheres_in_a_box.json new file mode 100644 index 000000000..8ee55855d --- /dev/null +++ b/examples/recipes/v2/spheres_in_a_box.json @@ -0,0 +1,88 @@ +{ + "version": "1.0.0", + "format_version": "2.0", + "name": "analysis_b", + "bounding_box": [ + [ + 0, + 0, + 0 + ], + [ + 1000, + 1000, + 1000 + ] + ], + "objects": { + "base": { + "type": "single_sphere" + + }, + "sphere_100": { + "type": "single_sphere", + "inherit": "base", + "color": [ + 0.498, + 0.498, + 0.498 + ], + "radius": 100 + }, + "sphere_200": { + "type": "single_sphere", + "inherit": "base", + "color": [ + 0.827, + 0.82700002, + 0.82700002 + ], + "radius": 200 + }, + "sphere_50": { + "type": "single_sphere", + "inherit": "base", + "color": [ + 0.306, + 0.45100001, + 0.81599998 + ], + "radius": 50 + }, + "sphere_25": { + "type": "single_sphere", + "inherit": "base", + "color": [ + 0.467, + 0.23899999, + 0.972 + ], + "radius": 25 + } + }, + "composition": { + "space": { + "regions": { + "interior": [ + "A", "B", "C", "D" + ] + } + }, + "A": { + "object": "sphere_100", + "count": 6 + }, + "B": { + "object": "sphere_200", + "count": 2 + }, + "C": { + "object": "sphere_50", + "count": 15 + }, + "D": { + "object": "sphere_25", + "count": 40 + } + } +} \ No newline at end of file