[Plugin] extrudeEdgesByEdges.rb
-
@tamfore said:
@tig said:
There are as usual detailed instructions at the start of these scripts - open in NotePad.exe and read them...
I could not find what you are referring to when speaking of Detailed instructions at the start of these scripts and open in NotePad.exe Confused with that... I am a little new to plugins and do not understand that?
OK - here's step by step guide...
Almost all scripts are .rb files and whilst a few are encrypted most are readily 'readable'.
They are just a plain-text files with an alternative suffix so that SUp knows to load them on startup.
I am assuming you are v7 on a Vista PC, but if it's v6, XP or a Mac then it'll still be pretty similar...
Open the '..\Sketchup 7\Plugins' folder and find the script you want to 'read' - in this case it's calledextrudeEdgesByEdges.rb
.
Select its icon, right-click the mouse and pick 'Open with' in the context-menu [or something equivalent].
If the application 'Notepad' is not listed as an option then pick 'Choose Default Program...' and find 'Notepad.exe' [typically it's located in the 'C:\Windows\System32' folder].
Either way you'll now be able to set 'Notepad' as the default program to always open .rb files - don't worry about doing this as it will not affect Sketchup's ability to load and run these scripts - it just means that in future when you double-click on a file ending with .rb it'll open in 'Notepad' so you can read it.
Note that 'Notepad.exe' is the built-in plain-text editor in Windows - there other similar suitable applications like 'Notepad++' [which is what I use] - it must be a 'plain-text-editor', BUT do not use word-processors like 'Write' or 'Word' as they can leave hidden formating inside a file if you save it and then Sketchup will have problems loading the script !
Anyway, you should now have the script open in a Notepad window and you can read its contents.
The usual convention is that at the start of the script there's a block of text that explains the script's ownership, copyright, what the script does, how to use it, versions and changes etc etc - these are added as 'comments' to help users, and the text is preceded with a#
or it's within a=begin...=end
block so that Ruby ignores them when it loads the code.
Once you get to a line saying something likerequire 'sketchup.rb'
the code is starting and your eyes should glaze over... it might be interesting occasionally to read such code though to see what the script is doing...
The other usual convention is to add any menu code at the end of the script - so to see where it'll load and what it'll be called simply scroll to the end. For 'EEbyEdges' the menu is "Plugins" and it'll be called "Extrude Edges by Edges". You can change the menu to another standard one off the top bar and also any text it has, and save the file [keep a backup copy in case you mess up] - e.g. translate it into your own language. Within the code itself there will be prompts, dialogs etc, and again that text is editable if desired - just remmeber that the text is inside "" [or ''] and respect these "" etc - e.g.UI.messagebox("Select 2 Groups of Edges !\n1st is 'profile' and 2nd 'path'.")
- Note that\n
is a new line character and\t
is a tab character.
You'll probably just want to read the script and then close it without saving, BUT if you do change the script and save it these changes will only become apparent when Sketchup is restarted.
Happy Sketchup'ing New Year -
thanks a lot
-
Thanks for this!!
-
Fantastic!! Many thanks
-
Great. So useful
Thanks alot -
this post deleted and re posted at Extrude Edges by Rails
-
This post resubmitted at Extrude Edges by Rails
-
This post deleted and re posted at Extrude Edges by Rails
-
This is v2.0 - it's now been deBabelized, with a combined Extrusion Tools Toolbar added and miscellaneous glitches tweaked...
http://forums.sketchucation.com/viewtopic.php?p=166780#p166780 -
Here's v2.1
A typo meant that the lingvo files didn't translate properly [an ES user spotted it...]
http://forums.sketchucation.com/viewtopic.php?p=166780#p166780 -
Here's v2.2
Lingvo files updated. FR=Pilou, ES=Defisto.
http://forums.sketchucation.com/viewtopic.php?p=166780#p166780 -
Here's v2.3 - a typo preventing the plugins menu item working has been corrected.
http://forums.sketchucation.com/viewtopic.php?p=166780#p166780 -
tig. query
edges by edges, may function similar to edges by rail?- Add option Smooth
- Remove requirement of Groups of Edges/Curves. used alone edges
is it possible?
-
@diego-rodriguez said:
tig. query
edges by edges, may function similar to edges by rail?- Add option Smooth
- Remove requirement of Groups of Edges/Curves. used alone edges
is it possible?
It is possible, but I have left it as it was originally made for now - it was the first in the set...
-
Here's v2.4 - updated FR lingvo file.
http://forums.sketchucation.com/viewtopic.php?p=166780#p166780 -
Thank you very much descriptive detail.
-
Took me a bit to warm up to the plugin -- text descriptions of visual proceedures don't work so well for me
But now that I made the effort to figure it out I must say this is one very cool plugin set -- I'll have to get used to it but it may very well become part of my regular modeling tool-set... but it's definitely on my short list of plugins that need a Paypal donation made to support its development.
Thank-you.
Best,
Jason. -
@jason_maranto said:
Took me a bit to warm up to the plugin -- text descriptions of visual proceedures don't work so well for me
But now that I made the effort to figure it out I must say this is one very cool plugin set -- I'll have to get used to it but it may very well become part of my regular modeling tool-set... but it's definitely on my short list of plugins that need a Paypal donation made to support its development.
Thank-you.
Best,
Jason.Thanks...
There are also several skp examples and even a movie tutorial or two on the forum too...
-
Haloo guys ,i have problem, why can¨t use for rails lines, only curves ?
thx
-
@unknownuser said:
Haloo guys ,i have problem, why can¨t use for rails lines, only curves ?
thxYou've probably published this in the wrong place !
EEbyEdges
does actually take any edges or curves etc within the two selected groups... but offers no controls over the form otherwise.
I think you meanEEbyRails
This tool takes a Profile, a Rail1, a Rail2 [which can be the Rail1 again] and a MeldingProfile [which can be the Profile again].
These each need to be Curves*** - a curve is a collection of edges - these can be as an arc or bezier or ANY collection of connected, unbranched edges that you join using theweld.rb
script [see the Smustard site for a free download - it's an invaluable tool with many uses].
The reason you them being joined into a curve is that how else would the tool know when you finished picking one set of edges for the profile and wanted to start picking those for the rails ? It is very simple to have straight lines welded into a 'curve' if you want straight shapes as profiles or rails - there are even ways of making a single line into a one segment curve - I actually published a tutorial on this recently in the very tool's thread...
So, with most of theEEby..
tools you CAN'T use a plain line [edge] for a profile/rail... BUT it's easy to convert one into a 'curve' before using the tool anyway - useweld
... ***SUp calls 'polylines' 'curves which can be confusing as they needed be curved at all !!!
Advertisement