After watching all of the solid modelers have their fun, and watching the leaderboards go Solidworks, Onshape, Fusion, Solidworks, Onshape, Fusion…I decided to give it a go using Rhino.
Had to adjust aliases, start using the Gumball to extrude/cut, do some Grasshopper scripting to return mass, set up my phone as a sort of Stream Deck alternative (might actually buy the real thing when money’s a bit more flush), and try a bit of scripting, and as of right now, I’m sitting in third. But…I’d be willing to bet that some of the proper wizards here would be able to do even better.
Rules are explained in one of Toby’s videos, but the basic idea is to apply the material/unit system and then, using his drawings, get the exact mass listed as fast as possible for three separate models.
I’ll try to remember this evening, it’s on my other computer. I can give the basic rundown of it though. It’s pretty much only useful for these challenges though.
Since the challenges are only ever in one of three materials (Steel, Aluminum, ABS; all with densities defined by the challenge) and in one of two unit systems (IPS or MMGS), I have six possible Rhino template files to open. (Inch-Steel, MM-Steel, Inch-Aluminum, MM-Aluminum…and so on). In each of these templates, I’ve already set up the unit system, a grid setting that might be useful, and have set the Default layer’s material to the relevant material.
The Grasshopper script pulls the unit system from the Rhino file and sets the number to multiply with the kg/m^3 density provided, then pulls the material table (and since there’s only one, on the Default layer, that’s what I get back). Using the new Rhino tab in GH to Query Model Object and filter, etc, it selects the largest BRep in the Rhino file, and finds its volume.
Volume x density = mass.
I then publish the mass value to a remote control panel so I can keep the script minimized while frantically modelling, heh.
On the first model, that chamfer is going to slow down Rhino users. For example how did you know it was 3 x 2.517 ? A rhino user would have to do some construction geometry to figure it out.
Also, Rhino7 cannot calculate the volume; even though it’s a valid closed solid.
The volume bug might be something to do with Grasshopper differences between 7 and 8. Not sure though, our company switched right from 6 to 8.
With regards to how I knew the distances for ChamferSrf - I worked it out with trigonometry before starting. You don’t have to go into this particular challenge blind, and you’re allowed as many tries as you need. It’s also not against the rules to take advantage of commands remembering values, which helps!
@ssommerv I made a somewhat simplified version of the GH script you shared as a small, fun night project. I removed dependencies on third-party GH plug-ins. I could probably move even more into the python component, but this already should be good enough. One caveat, after loading new document you’ll have to press the reset button to read the model unit system and the material, since I took out the timer as well. The material definition I moved into a document user string with key “material” and as value the material name you used to look for in your script.
I’d probably want to keep the timer if it’s not affecting performance. Clicking Reset each time you load a new document is one more operation that takes time…
I tried the first part of the May challenge to see if the script works - not timed or anything, but I wonder if the round to number in your original script does just a truncation, since I come out at 184g for the first part if rounded up, but if I would truncate it would end up as 183g
I don’t think I have modelled anything this ‘complex’ before in such a short time.
I’d put the timer on the python script, that’s the only thing that needs to check the document for changed settings, the query component already does trigger automatically.