Issues with Unroll / OpenNest

Hi guys, im struggling with getting open nest to work how i need it to.

Open nest keeps coming up with this error message and i don’t really understand it.

  1. System.NullReferenceException: Object reference not set to an instance of an object.
    at OpenNestLib.OpenNestUtil.ToPolylines(IEnumerable`1 nurbsCurves, Boolean collapseShortSegments)
    at OpenNest.OpenNestFullComponentCleanUp.SolveInstance(IGH_DataAccess DA)

When it does descide to work, it just stacks all my surfaces ontop of eachother rather than spreading them out across the sheet.

Then other times its the unroll component im having trouble with and its spitting out this error

  1. Solution exception:Unable to cast object of type ‘Grasshopper.Kernel.Types.GH_Surface’ to type ‘Grasshopper.Kernel.Types.GH_Brep’.

Can anyone help me out with where im going wrong here please?

Moddel to Cut Code.gh (76.0 KB)

Your model is already composed of flat surfaces, so you don’t need to unroll it.

This should get you started:

Packs your surfaces and nests based on outside (longest) curve. One of your surfaces is too large to fit on your sheet. You could cut it into multiple surfaces and nest them.

240419a_Moddel_to_Cut_Code.gh (64.8 KB)

-Kevin

1 Like

Looks like your issue is Unroll instead of OpenNest, though as far as I know, only one “paper” curve is expected. OpenNest will replicate that as needed.

Also, I believe OpenNest ‘Geo’ should be curves, not breps.

1 Like

ahh kevin, you have saved my day! you dont know how long i have wasted today trying to work out where im going wrong here.

This should make the rest of this modelling a lot easier, I think with a few more steps in the script, i can get it to work exactly how i need it now!

Cheers

  • Jake

Yeah, i think you were right,

I was struggling to find a decent explination online of what types of data inputs open nest wants.

Do you know if there is anything in grasshopper i can use to see the required inputs for a component?

Many examples of GH code using OpenNest on this forum. Here are a few from me but there are many more. Search :bangbang:

https://discourse.mcneel.com/search?q=opennest%20%40Joseph_Oster

1 Like