but I keep getting this error no matter how I try to get around it. I checked out the example file and I think I’m following the workflow in the same manner, but it keeps giving me “Object ref not set to an instance of an object…”
I have uploaded an image of the .gh file and the .gh file itself along with the .3dm file. I appreciate any kind of help. Thank you.
Thanks for the reply. Actually my curves were closed, but I found out that the problem is in curved curves. I have some curves that are not line-like. and when you use discontinuity and pline them you get polycurves that are all made up of line-like curves. does Open Nest not support curved curves?
Hi @Petras_Vestartas, first of all, thanks for the OpenNest plugin. I am trying to nest curved curves with Rhino Plugin, not with Grasshopper version, it doesn’t seem to work. I guess it is because the plugin tries to convert curved curves to polyline but fails, interestingly I can nest the same curved curve with the Grasshopper version. Am I doing some usage mistakes? I need to use the rhino plugin version, thanks!
Do you have any plans on integrating curves as input directly? Because converting curved edges to polylines results in too many points and it may occur problems. I would be glad to help if you decide to make it opensource.
The issue is when user cannot control number of points as you would do in grasshopper during conversion. When you have tons of point for a single polyline the solver will hang looping forever. Thus you need either very a minimal amount of points or convex hull polyline.
The addition you describing needs to be done like that:
If you would like you could create a separate rhino command to convert curves to polylines by minimal amount of points. The main point is that this closed polyline must enclose fully the curve, elsewise you would have collisions in the final result (including concave and convex cases). Then I would include into next release. This was an idea behind grasshopper component RhinoObjects which is the same method applied in Rhino plugin. It groups outlines based on a logic that curve, lines and other object always are placed within a closed polygon. I do not know why the third case works, but it seems it would be enough just to have a closed polygon. You can see two guids. After nesting you would skip the polygon i.e. by hiding layer.
hmm, got it, I am going to think about that If I come up with a solution I will notify you. By the way, before the image update, I was going to request for contents of that block I thought that you solved in Grasshopper but didn’t transform to RhinoCommon, it is clear now.
The issue with curve to polyline conversion is that it will subdivide by curvature.
So that was my concern. In grasshopper user can set resolution if you subdivide by number and then offset the curve by clipper. But how to properly choose the subdivision value in Rhino since there is no interface? It also relates to scale the bigger the figure the more points this method outputs (for circle no but the figure on the right has 2x times more points than the smallest one):