sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] Exploded Arc Centerpoint Finder UPDATE May 23, 2013

    Scheduled Pinned Locked Moved Plugins
    59 Posts 31 Posters 64.5k Views 31 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • free agentF Offline
      free agent
      last edited by

      wierd just after reading this, and going back to modeling, i needed to find a center point of a curve πŸ˜„ thanx alot

      http:i167.photobucket.comalbumsu143FreeAgent84bug.gif

      1 Reply Last reply Reply Quote 0
      • jim smithJ Offline
        jim smith
        last edited by

        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. πŸ‘ πŸ‘

        "Out of clutter find simplicity,
        from discord find harmony,
        In the middle of difficulty lies opportunity"
        Albert Einstein

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          @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. πŸ˜„

          Thomas Thomassen β€” SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • B Offline
            Ben Ritter
            last edited by

            Chris,

            Again, many thanks.

            Ben

            1 Reply Last reply Reply Quote 0
            • S Offline
              Sir
              last edited by

              @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 πŸ‘

              1 Reply Last reply Reply Quote 0
              • N Offline
                nobnob
                last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • Chris FullmerC Offline
                  Chris Fullmer
                  last edited by

                  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

                  1 Reply Last reply Reply Quote 0
                  • Bob JamesB Offline
                    Bob James
                    last edited by

                    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 πŸ˜†

                    i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

                    1 Reply Last reply Reply Quote 0
                    • C Offline
                      chango70
                      last edited by

                      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?

                      1 Reply Last reply Reply Quote 0
                      • EarthMoverE Offline
                        EarthMover
                        last edited by

                        I missed this one too. Something I always need as well. Thanks a ton Chris!

                        3D Artist at Clearstory 3D Imaging
                        Guide Tool at Winning With Sketchup
                        Content Creator at Skapeup

                        1 Reply Last reply Reply Quote 0
                        • Chris FullmerC Offline
                          Chris Fullmer
                          last edited by

                          @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:

                          Link Preview Image
                          SketchUcation

                          3D SketchUp Community for Design and Engineering Professionals.

                          favicon

                          (www.sketchucation.com)

                          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

                          1 Reply Last reply Reply Quote 0
                          • EarthMoverE Offline
                            EarthMover
                            last edited by

                            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?

                            3D Artist at Clearstory 3D Imaging
                            Guide Tool at Winning With Sketchup
                            Content Creator at Skapeup

                            1 Reply Last reply Reply Quote 0
                            • Chris FullmerC Offline
                              Chris Fullmer
                              last edited by

                              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

                              1 Reply Last reply Reply Quote 0
                              • EarthMoverE Offline
                                EarthMover
                                last edited by

                                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!!


                                centerpoint rectangle.jpg

                                3D Artist at Clearstory 3D Imaging
                                Guide Tool at Winning With Sketchup
                                Content Creator at Skapeup

                                1 Reply Last reply Reply Quote 0
                                • C Offline
                                  cyan.archnet
                                  last edited by

                                  truly a BIG help!, this is awesome!, THANKS!!

                                  1 Reply Last reply Reply Quote 0
                                  • Chris FullmerC Offline
                                    Chris Fullmer
                                    last edited by

                                    @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

                                    Lately you've been tan, suspicious for the winter.
                                    All my Plugins I've written

                                    1 Reply Last reply Reply Quote 0
                                    • TIGT Offline
                                      TIG Moderator
                                      last edited by

                                      ...TIG wasn't... but... what is you want to do take a Curve and make it into an ArcCurve ? For example you Weld together some Edges into a Curve and want them to become an ArcCurve ? This would only work if the original edges would form an Arc anyway - a Curve isn't necessarily even 2D let alone an Arc... Rather, don't you really want to select some Edges and make them into an Arc if it's possible to do so ?

                                      Wouldn't it be more flexible [and quicker] to use Chris's tool to add a CentrePoint to what could be the Arc [from the Exploded Edge set], then place a Cpoint at a Vertex (or the two ends), Erase the Edges [or Erase them later ?] and simply redo an Arc/Circle using the points etc?

                                      Can you give some better examples of where this might be useful [better/quicker] so I can see if the effort of making it work would be worthwhile...

                                      I have already written a Method for changing Segments in an Arc http://forums.sketchucation.com/viewtopic.php?p=158903#p158903
                                      It has an example script too: you select the Arcs to change, in the Ruby Console type changearcsegments 64 and they all have 64 segements [change number as desired]. It is like Entity Info in that you cannot change the Segments of Arcs forming complex 3D Geometry like cylinders...

                                      TIG

                                      1 Reply Last reply Reply Quote 0
                                      • EarthMoverE Offline
                                        EarthMover
                                        last edited by

                                        TIG,

                                        Thanks for the response. I'm referring to offset arcs. When you offset an Arc, the result is a simple curve, which looses it's ability to increase segments,find center point from or take a radius dimension pull offs. In my work, I design a lot of radius steps, curved walls, curved walkway & Patios. I often will draw out an Arc, which represents a landing, then I will offset that Arc 5 or 6 times for my steps. By the time I get out the last offset, I may want to increase the segments in my arc as it is looking choppy, but it is not possible at that point. I'll also often delete the initial arc to open up my landing, then I'm left with all simple curves and I have no ability to find the center point, unless I explode a curve, use Chris's script, then reweld, but still it is not an Arc. I also tend to have trouble getting the weld ruby to work on certain exploded curves, and instead of welding, it will decimate it into more segments. The other thing is dimensioning. Only with an Arc can you use the dimension tool to get a quick radial dimension. If you try and get a dimension on a offset curve, it will just measure one of the segments and not the whole curve. This is where a conversion tool would be useful.

                                        I noticed also, that when you have an Arc that is part of a face and extruded, it's extruded counterpart maintains it's Arc status, but both the initial Arc and the extruded Arc lose their ability to have to the segments changed, for obvious reasons. This would be important for trying to convert Curves to Arcs in 3D space, as the newly created Arc would have be locked similarly. The gain from converting a curve to an arc in 3D space would be solely the ability to pull radial dimensions and also to find center point. Unless someone wrote a script that would allow for selecting two arc counterparts in an extrusion and simultaneously increasing the segments in 3D after a curve to Arc conversion.

                                        EDIT - I just looked at the link you posted. Sounds like my latter request was addressed in that post and not possible. Oh well then.


                                        Arc Curve.jpg


                                        Arc Counterpart example.jpg

                                        3D Artist at Clearstory 3D Imaging
                                        Guide Tool at Winning With Sketchup
                                        Content Creator at Skapeup

                                        1 Reply Last reply Reply Quote 0
                                        • RunnerPackR Offline
                                          RunnerPack
                                          last edited by

                                          Hey, EarthMover,

                                          It was my request on this Google Group post that (partially?) inspired Chris F. to make his plugin. Using his idea from that discussion, I made code to find the center-point of two Edges... which I promply discarded when he made his implementation that didn't look like a train-wreck πŸ˜†

                                          So, I took his code (without permission; sorry, Chris! 😳) and made my own tool with a different interface (context menu) that I think adds (some of) the functionality you want. Since you probably wouldn't find it otherwise, here is the thread where I attached mine.

                                          The readme header in the file also explains how other coders can use the new methods for finding the center of a Curve or of any two Edges. I also wanted to add a radius method and the "convert Curve to ArcCurve" function discussed above, but they're still on the todo list. BTW, my plugin also works on Circles and Polygons.

                                          You might have noticed... I'm a bit of a ferpectionist.

                                          1 Reply Last reply Reply Quote 0
                                          • C Offline
                                            c.plassais
                                            last edited by

                                            Hi Chris,
                                            Arc Centerpoint Finder translated into French and the attached link http://biblio3d.1fr1.net/plug-in-sketchup-f19/plugin-arc-centerpoint-finder-en-francais-retrouver-le-point-central-d-un-arc-t448.htm#3004

                                            at the next

                                            Christophe

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 2 / 3
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement