• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[PLUGIN] Voronoi + Conic Curve

Scheduled Pinned Locked Moved Plugins
136 Posts 53 Posters 222.1k Views 52 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.
  • U Offline
    unclex
    last edited by 26 Jul 2012, 12:12

    wonderful

    1 Reply Last reply Reply Quote 0
    • T Offline
      the.pjt
      last edited by 26 Jul 2012, 14:18

      thanks a lot Matt ... πŸ˜‰
      I wish my works have been helpful for you ...
      and I'm glad for helpping you to have a nice plugin . πŸ˜„
      I myself didn't have any problem with icons and I'm wondering why it can't handle the Icon folder path ... but thanks for learning me the right way of codding ... Matt
      ... but you know ... I'm not a proggrammer .. 😞 , I wish I could code my sugestions .. and help you more than making some icons 😞

      ..
      thanks agane Matt .. have a nice tool πŸ˜„

      1 Reply Last reply Reply Quote 0
      • N Offline
        notareal
        last edited by 26 Jul 2012, 14:20

        I'll be keeping eye on this. 3D... that would be great.

        Welcome to try [Thea Render](http://www.thearender.com/), Thea support | [kerkythea.net](http://www.kerkythea.net/) -team member

        1 Reply Last reply Reply Quote 0
        • T Offline
          thomthom
          last edited by 26 Jul 2012, 15:40

          Matt, the icons - did you put the icons in the correct folder? The change you did make it appear that you placed them in the root folder... ?

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

          1 Reply Last reply Reply Quote 0
          • M Offline
            MattC
            last edited by 26 Jul 2012, 16:17

            the.pjt thanks for a hard work.
            I
            I must admit that that part of writing rubies is still unknown to me. I just concentrate on making my code running and not on wrapping it in a nice package as You did.
            One question - as I downloaded Your files I could not access icons, Toolbar was blank.
            so in place of

            cmd.small_icon = "voronoi_conic/icon0s.png"
            

            I used

            cmd.small_icon = "./icon0s.png"
            

            and it worked.
            I have no idea why it was like that.
            As for a wishlist:

            • add a point cloud generator ruby tool - this should be no problem, if we are talking about random pints in a cube/box, and probably random points on face but I have no idea (for now) about random points in a volume (is it possible in Sketchup ?).
              -add option to decide the resoult of VoronoiXY tool should be grouped or not - ok , just one userform asking if groups should be exploded in the end.
            • add option (ConicCurveInFace.rb) that let user make ConicCurves from grouped face (resoult of VoronoiXY tool)- this should also not be a problem
            • add option (ConicCurveInFace.rb) that let user make ConicCurves from a set of selections .. no need to click and click and click ... - same as above.

            I will try to get it done, when I finish 3DVoronoi.

            Cheers
            Matt

            1 Reply Last reply Reply Quote 0
            • M Offline
              MattC
              last edited by 26 Jul 2012, 16:28

              I've unpacked it just as at was, so icons sits in a folder Plugins/voronoi_conic.
              Somehow code

              cmd.small_icon = "voronoi_conic/icon0s.png"
              

              , does not work for me (Win 7 and WinXP)
              Strangely:

              1. :
              cmd.small_icon = "icon0s.png"
              

              and 2)

              cmd.small_icon = "./icon0s.png"
              

              both works.
              code 1) I understand as icons and ruby that invokes toolbar are in the sam location.
              But 2) searches for icons in Plugin folder...or am I mistaken?
              Does it work for You straight away ThomThom??

              Matt

              1 Reply Last reply Reply Quote 0
              • T Offline
                thomthom
                last edited by 26 Jul 2012, 17:02

                Haven't had time to try it - been very busy. Just monitoring the forum a little...

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

                1 Reply Last reply Reply Quote 0
                • S Offline
                  Sl-m
                  last edited by 27 Jul 2012, 10:47

                  Hi the pjt !

                  Great work!

                  Few comments :
                  1/ Could it be possible to undo the voronoi generation in one go ?(ctrl Z is going back through all the steps of the generation)
                  2/ It does not generate the voronoi all the time. Sometimes nothing happens. Any idea ?

                  Thanks for making my day with those plugins!

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    the.pjt
                    last edited by 27 Jul 2012, 11:42

                    Matt's original ruby files (could be found in the first post of this topic ) displays a dialog box that counts each step and you should verify each step by pressing OK button .. It could be good for preventing unwanted results ... ( but it was annoying for me )

                    also you can delete each group of resoults and doing the Voronoi command on a particular face ...

                    but above all I'm not a programmer Author ... I just wanted to help Matt by doing some routine steps of making an SU Extension ...

                    πŸ˜‰

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      MattC
                      last edited by 27 Jul 2012, 16:51

                      @unknownuser said:

                      Few comments :
                      1/ Could it be possible to undo the voronoi generation in one go ?(ctrl Z is going back through all the steps of the generation)

                      • added to the wish list - see some posts above

                      @unknownuser said:

                      2/ It does not generate the voronoi all the time. Sometimes nothing happens. Any idea ?

                      • if You can post Your .skp file then I can take a look at it.

                      Matt

                      1 Reply Last reply Reply Quote 0
                      • L Offline
                        lapx
                        last edited by 27 Jul 2012, 21:01

                        Great Plugin Matt,

                        However, some regions will not work for some strange reason. Snag in program somewhere.
                        Good start though. I wish the ruby God's will help complete this one. Its very useful for creating metal sheets with these patterns and much much more. I used the "conic curve on face" and pointed to each face.

                        Thanks!

                        Lapx


                        vjpeg.jpg

                        1 Reply Last reply Reply Quote 0
                        • N Offline
                          nektares
                          last edited by 27 Jul 2012, 23:13

                          sorry for the late reply, itΒ΄s a new file, no other geometry in it. if i open the ruby console i get this:

                          Error: #<NoMethodError: undefined method vector_to' for nil:NilClass> C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/VoronoiXY.rb:258:in voropoints'
                          C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/VoronoiXY.rb:231:in each' C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/VoronoiXY.rb:231:in voropoints'
                          C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/VoronoiXY.rb:128:in voronoi' C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/VoronoiXY.rb:105:in each'
                          C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/VoronoiXY.rb:105:in voronoi' C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/VoronoiXY.rb:36:in initialize'
                          C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/VoronoiXY.rb:384:in new' C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/VoronoiXY.rb:384 C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/VoronoiXY.rb:132:in call'
                          C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/VoronoiXY.rb:132

                          error voronoi
                          skp file voronoi

                          i hope you know what it is matt i would love to do something cool with your plugin.

                          if i donΒ΄t open it i get this:

                          1 Reply Last reply Reply Quote 0
                          • S Offline
                            Sl-m
                            last edited by 28 Jul 2012, 03:21

                            @mattc said:

                            @unknownuser said:

                            Few comments :
                            1/ Could it be possible to undo the voronoi generation in one go ?(ctrl Z is going back through all the steps of the generation)

                            @mattc said:

                            • added to the wish list - see some posts above

                            Thanks !
                            If I may add one wish : The tab options for the conics should remember the last options chosen.

                            @unknownuser said:

                            2/ It does not generate the voronoi all the time. Sometimes nothing happens. Any idea ?

                            @mattc said:

                            • if You can post Your .skp file then I can take a look at it.

                            Here it is.
                            By the way I'm using pjt's plugin. Thanks for looking at this!
                            Sl!m


                            XY plan cloud points. Can't generate a voronoi

                            1 Reply Last reply Reply Quote 0
                            • T Offline
                              the.pjt
                              last edited by 28 Jul 2012, 22:04

                              Hi Matt β˜€ ... please post the toolbar (my work )to the first post ... copyrhight ? !! feel free .. it's our plugin .. not my" plugin . and I also posted PSD icons for you .. πŸ˜›
                              ICON folder path ? .. I'm surry for this bug .... but I myself tested it on my 2 computers with windows 7 and 8 (SU8) .. and It was fine for me .. 😐 😐 ... but if there is a problem please repair it and use my works in future versions ... πŸ˜‰
                              good luck πŸ˜„

                              1 Reply Last reply Reply Quote 0
                              • M Offline
                                MattC
                                last edited by 29 Jul 2012, 07:55

                                Hi,
                                I will do it as soon as I correct bug that nectares reported.
                                Also I already adressed some things from a wishlist.
                                So stay tune.
                                Also , evereyone that is using pjt's wrapped wersion with toolbar, please report if You can see icons, I don't know if it is only me that have this problem ??
                                I don't want to fix things that are ok.

                                In general Stat tuned. Version 1.1 is coming.
                                Matt

                                1 Reply Last reply Reply Quote 0
                                • G Offline
                                  gilles
                                  last edited by 29 Jul 2012, 09:09

                                  @unknownuser said:

                                  However, some regions will not work for some strange reason

                                  Same thing for me.

                                  Also Tab key does not open dialog box (Macbook pro), for me.

                                  " c'est curieux chez les marins ce besoin de faire des phrases "

                                  1 Reply Last reply Reply Quote 0
                                  • T Online
                                    TIG Moderator
                                    last edited by 29 Jul 2012, 09:23

                                    On a MAC the TAB a onKeyDown method doesn't work [known bug!] - you need to use a onKeyUp method to spot the press of the TAB-key for MAC AND PC.
                                    Also note that TAB key-mapping will differ between PC and MAC - if key==9 || key==15... DON'T use key 48 as that is only TAB on some Linux setups [I think] and causes issues with mainstream users [== 0 ?] - an error is some of my older code that should be fixed in MY scripts πŸ˜•

                                    The regional differences might be caused because there's a ',' as a decimal separator rather than a '.' ?
                                    If dialog values are taken as 'float' or 'length' then this should be accounted for automatically by Sketchup ?

                                    Use inputbox rather than UI.inputbox as it checks user inputs better...
                                    [include a require 'sketchup.rb' in the first line of the script to ensure it's available to you]
                                    Don't use @@dek.to_mm you've already predefined it as a 'length' as @@dek=25.mm - later you mess with it again .to_f.mm - because you first set it as a length then the user's current units will be used instead anyway - there's no need to restrict it to 'mm' at all - just use 'Offset:' as the prompt... similarly the other inputbox values can only be what you set them as so if it starts as a float the user's input must be a valid float so typing 3 returns 3.0 anyway...

                                    TIG

                                    1 Reply Last reply Reply Quote 0
                                    • I Offline
                                      ivreich
                                      last edited by 30 Jul 2012, 00:54

                                      Hi MattC

                                      Still unable to use your plugin. Here's the error message and file...

                                      Joel


                                      Error file


                                      Error message

                                      1 Reply Last reply Reply Quote 0
                                      • T Online
                                        TIG Moderator
                                        last edited by 30 Jul 2012, 07:58

                                        It's possible to have two 'lines' that don't intersect and produce 'nil' as the result, so the code needs to trap for the existence of the point and only proceed with it if it's not nil...
                                        That should be a relatively simple 'trap' to construct...

                                        TIG

                                        1 Reply Last reply Reply Quote 0
                                        • M Offline
                                          MattC
                                          last edited by 30 Jul 2012, 09:51

                                          True TIG
                                          I already implemented this trap, but also encountered another case that is a bit problematic.
                                          It is geometry limitation of Sketchup.

                                          I will update script when this will be solved, in a meantime if anyone also has non-working combination of points, post it here.
                                          I will have more material to analyse.

                                          Matt

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 5
                                          • 6
                                          • 7
                                          • 2 / 7
                                          2 / 7
                                          • First post
                                            40/136
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement