Convex Hull Import from Qhull to Rhino

I came across a script designed to translate voronoi information from QHull to geometry in Rhino by Stylianos Dritsas at dritsas.net. After many frustrations, I was able to figure out how to use Qhull and run the script. I became curious as to what a Convex Hull would look like, so I tweaked the original to import convex hull data.

View the Script

convex hull geometryThis script takes the convex hull information for a number of points from Qhull and creates surface geoemtry from it (right).

15 Responses Subscribe to comments


  1. zarb

    hay man I’m breaking my teeth here on what kind of output does ur script need in order to import a .txt file from qhull ?

    is it f g i o n s ???
    I was to young at the time dos got out I started with windows 3.1 so sorry if my Q is obvious

    btw – took me half an hour to figure out that capital letters and small letters mean different things !

    tnx

    Feb 12, 2009 @ 11:08 am


  2. Luis

    Thanks for the interest, zarb.
    The script reads .txt files exported from qHull in the qconvex o format.

    Feb 12, 2009 @ 1:45 pm


  3. zarb

    tnx a lot man !

    Feb 13, 2009 @ 8:28 am


  4. star

    hi Luis. I very like this. can u Show me how to u this script.

    Mar 10, 2009 @ 4:57 am


  5. star

    How to use this script in Rihnoceros. Tnx

    Mar 10, 2009 @ 4:58 am


  6. Luis

    Hi star.
    This script just converts information exported from qHull into geometry in Rhino. You’ll need qHull.
    You can download it along with tutorials at http://www.qhull.org/

    Basically, you’ll need to import a file of the points you want to evaluate and evaluate them in the qconvex o format.
    When you run the script it will ask you to choose the file from which you wish to evaluate the data, and that will be the file.
    You can use my Random Points rhinoscript to generate a file to import into qHull if you like.

    Let me know if you have any more questions…

    Mar 11, 2009 @ 9:51 pm


  7. ryan

    I continue to have syntax errors with this script. any ideas? I’ve tried various information sets from qhull with no success.

    Mar 29, 2009 @ 9:07 pm


  8. Luis

    Ryan,
    The imported .txt file should be in the qconvex o format for the script to run properly. What error messages are you getting specifically?

    Mar 30, 2009 @ 9:01 am


  9. ryan

    Got it to work, was having trouble with the qconvex o. That seemed to solve it. Thanks.

    Mar 30, 2009 @ 8:34 pm


  10. Jill

    Hi, Luis, nice work, except I still have problems running it, it always show error on line 108, do you know how to fix it?

    Aug 14, 2009 @ 1:55 am


  11. Luis

    Hey Jill.
    I’m looking over the script, and there are only 91 lines to it. Did you mean line 18?

    Aug 16, 2009 @ 8:09 pm


  12. Eddie

    Hey Luis, great job releasing these kinds of scripts.

    I am having some trouble with the script on line 39, something about [Number 1]. i hope you can help me.

    agian amazing release.
    thanks

    Aug 21, 2009 @ 6:56 pm


  13. Luis

    Thanks, Eddie.
    I’m looking it over and it could be a problem with the text file you are using to generate the geometry. If the text file was generated from qHull in and format other than the qconvex o format then it will not work. Let me know if you still have problems.

    Aug 21, 2009 @ 9:28 pm


  14. Eddie

    Hey Luis,

    I generated the text file for the geometry using your random points script. Also, I have no idea how to make a qconvex format file. I apologize if this is an ovbios question but your help is well appreciate it.

    Aug 24, 2009 @ 2:51 am


  15. Luis

    Hey Eddie.
    The file you need to import to run the script is exported from a program called QHull. It’s free and you can download it at qhull.org. Qhull actually does all mathematical computations to find the convex hull information for the set of points provided. I don’t really want to get into the specifics of how to use the program (theres an online manual at qhull.org), but you will basically need to import a .txt file with the information of the points you wish to evaluate (this can be generated by my Random Points script) and run it in qconvex o format. You can export from qhull a text document with this information, and that is what you will need to use in order for the script to run correctly.

    Hope this helps.

    Aug 24, 2009 @ 8:10 am

Reply

Spam Protection by WP-SpamFree