The company where I work at, we have a series of projects which involve creating custom metal frames out of aluminum angle. We have the design aspect of the frame down pretty well. The frames are built from three different sizes of aluminum angle and each piece if Blocked with the block title being a part number. When each frame has been completed, I can use Block Manager in Rhino to give me a quick count of each part, however I still need to go through and manually measure each part and manually enter it into the spread sheet along side the part number and quantity. This is a huge opportunity for user error. Being as all the parts are lengths of Angle, we only need the length, no depth or height or anything else.
What I want to figure out is a script, most likely using Grasshopper, which will allow me to quickly generate a Microsoft Excel spreadsheet which will list the part number, quantity, and length. I saw another topic on the forums dealing with a similar situation. There was a gentleman who wanted to generate cut list for pieces of wood. He has to deal with widths, lengths, thickness, as well as grain direction. Someone here posted a solution for that, but there isn’t enough detail in there posted screen shots for me to replicate the process. Hopefully someone here can point me in the right direction. My objective is simpler, I just need length & part number. I think the solution will involve the Grasshopper plugin Horster. Please message / email me for details. email@example.com
If the parts you are measuring & quantifying happen to always be aligned squarely in your model space, you should be able to do all of this pretty easily using Rhinoscript. If they are at funny angles in space but there are just a few versions, you could have some part data that lists what size the part is, and just have a script extract that data & write it to excel.
These scripts are more complicated that what you need (I think) but maybe they would give you a starting point?
Thank you so much! I will give this a try ASAP!
Before you get excited - my scripts don’t do quite what you are asking, but you may be able to modify them to do what you want.
I have a couple python scripts that I wrote a while ago that is described here. It was set up for our specific needs although if interested I could tweak it slightly so that it could give you what you are looking for. The basic premise is that you add data to objects in the blocks. Then run another script that exports that data, qtys, name … to a csv file.
Here are also the python scripts
Your script is almost exactly what I am looking for. I have a few questions about your workflow. From reading the “Rhino Part Assembly Management” PDF you posted, I get the impression that you had a collection of parts first, and then created assemblies? Or Am I wrong?
With my situation, we have a modular frame system which is applied to an existing wall which is built by others. This wall varies greatly from project to project. Thus our frame varies greatly from project to project. The project is a recurring rehad to an automotive franchise and it’s numerous locations. Although it’s the same design, the same kit of parts, the same part numbers, in each project, some parts must be modified to accommodate the varying locations. The whole thing is made of aluminum angle. Thus the only thing which varies is length.
Here is my real question. When I am taking our frame and modifying it to a specific location, I work like this. I have a Rhino model full of angle pieces which are all blocks. The name of the block is the part number. I will bring in a frame and use block editor to shorten or lengthen the angle as needed and then exit block editor. Once I am done with all the pieces I can go into block manager and export each block as a separate rhino file. QUESTION. How do I go about using this script?
Would I go into each individual export block and apply a dimension string?
The issue is that I do not know what size my blocks will be till the frame has been customized. It’s the order of how the script is used that has me a little confused.
Yes you are correct is that the way I worked was I essentially create all the needed parts first and them assembled them. If I need to replace a part I created it in it’s own files and then replaced block in the assembly file. The reason for setting it up this way was we were using the same part across multiple different assemblies and I need to know how many of each we were using.
I have a couple thoughts on how to get what you need,but a couple questions first. For your output on the length of the items what format your looking for decimal inches, feet and inches, fraction inches or are you using meter. The reason I choose the using the dimension string and then adding a script for plug that value into the user data was that we need the output to be in feet and inches, so instead of adding something in the script to deal with rounding and unit conversion I just used the dimension value which has it built in. It’ really not that much different than added a dimension variable in say solid edge.
Thank you very much for sharing this script, it works perfectly. I tried to use this script to generate a list of curves with lengths and radii. But it only allows selection of objects and not curves. Is there a way to modify it to select curves and generate a list of their lengths and radii? Thank you
It is possible to make it so that you can select curves. Just change the line near the top of the script from:
arrObjects = Rhino.GetObjects("Select objects to create BOM ", 8 + 16 + 32 + 4096, True)
arrObjects = Rhino.GetObjects("Select objects to create BOM ", 4 + 8 + 16 + 32 + 4096, True)
The rest is a little trickier, and I don’t have time to work on it unfortunately.
@phcreates Thank you very much. I will be working on tweaking it.
This scripts are outdated. They are no longer working, generating a bunch of errors when opening them on RhinoMAC 7 WIP.
It is possible to update them to make them compatible with the newest versions of Rhino?