Skip to content

Commit

Permalink
format fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
meganrm committed Oct 12, 2023
1 parent 5d9ecae commit d35738d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cellpack/autopack/plotly_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def add_square(self, side_length, pos, rotMat, color, opacity=1):
def add_ingredient_positions(self, env):
for obj in env.packed_objects.get_ingredients():
ingr = obj.ingredient
if hasattr(ingr, "positions") and len(ingr.positions) > 1:
if hasattr(ingr, "positions") and len(ingr.positions) > 1:
self.add_circle(obj.radius, obj.position, obj.color)

for level in range(len(ingr.positions)):
Expand All @@ -79,12 +79,14 @@ def add_ingredient_positions(self, env):
if ingr.model_type == "Spheres":
self.add_circle(obj.radius, obj.position, obj.color)
if ingr.model_type == "Cube":
self.add_square(ingr.radii, obj.position, obj.rotation, obj.color)
self.add_square(ingr.radii, obj.position, obj.rotation, obj.color)
elif ingr.model_type == "Cylinders":
length = ingr.length
width = 2 * ingr.radii[0][0]
side_lengths = [[width, length, 1.0]]
self.add_square(side_lengths, obj.position, obj.rotation, ingr.color)
self.add_square(
side_lengths, obj.position, obj.rotation, ingr.color
)

def make_grid_heatmap(self, env):
ids = []
Expand Down

0 comments on commit d35738d

Please sign in to comment.