Slab.SetEdgeConnection for multiple surfaces - solution exception error [SOLVED]

Hello,

At the beginning I’d like to show you my script, which should set up the correct properties to deconstructed plates.

There is an error “Solution exception: object reference not set to an instance of an object”.
Any suggestion why it appears and how to fix it?

@Tomasz_Gniady
From the provided picture, I would assume that you need to “graft” the Slab input

@Tomasz_Gniady

You can see my “data structure” in the picture below.

I’ve tried this one, erorr still appears.

Please find script and model attached, maybe it will be helpful.
EdgeConnForMultipleSurfaces_error_replication.zip (5.8 MB)

@Turez

Looks like that you were setting some “nulls” edge connections and indexes and the component doesn’t like it :slight_smile: .

Below, a proposed solution that should work.

EdgeConnForMultipleSurfaces_error_replication_SOLVED.gh (17.4 KB)

I am going to slightly improve the “set edge connection” as it does not look fully user friendly

@MarcoPelle
Great input as always from your side.
Yeah for component it works, but overall order of the edges looks messy and some of them are missing:

I gues, that without “nulls” edges are randomly prescribed to the surface.

@Tomasz_Gniady
have a look at the following script

EdgeConnForMultipleSurfaces_error_replication_SOLVED_2.gh (16.8 KB)

Can you just “setEdgeConnection” without creating a new one?

There is a Bug in constructing the surface again which changes the order of the edge

1 Like

Yes, in this case is even better for me to not creating a new one. Thanks a lot!
It’ll be nice to fix this bug, as I suppose there will be some case, where creatring a new one will be necessary :slight_smile: