I canât find a way to say to OpenNest how many pieces of each shape I do need for nesting without copying the geometries a lot of time in Rhino. I do need to nest each shape to different numbers for each one.
In this example it is like this as it works for this case of the user.
You can write your own code that does this using surface input. You can do it using native grasshopper components.
I did a new code, which is not open-source at the moment. All the hassle of curve to polyline simplification is also solved, since there are two different ways to do it, rhino native and a standalone clipperish one. I took me quite some time to make it clean and structured:
The white group in this model identifies the unique parts. The yellow group (âView One Partâ) is a way to see which part corresponds to the numbered sliders with pink border (âgene poolâ). Thatâs where you set the quantity for each part.
I do need to nest a lot of shapes, so I will need a more manageable solution.
It is possible to read the objects âAtribute User Textâ a Key like âNesting_Noâ? I can assign a value number with the quantity that I do need to nest.
There are several ways to replace the âGene Poolâ (Count of each unique part), as long as you make the correlation between part shape and quantity. Might be best to supply part shapes as surfaces (possibly with holes) and extract their edges before filtering out the holes as @Petras_Vestartas did.
I replaced the TGuid component with my own Bake component (cyan group), using the holed surfaces.
I think, I had already went through this discussion.
A good explanation and I talked with Jack to understand the logic, but the develolment went differently to that.
The idea is similar, Boost library generates minkowski shapes and a basic genetic algorithm.
Which is not the best way to test different samples, specially knowing that it is based on random mutations of rotations and placements.
The most simple code you can write is to generate minkowski via clipper and check all possible placements. It is literaly can be not longer than 100 lines of C# to illustrate the idea. You can then see how slow it becomes just by simple iteration of all possible solutions. Then comes the question how to make the code better so that it could be usuable by a user since no optimal solution exists. You can explore solutions on GPU by evaluating fixed size images or check randomly. Since it n! operation, the current version naively runs GA. If you know better solutions to such problems let me know. I like reading papers about these 2d nesting problems.
I do use the EasyCut Python script that it is very useful because can read all the 3D objects and it creates a cutting list. It is stores the values into each object itself using some Keys/Values stored in the âAttributtes User Textâ. For example, the number of pieces that are repeating it is stored as Key=N and Value=2.
Will be wonderful if OpenNest will be able to read this keys and apply the value stored on them as input for the number of pieces to nest.
OpenNest doesnât need to do that if you can you read those attributes yourself in Grasshopper?
Donât wait for enhancements, work with how it is now!
Can you show an example file of your workflow in the most simplified way?
But I agree to @Joseph_Oster custom input implementation are always a bit time taking, as you can easily get into a rabbit hole. Plus I have other work to do⌠Rhino object component and handling of user inputs took me 2 weeks, then a month of partly bug cleaning⌠Currently I have a good solution for curve to polyline conversion and input duplication using layer structure of rhino.
Try to write your own python input transformation and prepare it for the nest.
The only thing I see that is missing is that you want to duplicates parts as a user input.
I am doing some furniture, trying to make a workflow using only Rhino6+Grasshopper for all the necessary operations required. My teammate it is using SolidWorks with Alphacam but I canât run that software in my CNC machine who have only 4GB of RAM and it is running Windows7.
I do use a mixed 2D and 3D workflow. I import objects from DXF and SolidWorks files as STEP into Rhino6 (the Rhino6 SolidWorks importer donât work with the latest files). After that I need to prepare the objects for nesting, group them by thickness and material, create the mechanization layers for the machine and after that nesting the parts and exporting the result as DXF to import into SCM Maestro that it is doing the CAM operations for each layer. Create BOM files and drawings with assembly instructions.
Forgot to mention that because some of the inside lines are extended outside of the exterior shape of the peace I used the OpenNest definition from this tread that works better. The only downside it is that I do need to manually select the outside and inside shapes. Maybe there itâs a way to do the sorting operation automatically, still need to investigate how to do so.
you can do that using custom code or through some plugins like Elefront (here is with Elefront)
I didnât fully understand the issue you describe in the following:
if the curves inside the DXF file you receive are already sorted inside/outside by layers or even just by color, then you could filter them by those properties (again you can do that by custom code or with plugins such as Elefront or Human, following is filtering by layer name with Elefront)