Voronoi, convex hull, geometry modification toolset
-
recursive dent does this, when you need a nice point cloud, just apply the Plugins/Tooling/Pointify command to these dented lines
-
Hi,
Thanks for sharing. Extremely interresting, especially the convex hull. I don't know what to do with it for now, but it will surely be a good start for goodies develpment.
Regards, -
re: convex hull
Wonder if its of any use for SketchyPhysics? (Though I'm not sure whether it uses GJK searching.) Anyone?
-
the convex hull generation is pretty solid (works far more reliable than the voronoi solution) but the workflow is awkward for realtime generation - since the plugin exports vertices to a file and then calls qhull.exe which writes the results to a file, then these results are built in SU. i don't know much about the actual algorithm behind the calculation - please refer to http://www.qhull.org/html/qconvex.htm
-
Ah (so this doesn't work on Macs I guess). However, QHull does a great job - I've used it for many years. If SketchyPhysics doesn't use convex hulls it probably should rather than do full prim.prim collision wrt performance.
-
re: macs
no it's not gonna work, since i don't have any mac at hand there is no way to port it myself (i guess there is a qhull for mac http://qhull.darwinports.com/) -
@a4chitect said:
the convex hull generation is pretty solid (works far more reliable than the voronoi solution) but the workflow is awkward for realtime generation - since the plugin exports vertices to a file and then calls qhull.exe which writes the results to a file, then these results are built in SU. i don't know much about the actual algorithm behind the calculation - please refer to http://www.qhull.org/html/qconvex.htm
It may be awkward, but it's a valid technique which I didn't think to use before. The source code for qhull is available and a native plugin could possibly be compiled, and a sketchup-ruby interface made. I've heard it's not terribly difficult, but then I've not tried it.
-
Hello
I've tried it up but i am stuck when I've started voronoi. It made nothing just bumped out
the command line that it cant read point.txt dont you know what can be potential problem?
I hahve checked the file points.txt, it is there and it has been made up. It would superb
if it works, this is what i have been dreaming off.thanks for the answer
martin
-
hi a4chitect...
i've download the plugin but i cannot make it works.
I can export the points, it seems to work...
but when i try to launch voronoi or convex qhull seems to be launched without any problem but nothing appears in sketcuhp...i'm an architecture's student and i think i could be a powerful engine to design...
can you help me? -
i have already let a few of you down, sorry. i promise to look into it and hopefully fix all main issues asap. you are free to do the needed changes yourselves, i think that currently there are 2 possible problems>
- the script is unable to call the qhull program to compute the actual result, and/or is unable to read the exported points or unable to write the results to a file or unable to read the results
(all of this is probably due to incorrect paths in the script/or system incompatibility)
- the problem is due to a specific points placement and the nature of the qhull algorithm (is often unable to find the correct result and therefore end without any...)
so when you run point exporter first, check if the points.txt file gets created in the Plugins\Tooling
then when you run for example 'voronoi' - and nothing gets created, check if there is a file named qvoronoi.txt at the Plugins\Tooling location
if all of the above works, the problem lies probably with the geometry, try with fewer or different points
if you are desperate, please wait for a change by me..
-
thanks for your patience
http://www.sketchucation.com/forums/scf/viewtopic.php?f=153&t=8116&p=47799#p47799
-
hello a4chitect
well, i have just download the update, i tried it but i have the same problem..
I can pointify, i can export (i have looked in the folder and the file with the coordonate of my point exist. But when i launch voronoi or convex hull, the program seems to launch but nothing is drawn.. and no other file (for instance voronoi.txt ) is created
i will retry of course but i don't understand..
is there anybody in the same case? or am i alone ?
i will search what the problem is..thank you for your work wich seems to be great !
-
please try exporting points with or without the bounding box (depending on which way you went before - choose the other way this time) and try to run voronoi.
or
download the attached skp and follow the instructions to test.
(maybe the qhull can't compute the results for your specific points alignment)or
please attach your points in a skp for me to try
-
dear a4chitect , thanks for your ruby ,but i had the same problem (voronoi doesnt work for me too ) maybe its because of operating system or something ( 32 or 64bit) dual prosseccoror... I dont know what! yours majid
-
please try this:
windows - open command prompt and navigate to your sketchup\plugins\qhull
(windows vista: it is easier to open qhull folder in windows explorer, press and hold shift and right-click anywhere inside empty space in qhull, choose 'Open Command Window Here')paste the following code 'qhull.exe TI points.txt v Qbb Qj o Fv' (without quotes) and press enter
(paste works by clicking in the top left corner on the small black icon, choose edit>paste)let me know your results
thanks
-
dear a4chitetct , i did and here is the result ( i paste all the result in a text file and zipped)
-
from the file you have attached, it is clear that the voronoi computation is all right, I have copied the following part
3 19 12 1 -10.101 -10.101 -10.101 69.50972188371688 213.9843863157402 423.5501981233883 ... ... ... 5 8 10 0 4 3 6 9 11 0 13 15 18
and pasted into an empty sketchup\plugins\qhull\qvoronoi.txt
then imported using a modified voronoi.rb (attached) which doesn't run the computation it only builds geometry from the qvoronoi.txtI am attaching the result as a .skp file
modified voronoi (replace your current but keep the original since this is for debugging)
-
hello a4chitect
excuse me for havn't said a word these days (a virus strike in my school..)
i have tried and tried different ways but nothing gets better. the file voronoi.txt (and convex hull too) is not created when i run voronoi (or convex hull)well i don't know how to do to attach a file... sorry..
i'll keep on trying on an other computer..thanks for your work !!
-
Hi A4chitect,
is there any way to have the export points script output in meters?
(great set of rubys by the way)
-
Can't get this work well. Seems to be some problem to read my points.txt file !?
Command input :
@unknownuser said:...Sketchup 6\Plugins\Qhull\qhull.exe" TI points.txt v Qbb Qj o Fv
Command output :
@unknownuser said:qhull error: could not open file "points.txt".
While executing: | qhull TI points.txt v Qbb Qj o Fv
Options selected for Qhull 2003.1 2003/12/30:Could anybody help and or develop some direct and realtime approximate voronoi calculation in sketchup ? Like soap-skin-bubble plugin ?
File from the debug.skp file given by a4chitect... Do not work with my qhull.exe ?
Advertisement