[Plugin] Auto Centerpoint

[Plugin] Auto Centerpoint

Postby Jim » Tue Mar 11, 2008 1:40 am

I've written a new plugin that will automatically add a centerpoint to a drawn circle.

Requires SU version 6.

New Version Updated 5/4/2008:

http://sketchuptips.blogspot.com/2008/0 ... point.html

* Update Sep 2011

I am recommending not installing this plugin at this time due to early design decisions and inadequate implementation. The following image shows the files installed by the plugin and which can be removed.

acp.png
0
Last edited by Jim on Sat Sep 17, 2011 2:06 pm, edited 3 times in total.
Reason: Just cleaning up and organizing the Plugin forum. Adding [Plugin] tag
Hi

Jim 
Global Moderator
 

Re: Auto Centerpoint Plugin

Postby agrazdi » Tue Mar 11, 2008 3:33 am

Is there a way that it stays " ON " by default, so every day i open SU i don´t have to active it ??

Thanks
0

agrazdi 
 

Re: Auto Centerpoint Plugin

Postby Jim » Tue Mar 11, 2008 3:41 am

Not yet... it is a feature that is coming. Does it work good for you?
0
Hi

Jim 
Global Moderator
 

Re: Auto Centerpoint Plugin

Postby Jim » Tue Mar 11, 2008 11:28 pm

agrazdi wrote:Is there a way that it stays " ON " by default, so every day i open SU i don´t have to active it ??

Thanks


How about using the Extensions dialog? Once enabled, it stays on. The only down-side is to turn it off, you need to restart SketchUp. This is what makes the most sense to me.
0
Hi

Jim 
Global Moderator
 

Re: Auto Centerpoint Plugin

Postby Jim » Wed Mar 12, 2008 2:44 am

Wow, that one went over like a lead baloon. :)

Anyway, I've about got it finished up. I removed the Plugin menu items and made it available through the Extensions dialog. This means a restart if you want to stop it - which I don't care for, but can't think of anything better. But I hated the idea of another Plugin menu entry even more.

It now remembers if it was on or off when closing and restarting SketchUp, as well as starting a new file, or opening a file.

New version will be 2.0, look for it soon.
0
Hi

Jim 
Global Moderator
 

Re: Auto Centerpoint Plugin

Postby Baker518 » Sat Mar 15, 2008 8:31 pm

Jim,

I don't care what anyone else says, I like it. It seems like you wanted to do more but ran out of gas. Here's what I hope you ultimately wanted to do with this:

The guide can easily be deleted, simply by clicking "Delete Guides".

It only shows up on the original single surface, it doesn't expand as an object is Push/Pulled, and it doesn't set a guide at the end of say, a cylinder when p/p, nor does it connect the two guides as a center line would. If you were ever to consider modifying it, this is something I would like to see.

Regardless, I will still use it, thank you very much

Mike
0
Don't worry about things you have no control over. Worry is a lack of Faith!

Baker518 
 

Re: Auto Centerpoint Plugin

Postby JClements » Sat Mar 15, 2008 11:06 pm

Jim, this functionality has been on my wishlist as a "standard" for the circle tool for the last two releases of SU.

Since the script is loaded as an extension, perhaps you could allow holding the Alt-key on the first click to disable the centerpoint or vice versa (allow the centerpoint to be created only with the Alt-key)?

I do wish there was an option to automatically assign the construction point to a specified layer so that I can easily turn all my "construction" geometry on or off. Better yet, but I don't think its possible, is to have the extension change the way View > Guides and Edit > Delete Guides operates in the first place. My ideal would be

View Guides:
·Guides
·Construction Points
·Both

Delete Guides:
·Guides
·Construciton Points
·Both

At any rate, a big thank you.


QUESTION: what does the Singleton.rb in the Ruby subdirectory accomplish?
0
Last edited by JClements on Sun Mar 16, 2008 9:02 pm, edited 9 times in total.
John
Illustrator
Beaverton, Oregon
User avatar
JClements 
Premium Member
Premium Member
 

Re: Auto Centerpoint Plugin

Postby watkins » Sun Mar 16, 2008 12:02 am

Dear John

If you go to:

http://www.crai.archi.fr/RubyLibraryDep ... i_page.htm

you will find two scripts. One deletes construction lines only, and the other construction points only.

Regards,
Bob
0

watkins 
 

Re: Auto Centerpoint Plugin

Postby Baker518 » Sun Mar 16, 2008 3:49 am

I find myself often deleting the guides and lines, only to replace them at a later time. I think rather than delete them, just make them go to a layer of their own instead. That notion has just dawned on me, remembering that I had asked for the same delete options only to find it already existed in the two scripts mentioned.

Another thought comes to mind, TIG has written a new script that moves hidden to layer, this may be something to expand on for the guides, but I dont know.

TIG wrote:See: viewtopic.php?p=47582#p47582 for v1.1...

This script Hidden2Layer.rb moves hidden active entities onto a layer called HIDN...

Usage: Put this file into the Plugins Folder.
Pick "Hidden to Layer" off Plugins Menu...
Any Hidden Active Entities are moved onto Layer HIDN
This means that any Hidden Model-based Geometry is moved,
BUT if you want to do Hidden Entities that are inside of
Groups or Component Definitions then you need to Edit them
so their Entities are then 'Active' and then on running
this tool they will be moved to HIDN...

It's main use is that when you want to export to DWG or DXF for use in CAD packags the SUp based hidden geometry is on a special layer - HIDN - and can be frozen or switched-off so it's not visible...
0
Don't worry about things you have no control over. Worry is a lack of Faith!

Baker518 
 

Re: Auto Centerpoint Plugin

Postby Jim » Sun Mar 16, 2008 1:07 pm

It's trivial for me to put the construction points on their own layer. What if I used CenterPoints as the layer name?

Or would you want to select a layer each time the extension is enabled?
0
Hi

Jim 
Global Moderator
 

Re: Auto Centerpoint Plugin

Postby Jim » Sun Mar 16, 2008 1:23 pm

Baker518 wrote:Jim,

I don't care what anyone else says, I like it. It seems like you wanted to do more but ran out of gas.


Thanks Mike, it does exactly what I meant it to do - no more, no less :) I didn't write it for anyone in particular but myself, however i did expect a few more comments.

Here's what I hope you ultimately wanted to do with this:

The guide can easily be deleted, simply by clicking "Delete Guides".

It only shows up on the original single surface, it doesn't expand as an object is Push/Pulled, and it doesn't set a guide at the end of say, a cylinder when p/p, nor does it connect the two guides as a center line would. If you were ever to consider modifying it, this is something I would like to see.

Regardless, I will still use it, thank you very much

Mike


These are good ideas. I think I can make it add another point after a pushpull on a cylinder.
0
Hi

Jim 
Global Moderator
 

Re: Auto Centerpoint Plugin

Postby JClements » Sun Mar 16, 2008 9:10 pm

Jim wrote:It's trivial for me to put the construction points on their own layer. What if I used CenterPoints as the layer name?

Or would you want to select a layer each time the extension is enabled?


Jim, something like "CircleCenterPoints" as a layer name is fine by me. If I want to rename the layer or move the points to another layer later on that is easy enough to do; at least this way the points can be turned on or off irregardless if they are in nested entities or not.
0
John
Illustrator
Beaverton, Oregon
User avatar
JClements 
Premium Member
Premium Member
 

Re: Auto Centerpoint Plugin

Postby Baker518 » Sun Mar 16, 2008 11:12 pm

Jim

You write good scripts, good thought and insight to need and purpose. I am confident that what ever addition and/or change you make will be good. As far as a layer, for guides and/or points, I like it the layer name CenterPoints, that way any center point you add should end up there, maybe.

Thanks
Mike
0
Don't worry about things you have no control over. Worry is a lack of Faith!

Baker518 
 

Re: Auto Centerpoint Plugin

Postby Jim » Sun Mar 16, 2008 11:44 pm

Points now get put on CenterPoints layer

http://sketchuptips.blogspot.com/2008/0 ... point.html
0
Hi

Jim 
Global Moderator
 

Re: Auto Centerpoint Plugin

Postby JClements » Mon Mar 17, 2008 6:58 pm

Jim, are you sure the link downloads the latest version?
0
John
Illustrator
Beaverton, Oregon
User avatar
JClements 
Premium Member
Premium Member
 

Re: Auto Centerpoint Plugin

Postby Jim » Mon Mar 17, 2008 9:00 pm

JClements wrote:Jim, are you sure the link downloads the latest version?


Yes, just copy the new files over top of the ones already installed.
0
Hi

Jim 
Global Moderator
 

Re: Auto Centerpoint Plugin

Postby JClements » Tue Mar 18, 2008 6:30 am

Jim,

This may be a bug.

When finishing a circle with the second mouse click, I can't make an entry in the VCB to change the radius.

John
0
Last edited by JClements on Tue Mar 18, 2008 5:20 pm, edited 1 time in total.
John
Illustrator
Beaverton, Oregon
User avatar
JClements 
Premium Member
Premium Member
 

Re: Auto Centerpoint Plugin

Postby Jim » Tue Mar 18, 2008 11:13 am

JClements wrote:Jim,

This may be a bug.

When finishing a circle with the second mouse click, I can't make an entry the VCB to change the radius.

John


Seems you're right. Let em look into it.
0
Hi

Jim 
Global Moderator
 

Re: Auto Centerpoint

Postby Yup_done » Thu Apr 24, 2008 4:29 am

After a brief time away from sketchup, I've decided to give it another shot.
Your plugin seems "spot on" and dare I say: something which would be better off included in the actual program itself.
Kudos and regards,
Chris D, near MTL, canada
0

Yup_done 
 

Re: Auto Centerpoint

Postby Jim » Sun May 04, 2008 3:14 pm

Thanks Chris,

I haven't yet had time to see if I can fix the VCB problem. I had a couple projects come up unexpectedly.
0
Hi

Jim 
Global Moderator
 

Re: Auto Centerpoint

Postby Jim » Sun May 04, 2008 3:15 pm

New version is available here:

http://sketchuptips.blogspot.com/2008/0 ... point.html

Let me know how it works for you.
0
Hi

Jim 
Global Moderator
 

Re: Auto Centerpoint

Postby juju » Sun May 04, 2008 4:39 pm

:cry:
Error Loading File auto_centerpoint.rb
No such file to load -- ruby/singleton
0
Save the Earth, it's the only planet with chocolate.
User avatar
juju 
Premium Member
Premium Member
 

Re: Auto Centerpoint

Postby Jim » Sun May 04, 2008 5:20 pm

Juju wrote::cry:
Error Loading File auto_centerpoint.rb
No such file to load -- ruby/singleton


OK, should be fixed. You'll need to download again from the same link and try again. Sorry.
0
Hi

Jim 
Global Moderator
 

Re: Auto Centerpoint

Postby outersketcher » Fri May 30, 2008 10:08 pm

Jim,
As a newbie at sketchup, I was excited to find this ruby script.
The script seems to have installed ok since I do get the little single button menu.
But, how do I use it? I've tried clicking on it first to activate the ruby... but when I use the circle tool... I don't see any center point. And I've tried creating the circle first, and then clicking on the auto center button and then back to the circle again... neither method works. Am I not doing something right?

I am running sketchup 6 on an intel-based mac running system 10.5.2.

Thanks,
outersketcher
0

outersketcher 
 

Re: Auto Centerpoint

Postby Jim » Fri May 30, 2008 10:19 pm

I just downloaded it and reinstalled it, and it works. You should have the following files and folders in your Plugins folder:
acp.jpg


Then, you can toggle the creation using the toolbar button.

One other thing - points aren't created until you switch tools.
0
Hi

Jim 
Global Moderator
 

Re: Auto Centerpoint

Postby outersketcher » Mon Jun 02, 2008 9:40 pm

Well, bummer...still can't get it to work yet.

I've double checked the plugins folder and the two folders and file are there.
The plugin button appears and responds to my mouse by going darker when I click on it... but, nothing else happens when I draw the shape and click to a different tool.

This might be a Mac thing? Are there any other Mac users using this ruby okay?

David
0
"I mostly enjoy not being dead.." -Grandpa

outersketcher 
 

Re: Auto Centerpoint

Postby Jim » Tue Jun 03, 2008 10:42 am

It could be a Mac thing - I don't have a way to test on a Mac. However, it should work on both platforms. Can someone try this on a Mac?
0
Hi

Jim 
Global Moderator
 

Re: Auto Centerpoint

Postby david_h » Tue Jun 03, 2008 3:29 pm

I am getting the same message. Im on a PC. I however did not get the RUBY file in my Plugins directory that was shown in the little graphic above.
Error Loading File auto_centerpoint.rb
No such file to load -- ruby/singleton
[/quote]

OK, should be fixed. You'll need to download again from the same link and try again. Sorry.[/quote]
0
If I make it look easy. . .then it probably is.
User avatar
david_h 
Top SketchUcator
 

Re: Auto Centerpoint

Postby Jim » Wed Jun 04, 2008 11:13 am

Make sure when you extract the .zip file, the folder structure is maintained.
0
Hi

Jim 
Global Moderator
 

Re: Auto Centerpoint

Postby placidfury » Sat Jun 07, 2008 5:44 am

I'm getting the ruby/singleton error as well... have re-downloaded, dir structure is there... any ideas? Thanks!
0
User avatar
placidfury 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: No registered users and 19 guests

Visit our sponsors: