gds_fdtd.geometry

gds_fdtd simulation toolbox.

Geometry primitives: Port, Structure, Region, Component. @author: Mustafa Hammood, 2025

Functions

calculate_polygon_extension(center, width, ...)

Calculate the polygon extension for a port.

initialize_ports_z(ports, structures)

Initialize each port's z-center, height, material, and layer from the DEVICE structure containing it (last match wins, as before).

is_point_inside_polygon(point, polygon_points)

Test if a point inside a polygon using Shapely.

Classes

Component(name, structures, ports, bounds)

A component consisting of structures, ports, and boundaries.

LayoutSource(name, ly, cell)

Port(name, center, width, direction)

Represents an optical port object in a component.

Region(vertices, z_center, z_span)

Represents a 3D region defined by a 2D polygon and vertical extent.

Structure(name, polygon, z_base, z_span, ...)

Represents a physical structure in the component with geometric and material properties.