[Plugin] Exploded Arc Centerpoint Finder UPDATE May 23, 2013
-
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
-
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 -
Thanks Chris.
The video really shows how useful this is.
-
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.
-
wierd just after reading this, and going back to modeling, i needed to find a center point of a curve thanx alot
-
Chris,
I just wanted to add my thanks for this very helpful plug in and again for all the others- a very impressive collection of time savers.
-
@unknownuser said:
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.
-
Chris,
Again, many thanks.
Ben
-
@unknownuser said:
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
-
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.
-
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
-
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 said:
That's because Chris mixes his plugins with crack cocaine making everyone addicted.
Hey, Thom, cut that out: if they arrest him how will we get any more of his great plugins
-
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?
-
I missed this one too. Something I always need as well. Thanks a ton Chris!
-
@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
-
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?
-
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
-
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!!
-
truly a BIG help!, this is awesome!, THANKS!!
-
@earthmover said:
Could you potentially convert a simple curve to an ArcCurve?
I think that TIG perhaps already created that plugin? Or maybe he created the first part of it and I was thinking I would use it to finish writing it....I don't recall anymore. But I agree, that would be handy. Not easy, maybe not even possible. But definitly handy!
Chris
Advertisement