Skip to content

Commit

Permalink
Merge pull request #1425 from pkreissl/visualizer_ignore_non_shape
Browse files Browse the repository at this point in the history
openGL Visualizer: Ignore non shape-based Constraints.
  • Loading branch information
fweik committed Sep 22, 2017
2 parents 076c1b1 + aa9f011 commit c6a3d3e
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/python/espressomd/visualization_opengl.pyx
Expand Up @@ -219,14 +219,15 @@ class openGLLive(object):

# Collect shapes and interaction type (for coloring) from constraints
coll_shape_obj = collections.defaultdict(list)
for c in self.system.constraints.call_method('get_elements'):
t = c.get_parameter('particle_type')
s = c.get_parameter('shape')
n = s.name()
if n in ['Shapes::Wall', 'Shapes::Cylinder', 'Shapes::Sphere', 'Shapes::SpheroCylinder']:
coll_shape_obj[n].append([s, t])
else:
coll_shape_obj['Shapes::Misc'].append([s, t])
for c in self.system.constraints:
if type(c) == espressomd.constraints.ShapeBasedConstraint:
t = c.get_parameter('particle_type')
s = c.get_parameter('shape')
n = s.name()
if n in ['Shapes::Wall', 'Shapes::Cylinder', 'Shapes::Sphere', 'Shapes::SpheroCylinder']:
coll_shape_obj[n].append([s, t])
else:
coll_shape_obj['Shapes::Misc'].append([s, t])

# TODO: get shapes from lbboundaries
for s in coll_shape_obj['Shapes::Wall']:
Expand Down

0 comments on commit c6a3d3e

Please sign in to comment.