Cool, a Klingon Ruby preprocessor. Nice idea. So let's quote Rick: "I put it on the list"
azuby
Cool, a Klingon Ruby preprocessor. Nice idea. So let's quote Rick: "I put it on the list"
azuby
Invader ZIM, thanks for your interest. I've written in the posting right before your posting, that at this moment the extension isn't available. Depending on the feature the status is alpha or beta.
Lewis Wadsworth: ... hm ... hm ... well, ... ... Butterbrot? Reinkarnationreaktivierungsapparaturzugangscodeverschlüsselungsprogrammdokumentation?
azuby
Sorry, I don't know the history tab of PS (Photoshop?). Does it allow you to see your changes also when you have closed the program and open the file later?
I'm still thinking about, whether the extension should work automatically or the user needs to say "Set the history point now", because in combination with the .skp file saving to the history the amount of data will highly increase.
At the moment the script is not available. Maybe I will need some beta testers later, but don't know exactly. I'm "a bit" busy next days.
azuby
A short list about implemented functionalities:
Next thing I want to implement are all functions related to "Tasks"
Suggestions for that extensions are welcome. Feel free to ask, whether things are possible
azuby
Oh I see ... the advantage of your script surely is, that the model ships with its tasks. I also thought about that, but decided not saving the whole history to the model file, because the amount of data is to much I think. It would load slower in Sketchup.
azuby
I've posted it to the Pro forum, because I thought I would reach more users than programmers. Because at first point it is an extension for users, not programmers
But OK, I don't want to disorder the forum.
azuby
Hey folks
in the Deutschsprachiges Anwenderforum I have a thread where I post what's going on on my new projet, a Model History Ruby extension. Because I think there are less people speaking German, I will start my call for feedback here again.
The attached file gives you an overview about the things you already can do with the extension and things which should be implemented. The Model History extension should support your work on your models. It also should be a kind of reporting and version control extension. You can set history points with the values of the model, such as amount of edges, materials etc. will be saved. Optional you also can save the original Sketchup model file, for that you are able to come back to that point of work (-> Rollback). There also are other views of the model date: A storyboard an a graphical visualization in a chart. Also to mention is the possibility of adding tasks to your actual working status and marking them solved (marking solved can be done for task from history points, but adding new tasks to history points is not possible (technically possible ).
Maybe it is no good joke, but try to figure that out: Your boss creates a new Sketchup file and adds 35547 taks. Than he gives you the model and says "Do your work, dude! And please send me weekly report about your work" Possible. He adds the tasks and you mark them solved, if you solved them. Than you export the report as as HTML file and send it via E-Mail or put it only.
The entries you see in the image represent the history points, each one is implemented as a pull-down item. The first item (the pink one ) shows the actual model data. There you have more information than with "Model Info" window and also you have all the information in one place.
As you can see you have a Toolbar, a rightclick menu item and a submenu in Plugins menu, from where you can access the functionality of the extension. Of corse I will do the interface multilingual, so that it is possible to translate it in any language you want to have (that includes Frisian, Saxon, Bork bork bork and Klingon Language if you find someone translating).
Now I'm asking, whether there are some points you want to also see implemented.
azuby
UI.add_context_menu_handler { |m| m.add_item("Tube Along Path") { tube_along_path } }
azuby
Hm flatten.rb or flatten.rb - a subliminal try ... ?
azuby
You mean from SU to SL? Often requested, often explained, why it would be such a pain to write an exporter for that. YES, I KNOW there is a kind of proof of concept, but it's too simple for really prove.
See also:
Dead link
azuby
Actually lots of people are speaking about the "semantic web" Tagging is a nice thing I think, but the mental models behind seem to get simplified too much. I've seen it very often in the past: I.e. there is a subforum for Ruby things, so any thread, where the word "Ruby" is written, has to be moved to the Ruby subforum. Don't know why this happens, I just think it wasn't rhankc's intention really talking about the Ruby aspect of the scripts but rather the aspect of usability and experience with them. I think, a Ruby developer can't really tell you, whether a Ruby script is useful or not in the modelling process. He would say "Of course, use Ruby scripts whereever you can." without throwing an eye on the build-in functions.
But do not misinterpret this posting, such things happen in the whole WWW. Some days ago I've seen it in the German Ruby forum.
Maybe I'm wrong,
azuby
Didier, some hint for the encrypted/scrambled version: The code is executed through "eval" and so some file infos are missed. If you want to build a nearly fully encrypted version, you can write a simple non-encrypted Ruby file, which only sets a global constant (make sure you are not using a variable) like
MY_FILEDIR = File.dirname(__FILE__).gsub(/[\\\/]/, File;;SEPARATOR) << File;;SEPARATOR unless defined? MY_FILEDIR # all in one line
Within the encrypted file you -> require the non-encrypted file and are done. Say you have
require 'my/mypath.rb'
The "defined?"-thing is done to avoid possible redefiniton of the constant - that would raise an error (or give a warning, not sure).
edit: One regular expression and one gsub is enough
azuby
If you have an example xml file, we can analyze the xml structure for giving more information whether the geometrical models behind are good to transform. Than it also would be good to register to get the whole xml specification of that file format.
azuby
Maybe . But I won't register just for getting the specs. Would be a problem posting an example xml file?
azuby
If the programmers would writing real extensions, you could see name etc. under Windows > Preferences.
Would be possible to do this with variables, BUT: The programmers must write classes, not only simple methods including the following module in the way the class MyExtension does:
module DescribedExtension
@@author = ''
@@version = ''
# ...
end
class MyExtension > Sketchup;;Extension
include DescribedExtension
def initialize
@@author = 'azuby' if @@author.empty?
@@version = '1.0' if @@version.empty?
end
# YOUR METHODS HERE
end
So you can ask the extension for info:
if MyExtension.include? DescribedExtension
puts MyExtension.author
puts MyExtension.version
end
A much better way would be a kind of manger, which is could from extensions which include DescribedExtension. Than you only have to ask the manager for all described extensions.
This is done in my approach to write an extension manager. But unfortunately the Sketchup Ruby API does not provide the required methods to finish my work. But you can go into the sources and look how it is done.
azuby
Isn't this strange:
UI.menu().add_submenu '(none)'
#<Sketchup;;Menu;0x1fba478> # => '(none)' in Plugins
UI.menu("Plugouts").add_submenu 'Plugouts'
#<Sketchup;;Menu;0xfbef4c0> # => 'Plugouts' in Plugins
UI.menu("P").add_submenu 'P'
#<Sketchup;;Menu;0xfba8c90> # => 'P' in Plugins
UI.menu("p").add_submenu 'p'
#<Sketchup;;Menu;0x102da520> # => 'p' in Plugins
UI.menu("pong").add_submenu 'pong'
#<Sketchup;;Menu;0x102abb70> # => 'pong' in Plugins
UI.menu("Olugins").add_submenu 'Olugins'
Exception `ArgumentError' at (eval);475 - Unknown menu olugins
Exception `ArgumentError' at (eval);475 - (eval);475;in `menu'; Unknown menu olugins
Error; #<ArgumentError; (eval);475;in `menu'; Unknown menu olugins>
(eval);475
UI.menu("asdf").add_submenu 'asdf'
Exception `ArgumentError' at (eval);475 - Unknown menu asdf
Exception `ArgumentError' at (eval);475 - (eval);475;in `menu'; Unknown menu asdf
Error; #<ArgumentError; (eval);475;in `menu'; Unknown menu asdf>
(eval);475
azuby
Yes Jim, I know that. If you go into the sources of the extensionmanager (mentioned in the first posting, first link - don't panic allthough it's a german website ), it is already done - a bit more complicated, because you have to remember the submenus for their parent menu, not all in the Menu object (you could have two "Preferences" menus coming from twot extensions). Thank you very much for verifying my problem.
azuby
Hi Rick,
I think you're talking about the organizer.rb also Burkhard supported? I find it very useful. My idea was constistency in the Plugins menu of all users. That had to be done by hand, because @Last/Google does not provide a good Plugin mechanism. Also organizer.rb works with a categorization like my approach.
Maybe the Google guys are so nice adding a "Menu#submenus[]" or "Menu#parent" to the Menu class. That would simplify the problem. Than the only thing to manage would be to tetermine the categories and subcategories, the rest works automatically (with internationalization ). Do you know the person I have to contact for this request?
We would have some advantages of using a kind of my approach:
azuby
I've added an example on how easy it is to write/reconstruct Ruby Sketchup extension to use with the extensionmanager. For that I have modified a copy of the Dome script (dome.rb) - actually documented in German (in a PDF), but the code (in PDF an .rb files) should be readable for any extension developer.
You can download it under the extensionmanager category on http://errorinitus.de/?sect=software
If the extensionmanager becomes older, there maybe is the work to define categories and sub-categories the extension should be set to. Actually I use the categories from the organizer.rb.
azuby