s_bend_length¶
- photonforge.s_bend_length(offset, radius=None, meander=True)¶
Compute the ideal S bend length for a given offset and radius.
- Parameters:
offset (float) – S bend offset.
radius (float | None) – Desired S bend radius. If
None
, look for deafult inconfig.default_kwargs
.meander (bool) – If true, the resulting length will generate S bends that turn more than 90° per bend when
offset >= 2 * radius
. Otherwise, the length will be set to2 * radius
in that cases.
- Returns:
S bend length.
- Return type:
float
Note
If
offset >= 4 * radius
, returns2 * radius
.