Just remove the exclamation mark to @sel.clear
Posts
-
RE: Select all geometry
-
RE: Showing a web site in a Web Dialog
Morisdov,
You are right. I tried from another computer and it works fine.
Must be the firewall I have on my laptop.Thanks
Fredo
-
RE: Attribute dictionnary
Matt,
Then, you just need to loop through the collection of dictionaries of the model
model = Sketchup.active_model list_dico = model.attribute_dictionaries # List of all dictionaries list_dico.each do |dico| dico.each_pair do |key, value| #do what you want with the key and value end end -
Showing a web site in a Web Dialog
I am curious to know if anyone has already set an external URL in a Web dialog.
When I try the following code, I get an HTML error page:w = UI;;WebDialog.new w.set_url "http://www.google.com" w.showThe doc mentions a method allow_actions_from_host (hostname) to manage secure sites, but it does not work either, if I use it in the code:
w = UI;;WebDialog.new w.allow_actions_from_host "google.com" w.set_url "http://www.google.com" w.showThanks in advance
Fredo
-
RE: Attribute dictionnary
Matt,
You can get the dictionnary, via the model (either existing or to create a new one)
model = Sketchup.active_model attributedictionary = model.attribute_dictionary name, createThis is described in the Ruby doc.
Be careful to choose your own name to avoid interfering with other dictionaries used by some scripts.
Fredo
-
RE: [Plugin][$] Tools On Surface - v2.6a - 01 Apr 24
@fky said:
I've just seen a little bug in the arc display. When you move an arc created with this plugin, the center point (displayed by a cross) doesn't move.
Not really a bug actually. the script just create a construction point for the arc center for convenience (as it should maybe in native Sketchup!). But the construction point is not really part of the arc and does not keep any connection with it afterward.
@fky said:
It would be nice to have the tangent constraint when you create an arc after an other or a line to have a continuity.
Yes, that would be nice. On a Surface, it is however a little bit tricky, though probably feasible.
-
RE: [Plugin][$] Tools On Surface - v2.6a - 01 Apr 24
CadFather,
For easier access to your set of icons and cursors, I edited the first message of this thread and attached the archive file.
http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=11212&st=0&sk=t&sd=a#p76625Fred
-
RE: [req] double line tool
@edson said:
this could be a script on its own but perhaps it could be part of fredo's Tools on Surface. if a single line polyline is possible and it is there why not have a double line tool as well?
Edson,
I am working on this (I call it 'Rail'), but it would be a function that you apply afterward to a contour. The reason is that if you draw directly in Rail mode, then you would have no clean junction for a next portion of contour that would be drawn afterward. Also, you often use several tools to draw a contour (ex: Line and Arcs) and you may want to Edit it before transforming it into a wall.
This should be in Version 1.4 of ToolsOnSurface.
Fredo
-
RE: Scaling cursor icon?
Pixero,
Another solution is simply to draw the cursor as a circle with the method view.draw2d available in View class at the position of the cursor (this is how I do for my protractors). You just adjust the size of your circle based on your current parameters.
To make the Sketchup cursor disappear, I guess the best would be to have an 'empty' png file (or a cross or whatever you want to design the hot spot)
Fredo
-
RE: [Plugin][$] Tools On Surface - v2.6a - 01 Apr 24
@cadfather said:
Hi Fredo, i don't think this same 16/24 system applies to bezier as well - had a look at the scripts but cannot locate/attempt how to make the switch automatic..any pointers would be great..
No, Bezierspline is an old script now, but I plan to refresh it at some point in time.
This being said, it would be relatively simple to make just the modification about icons. Let me think about it. -
RE: [REQ] Advanced drape tool
Unfortunately, DrapeOnSurface would take a planar drawing and just drape it onto the surface.
To adjust volumes along a shaped surface requires much more work and a very different approach, since basically you would need to deform the whole 3D shape, with changes to the original geometry (just imagine a cube falling in the bowl!) -
RE: [req] sketch fillet tool
@remus said:
This is one of the few things i miss upon returning to SU after my brief flirtation with solidworks.
Its basically a tool that lets you select 2 eddges, specify a radius and then draws in a suitable fillet.
Any chance one of you lovely ruby people could knock this up? i'll buy you a pint...
Remus,
If I understand correctly, you just need a round corner script, specifying a radius at the vertex between two edges.
As two edges are necessarily in a plane, there are exact geometrical solutions with circular arcs, as well as with Bezier curves (degree 2). For each one, you would need to set a number of segments indeed to play with the precision.It is certainly feasible in Ruby. But I thought someone already did it. I remember there was another thread about the same subject (initiated by Ken), see http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=8887&p=53692&hilit=round+corner#p53692.
But apparently this script fillet.rb does not work!
-
RE: [Plugin][$] Tools On Surface - v2.6a - 01 Apr 24
@cadfather said:
large toolbars use 24 pixel icons, small 16 pixels.
but TOS does not load them automatically, so if you want small toolbars put the 16 in the folder - if large the 24
a quick way is to zip both set of icons in the TOS folder - when you want to change them just "unzip here" and overwrite all files (i use winrar).
CadFather,
First of all, thanks for your hard and impressive work on the icons and cursors. I am glad to see that this is appreciated by users.
The TOS script actually makes provision of big and small icons. The naming convention is to append **'_24'**or **'_16'**to the icon filename for big and small icons, respectively.
It is only because I am lazy that I did publish only one set (and in 32x32 by the way).
The attached archive contains your two sets of icons and cursors merged into one set, with the proper naming convention. All .png files should just be extracted and dropped in the folder TOS_Dir_13
Again, thanks very much
Fredo
-
RE: [Plugin][$] Tools On Surface - v2.6a - 01 Apr 24
@cadfather said:
goooodness me Fredo.. how many cursors in this plugin!
(could they impact on loading speed?)anyway, at 1am - with divorce proceedings well under way - i have finished icons and cursor - both for small and large toolbar (16, 24) [plus an extra set] - again just place them in your "...\Plugins\TOS_Dir_13" folder, overwriting all files".
@Plot-Paris, thanks, glad they can be of use

CadFather,
The cursors are very good and well designed. Nice work
For the icons, could you make them a little 'bigger', meaning using more of the surface of the toolbar button. On my small-screen computer (15'), it is hard to distinguish the shapes and visually see the differences between buttons.Thanks a lot. I promise not to touch the naming convention for these icons and cursors in future versions (but I may have to add new ones !).
Fredo
-
RE: [REQ] Advanced drape tool
I may have to speed up the delivery of my (future) DrapeOnSurface tool, as this will be doing more or less what Justry is describing: Take a plane collection of segments and faces, and lay it down onto a surface, with choice of orientation (and scaling).
-
RE: [Plugin][$] Tools On Surface - v2.6a - 01 Apr 24
@unknownuser said:
It has already been said by Gaieus, the Freehand On Surface tool does not close the path. You think you can fix this? Or am I missing an option?
Freehand does not close automatically and does not have inference on by default, but if you keep Shift depressedwhen approaching a remarkable point, the inference is activated (on existing point, and on points of the curve drawn).
Also CTRL depressed allow you to pause the input of points when you move the cursor. -
RE: [Plugin][$] Tools On Surface - v2.6a - 01 Apr 24
@watkins said:
Dear Fredo,
Thank you for the explanation. I use Sketchup for mechanical design and so I almost always draw on flat surfaces, hence my interest in using your tools for both plain and construction lines.
Kind regards,
BobBob (and Daniel)
That's simply a bug, thanks for signaling (actually the script was generating a face for the shape, even in construction line).
This is fixed and I updated the Zip file in the main message of this thread.Fredo
-
RE: [Plugin][$] Tools On Surface - v2.6a - 01 Apr 24
@watkins said:
I am unable to use the option 'Done' when using the line tool. I am assuming that 'Done' terminates line drawing, but then again, perhaps I should read the help file before writing this message. I have to use Escape to stop line drawing. Have I overlooked something?
Line on Surface is like its native cousin. The tool remains active until you change to another tool or back to selection. I provide chaining of segments, as does Skecthup (but if you draw with the Click-Drag-Release mode, there is no chaining). The "Done" menu is just to terminate the current line, and of course, start a new one, not to exit the tool. Escape does not exit either, but just allow choosing another origin (again like in native Sketchup). So just use Space or a short cut for other tools to exit the LineOnSurface tool.
@watkins said:
A useful addition would be the ability to select the line-type option when using the pie tool (plain or construction)
Just hit F2 or Ctrl Alone and you'll toggle between plain lines and construction lines. This method works for all tools, including Offset.
Hope this helps
-
RE: [Plugin][$] Tools On Surface - v2.6a - 01 Apr 24
@stu said:
Fredo,
Thanks again!.
I am, however having trouble with that popup at start.
After you mentioned the bug I deleted any older TOS files and re-installed and unzipped the latest folder.
On my XP machine all is fine, except that I still get the popup on opening the session.
On my Vista laptop when I do the same, the TOS tool bar has vanished in SU [and is not visible either in the Plugin Folder after unzipping]....but is able to be accessed via the 'Tools' drop down menu....still with the popup at the start.Stu
Stu,
The message warning should be fixed in the version currently attached to the main message of this thread. If it appears, it should be because you still have the old files "xxxOnSurface.rb" in your Pligins folder.
For the toolbar, did you check if the scripts are nebaled in the Windows>Preferences>Extension menu (as the tools now install as a Sketchup extension)?
-
RE: [Plugin][$] Tools On Surface - v2.6a - 01 Apr 24
@gaieus said:
One thing to improve maybe (and for me to really remove the "Draw" toolbar of native SU): could the line tool - after creating a closed loop of edges - form a face in 2D as well? I mean without drawing on an already existing face/surface?
Don't do that too quickly! There still a huge gap with the native Sketchup tools:
- Creation of faces when lines are drawn: I am working on it, but it is rather tricky
- Moving and deforming faces when doing an offset. My offset tool does not do that
- In order to keep track of edges 'on surface' for later contour edition, i assign them a small attribute string (about 10-15 characters). If your entire model is made out of lines and shapes on Surface, you will increase the file size. I plan to have a small tool to perform a clean up
- The tools are primarily designed to work on a surface. I just tried to make them behave 'honestly' when there is no surface, but this is just a side effect. By the way, I still have a lot of issues to resolve when lines or shapes are drawn on a mix of surface and non-surface.
Clearly Google could do a much better work, because it would be compiled code, and taking benefit of all the internal geometry representation they have, which is incompletely exposed via the Ruby API.
I'm glad anyway that you find the scripts useful and I apprecaite your feedback.
Fredo