Complete noob at ruby code. Like so new that I just heard the phrase for the first time like 3 days ago.
I work at a custom furniture shop and I’m trying to overhaul our design and pricing process. I’ve opted to use Open Cutlist as a tool to help us quickly generate lots of projects data. We’re currently using spreadsheets to price things and that just doesn’t make sense to me since were drawing it all in the first place. The data is all there already, no need to do extra work!?
Anyway, I don’t know anything about coding in general, I don’t even know if this is considered ‘coding’. My tech friends would probably laugh at me with how simple this probably is. Here’s what I’m trying to do:
I need to find out what the ruby code would be for calculating BDFT price. I know there are ways to make your own custom badges and apply them to the summary but I also want it on the parts list. Can someone help me please?
@total_cutting_length is a Length. If you multiply it by a float it stays a length that by default output as its string representation according to the model unit. To transform it into a number, you need to do :
@total_cutting_length.to_f (and you get a float in inches)
@total_cutting_length.to_feet (and you get a float in feet)
Adding a “price” variable in part list is not possible for Sheet Good or Dimensional parts without computing cutting diagram because multiple prices can be defined on material for specific full sheet size and thickness.
That’s why we add the specific Estimate (formerly Report) module that do this job. But yes it doesn’t display the price of each part.
That was the first time I tried using OCL. Even though I wasn’t familiar with BRFT or the software and had an error pop up about materials, it was easy to use and see just how plain nice OCL is. I also saw some of the options you mentioned above for creating estimates. I’m sure I didn’t pay close attention when I quickly added a material and that’s why I had an error.
I have a couple of projects that will provide opportunities to put OCL to use in the near future. I’m looking forward to getting to know the how to use it better then
Currently, it’s not impossible, but it will be a big tweak to compute individual part price in part list export. Because parts list merge all type of material, and I suppose that each type doesn’t have the same “volumic price”.
And as said before, export can’t extract price defined on each material without determining first the raw material size.
I basically followed what was a very easy and intuitive process to create a “Oak” material for a “2x4” component I made in SU (no materials). I selected “dimensional” because that seemed correct.
I was basically trying to test Ruby in the export options. Since I couldn’t quite do it, I started looking at the estimate options looking for an easier way and that’s why I made the material (if I recall, Estimate is not available without materials). It looks like user error since I didn’t fill in any other options.
*I need to do a site visit to get measurements. The job will be a deck renovation. It should be a simple job and a good test case to get in and use SU and OCL. I’ve not been one to use a lot of (or any) materials in SU. I saw that the material I created in OCL was applied to the component in the model. Because it was easy and I like the OCL user interface I might be able to improve in the materials department with OCL too.
Anyway, I’ll create proper project and get squared away with materials and sizes… it looks like it’s just a couple of button presses away :).