Solids to weights
-
Hello
could anybody please provide me with a pluggin that would give me a weights (in Kg) for a solid.
I don't know anything about ruby, so I'll try to explain what I want :
-
I draw a board (solid of course), and make it a component
-
I want to know how much it'll weigh.
-
click on Solid to Kg pluggin --> a dialog box opens asking : "Kg / m3 ? :"
-
I type in the information, let's say it's pine wood : 740
--> the pluggin gives me the result = xx Kg
that would be step one into this pluggin.
step 2 is to send this piece of information into the Components box, under the name of it.
step 3 is when selecting x number of components the pluggin shows Total weigh, and export a list of parts with weights....
in fact maybe something such as the Cut List pluggin + weight
Ok, I know it's lot to ask for, but I am sure the community could appreciate such a tool.
best regards,
thank you for reading all this
-
-
You need the Volumes - v8 'semi-automatic' or use one of the 'Volume' rubies
Then multiply the volumes by the density... >>> mass [aka weight] -
Tig's C of G for part 1
-
-
Bertier
My
C of Gravity
tool should do everything you want...It calculates the CofG and the Weight of a selected instance ['Find C of G'].
It then adds 'markers' and appropriate text to the model.
If you make a group of say two assembled 'parts' and combine them as one group it will give one CofG/Weight of that right off - this is OK if the density is the same for both of them...
BUT there is a second option 'Composite C of G' for two CofGs...
With this you first make the CofGs for each of the two parts separately and give them their different densities etc [it must be in same units, e.g. kg/m3]: now run that option and a third CofG is made marking the shared CofG and showing the Composite Weight.
You can even get the Composite CofG / Weight of composites themselves - so you can combine three or more in this way...*PS:
To add the info to the Component's 'description' you will need to edit the CofG tag's text and copy to the clipboard then paste to the appropriate box in the Component's details [in Compo'Browser>Edit or 'Entity Info']. You could do this programmatically...To export the CofG data you need to find all CofG groups - iterate through all groups in the model - then use
group.get_attribute("CofG","tag",false)
which returns 'true
' if thegroup
is a 'CofG'; in it there is a CofG component_instance - let's call if 'coginst
' - that has other attributes that you need
coginst.get_attribute("CofG","volume",nil) coginst.get_attribute("CofG","weight",nil) coginst.get_attribute("CofG","id",nil)
The 'id' is the component/instance name with a CofG prefix, or if it's 'Composite' additional text saying that too...
These pieces of data can then be used to write a CSV file - I suggest look at myComponentReporter++.rb
for some clues on doing this...* -
thanks TIG
it looks great... but sounds Chines to me
as far as pluggin are concerned, I am a happy end user !
CoG is great, indeed it does some of what I'd asked for; it'll do for now.
have a great week end.
-
Bertier
Here's your CofG Reporter...
http://forums.sketchucation.com/viewtopic.php?p=278046#p278046
-
Hi Bertier.
The Cutlist plugin could do what you ask but it would need some modification of course to do everything.
It already computes volume, so if your model was made from the same type of material, then it's a simple matter of multiplying.
If your model is in metric units, then it computes total cu.m. If in imperial units, it displays board feet.
If it was composed of different materials with different masses, then of course you need a way of assigning weights to either the material or each component.
I always imagined using custom attributes. I will need this for other things as well, for example for grain orientation for the layout function (since Sketchup has no idea about this). Other attributes which would be useful would be cost of material.
Then you could either add the cost, weight, etc back into the description or simply output as part of the materials list output In either html or csv output)But, of course, only the first part is there without modification and I currently have no plans to made modifications for a short time anyway. It is nearing summer here and now I need to so some projects in the real world - in the shop!
Steve
-
fair enough !
have a great summer....it's start freezing here !
Advertisement