Isovist fails when ray origin coincides with curve obstacle

I’ve noticed that both isovist components fail when the ray origin coincides with a curve obstacle. This is shown in the following images. The first is coinciding and causes an error, the second shows the component(s) work fine when the origin is moved slightly away from the curve.

The exception is: index must be less than the size of the collection

I think this is a bug as this doesn’t seem to happen with the breps I tested and the failure is quite hindering to its functionality as the rest of the list/tree of items passed to it will not be computed.

I agree with you it should not return that error, but it should output the same Ray_Origin point instead

@wim example of different behavior for Circle and Sphere [Version 8 SR19
(8.19.25120.1001, 2025-04-30)]

isovist_behavior.gh (10.7 KB)

it’s weird because isovistRay is fine, and being isovist a collection of isovistRays it should also be fine… :slight_smile: …at least you have a workaround until the problem gets solved

isovistRay_is_fine.gh (9.7 KB)

tja. When you extrude the circle and use that object as the obstacle, the result is very different.

At any rate, this has been on the list for a while and I’ve added this thread and a file.
RH-43206 IsoVist Ray in GH
Thanks,
-wim

1 Like

So the problem is easily avoided - why not do that :question: :man_facepalming: Sounds very debatable whether or not this is bug or user error.

No GH file posted :interrobang: :-1:

ohh, I didn’t notice that tiny MINUS sign, my forehead just exploded :+1:

I don’t consider translating the points to be a good solution because it doesn’t guarantee the points are moved somewhere that won’t fail (unless the logic is made more complex to check this case). The failure causing all inputted items to not be computed makes it a lot more problematic than if it returned for example, an empty branch or null.


Here is a grasshopper script with some other curves, both isovist components fail for me:

isovist curve obstacle failures.gh (15.5 KB)