[Code] Scarpino's SphereTool Sample ver 2.1.0
-
I'll try and find all my notes re. skell, interestingly, from what you just outlined, it may suffer from 'entities confusion', sometimes it ran and other times it just melted SU...
With Mat's help, I attempted to have this one work along the user drawn axis, so you could e.g. create a string of pearls.
Could you add or suggest how that could be done?
Then it's quite different from all the others.
john
-
Ok, all works on my mac,
I had to add the full path to the
require("/Library/Application Support/Google SketchUp 8/SketchUp/plugins/Scarpino/SphereMaker/spheretool.rb")
and I used a couple of icons I had from the last play, and I just used same full folder path for them as well.
I'll make some nicer ones if you want, this was my first attempt at making icons in SU... john -
@driven said:
With Mat's help, I attempted to have this one work along the user drawn axis, so you could e.g. create a string of pearls.
Could you add or suggest how that could be done?
See a new post (... I must have been reading your mind.)
I made a Library edition:
[ Code ] Scarpino's SphereUtil Sample -
@driven said:
I had to add the full path ... john
Oh to get SU to find the icons ??
I can prepend the icon paths with:
File.basename(__FILE__)
... the
UI::Command
class is cranky sometimes, with the icon locations.The icons look fine.. it's an example anyway.
I could tie it all up in an rbz for easy download. (Need to do the extension registration script first.)
-
@dan rathbun said:
VERSION 2.1.0
added some model tracking in to account for switching back and forth between models on Mac.I don't follow what's meant to happen, can't see anything new in my context menu.
When you switch between models, you switch tool and undo stacks automatically.am I being dim? john
@unknownuser said:
Oh to get SU to find the icons ??
no, before trying with icons, the path was failing.
I always use full or defined paths with require, it seems flakey. i.e.require path + "find"
OT: have you use find.rb with SU, it really shows up problems with 'Path' on mac's. -
@driven said:
I don't follow what's meant to happen, can't see anything new in my context menu.
Just a note, that when I referred to context menu, I was referring to entering and exiting group/component edit modes, via the context popup items "Edit Group" and "Close group".
You have to point to the group and right-click the mouse (or you don't see these items on the popup.)
Previously, the example tool, ignored any change in context, in fact, it was hard-coded to ALWAYS use the model's entities. So as Matt wrote it, you could not draw a sphere inside a group or component.
So in 2.0.0, I changed it to use
active_entities
, but once the construction point (for the center,) was drawn, the tool would put the sphere in the edit context of thec_point
, even if the user had changed the edit context.Version 2.1.0, checks to see if the edit context has changed when the second click is made, and acts within the new context, instead.
-
Well it on PC we can use a singleton instance of a tool, there's only one stack, and model.
But on Mac, this example now makes a new tool for each model's toolstack, but only ONCE.
His example was actually creating a new instance EACH time the toolbar button was clicked. That makes ruby garbage collection do more work.
And he was having ALL instances (models,) share 2 global variables.$ents
and$c_point
-
@dan,
I missed the fact you started the 2nd thread for this. I had 'another look at line tool, but what I meant is more like the Cyl.class at the bottom.i.e. After the user draws a line, a base circle 'path' is created, then at the line's 'mid-position' a 'filled circle' at 90ยบ to path, with rad 1/2 line length is created, then the follow-me, clean-up, etc...
You end up with the new axis aligned to the original drawn line and could select the end point to continue a 'string of pearls'... If you the intersect those, the geometry could be line-up, without having to rotate groups manually. However, clytool dosen't work here...I've been distracted by almost having a WebDialog do the same things as my macMessage video shows. [but it's an 'almost' standard webdialog].
john
-
-
@driven said:
I'll make some nicer ones if you want, this was my first attempt at making icons in SU... john
A note about toolbar icons.
GIFs are not the best. (They are good for print ads, cartoons, etc.) But the edges look ragged.
You should save as PNG, as the edges are anti-aliased. (smoothed via blending.)
Advertisement