[Plugin] Slicer5
-
@miki71ita said:
hi TIG!... I downloaded the last version 5.11 and....You wrote 'The best Plugin all over the world!!!' for me!!!
But I use the old 5.5v!.. And I'd like to know a tip... Your script (5.5v) makes the menu: 'Plugins' and the item: 'Slicer5' inside it.
How can I simulate the press of this item by ruby code to start your script from my small personal script, without using manually the mouse click on it?.. Tanks a lot and good job!!!
To make a shortcut key that works for any tool [even scripts] you simply open Window > Preferences > Shortcuts, filter for 'Slicer' [or whatever it is called in your locale if you have the more recent deBabelized version]. The available list of tools will be reduced to just those containing 'Slicer'. Pick the one you want and assign a shortcut key to it.
Don't use numbers as they are used for inputting lengths etc, and some others are already used like S for Scale and Ctrl+S for Save. Repeat if you want to add other shortcuts to other tools... OK to close and try your shortcut - if you don't have a suitable selected group etc the error message should be the same if if you ran it from a Plugins-menu item or Slicer5-toolbar button click.PS: Why haven't you upgraded to v5.11 ? It is more stable has a few minor issues fixed AND offers several new/improved tools, like Slotter and Audit...
-
@miki71ita said:
OK thanks for Tip, but I'd like to launch your script from ruby code into my small script....
maybe exist a SU ruby command to select and virtually push a specific button inside the Slicer5's Toolbar...? or to select your script from Plugin menu.....?? or something similar..!
Read the first part of the module inTIG-Slicer.rb
and see how the commands are called for the menus and toolbar-buttons.
Simply replicate those in your own code e.g.
cmd=UI::Command.new(S5){self::Slicer.new()}
where you do
S5="Slicer5_inside_my_code" cmd=UI::Command.new(S5){**TIG::Slicer.new()**}
make sure that it loads afterSlicer.rb
has loaded by naming if after it alphabetically OR includerequire 'Slicer.rb'
at the start of your code. -
I did embolden the 'important part':
**TIG::Slicer.new()**
If you type/copy+paste that in the Ruby Console you'll see it starts 'Slicer5'.
If nothing is selected it produces the same error message as running it from the menu or the toolbar might.
So your own code either needs to ensure something suitable [i.e. ONE 'solid' group/component] is selected when it gets to that line of 'Slicer' code, or just before that line you need to use something like:
Sketchup.active_model.selection.clear Sketchup.active_model.selection.add(object)
which will ensure that the group/component-instance which the reference 'object
' points to is the only thing selected when the 'Slicer' code kicks in... -
....amazing! You have a solution for everything .... Thank you so much TIG!!!
-
Sorry, but I'm a very super beginner in SU and ruby-script language.....!!! And so my question is:
to run your 'Slicer5' plugin I can use the 'Plugins-menu item' or 'Slicer5-toolbar button click'.... -
ok thanks for Tip, but I'd like to launch your script...
-
hi TIG!... I downloaded the last version 5.11 and....You wrote 'The best Plugin all over the world!!!' for me!!!
But I use the old 5.5v!.. And I'd like to know a tip... Your script (5.5v) makes the menu: 'Plugins' and the item: 'Slicer5' inside it.
How can I simulate the... -
About the Bug...
-
Hi people... I have a problem with Slicer5 v5.5....
-
@tig said:
I have now added the 'Txt' ttf font in a zip file onto the end of the main download page... read the notes with its link, if you want to download it...
zip http://forums.sketchucation.com/download/file.php?id=81087
on page http://forums.sketchucation.com/viewtopic.php?p=374969#p374969Hello, I am a Chinese user, I am Chinese language translation tools for the Chinese language how to use the default tool, thank you!
-
Do you understand how to make a 'lingvo' file ?
Here an overview...
Find your 'locale' id, in the Ruby Console thus:
Sketchup.get_locale.upcase
For Chinese it'll probably be
'ZH-CN
'
Make a copy of theTIG-SlicerEN-US.lingvo
file that is in theTIG-Slicer
subfolder, within thePlugins
folder.
Name this copied file to match that, thus:
TIG-Slicer**ZH-CN**.lingvo
Edit that new lingvo file using a plain-text editor likeNotepad++.exe
.
A lingvo file contains words or phrases; one 'set' per line.
In the English version the original word or phrase, and its translation are the same.
There is a special symbol separating the two parts
'<==>
'.
For example...
Slicing tool**<==>**Slicing tool
Make your translation for the word or phrase.
Replace the right-hand version.
For example in 'Simplified Chinese' you could use something like...
Slicing tool**<==>**ๅ็ๅทฅๅ ท
Repeat your translations as desired...
Save the lingvo file.
When Sketchup restarts it should find this new lingvo file, and because it matches your locale it will translate any English matching words or phrases that it finds, using your locale's translations... Any words that you do not translate remain the same; so if you leave the line as
Slicer5<==>**Slicer5**
Your menu items etc will then say 'Slicer5
' even though they will use Chinese translations for other words you might have given translations to...
Tip: You might need to 'convert' the lingvo file to a UFT-8 encoded type, to get the Chinese characters to be correctly displayed You can easily do that withNotepad++.exe
.
-
@tig said:
Do you understand how to make a 'lingvo' file ?
Here an overview...
Find your 'locale' id, in the Ruby Console thus:
Sketchup.get_locale.upcase
For Chinese it'll probably be
'ZH-CN
'
Make a copy of theTIG-SlicerEN-US.lingvo
file that is in theTIG-Slicer
subfolder, within thePlugins
folder.
Name this copied file to match that, thus:
TIG-Slicer**ZH-CN**.lingvo
Edit that new lingvo file using a plain-text editor likeNotepad++.exe
.
A lingvo file contains words or phrases; one 'set' per line.
In the English version the original word or phrase, and its translation are the same.
There is a special symbol separating the two parts
'<==>
'.
For example...
Slicing tool**<==>**Slicing tool
Make your translation for the word or phrase.
Replace the right-hand version.
For example in 'Simplified Chinese' you could use something like...
Slicing tool**<==>**ๅ็ๅทฅๅ ท
Repeat your translations as desired...
Save the lingvo file.
When Sketchup restarts it should find this new lingvo file, and because it matches your locale it will translate any English matching words or phrases that it finds, using your locale's translations... Any words that you do not translate remain the same; so if you leave the line as
Slicer5<==>**Slicer5**
Your menu items etc will then say 'Slicer5
' even though they will use Chinese translations for other words you might have given translations to...
Tip: You might need to 'convert' the lingvo file to a UFT-8 encoded type, to get the Chinese characters to be correctly displayed You can easily do that withNotepad++.exe
.
Thank been resolved, there is a problem, slice tile can not be achieved, the previous version can, thank you!
-
@unknownuser said:
Thank been resolved, there is a problem, slice tile can not be achieved, the previous version can, thank you!
Please explain ore clearly - I don't fully understand you...
Are you getting error messages in the Ruby Console ?
What is failing ?
Is this after you have messed with a lingvo file ?
Does it work if you temporarily remove the lingvo file from the subfolder ?
Which version worked ?
Which version fails ?
-
@tig said:
@unknownuser said:
Thank been resolved, there is a problem, slice tile can not be achieved, the previous version can, thank you!
Please explain ore clearly - I don't fully understand you...
Are you getting error messages in the Ruby Console ?
What is failing ?
Is this after you have messed with a lingvo file ?
Does it work if you temporarily remove the lingvo file from the subfolder ?
Which version worked ?
Which version fails ?
Version 5.11, can not be achieved slice tile, without any prompting!
-
@unknownuser said:
Version 5.11, can not be achieved slice tile, without any prompting!
Let me try to recast what you said, as I understand it...
Version 5.11, does not make slices, without any error messages...
If has a toolbar and menu items, and you have a saved SKP, with just one group selected, and you run the tool... what happens ???
Because it is working successfully for me [and many hundreds of other users] then it suggests that you have something wrong in your installation.
Please try reinstalling everything.
Ensure that there are no copies of the files that should be in the tool's subfolder inside thePlugins
folder by mistake.
There should be two files in thePlugins
folder
Slicer.rb deBabelizer.rb
and a subfolder named
TIG-Slicer
containing
TIG-Slicer.rb
and the 8 PNG image files for the toolbar buttons
and the 6 lingvo files...
-
I've noticed an error with the 'Portuguese' lingvo file that was recently supplied with v5.11
It's incorrectly named 'PO' and it contained no translations anyway !
Here's the correct 'PT' version.TIG-SlicerPT-lingvo.zipExtract it from the zip.
If you want Portuguese translations, please remove the incorrect 'PO' version and add this correct 'PT' one to the tool's subfolder. If your 'locale' is not 'PT' you can always change that part of the name to suit... -
@tig said:
I've noticed an error with the 'Portuguese' lingvo file that was recently supplied with v5.11
It's incorrectly named 'PO' and it contained no translations anyway !
Here's the correct 'PT' version.[attachment=0:2ob4u420]<!-- ia0 -->TIG-SlicerPT-lingvo.zip<!-- ia0 -->[/attachment:2ob4u420]Extract it from the zip.
If you want Portuguese translations, please remove the incorrect 'PO' version and add this correct 'PT' one to the tool's subfolder. If your 'locale' is not 'PT' you can always change that part of the name to suit...I may not know the expression, films can not be razed to the ground piece, thank you
-
@tig said:
I've noticed an error with the 'Portuguese' lingvo file that was recently supplied with v5.11
It's incorrectly named 'PO' and it contained no translations anyway !
Here's the correct 'PT' version.[attachment=1:zqav1736]<!-- ia1 -->TIG-SlicerPT-lingvo.zip<!-- ia1 -->[/attachment:zqav1736]Extract it from the zip.
If you want Portuguese translations, please remove the incorrect 'PO' version and add this correct 'PT' one to the tool's subfolder. If your 'locale' is not 'PT' you can always change that part of the name to suit...Translated into Chinese, it can not achieve the flattening function, the following documents attached to the Chinese language, thank you! !
[attachment=0:zqav1736]<!-- ia0 -->TIG-SlicerZH-CN.zip<!-- ia0 -->[/attachment:zqav1736]
-
OK.
What you are saying is that when using a Chinese lingvo file the 'Flattening' function fails.
If you change the translation for the 'Flattening' parts of the lingvo back to the original file's text, does it then work ?
If so, then it suggests that some 'characters' in your translation are not working properly.
Did you use the 'UFT-8' option when saving the Chinese lingvo file ?
The translate strings go inside " " in the code, so you can't include any " in the translation, as it breaks the way the code reads it in...
Can you try alternative 'wording' ?
-
@guanjin said:
@tig said:
I've noticed an error with the 'Portuguese' lingvo file that was recently supplied with v5.11
It's incorrectly named 'PO' and it contained no translations anyway !
Here's the correct 'PT' version.[attachment=1:r7efhnet]<!-- ia1 -->TIG-SlicerPT-lingvo.zip<!-- ia1 -->[/attachment:r7efhnet]Extract it from the zip.
If you want Portuguese translations, please remove the incorrect 'PO' version and add this correct 'PT' one to the tool's subfolder. If your 'locale' is not 'PT' you can always change that part of the name to suit...Translated into Chinese, it can not achieve the flattening function, the following documents attached to the Chinese language, thank you! !
[attachment=0:r7efhnet]<!-- ia0 -->TIG-SlicerZH-CN.zip<!-- ia0 -->[/attachment:r7efhnet]I am really stupid, I did not expect this problem, thank you!
Advertisement