Size-field composition¶
Compose multiple per-point edge-length contributions into a single
SizeFieldFn suitable for passing to triangulate(size_field=...).
SizeFieldFn¶
compose_size_field¶
admesh.compose_size_field ¶
compose_size_field(builtins: Iterable[SizeFieldFn], user_contribs: Iterable[SizeFieldFn] = (), combine: Callable[[list[ndarray]], ndarray] = np.minimum.reduce, *, hmin: float | None = None, hmax: float | None = None) -> SizeFieldFn
Return a closure that evaluates the two-phase size field at points.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
builtins
|
Iterable[SizeFieldFn]
|
Phase-1 built-in stages — wrapped faithful-port functions
(curvature, medial axis, bathymetry, tide, etc.). Always
combined with |
required |
user_contribs
|
Iterable[SizeFieldFn]
|
Phase-2 user-supplied contributions. Each is sanitized against
|
()
|
combine
|
Callable[[list[ndarray]], ndarray]
|
Phase-2 reduction: takes a list of |
reduce
|
hmin
|
float | None
|
Optional clamp bounds applied to user contributions before
Phase 2 combination. |
None
|
hmax
|
float | None
|
Optional clamp bounds applied to user contributions before
Phase 2 combination. |
None
|
Returns:
| Type | Description |
|---|---|
Callable[[ndarray], ndarray]
|
A pure function |