SketchUcation Premium Membership

 

 

[Plugin] Exploded Arc Centerpoint Finder UPDATE Oct 27, 2009

[Plugin] Exploded Arc Centerpoint Finder UPDATE Oct 27, 2009

Postby Chris Fullmer » Mon May 11, 2009 7:20 pm

Name: Arc Centerpoint Finder
Version: v1.0
SU Version: Developed on SU 7, should be compatible with 6 and 5 at least.
Description: This scipt places a construction point at the centerpoint of an arc, even after the arc has been exploded in SketchUp.
Usage: Select two line segments that used to be part of an arc object in SketchUp. Then run the plugin from Plugins>Chris Fullmer Tools>
History:
1.0: 2009-05-11
  • First release
1.1: 2009-10-27
  • Now works better in Group/Component edit mode

This came from a request made here:
http://www.sketchucation.com/forums/scf ... 80&t=18948

If you run into situations where it doesn't work, and you're pretty sure it should work, please let me know.
EDIT: Sorry the video is so quiet! You might need to turn up your speakers a little.


And its available in French now too! Find it HERE!

Chris
552
Please, register (free) to access all the attachments on the forums.
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6688
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby Pilou » Mon May 11, 2009 7:43 pm

Another cool plug :)
You are very fair to use the Fredo6 bend plug ;)
Please, register (free) to access all the attachments on the forums.
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
Pilou
Top SketchUcator
 
Posts: 10048
Joined: Wed Jan 23, 2008 10:33 pm
Operating system: Windows
SketchUp version: 6
License type: Free
SketchUp use: hobby
Level of SketchUp: Advanced

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby JClements » Mon May 11, 2009 7:58 pm

Hey, Chris

Another nice one.

I'm guessing you've figured out how to analyze co-planer segments to determine if they have ARC (and probably circle) attributes. If, so could you use the code to reconstruct/convert them back into "real" SU arcs or circles?

Another, cool thing would be to recognize say a circle that had been scale along one axis to make an ellipse, then pick its center point or rescale back into a circle or display its radius.


John
John
Illustrator
Beaverton, Oregon
User avatar
JClements
Premium Member
Premium Member
 
Posts: 773
Joined: Wed Nov 14, 2007 4:32 pm
Location: Portland/Beaverton, Oregon
Name: JClements
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: illustration, cartoons
Level of SketchUp: Intermediate

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby mitcorb » Mon May 11, 2009 8:14 pm

Dear Mr. Fullmer:
I'm not worthy. I'm not worthy. I'm not worthy.
But thank you, nonetheless. You got skills.

Actually, the last sequence is a perfect demo of a higher usefullness of this plugin.
Thank you once again.

By the way, you did not confirm if that was a Takamine guitar in your music post.
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb
Top SketchUcator
 
Posts: 3404
Joined: Sat Mar 22, 2008 2:32 pm
Location: USA
Name: Tim
Operating system: Windows
SketchUp version: 8
License type: Free
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby wolfy » Mon May 11, 2009 8:34 pm

Thanks again Chris. I have run into the problem of trying to find center points of exploded arcs many, many times. Thanks for this very useful solution!!!
wolfy
 
Posts: 46
Joined: Tue Oct 07, 2008 5:45 am

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby Dave R » Mon May 11, 2009 9:46 pm

Chris, this is cool!

I haven't had a chance to download it but does it work on non-contiguous line segments as well?
Inspecting mirrors is a job I could easily see myself doing.
User avatar
Dave R
Global Moderator
 
Posts: 9003
Joined: Tue Nov 13, 2007 11:52 pm
Location: SE Minnesota
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: woodworking
Level of SketchUp: Advanced

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby mitcorb » Mon May 11, 2009 10:08 pm

Chris:
I am going ahead and loading the plugin. Does it automatically attach to the cf tools category?
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb
Top SketchUcator
 
Posts: 3404
Joined: Sat Mar 22, 2008 2:32 pm
Location: USA
Name: Tim
Operating system: Windows
SketchUp version: 8
License type: Free
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby Chris Fullmer » Mon May 11, 2009 11:43 pm

Hi Mitcorb, yes it will automatically put itself into the CF tool set in the plugins menu. I have done that on all my scripts because I found that I was clogging up the plugins menu rather quickly. So now they all load themselves into the CF sub menu.

Hi Dave, yes it will work on segments that are not connected in any way. I think the only requirement is that the segments are coplanar.

Also, it should be noted that it will return bad points sometimes. Specifically, if you are using 2 segments that are not the same length, that will lead to a center point being added that is probably not really the centerpoint of the arc. It relies on the line segments being equal in length. I could build another check into it so that it checks that first if that would be helpful.

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6688
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby Chris Fullmer » Mon May 11, 2009 11:48 pm

Oh and Mitcorb, I forgot to mention, it is an Ibanez! :)
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6688
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby mitcorb » Tue May 12, 2009 4:50 am

Hmmm coulda sworn it was a Takamine because mine has the same body profile and your bridge seems to have the same tapered profile as mine. I did a so-so model of mine, but I did not render it.
And now I think I will try to attach a skp of the furniture I modeled using your new tool.
This is not my design and some of the components and connections are not precise.
But, as some kind of tribute to your capabilities, see attachment.
I apparently cannot attach the skp. I will try to do a jpg.
Please, register (free) to access all the attachments on the forums.
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb
Top SketchUcator
 
Posts: 3404
Joined: Sat Mar 22, 2008 2:32 pm
Location: USA
Name: Tim
Operating system: Windows
SketchUp version: 8
License type: Free
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby mitcorb » Tue May 12, 2009 5:03 am

By the way, Chris:
On your reply to Dave, is there any reason to limit the number of segments to two? It would seem that the more coplanar segments, the more precision. Maybe not. Here again, I have no real understanding of the Ruby language.
That tool saved me a ton of time, because the upper backrest section was done with it, but the lower section webbing was copied one element at a time and individually rotated and spaced.
The dadblamed model is 3.99 MB!

I used Tube Along Path for the round sections, follow me on the elliptical tube frame, Fredo Freescale bend tool on the curved work, native pen and pushpull on the rectangular sections. I knew it was going to be a fat file, but I wanted to do it anyway.
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb
Top SketchUcator
 
Posts: 3404
Joined: Sat Mar 22, 2008 2:32 pm
Location: USA
Name: Tim
Operating system: Windows
SketchUp version: 8
License type: Free
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby Chris Fullmer » Tue May 12, 2009 6:28 am

Looks great, glad its helping already!

If it is a true arc, 2 segments are just as precise as 3 or 3,000. So no need to worry, 2 segments is all it needs. I could add the ability to select lots of connected line segments and have it attempt to find all their centerpoints. But that would take considerably more time. Its a script I've discussed with someone else, and maybe in time it will happen. But for now, this is all it is, but its still pretty useful.

@John, the idea of revuilding exploded arcs is a good one, and I thought it would be easy to accomplish. But it actually takes more work than I realized it would. I think its possible, but I'm not 100% sure yet. I'll add it to my list of scripts I'd like to work on. I seriously need to start a list like that....

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6688
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby watkins » Tue May 12, 2009 10:31 am

Dear Chris,

I need to find centre-points so frequently that an icon would be useful. Would that be possible?

I raised the issue of a proper lathing tool in a previous thread, but no one took on the challenge. Using follow me when lathing produces exploded arcs and circles. It would be extremely useful to have a tool that would lathe a shape about an axis but produce edges that were proper circles or arcs.

Kind regards,
Bob
watkins
 
Posts: 1367
Joined: Wed Nov 14, 2007 5:47 pm

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby Dylan » Tue May 12, 2009 10:48 am

Thanks Chris.

The video really shows how useful this is.
Dylan
 
Posts: 1932
Joined: Mon Oct 22, 2007 1:41 pm
Location: Royston (Herts), UK
Name: Dylan Morton

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby Dave R » Tue May 12, 2009 11:22 am

Chris, this is an interesting plugin and I caan see a lot of possibilities. I was just playing around with it using a randomly drawn Bezier curve. Below are the results. The curve with the guidepoints is the result of finding the centers for the 1st & 11th segments, the 2nd & 12th, 3rd & 13th and so on. The straight line comes from the centers of the 1st & 20th segments, the 2nd & 19th, 3rd & 18th and so. There must be some sort of progression in the distances between points but I didn't take the time to figure that out. I don't know if that sort of thing has much usefulness but I thought it was an interesting result to find while getting my first cup of coffee injected into my system.

Bezier Centers.jpg
Please, register (free) to access all the attachments on the forums.
Inspecting mirrors is a job I could easily see myself doing.
User avatar
Dave R
Global Moderator
 
Posts: 9003
Joined: Tue Nov 13, 2007 11:52 pm
Location: SE Minnesota
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: woodworking
Level of SketchUp: Advanced

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby Free Agent » Tue May 12, 2009 12:40 pm

wierd just after reading this, and going back to modeling, i needed to find a center point of a curve :) thanx alot
User avatar
Free Agent
 
Posts: 273
Joined: Thu Jun 05, 2008 10:00 am
Location: Cape Town, South Africa
Name: Sean

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby Jim Smith » Tue May 12, 2009 12:57 pm

Chris,

I just wanted to add my thanks :enlight: for this very helpful plug in and again for all the others- a very impressive collection of time savers. :thumb: :thumb:
"Out of clutter find simplicity,
from discord find harmony,
In the middle of difficulty lies opportunity"
Albert Einstein
User avatar
Jim Smith
Premium Member
Premium Member
 
Posts: 418
Joined: Mon Nov 12, 2007 2:25 pm
Location: Crown Point, Indiana, USA , home and office)
Name: Jim Smith
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby thomthom » Tue May 12, 2009 1:00 pm

Free Agent wrote:wierd just after reading this, and going back to modeling, i needed to find a center point of a curve :) thanx alot

That's because Chris mixes his plugins with crack cocaine making everyone addicted. :D
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17595
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby Ben Ritter » Tue May 12, 2009 4:19 pm

Chris,

Again, many thanks.

Ben
Ben Ritter
 
Posts: 353
Joined: Wed Nov 14, 2007 4:55 pm
Location: Malta, Illinois

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby Sir » Tue May 12, 2009 4:49 pm

Free Agent wrote:wierd just after reading this, and going back to modeling, i needed to find a center point of a curve :) thanx alot


same for me! yay chris :thumb:
Sir
 
Posts: 178
Joined: Mon Jan 12, 2009 3:42 pm
Name: Mat B

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby nobnob » Mon Jun 22, 2009 3:06 am

Thanks Chris!

I'll make a script that changes exploaded edges to an arc curve.
Yours is very helpful for me.

note: line 42 does not check that both of two selected entities are edges. It checks only one.

Thank you.
nobnob
 
Posts: 4
Joined: Tue May 12, 2009 1:30 pm
Name: Nobuo I.
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby Chris Fullmer » Mon Jun 22, 2009 4:52 am

Hehehe, oops! Line 42 does have problems. I should fix that and update it. Thanks for pointing it out. I'm sure if you look closely you'll find lots of other places that could be improved.

Good luck on your script. You'll make a lot of friends around here if you get that up and running!

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6688
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby Bob James » Mon Jul 13, 2009 12:01 am

I'm very late in thanking you for this plugin: literally hundreds of times I've had to re-create the centerpoint of a curve that, in the process of manipulation, has "lost" its centerpoint.

A perfect example of a plugin that saves a lot of time.



thomthom wrote:That's because Chris mixes his plugins with crack cocaine making everyone addicted. :D


Hey, Thom, cut that out: if they arrest him how will we get any more of his great plugins :lol:
"If you don't plan ahead you'll be at the mercy of those that do" - Ashleigh Brilliant

"Bad is not good until worse happens" - Bob James
User avatar
Bob James
Premium Member
Premium Member
 
Posts: 607
Joined: Fri Jan 18, 2008 9:29 pm
Location: Lompoc, CA, USA
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby chango70 » Mon Jul 13, 2009 12:17 am

Hi Chris I just want to say thank you for making such wonderfully useful tools for the SU community. I was thinking maybe I will start to learn Ruby one of these days. For someone who have had no experience with any programing language where would you recommend that I start?
chango70
 
Posts: 587
Joined: Tue Mar 25, 2008 3:06 pm
Location: London

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby EarthMover » Mon Jul 13, 2009 2:32 am

I missed this one too. Something I always need as well. Thanks a ton Chris!
A designer is an emerging synthesis of artist, inventor, mechanic, objective economist and evolutionary strategist. - R. Buckminster Fuller
Some of my 3D crap
User avatar
EarthMover
Top SketchUcator
 
Posts: 1792
Joined: Fri Sep 12, 2008 9:06 pm
Location: Eastern Pennsylvania
Name: Adam Hails

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby Chris Fullmer » Mon Jul 13, 2009 8:02 am

@Bob - Great, glad it has been helpful so often. Thanks for posting here to let me know :)

@Adam - Great, hope it helps you out!

@Chango - Thanks also for the kind words. They go a long way! As for learning Ruby, I say go for it. I think Ruby is the perfect language to learn. I have VERY little programming background. I understood the concept of if then ele statements, but that was about it. I found Ruby to be very nice to work with. And writitng SketchUp tutorials is something I've been doing for so long, so I recently put together 2 tutorials on Ruby for Sketchup. The first one is here:

http://www.sketchucation.com/beginning-ruby/

It does not teach much Ruby syntax, but it does point you to a good tutorial that will help teach Ruby in general. Then my tutorial explains how to use Ruby with SketchUp to write plugins. Hopefully its helpful. I just started with Ruby in January and I have learned a TON from the great authors here on the forum. They are all very helpful.

So I would suggest taking a look at that tutorial. See how far you get, come back here with questions. I think there are ALWAYS good ideas for scripts around here if you need some ideas for own once you get the basic syntax worked out. Good luck with it and ask lots of questions.

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6688
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby EarthMover » Mon Jul 13, 2009 11:30 pm

Chris,

Quick question. One thing I've always wondered about was why an offset arc loses it's ability to find a centerpoint. Any way to add a centerpoint function in your script to arcs that are the result of an offset, without having to explode the curve and select two segments?
A designer is an emerging synthesis of artist, inventor, mechanic, objective economist and evolutionary strategist. - R. Buckminster Fuller
Some of my 3D crap
User avatar
EarthMover
Top SketchUcator
 
Posts: 1792
Joined: Fri Sep 12, 2008 9:06 pm
Location: Eastern Pennsylvania
Name: Adam Hails

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby Chris Fullmer » Tue Jul 14, 2009 1:59 am

I had not noticed that before, I don't use the point at center all that often. But it is true, it does not work on offset arcs. It is because the offset changes it from an ArcCurve entity to a simple Curve - which just means that SU no longer recognizes it as a true arc.

The ability to add a centerpoint to an arc is actually a plugin written by Google (@Last). So I went through and added the functionality to mine, then realized that it's actually just a plugin, so it would make more sense to change or modify their code.

But I need help here.

@Any Ruby Pro - My thinking is that I can alias their method that adds the centerpoint and essentially re-write it with my own code. And do this inside of this plugin. So when you run this plugin, it will install itself like normal, and also it will over-ride part of the contextmenu.rb example file (which is the ruby that adds the centerpoint funcitonality).

Is that the "correct" way to do it, so I don't actually re-distribute and re-write their file, but merely over-write in this script. Correct?

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6688
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby EarthMover » Tue Jul 14, 2009 2:47 am

Oh good...that sounds promising then. Could you potentially convert a simple curve to an ArcCurve? This way you would unlock the ability to increase segments in the entity info for an offset curve. Currently you cannot.

On another note regarding your great script. It will also find the centerpoint of a rectangle or square!! Just draw it out with the rectangle tool and then select two sides, run the script and it will mark the center! Great time saver!!
Please, register (free) to access all the attachments on the forums.
A designer is an emerging synthesis of artist, inventor, mechanic, objective economist and evolutionary strategist. - R. Buckminster Fuller
Some of my 3D crap
User avatar
EarthMover
Top SketchUcator
 
Posts: 1792
Joined: Fri Sep 12, 2008 9:06 pm
Location: Eastern Pennsylvania
Name: Adam Hails

Re: [Plugin] Exploded Arc Centerpoint Finder

Postby cyan.archnet » Tue Jul 14, 2009 3:32 am

truly a BIG help!, this is awesome!, THANKS!!
cyan.archnet
 
Posts: 52
Joined: Tue Jun 03, 2008 10:32 am

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Not a Premium Member yet? Check out the great time-limited deal we are offering.

Ad Machine
Robot
 
Posts: 2012

Next

Return to Plugins

Who is online

Users browsing this forum: alexxan99, Bob James, bsneisen, chri, FritsBee, ihsanrahim, imabzeous, libeskiano, pjalbert, vantin and 15 guests