PlaneSurface constructor, unexpected behavior

Hi all,

I’ve encountered some unexpected behavior when constructing a PlaneSurface when one interval’s parameters are sorted in decreasing order, like Interval(4, 0), it doesn’t seem to like this.

for example:

new PlaneSurface(Plane.WorldXY, new Interval(4, 0), new Interval(0, 2));

creates a plane with X-extends between 0 and 1. the Y is correct. However if I flip the X parameters:

new PlaneSurface(Plane.WorldXY, new Interval(0, 4), new Interval(0, 2));

then the result is correct, a surface between 0…4 in the X, and 0…2 in the Y

I tried searching PlaneSurface documentation, but I can’t find a mention of “Interval must be increasing”. But, to be honest, even if this is the requirement, I wouldn’t expect that a violation of this requirement resulted in a valid surface but that it silently changed the domain for me.

But, I feel a bit crazy, is this error on my end? Can someone run a quick test to see if you get the same result?

Thank you!

Hi @RK1,

Yes, the interval must be increasing.

– Dale

Thanks Dale! good to know.

I guess I’m curious if you think that this merits a mention in the documentation. Or do you think this usage of Interval is so idiomatic that people will just know that this is the case? I’ve only been coding with Rhino Common for about a year so I wouldn’t know.

Hi @RK1,

If you’re confused, when we need to update the documentation, which I will do.

– Dale

RH-77314 is fixed in the latest BETA