X-tremez equivalence in Python/C#

Hello, the X-tremez component is super useful to get lowest and highest points in a curver. Is there an equivalent code in Python/C#?

Thanks.

Just call that component:

This is how you can find extremes. So you can do that in python/C#. Get curve bounding box, intersect box with curve, sort points by z, select the first and last points in the sorted list.


Extremes.gh (5.7 KB)

1 Like

Hi @mikity_kogekoge,

You can also use Curve.ExtremeParameters. Note, this isn’t the method used by the X-tremez component.

– Dale

Bounding Box!!! Clever!

The attached works with R5 as well (since Curve.ExtremeParameters is a R6 Method)

Curve_MinMax_V1.gh (117.2 KB)
Curve_MinMax_V1.3dm (323.8 KB)