View RSS Feed

Recent Blogs Posts

  1. Python Goodies - the sorted function

    There are so many nice little features of python. Here's a good one to learn; the sorted function.

    sorted(iterable[, cmp[, key[, reverse]]]) - http://wiki.python.org/moin/HowTo/Sorting/
    This function takes a list and returns a sorted version of the list. That's nice...... but I wouldn't write a blog post about this if that was all this function does. Here's what I really like about the sorted function, the optional key argument. This argument lets you define a function ...
    Categories
    Uncategorized
  2. Kinect2RhinoSkeleton through OpenNI/OSCeleton

    After installing OpenNI you need to unzip the donwload file and start osceleton.exe.
    Then you start test_rhino.py through EditPythonScript in Rhino5.
    Finally OpenNI/Kinect must detect a skeleton. For this reason you have to do the "init-gesture", i.e. spreading your arms and lifting them, while the kinect sees your upper body .
    It is also possible to record data and play them back if you are a bit shy or lazy.
    Comments:
    Besides OpenNI you need OSCeleton ...

    Updated 10-12-2011 at 12:43 PM by bar

    Tags: kinect Add / Edit Tags
    Categories
    Uncategorized
    Attached Thumbnails Attached Files
  3. Is there a way to change the size of the font inside the editing Python editor?

    Hi, it is not that I can not read it, but when you teach, the students on the back of the room can not read the lines...

    Thanks

    Andres
    Categories
    Uncategorized
  4. My First RhinoPython Script

    I know this is kinda cheezy, since I use the RhinoScript syntax. But hey! gotta start somewhere...


    Python Code:
      ###############################################################################
      # ArchimedeanSpiral.py -- July 2011
      # If this code works, it was written by Dale Fugier.
      # If not, I don't know who wrote it.
      #
      # Change 'a_const' to turn the spiral.
      # Change 'b_const' to control the distance between turnings.
       
      import
    ...

    Updated 07-26-2011 at 05:43 AM by Steve Baer

    Categories
    RhinoPython , RhinoScript
  5. Numpy and Scipy in RhinoPython

    Disclaimer: I have very little experience with numpy and scipy so you are going to do better by searching google for support with these libraries. This blog is about getting these libraries to run in Rhino.
    Yes it is possible now!!!
    Okay, here's what I did to get numpy/scipy running in Rhino

    1 - Install Rhino 5 (32bit version)
    numpy/scipy uses C++ DLLs which need to be compiled for a specific platform. Currently numpy/scipy for IronPython will only run ...
    Categories
    Uncategorized
  6. Kinect SDK

    YES!!! This could lead to some incredible applications.

    http://research.microsoft.com/en-us/...cts/kinectsdk/

    Now if they only had a version that clipped to your monitor and tracked your fingers...
    Categories
    Uncategorized
  7. Outside the Box 2 - Calling the Shapeways API from Python

    I received a question on accessing the ShapeWays API from my last "Outside the Box" blog and figured I should dig in and figure out what is going on. Shapeways has a web service API that uses SOAP and a WSDL page (http://en.wikipedia.org/wiki/Web_Ser...ption_Language) as described here
    http://www.shapeways.com/api

    This API is a bit different than the REST API which I wrote a script to access in my previous blog post. In order to use this API, I ended up ...
    Tags: python, soap Add / Edit Tags
    Categories
    Uncategorized
  8. Multithreaded Python


    One of the nice bits that we have access to in Rhino python is the Task Parallel Library that is built into .NET 4
    http://msdn.microsoft.com/en-us/libr...ing.tasks.aspx

    This set of classes and functions makes it relatively easy to write things like parallel for loops in which every iteration of the loop may be processed on different threads. This nice thing about parallel for loops ...
  9. Outside the Box - Using Web Services from Python

    I've been trying to learn more about things like web services and APIs provided by internet companies (gotta figure out what all of these buzzwords are.) One thing I've noticed is that many companies now provide a REST API which return JSON objects. There are enough resources on the web that describe REST and JSON that I don't need to repeat it here; I'm just going to get to my python experiments on this technology.

    Attached are a python script and a grasshopper definition containing ...
    Categories
    RhinoPython
  10. Python component for Grasshopper

    Giulio Piacentino and I have been working on an update to the grasshopper/python component and finally have something to show off!!!

    http://www.food4rhino.com/project/ghpython - NOTE: Will only work in Rhino 5


    This component is a scripting component similar to the VB.NET and C# components that ship with Grasshopper. You get a component where you can define as many input and output variables as you want and then reference these variables in the python script. ...
  11. Running scripts from Toolbar buttons

    This is only for Windows Rhino right now since you can't customize toolbar buttons on Mac yet, but once that feature becomes available I'm pretty sure the technique will be the same.

    In Rhino, create a new toolbar button and edit it. Consult the Rhino help for for adding and editing toolbar buttons. Now you have three options (that I can think of at the moment) for adding a python script to a toolbar button. All of these involve executing the RunPythonScript command

    ...
    Categories
    RhinoPython
  12. Komodo Edit on Mac and RhinoPython



    Komodo Edit can be configured to recognize the rhinoscriptsyntax module which provides for editor features like autocomplete and function tooltips.
    • Download and start Komodo Edit - http://www.activestate.com/komodo-edit
    • On the menu, select Komodo->Preferences...
    • Expand "Languages" and select "Python"
    • In the Additional Python Import Directories click on the "add" button
    ...
    Categories
    Uncategorized
  13. ACADIA and MIT wrap up

    Just got back from a trip to New York and Boston for the ACADIA conference (http://www.acadia.org/acadia2010/). I want to thank everyone that spent the time to meet with me and talk python. In particular, it was great getting together with
    Marc Fornes - http://theverymany.com/
    Skylar Tibbits - http://www.sjet.us/

    who from what I can tell are doing most of their Rhino oriented scripting in python now. Nice!

    -Steve
    Categories
    Uncategorized
  14. StarMaker - An advanced sample

    Here's a sample that demonstrates quite a few of the advanced features in Rhino.python. This sample was written and tested on Windows (I doubt it is going to work very well on OSX given that Windows.Forms are being used.) You are going to need to be running at least the July 20th build of Rhino 5 to test this.

    StarMaker is composed of two script files; starmaker.py and sliderform.py. Save these files to the same directory.

    What does it do? StarMaker just creates a ...

    Updated 09-09-2010 at 05:15 PM by Steve Baer

    Categories
    RhinoPython
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	sharpdev.jpg
Views:	1431
Size:	126.4 KB
ID:	94   Click image for larger version

Name:	starmaker.jpg
Views:	1597
Size:	119.3 KB
ID:	100  
    Attached Thumbnails Attached Files
  15. Configuring Pydev for Rhino.Python


    NOTE: This article is specific to getting Pydev to work on Windows. I've had problems getting the ironpython interpreter to work inside Pydev on Mac. Hopefully this will inspire someone to hack away at the Mac version of Pydev and figure out what it takes to make it work for Rhino.Python.

    What's Pydev?
    The folks at Pydev can probably do a much better job of explaining their product (http://pydev.org/index.html). In ...

    Updated 01-06-2011 at 10:43 PM by Steve Baer

    Categories
    RhinoPython
Page 1 of 2
1 2 LastLast