by MattC » Fri Jul 27, 2012 5:51 pm
sl!m wrote: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 sl!m wrote: 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
-
MattC
-
- Posts: 41
- Joined: Tue Dec 07, 2010 6:35 pm
- Name: MattC
by lapx » Fri Jul 27, 2012 10:01 pm
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
-
lapx
-
- Posts: 582
- Joined: Wed Dec 05, 2007 11:14 pm
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by nektares » Sat Jul 28, 2012 12:13 am
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 scrnsht.jpg voro-no-i.skp 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:
-
nektares
-
- Posts: 145
- Joined: Fri Jun 20, 2008 3:38 pm
by Sl!m » Sat Jul 28, 2012 4:21 am
MattC wrote:sl!m wrote: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 wrote:- 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. sl!m wrote: 2/ It does not generate the voronoi all the time. Sometimes nothing happens. Any idea ?
MattC wrote:- 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
-
Sl!m
- Premium Member

-
- Posts: 15
- Joined: Tue Jan 20, 2009 3:43 am
- Name: sl!m
by the.pjt » Sat Jul 28, 2012 11:04 pm
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 
-
the.pjt
-
- Posts: 208
- Joined: Sun Aug 09, 2009 1:20 pm
- Location: iran
- Name: pejman
by MattC » Sun Jul 29, 2012 8:55 am
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
-
MattC
-
- Posts: 41
- Joined: Tue Dec 07, 2010 6:35 pm
- Name: MattC
by gilles » Sun Jul 29, 2012 10:09 am
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 "
-

gilles
- Top SketchUcator
-
- Posts: 1300
- Joined: Mon Apr 07, 2008 10:29 am
- Location: france
- Operating system: Mac
- SketchUp version: 2015
- License type: Free/Make
- SketchUp use: other
- Level of SketchUp: Intermediate
by TIG » Sun Jul 29, 2012 10:23 am
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
-

TIG
- Global Moderator
-
- Posts: 20265
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by ivreich » Mon Jul 30, 2012 1:54 am
Hi MattC
Still unable to use your plugin. Here's the error message and file...
Joel
-
ivreich
-
- Posts: 73
- Joined: Fri May 16, 2008 9:28 am
- Location: Australia
- Name: Joel Lee
- Operating system: Windows
- SketchUp version: 2014
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by TIG » Mon Jul 30, 2012 8:58 am
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
-

TIG
- Global Moderator
-
- Posts: 20265
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by MattC » Mon Jul 30, 2012 10:51 am
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
-
MattC
-
- Posts: 41
- Joined: Tue Dec 07, 2010 6:35 pm
- Name: MattC
by TIG » Mon Jul 30, 2012 11:06 am
Putting the code inside a begin...do_point...rescue...end structure will allow the code to fail on the point without a crash ? But a simple intersect_lines...if point...do_stuff...else...next_point...end would suffice here... Something like: if int && (test[0]==0)&&(test[1]==0)&&(test[2]==0) intprim=int+int.vector_to(pointstable[bpntindx])+int.vector_to(pointstable[bpntindx]) points<<intprim.project_to_line([midlines[0][0],midlines[0][1]]) points<<intprim points<<intprim.project_to_line([midlines[1][0],midlines[1][1]]) elsif int points<<int end and if int && point_is_between(p1,p2,int)&&point_is_between(polygon[i],polygon[j],int) point<<int end AND any other place where int is set as an 'intersection' that might fail - test for its existence before trying to use it. Only uses int if it's not 'nil'.
TIG
-

TIG
- Global Moderator
-
- Posts: 20265
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by MattC » Mon Jul 30, 2012 12:34 pm
Yup, second way is exactly how I changed it. My fault was testing it on set of random points, and combination of 3 colinear points didn't occure. Matt
-
MattC
-
- Posts: 41
- Joined: Tue Dec 07, 2010 6:35 pm
- Name: MattC
by Sl!m » Fri Aug 03, 2012 2:09 am
Hi there, I found this Voronoi so cool... couldn't resist posting this. Interacting with the mouse moving over the points. Is that code any useful to ruby Heros ? http://mbostock.github.com/d3/ex/voronoi.htmlHave a great day/night! Sl!m
-
Sl!m
- Premium Member

-
- Posts: 15
- Joined: Tue Jan 20, 2009 3:43 am
- Name: sl!m
by juanjo » Tue Aug 07, 2012 7:37 pm
Hi Matt Great plugin mate... lots of potential here But I have a little problem: you say that for this to run properly this plugin requires "delauney3.rb" I don't have it... I only have "delaunay2.rb". I get the Typical plugin error..."Error loading file VoronoiXY.rb no such file to load -- delauney3.rb" But I can't find the robust version that TIG is refering to here: viewtopic.php?t=8314I did got the "conic curve" plugin to work and it's awesome. Also tried to use "qhull.rb" but it's a mess! I just get flashing DOS-screen ans crashes.... It's a shame, since it would also be a super-tool... Have you heard of any progress on that??? viewtopic.php?t=19040viewtopic.php?t=8116I'd really appreciate your help so i can start using this baby! Thanks!
-
juanjo
-
- Posts: 3
- Joined: Tue Apr 22, 2008 6:09 pm
by TIG » Tue Aug 07, 2012 10:38 pm
My 'modularized' version of 'delauney' [ delauney3.rb] ships as part of my 'Triangulate Points' tool - which is very much like Didier's original... BUT avoids potential clashes with common loose method names like 'triangulate' ! viewtopic.php?p=301274#p301274It doesn't replace the original, it just makes a 'safer' alternative for any tool that is using it instead...
TIG
-

TIG
- Global Moderator
-
- Posts: 20265
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by MattC » Wed Aug 08, 2012 7:25 am
juanjo wrote:But I have a little problem: you say that for this to run properly this plugin requires "delauney3.rb" I don't have it... I only have "delaunay2.rb". Also tried to use "qhull.rb" but it's a mess! I just get flashing DOS-screen ans crashes.... It's a shame, since it would also be a super-tool... Have you heard of any progress on that???
Hi juanjo, if You download a zip package made by pjt, and not separate files from first post, then You will have "delauney3.rb" as a part of it. I couldn't get "qhull.rb" to work, and that was one of the reasons why I started to work on this project. But I have some problems with the code. Some cases generates strange forms. So the work continues. Greets Matt
-
MattC
-
- Posts: 41
- Joined: Tue Dec 07, 2010 6:35 pm
- Name: MattC
by dtolios » Thu Aug 09, 2012 4:54 pm
MattC wrote:Pilou You 're teasing me  Is it Sketchup ?? Or something else? Well only step that I miss from those, is generation of 3D Voronoi  For rest I have plugins already. @ Joel, indeed there WAS a problem - file in first message is updated. Matt
Would it be too much to ask for 3D Voronoi? I would be in...even if not for free... 
-
dtolios
-
- Posts: 4
- Joined: Thu Mar 10, 2011 10:20 am
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Intermediate
by MattC » Fri Aug 10, 2012 7:32 am
Well... I think 2D voronoi package (delauney triangulation by TIG + Voronoi on XY plane + Conic Curve + Convex hull on XY plane) is almost ready. Next step will be: (delauney triangulation in 3D + Voronoi 3D + Conic Curve + Convex hull 3D). But it is a lot more complicated. So it is a bit to early to decide free / paid - but I think donationware ( if You like it - gratify creator) is the way to go. Cheers Matt
-
MattC
-
- Posts: 41
- Joined: Tue Dec 07, 2010 6:35 pm
- Name: MattC
by the.pjt » Tue Aug 21, 2012 8:09 am
hello Matt, did you got the Icons ? ... or a more important question: is this plugin still alive ?
-
the.pjt
-
- Posts: 208
- Joined: Sun Aug 09, 2009 1:20 pm
- Location: iran
- Name: pejman
by MattC » Tue Aug 21, 2012 9:55 pm
Hi Yes I got it, Thanks a lot, I am a bit busy at my normal work, but plugin is still alive. I will try to get updated version online this weekend, but I was already focused on Voronoi2D version 2.0 Cheers Matt
-
MattC
-
- Posts: 41
- Joined: Tue Dec 07, 2010 6:35 pm
- Name: MattC
by dekay » Fri Oct 26, 2012 8:19 am
tanks a lot, your script is very easy to use compared to others.it has been very helpful to me.
thank you once again..
-
dekay
-
- Posts: 1
- Joined: Thu Oct 25, 2012 8:15 am
- Name: chiatanya
- Operating system: Windows
- SketchUp version: 6
- License type: Free/Make
- SketchUp use: architecture
- Level of SketchUp: Beginner
by victor hugo » Sat Dec 15, 2012 7:38 am
Very interesting plugin... where can I get the CPOINT creator or a CPOINT plugin?
Thanks.
-
victor hugo
-
- Posts: 46
- Joined: Fri Aug 10, 2012 9:43 pm
- Name: VICTOR HUGO
by cotty » Sat Dec 15, 2012 9:54 am
VICTOR HUGO wrote:Very interesting plugin... where can I get the CPOINT creator or a CPOINT plugin? Thanks. Here
-

cotty
- Top SketchUcator
-
- Posts: 3434
- Joined: Fri Feb 12, 2010 1:41 pm
- Location: Germany
- Name: Carsten
- Operating system: Windows
- SketchUp version: 2020
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by ivreich » Mon Dec 17, 2012 1:35 am
VoronoiXY Error
Hi MattC
I'm still having problems creating a simple 2D Voronoi. Have attached the file with the cpoints and the error message.
Conic curve seems to work fine...
Cheers
joel
UPDATE: I see what the problem is. It's still the co-linear points. The plugin will not work if any of the points are colinear in either the X or Y axis.
Something that can be fixed?
Last edited by ivreich on Mon Dec 17, 2012 4:33 am, edited 1 time in total.
-
ivreich
-
- Posts: 73
- Joined: Fri May 16, 2008 9:28 am
- Location: Australia
- Name: Joel Lee
- Operating system: Windows
- SketchUp version: 2014
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by pilou » Mon Dec 17, 2012 3:07 am
With Wings3d and plugin ManifoldSinon Cell frature dans Blender tout aussi gratoche 
Last edited by pilou on Wed Aug 28, 2013 3:36 pm, edited 1 time in total.
-

pilou
- Top SketchUcator
-
- Posts: 21102
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by pilou » Mon Dec 17, 2012 3:35 am
Why not put in the first post the link for the Delauney3.rb by Tig ? It was not so evident to find it! here the link!  Else works fine  voro01.jpg
-

pilou
- Top SketchUcator
-
- Posts: 21102
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by pilou » Wed Feb 27, 2013 10:11 am
Hello For the Voronoï (with SU V7 tested) images previous post All works fine except I must click on the Ok Botton for have a voronoï polygon for each new polygon! Tig triangle works for a selection of points in one pass! And for the conic curve : does it possible to have the same for a selection of faces ? Click on each polygon is some tiedious when you have thousand of them! voronoi2.jpg EDIT : About Voronoï xy I must click on the Ok Botton
Works fine in V8 ! But something must be made for the UNDO !!! Here you must make each CTRL+ Z for each polygon ! 
Last edited by pilou on Wed Feb 27, 2013 1:52 pm, edited 3 times in total.
-

pilou
- Top SketchUcator
-
- Posts: 21102
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by pilou » Wed Feb 27, 2013 10:38 am
And about Conic Curve Does this possible ? conic_wanted.jpg
-

pilou
- Top SketchUcator
-
- Posts: 21102
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by MattC » Thu Feb 28, 2013 8:14 am
Hi Pilou, Hello everybody
Currently I am rewriting the whole Voronoi 2D plug-in. It is going painfully slow, but I have a lot of other things on my head right now. Why I am completely redesigning it? Well my understanding of Ruby got a bit better, and also I got some new ideas how to tackle this problem. What I want to accomplish: 1) prepare a nice flow chart for a process of creating 2D Voronoi diagram 2) based on that define set of standard functions that will be used 3) compose final version of Voronoi 2D plug-in - do steps 1-3 with 3D Voronoi - do steps 1-3 with Conic Curve - do steps 1-3 with random point generator (2D and 3D)
Shall I succeed then next step would be a "fracture tool" similar to one in Blender.
@ Pilou So to create voronoi diagram You have to iterate through the message boxes i=1, i=2 ... etc? I think that that was one of the first complains and I have disabled it in one of later versions. If not I can do it one more time. the same applies to UNDO in one step. Conic curve on all faces in selection was also made, but I don't know if it was made an official release.
Your last question is more complicated. Conic curve plug-in was made as a response to the topic in the first post. There You can see that there are multiple curves inside polygons. And all the polygons are convex. So the conic curve , which is a construction based on 3 points (let's say A B and C), is always located inside the smaller angle near the point B. In Your case polygon is Concave and conic curve will go outside. Is it possible to force it inside? Well it is. See explanation of how the conic curve is made in first post. You have to set an offset that will sit well inside, and also play with a weight value. But in this version You cannot set different weights for every vertex. Maybe I will get to that in one of the future releases.
Stay tuned for more details. I will try to make a nice blog (possibly later an e-book) about it.
Cheers Matt
-
MattC
-
- Posts: 41
- Joined: Tue Dec 07, 2010 6:35 pm
- Name: MattC
by Ad Machine » 5 minutes ago
-
Ad Machine
- Robot
-
- Posts: 2012
-
Return to Plugins
|