Volume calculator
 1-9  10-29  30-49  50-69  70-76

Previous
Next
 From:  Frenchy Pilou (PILOU)
7421.10 
Cool new tools! max Moi calculate default is 10 second on my computer result: 1686790,25
(free DesignSpark mechanical gives with Step volume exported from moi) in 0 second! ;)
1688427,718mm³ against theoric 1688427,718 3876

EDITED: 30 May 2015 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
7421.11 
Dinos
Great work!
I didn't knew about this method.
http://research.microsoft.com/en-us/um/people/chazhang/publications/icip01_ChaZhang.pdf
This algorithm is much faster than all moi calculations in my script.
I have some ideas:
1. Add line: moi.copyTextToClipboard(volume);
2. Add line: file.close(); moi.filesystem.deleteFile( fileName );
3. Obj file smaller than Stl. Script will be faster with export to Obj.

Marbleman
Thank you!
But Dinos's script is much better. :)

Pilou
>>free DesignSpark mechanical gives with Step volume exported from moi) in 0 second!
It's incompartable things. :) Of course the C++ compiled code will be faster than thousands calculations of moi factories, or exporting and reading stl files from harddisk.
But it's better than nothing.

P.S. We need to add data about densities of various materials.

EDITED: 30 May 2015 by SMIRNOV

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
7421.12 
About the Dino script
<< This script works by exporting the selected solid to an STL file and then loads it back and calculates the volume from the STL data.

Where I load it back ? In Moi there is not Import STL ! ???
---
Pilou
Is beautiful that please without concept!
My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  dinos
7421.13 In reply to 7421.11 
Thanks Max! Really appreciated. :-)

I was looking for an efficient way calculate volume and hit upon this http://stackoverflow.com/questions/6518404/how-do-i-calculate-the-volume-of-an-object-stored-in-stl-files

Really nice ideas, BTW!
I think that using obj is a good solution and it can improve things a lot. Also, materials!

I'll be away from my computer until monday night, but in the meantime feel free to improve this script any way you like!
I really like the idea of the mini open source scripts that are created on this forum by 2 or more people. That was the case with the LightOptions script. It was Mike's idea and helped a lot during its development. Then you included it in your UI and it was improved once again.
Cool stuff.

Dinos
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
7421.14 In reply to 7421.8 
Hi Dinos, re:

> That can be easily fixed if there is a way to set the STL export options to Ascii
> during export, but nothing that i tried worked.

That should be something like:

var OldSTLExportType = moi.settings.stlExportFileType;
moi.settings.stlExportFileType = 'Ascii';


<....>


// Reset original STL export type when finished.
moi.settings.stlExportFileType = OldSTLExportType;


- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
7421.15 
Updated version of Dinos's CVolume.
Now it uses obj file. Performance boost +50~100%
Defaut angle = 3. You can use command line parameter to change it. Example: _CVolume 10 or _CVolume 1

EDITED: 7 Mar 2022 by SMIRNOV

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
7421.16 In reply to 7421.15 
How it works ? Inside Moi ? You import an OBJ file ?

Ok , I have found the method : Now 1 second on my computer! :)

But same time and result when adding a number! (little or big)
1685.156253 When importing an OBJ

With the normal file
1688,220446 in 2 seconds by default _Cvolume

1668, 250237 in 1 Second with _Cvolume 10

1561,334244 in 0 second with _Cvolume 100

EDITED: 31 May 2015 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
7421.17 In reply to 7421.16 
Pilou, forget about obj :)
It's internal script mechanics. The script exports solids to an obj-file, then loads them back as polygonal model, and calculates volume.

P.S. I have great ideas about this script. ;))
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
7421.18 In reply to 7421.17 
:=)

Yet existing is now some speedy : just maybe the precision can be improved a little! :)

EDITED: 31 May 2015 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
7421.19 In reply to 7421.17 
The script requires running MoI with elevated privileges to work in Windows default installs. If you can look at how you are writing the objects to avoid that would be good.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
7421.20 In reply to 7421.19 
Hi BurrMan
new version of the script will use system temp dir instead of moi dir.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
7421.21 In reply to 7421.20 
:)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
7421.22 
CVolume v.0.98

Added: User interface, densities of miscellaneous materials etc.
Changed: temporary directory

In the next version I'll add tool for a model resizing by adjusting mass or volume.

P.S. Click to "Volume" or "Mass" label to copy value to clipboard.

EDITED: 7 Mar 2022 by SMIRNOV

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  ed (EDDYF)
7421.23 
Excellent Max.

I don't know how far you want to take this, but if you had the option to input the cost per unit of the material, the script could display the value of the object. Great for jewelers or folks who have their design 3D printed in metal.

Or pull the material cost in from an XML file, if such a file exists in the folder. Possibilities here for the user to update their material cost XML file off the web, using a script outside MoI of course, to pull in the current price of precious metals.

Taking a step further, associate the material cost XML file with a MoI style. Assign a "silver" Style to a ring, you get the material cost if it's cast in silver (not including waste of course). Assign a "18k gold" Style to a ring, you get the material cost if it's cast in gold.

Just some far out ideas ...

Ed Ferguson
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
7421.24 
Aaaaaaaaah! What a such list to translate! :)

PS I have put _cvolume 0 : that gives the good result with 2 decimal! 1688, 42 (takes just 26 seconds on my computer ;)
The other values goes very more speedy! :)
_cvolume 2 1688, 34 in 3 seconds
_cvolume 3 1688, 22 in 2 seconds
_cvolume 4 1688, 06 in 1 second
_cvolume 5 1687, 84 in 0 second

_Cvolume Alone is like _cvolume 3 : 1688, 22 in 2 seconds

EDITED: 31 May 2015 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  hep
7421.25 
very nice touch :-)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  grandpi (PIERREARCHI)
7421.26 In reply to 7421.25 
Great plugin !!!
Thanks a lot. Wait for it for a while ...
Pierre.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
7421.27 
Version 1.0

Improved interface.
Added mass and volume adjustments. Great feature! I like it :)

Click to "Volume" label -> Copy volume value to clipboard
Click to "Mass" label -> Copy mass value to clipboard
Double click to "Volume/Mass Calc." label -> Restore original volume

EDITED: 7 Mar 2022 by SMIRNOV

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  dinos
7421.28 In reply to 7421.27 
Hi Max,
I really love what you've done to the volume script :-)

Just one request:
in my original version i was converting cubic mm to cubic cm as this is a lot more meaningful, especially when dealing with 3D printing.
Can you add that feature back? As far as i know no one deals with cubic mm..

Other than that, excellent work :-)

Dinos
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
7421.29 In reply to 7421.28 
Hi Dinos
Sorry, forgot about this :)
Fixed

EDITED: 7 Mar 2022 by SMIRNOV

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
Show messages:  1-9  10-29  30-49  50-69  70-76