added preset saving and heat transfer
This commit is contained in:
@@ -78,6 +78,7 @@ def draw_toroid(
|
||||
output_path: str = "toroid.png",
|
||||
dpi: int = 180,
|
||||
fig_size_mm: float = 180.0,
|
||||
actual_fill: float | None = None,
|
||||
) -> None:
|
||||
"""
|
||||
Render a to-scale top-down cross-section of the transformer as a PNG.
|
||||
@@ -110,9 +111,10 @@ def draw_toroid(
|
||||
ax.set_xlabel("mm", fontsize=8)
|
||||
ax.set_ylabel("mm", fontsize=8)
|
||||
ax.tick_params(labelsize=7)
|
||||
fill_str = f" fill={actual_fill*100:.1f}%" if actual_fill is not None else ""
|
||||
ax.set_title(
|
||||
f"Toroid cross-section "
|
||||
f"ID={ID:.1f} mm OD={OD:.1f} mm H={core.height_mm:.1f} mm",
|
||||
f"ID={ID:.1f} mm OD={OD:.1f} mm H={core.height_mm:.1f} mm{fill_str}",
|
||||
fontsize=9, pad=6,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user