I’ve updated to OpenNest V2.
I have been able to nest closed polylines with internal objects (holes, points, text) with no issues and bake the nested geometry and keeping all the layers and attributes.
However with this new version, I am trying to avoid converting closed curves to polylines as it takes up too much computing time when nesting and CNC’ing. Here is my current Grasshopper layout:
Whenever I try and use closed curves (Whether they are made from splines, arcs etc) it throws this error:
System.NullReferenceException: Object reference not set to an instance of an object.
at opennest_2.RhinoObjects.SortGuidsByPlanarCurves(List`1 guids, Double tol)
at opennest_2.RhinoObjects.SolveInstance(IGH_DataAccess DA)
I have tried simply using the “Outlines” input for the nested geometry and “attributes” for the text. However I cannot find a way to bake the nested geometry while keeping its original layers or colours.
I also run into the issue if I directly assign geometry to “attributes” and have a geometry output from the “OpenNest2” block, it doubles up the attributes.
looks like you are giving the longest boundary curve of each geometry to the nesting core, and also giving the whole geometry to the attributes → this means you will end up nesting the outer curve, and the whole geometry will be overlapped to that
wire 1 being dashed means it’s carrying a data tree
wire 2 being just thick means it’s carrying a unique List
Thanks so much for that, I’ll give your suggestion a try.
In the meantime, I have attached the .3dm and .gh files to the original post - I haven’t internalised the geometries as I have two copies of the geometry I was testing with - one set as the original closed curves and the other set converted to polylines
working with the left ones (red) the only thing you really need to do is to increase Simplify Tolerance here, it was set to 0.01, but for such large objects even 1 or 10 is more than enough:
My aim is to include the text in the final nesting as they are scribed by the CNC and need to be on a separate layer.
Layer in red (polylines) works fine with my current method and I am able to bake in the outlines and the text if I select them all for the GUID.
Layer in black with the text is the geometry I am aiming to work with as converting to polylines either increases the nesting time due to increased number of points, or loses fidelity when converted to polylines.
I’m not very familiar with all the Rhino-referencing components available in OpenNest2, I’m still exploring and learning the new R8 pass-through components and the following is based on those
This reads Layers content and uses whatever it finds there, so it’s looking for:
a layer called Parts, from which it takes the curves to be nested
a layer called TEXT, from which it takes the code of each curve
a layer called SHEET, from which it takes the nesting sheet (a note, in your uploaded 3dm file, the layer “Sheet” is empty, and there are 4 overlapped sheets on the Layer “Parts”: move one of those to Sheet and delete the other 3)
When you click the BAKE button, two new layers will be created with geometries inside:
a first Layer called “Nested Curves” (or anythink you want to put there) containing the Geometry output from the OpenNest core component
a second layer called “Nested TEXT” (or whatever you want to name it) containing the very same Text codes with very same Text style as the input ones
as long as stuff is in the right layer everything should work
(note: this will not work with parts with holes, which are curves inside other curves)