good to here...
john
should I add this feature?
does anyone have any feedback...

john
@garry k said:
...I think showing how to set up a tool bar is a good idea for a tool
If we are discussing best practice for an Extension that provides a tool, than I believe the 'menu' items should be separate from the tool and be used to initialize the tool...
The Extension .rb loads the lang dictionary and the menu loader code and that's all...
the menu code should load the tools logic and it runs...
if never triggered during a session it is not even loaded...
my 2 pence...
john
cheers pilou,
I'll add it in the next update...
is everything working?
john
new thread with plugin is Sine Circle
john
the spur came from a user post for me to do something I have wanted to try for a while...
Cylindrical Sinusoidal's would be a bigger mouthful...
but, in basic form it's a Sine Wave that follows a Circle, so called Sine Circle...

some images to clarify my terminology...


you can do some fun things with scaling copies...

this one was
1: 'Move' [wave copy]
2: 'Scale' [RB: top cir, top wave]
3: 'Move' [ same pair down same distance as in 1]
4: Select and Delete surface between top cir, top wave
5: 'PushPull' [top cir too bottom cir]
6: Select and Delete top cir
7: 'Orient Faces'

English, BR-pt and [bad] French so far...
john
@cortneyrichards said:
...In my case it was the Lisanne Sketchup model. Hope this helps.
-Cortney
Lisanne is at origin by default and if she was at the extremes of your model, it should be moved to origin after you delete her...
john
@johnwmcc said:
... What I was trying to ask was what the code would look like so that the extension isn't restricted to having its support folder and files in SU's Plugin folder.
File.join(File.dirname(__FILE__), File.basename(__FILE__, ".*"), 'the_file_your_after' )
have it anywhere for any version of ruby...
you'll often see it split so you can use the different bits for other things...
dir = File.dirname(__FILE__)
base = File.basename(__FILE__, ".*")
file = 'the_file_your_after'
target = File.join(dir, base, file)
john
did you try a different DC?
any from the Components Browser will confirm if it's the Extension or the DC that's failing...
john
I agree looking at other scripts is a worthwhile experience...
as my tag line says...
john
I touch on a couple of your points...
@johnwmcc said:
...But his example installs to the Plugins folder and looks for support files there. For development, at least, I want to be able to run it from an external folder, to share with different versions of SU for testing purposes. What would example code to do that look like?.
most rubies can be loaded by simply typing
load "<path to file>"
and you can even drag the file between the quotes to get the path... [on a mac a least]
to reload, use the up arrow and hit return, again and again and again....
For the icons you just do a version and platform check and have different images in the same place...
ver = Sketchup.version.to_i
if ver >= 16
osx = Sketchup.platform == ;platform_osx
ext = osx ? '.pdf' ; '.svg'
else
ext = '.png'
end
cmd.large_icon = cmd.small_icon = File.join(File.dirname(__FILE__), 'Resources', 'images', 'sine_circle#{“ext}")
@unknownuser said:
a good example of the Tools 'draw' method for displaying temporary geometry
name a plugin with what you think is a good example...
most I have looked into use the linetool class as a template...
john
I updated again...
I hadn't spotted that the mac dialog was less descriptive then intended...
I thought I broke it when I added the language files, but looking at the gif above, show it was always broken...
john
when you go to the Extension Warehouse and log in, hover on your User Name then click 'My Extensions'...
Dynamic Components will either be listed as UpDate Available, Disabled or Enabled...
if it not in the list something is wrong and you need to instal it from there...
john
I made it into an Extension and if it doesn't break on PC's I'll add it to the store...
updated rbz moved...
edit: not tested on early SU versions or Windoze... [a little...]
john
updated the rbz after some v8 glitches were reported...
let me know if more are found...
john
I think any dongle needs an intermittent fault and an expensive service contract...
john
or use grep
oface.material = Sketchup.active_model.materials.grep(/Brick_Antique/)
john
thanks,
I'm in a lull from the 'other one' and thought I'd try making some geometry...
it was originally based on an old Jim Foltz script and then developed with advice from Jim Hamilton...
I'm considering doing a 'Pro' version, so this is the proof on concept...
maybe that one that should be subscription only in keeping with the current trends...
john