[Plugin] Tube cutting optimisation
-
-
i tried
made this file
get the following error message"optimisation
14
Error: #<ArgumentError: wrong number of arguments (1 for 0)>
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/BGSketchup/Tube_cutting_optimisation/Rb/Main.rb:118:inround' C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/BGSketchup/Tube_cutting_optimisation/Rb/Main.rb:118:in
add_optimisation_in_html'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/BGSketchup/Tube_cutting_optimisation/Rb/Main.rb:117:ineach' C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/BGSketchup/Tube_cutting_optimisation/Rb/Main.rb:117:in
add_optimisation_in_html'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/BGSketchup/Tube_cutting_optimisation/Rb/Main.rb:109:ineach' C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/BGSketchup/Tube_cutting_optimisation/Rb/Main.rb:109:in
add_optimisation_in_html'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/BGSketchup/Tube_cutting_optimisation/Rb/Main.rb:53:inoptimisation' C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/BGSketchup/Tube_cutting_optimisation/Rb/Main.rb:35:in
show_hide_window'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/BGSketchup/Tube_cutting_optimisation/Rb/Main.rb:118:in `call'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/BGSketchup/Tube_cutting_optimisation/Rb/Main.rb:118"tube cut opt -
Hello Glro,
Happy to see you again watching at my plugin ! ;o)
The error come with SU 8. In SU 2014 the error doesn't appear because SU include a new version of ruby.I'll correct this by using other function compatible with SU8.
I'll post it at same time than a new version which will allow exports in CSV format.If you have other idea to improve plugin, as usual you can tell me.
Inteloide
-
Just posted the new version !
-
@inteloide said:
Just post the new version !
Thank you for your plugins; it sounds magical for the user, but i know there is a lot of work behind
I tried the new version; now it works in SU8; i got the expected result from the model i uploaded previously
Then i selected one tube and i made it longer; clicked on "calculate/refresh" but the list didn't change
I realized maybe i had to select the component again by clicking on the button in the up right corner
i did ... and yes; this time it changed the list, but the result doesn't seem correct
Besides, by definition, a tube is a structural element that have one dimension much longer than the 2 others; so, would it be possible for the plugin to recognize automatically which dimension is much bigger, without having to define the vector by mouse?
This program might be useful for scaffolders who use tubes and fittings
-
Please check your personal messages.
-
Hello !
Just post new version !@unknownuser said:
Then i selected one tube and i made it longer; clicked on "calculate/refresh" but the list didn't change
I realized maybe i had to select the component again by clicking on the button in the up right corner
i did ... and yes; this time it changed the list, but the result doesn't seem correct
=> should work now !
@unknownuser said:
Besides, by definition, a tube is a structural element that have one dimension much longer than the 2 others; so, would it be possible for the plugin to recognize automatically which dimension is much bigger, without having to define the vector by mouse?
=> Clever ! I'll try to integrate it in future. The problem is with components with the biggest size not align with an axis of the model (tube created with angle of 45° between "vector" axis and model axis...
For JQL :
@unknownuser said:
- Should there be a difference between the sum total units of your script and the outliner?
=> I have seen the difference but I cannot explain, there are only 15 instance of the component in your model. Can you find other ?
@unknownuser said:
- Can the script be made to read the default unit of measure for the model (the attached model uses inches).
=> Done
@unknownuser said:
- Would there be a way to input the available lengths of the SOURCE material and calculate the optimize cuts for each? For example, 1x4's in the lumber yard come in lengths of 2 foot increments, starting at 6' up 12'. So I was thinking the user might be able to input something like 6,8,10,12 into a "source material" field of the script and the script would calculate the optimal lumber lengths required and the cut-lengths for each lumber size.
=> That's much more complicated (another algorithm to develop...) let see in future what I can do.
Inteloide
-
Thank you
I tried:
the plugin windows opens automatically when sketchup is launched: possible to avoid that? because you don't always need to use the plugin
calculate/refresh now works
2 lines for tubes same length; possible one line only?
in cut optimization, if french is the system language, you have to enter the number with a comma, not a decimal point; otherwise your computer freezes; possible to avoid freezing?i understand the difficulty to retrieve the length when the component doesn't follow main axis; would it be possible to store the tube component axis directly in the sketchup model, so that when you open it again, you don't have to clic again (same component, same axis)
also, if the point is to cut the tubes, would it be possible/useful to parameter the cut width?
-
Hello !
Just post new version that solve some of your issue. Main improvement is in vector auto-detection.
It try to find which dimension was change between component original definition and the component instance you selected. If within change (you didn't scaled selected component), the plugin try to find the biggest dimension axis in the component. If it's a cube (grrr...) then the plugin doesn't not define a vector, so user must define it. In any case user can change the vector afterward.I take into consideration, for next update, your requests :
- add cutting width parameter (should not be so complicated)
- Try to develop model structure to look component included in sub-components.
- I'll try to implement a option to list only components in selected entities of the model (to avoid listing all "tubes" of the model).
See you after some hours of coding ;o)
Inteloide
-
@inteloide said:
Hello !
Just post new version that solve some of your issue. Main improvement is in vector auto-detection.
It try to find which dimension was change between component original definition and the component instance you selected. If within change (you didn't scaled selected component), the plugin try to find the biggest dimension axis in the component. If it's a cube (grrr...) then the plugin doesn't not define a vector, so user must define it. In any case user can change the vector afterward.I take into consideration, for next update, your requests :
- add cutting width parameter (should not be so complicated)
- Try to develop model structure to look component included in sub-components.
- I'll try to implement a option to list only components in selected entities of the model (to avoid listing all "tubes" of the model).
See you after some hours of coding ;o)
Inteloide
thank you, you repaired everything
-
I could not get the latest version to accurately work at all.
Try the attached file. -
@jclements said:
I could not get the latest version to accurately work at all.
Try the attached file.[attachment=0:q94of7rb]<!-- ia0 -->test 2 for counting component.skp<!-- ia0 -->[/attachment:q94of7rb]
downloaded the file
plugin didn't work
switched units to millimeters
the plugin worked...concersion issues...?
-
Just post version 1.2.1 which correct your bug (html bug actually).
Inteloide
-
Big correction just post.
Also cut width function addedNow I'll work on multi-tube lengthes cutting optimization as per JClements request.
Version 1.3.0 Improvements : ADDED : Cut width taken into account CORRECTED : Errors with inches unit in optimisation. Now user can enter " or ' in tubes' length or loss or cut CORRECTED : Scan also groups and other components entities CORRECTED : Javascript errors make a bugsplat screen appear CORRECTED : Avoid bug with components names
-
Hello,
Last version (1.4.0) includes some corrections and optimization.
Mainly (for JClement) it allows to calculate cutting from different uncut tube sizes. Just enter tube sizes with a '/' between each.
In next revision, I'll include a crash preventer function, because, if you enter wrong parameters in tube cutting optimization (for example without a loss allowable and a big number of tubes), you may have some cases where calculation will take hours... For example a model with 30 tubes may have 10^32 solutions to be computed...
Inteloide
-
I couldn't get the "slashes" ( / ) to work for multiple source lengths.
-
Hello everybody !
Can somebody try the new version to check if everything goes ok ?
Then I'll post it in pluginstore.
Thank you.NB : I added an help file to explain how to use it.
Inteloide -
@inteloide said:
Hello everybody !
Can somebody try the new version to check if everything goes ok ?
Then I'll post it in pluginstore.
Thank you.NB : I added an help file to explain how to use it.
Inteloideit seems to be working fine
i don't understand the concept of "waste allowed", though
since the goal is to minimize the waste (loss...)it should be put at 0 everytime, no?
what is the use of a limit?
i tried to change it and the result is the same -
Waste allowed is for the plugin algorithm : if, during calculation, it found a solution with a loss shorter than "allowable waste" then plugin will not to find better solution : it's faster...in some case
-
Hello,
Just post new version :
ADDED : Translation in French. Other translation can be proposed by used in translating file BGSketchup/Tube_cutting_optimisation/Rb/Localization.rb
ADDED : Link to help file in status bar
ADDED : Help file directly into the plugin rbz file
CORRECTED : "Check for update option" didn't work, now solve
OPTIMIZED : Optimized scripts for statisticsBest regards
Inteloide (BGSketchup)
Advertisement