Polyhedron
Polyhedron(medium, vertices, triangles)Triangulated volumetric object.
Args
- medium (MediumType): Tidy3D medium used in this structure.
- vertices (Sequence[Sequence[float]]): Vertices of the polyhedron. Each element must be a sequence of 3 coordinates.
- triangles (Sequence[Sequence[int]]): Sequence of triangles that make up the boundary mesh of the polyhedron. Each element is a sequence of 3 indices into the
verticessequence.
Note
The order of the indices in each triangle determine the outwards normal of the polyhedron at that triangle in the counter-clockwise direction. All normals must be set correctly.
Methods
Section titled “Methods”| Method | Description |
|---|---|
copy | Create a copy of this 3D structure. |
to_tidy3d | Create a Tidy3D structure from this polyhedron. |
write_ply | Output this plyhedron’s mesh to a PLY file. |
copy(self)Create a copy of this 3D structure.
Returns
Polyhedron: New copy.
to_tidy3d
Section titled “to_tidy3d”to_tidy3d(self)Create a Tidy3D structure from this polyhedron.
Returns
tidy3d.Structure: Tidy3D structure.
write_ply
Section titled “write_ply”write_ply(self, filename)Output this plyhedron’s mesh to a PLY file.
Args
- filename (str): Name of the output file.
Returns
Polyhedron: This polyhedron.
Attributes
Section titled “Attributes”| Attribute | Description |
|---|---|
medium | MediumType: Polyhedron medium. |
properties | Properties: Object properties. |
triangles | ndarray: Indices of vertices for each triangle in the polyhedron surface. |
vertices | ndarray: Vertices of the polyhedron. |
medium
Section titled “medium”MediumType: Polyhedron medium.
properties
Section titled “properties”Properties: Object properties.
triangles
Section titled “triangles”ndarray: Indices of vertices for each triangle in the polyhedron surface.
vertices
Section titled “vertices”ndarray: Vertices of the polyhedron.