SpiralInductor#
- class zeroheliumkit.src.geometries.SpiralInductor(size: float, width: float, gap: float, num_turns: int = 5, smallest_section_length: float = 0.1, layers: dict = {'layer1': 0.1}, alabel: tuple = None)[source]#
Bases:
EntityRepresents a spiral inductor.
- Parameters:
size (float) – The size of the inductor.
width (float) – The width of each turn in the spiral.
gap (float) – The gap between each turn in the spiral.
num_turns (int) – The number of turns in the spiral.
smallest_section_length (float) – The length of the smallest section in the spiral.
layers (dict) – A dictionary mapping layer names to their respective widths.
alabel (dict) – A dictionary containing labels for the first and last anchor points.
Example
>>> # Create a spiral inductor >>> inductor = SpiralInductor(size=10, width=1, gap=0.5, num_turns=3, ... smallest_section_length=0.2, ... layers={'layer1': 0.1, 'layer2': 0.2}, ... alabel=('start', 'end'))
Methods
add(layer)Adds a layer to the class with the given name and geometry.
clean()Removes all layers with empty polygons
copy([rename_anchors, with_suffix])Creates a deep copy of the Entity instance.
crop(geom[, loc])Crops polygons in all layers.
cut(geom[, loc])Cuts the specified polygon from polygons in all layers.
export_dict([remove_holes])Returns all layer names and their corresponding geometries in a Dictionary.
export_dxf(filename, layer_cfg)Exports layers as a DXF file.
export_gds(filename, layer_cfg)Exports all layers as a GDS file.
export_pickle(filename)Exports all layers as a pickle file.
get(lname)Retrieves a layer by its name.
has_layer(name)Check if a layer exists in the class.
mirror(aroundaxis[, keep_original, ...])Mirror all objects around a specified axis.
move(dx, dy)Moves all objects in the class by the specified (dx, dy) offset.
quickplot([size, color_config, zoom, ...])Plots the Entity object with predefined colors for each layer.
remove(lname)Removes a layer from the class.
rename(old, new)Changes the name of a layer/attribute in the class.
rotate([angle, origin])Rotates all objects in the class
scale([xfact, yfact, origin])Scales all objects by the specified factors along the x and y axes.
slice(slice_line)Slices polygons in a layer using a given line.
snap_to(point_from, point_to)Snaps all objects in the class so that point_from aligns with point_to.
Attributes
anchorscolorserrorslayersskeletone