MCPcopy Create free account
hub / github.com/NanoComp/meep / get_vertices

Method get_vertices

python/simulation.py:451–465  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

449 self.swigobj = mp.volume(vec1, vec2)
450
451 def get_vertices(self):
452 xmin = self.center.x - self.size.x / 2
453 xmax = self.center.x + self.size.x / 2
454 ymin = self.center.y - self.size.y / 2
455 ymax = self.center.y + self.size.y / 2
456 zmin = self.center.z - self.size.z / 2
457 zmax = self.center.z + self.size.z / 2
458
459 # Iterate over and remove duplicates for collapsed dimensions (i.e. min=max))
460 return [
461 Vector3(x, y, z)
462 for x in list({xmin, xmax})
463 for y in list({ymin, ymax})
464 for z in list({zmin, zmax})
465 ]
466
467 def get_edges(self):
468 vertices = self.get_vertices()

Callers 1

get_edgesMethod · 0.95

Calls 1

Vector3Class · 0.90

Tested by

no test coverage detected