Hi Guys.
So I have these 2 old scripts shared here by different useres long ago.
These scripts are used to calculate gemstones and precess metals weight.
All I did was to modify the lists and a couple of other small copy-pastes … But I don’t know how to script beyond that.
The problem was that these scripts didn’t work with SubD [they were written long before subD came to Rhino. But now in R8 they also do not work on Mesh.
Ideally, there would be a good way to update these scripts to work on all types of closed objects, something I asked here in the past [need to find that old thread] But it seemed to be not simple to solve.
So a workaround would perhaps be to :
get volume [of the mesh or SubD with the Volume command
use the math formula [or hopefully there’s an in build way in rhino…?] to calculate diameter of a sphere from volume
run the sphere command 000 and diameter to create the sphere
run the scripts on the sphere
delete the sphere
Can something like this run as a Macro?
Or maybe using a box from volume would be simpler…?
Why do you want to create the sphere instead of just calculating the weight? Maybe just post the scripts here and someone can fix them to work with meshes and subds?
Also there’s PetersTools if you are just looking for part weights.
I just installed your PeterToools. they look great, but I haven’t had a chance to use them yet.
*Out of topic but one button doesn’t show in your toolbar [at least on Mac] the one near the timer.
Here are the 2 scripts. I did ask [about the subD] issue in the past, without success.
the advantage here is that I added “dictionary” with lots of gemstones and I get carats weight . and most of the metals relevant for jewellery.
Thanks for the toolbar feedback. I’m guessing you’re using Rhino 6 or 7?
It’s easy to enter the densities from your scripts into PetersTools. If you run RealMaterialTools and pick EditMaterialsList, you’ll see a list of names & densities. If you add yours in there (as listed in those scripts), and then run SaveAsTemplate, you’ll always have them available.
In terms of modifying your scripts - maybe someone better at scripts will chime in. If not, I’ll take a look when I get a chance.
I don’t get much information about what happens when people try to install PetersTools on Mac. Did you install it from PackageManager or somewhere else? Seems like the toolbar is from an older version. Which version of Peterstools do you have installed?
I did see the icon for that tool in one of the smaller toolbars , But on the one that show all the tools the icon is missing.
I don’t remember clearly how things were in older versions [7 / 6] but I think you couldn’t add the plugins tools bars, we were just using the commands.
Hi Peter
Do you think you could please add Carats to your list of weights formats
1gram = 5 carat
That way it will be possible to get the proper weight for gemstones [without the extra manual calculation ]
Gemstones are only mesured in carats.
Something like
I can add carats - but it won’t happen for a bit. In the meantime, I fixed your gems script (I also made it compatible with PetersTools, so if you use BOM or other tools, they will recognize the assigned material & density.)
and that’s working well,
and I see now that once I used the updated&fixed GemWeight script, your Mass tool is in sync with it. Quite amazing actualy !
[it a little strange to see the mass tool giving the the weight in grams for a gemstone, but it’s not an urgent issue by any mean ]
I’ve actually updated the plugin to include carats, but the toolbar isn’t loading automatically (at least on Windows). So…I’m waiting for answers from Mcneel about that. But you can download it - I don’t know what will happen on a Mac. You might end up with no toolbar at all but you can run PetersToolsCommands to get a clickable list of everything as a work-around until the toolbar is sorted.
The tool bar didn’t auto-load, But I may have not saved the WL before restarting Rhino [after the update]
But after adding it all looks good, and the Auto convert to dark mode seems to work well.
the color of the Real Materials button looks a bit out of place in that tool bar [all other button have some white [or black in Light mode]
Hey, I’m just happy to see that the correct toolbar is in the plugin finally. But yes, I don’t like the colors (or overall look) of the Real Materials button. Suggestions are welcome, but maybe I’ll just try it in blue & see if that helps much.
The color is better [to go with the other buttons in your toolbar]
But for users that sets the button size quite small [like me] that nets is kind of too dens, perhaps using fewer strips … or doing a version on the Material button that is already used in Rhino [for the material panel]. not that that one is nice or gives any clue from it’s appearance, but at least everyone had by now no choice but to recognize that it represent materials.
So perhaps that this a blue R…
BTW that’s the button I made for the GemWeight scripts … if anyone wants to use it