I ll try to test this in the new version I have not released yet.
There were quite some bugs that I left. I ll test and let you know.
I ll try to test this in the new version I have not released yet.
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.
Example of 2D DXF file that I do receive:
Example of 3D STEP file that I do receive:
Nesting result (one of the sheets):
Sheets been cutted:
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)
Unfortunately Elefront it is not very reliable (using the one with 6-es on icons). I tryied to use some components to read the Keys/values of the objects and messed-up the entire definition. I can provide an example file if somebody interested to do some debugging and head scratching.
I’d like to see a Rhino file with some examples of holed surfaces that contain quantity attributes? Not very interested in messed up code though…
this reads/filters user key/value pairs in Python
Py_KeyValue.gh (8.4 KB)
it will output Null for objects that do not have the chosen filtering key assigned:
So simple! I love it. But you didn’t internalize your curves. Is there a Rhino file I’m missing?
P.S. I created a Rhino file with four rectangles and assigned ‘key_1’ values to each but can’t read them?
- Solution exception:‘NoneType’ object has no attribute ‘GetUserString’
I did some experiments and deleted scriptcontext lines in the Python component that I shouldn’t have deleted…
here is the good one (it works in R7, should work also in R6 ?)
Much better! Nice work.
import Rhino import rhinoscriptsyntax as rs import scriptcontext as sc sc.doc = Rhino.RhinoDoc.ActiveDoc a = rs.GetUserText(curve, key)
I used @inno’s Python script to greatly simplify my version ‘b’ code from yesterday. I deleted the code that isolates unique parts on the assumption that all surfaces in the “unique parts for nesting” will be unique. Surfaces may have holes. I deleted @Petras_Vestartas’s SortGuids because using ‘Guids’ confused me and I couldn’t get it to work… I replaced it with the white group (“ignore holes”). I replaced the ‘Gene Pool’ set of sliders with quantities from @inno’s Python script, which are attributes of the surfaces. I used only one ‘Sheet’ (internalized) because I don’t understand how OpenNest works with multiple sheets when there aren’t enough sheets for all the parts?
To me, this is simple, obvious and elegant.
UPDATE: Replacing version ‘a’ with version ‘b’ - Playing around a little bit, I modified the quantity for one of the surfaces (the big one) and noticed two things:
The list of quantities from the Python script doesn’t change unless you reconnect its first input (which I renamed from ‘curve’ to ‘geo’ because these are now expected to be breps (surfaces with optional holes) instead of curves.)
I might have been confused but it appeared that the Repeat component didn’t respond correctly to this change, so I grafted its inputs to fix that.
I reduced ‘Iterations’ from 100 to 50 which is much faster and seems to work well enough.
Nesting_issue_2022Oct1b.3dm (66.2 KB)
Nesting_issue_2022Oct1b.gh (20.6 KB)
I do found this definition that can read the Keys/Values from any kind of geometry:
I do found something interesting:
I need to look into this as maybe I will be able to skip the part with export/import DXF files into Maestro to generate the Gcode files and I will be able to do this part also in Rhino/Grasshopper.
As I see, a lot of you guys are able to write Python scripts.
I am thinking that maybe somebody will want to continue the development of the EasyCut plugin, as seems that the initial developer abandoned this project two years ago, and the source code of the Python script it is available in GitHub
I am interested if possible to modify this script to add two more field:
- Material: 18MDF, 25MDF, etc.
- Mechanisation: (CNC, BeamSaw, Spindle)
and remove the “Layer” field.
Also a very useful feature will be to be able to select multiple cells in a column and type only once and fill all the selected cells with the same information. It is quite time consuming to copy paste into every cell because right now you can sellect only one object at a time.
Sounds like you are more interested in long term dreaming than immediate solutions.
Both of them if possible