1. Solution exception:Object reference not set to an instance of an object

hi there, i keep getting this error msg when runing the RegionUnion command. Also the inputed data is a set of polyline curves generated from the naked edges of a set of meshes that i created using a c# script.

Here is the .gh file :Region-Union.gh (15.2 KB)
Require Elk and the base map file :map (5).rar (2.3 MB)

Hi -

Since this is not in any way related to Elk or that base map, you could just internalize the curves right before you feed them into your C# script.

From this post, it seems that Region Union throws that error when one or more of the input curves are open. You have two open curves in there. Not that the component outputs anything without those two, but it doesn’t throw that error anymore. You might want to try this on smaller groups at a time?


Thanks for the feedback. Maybe I should try to join the curves before inputing them to the region component

could it be that the problem stems from the data type of the lines constituting the polygons being polylines? I tested wich polygons can generate a mesh using the mesh from lines components of weaverbird and only managed to create mesh surfaces from polygons with 4 lines, but at the same time I don’t think that’s the reason why the region union command throws that error.

Hi -

The reason for that error is that there are open curves. Polylines are fine.
Region-Union-Simple_Example.gh (5.3 KB)

can you plz help me with these open curves. Can’t seem to find them

i did run an analysis on the polylines and they all seem to be closed, so what’s the problem ?

Hi -

Region-Union-internalized.gh (1.7 MB)

As you see, Region Union doesn’t throw that error when you take away the open curves - but, as I said before, it doesn’t produce any output either…