View RSS Feed

Uncategorized

Entries with no category

  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. 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
  3. 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
  4. 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
  5. 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 ...
  6. 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
  7. 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
  8. Rhino 5 and .NET Framework 4

    This is not really a python post, but since this is my blog...

    Visual Studio 10 was recently released and along with a new IDE comes a brand new version of the .NET runtime (.NET Framework 4). Like previous runtimes, this one is packed with new programming features to play with. Two of which that stand out to me are: ...
    Categories
    Uncategorized
  9. Getting Started: 3 - The rhinoscript package

    By now you should be able to print text to the command line and write some simple python functions, but you may be getting a little bored with that. It’s time to start working with Geometry in Rhino. This is where the rhinoscript package comes into play.

    Introducing the rhinoscript package
    On your computer, the rhino/python plug-in creates a directory (package) named rhinoscript which contains a number of python script files (modules).
    • On Windows, this directory is located
    ...

    Updated 04-14-2010 at 03:05 PM by Steve Baer

    Categories
    Uncategorized
  10. Python Resources

    Here’s a list of links for learning more about Rhino and Python. Please let me know about any valuable resources that you may find and I’ll add them to this list.

    There is a wealth of information on Python at http://www.python.org/

    Learning Python
    OnlineBooks ...
    Categories
    Uncategorized
  11. Getting started: 2 - A little python syntax

    The python scripting languages contains a large set of features which you can find documentation on at http://docs.python.org/tutorial/. I’m going to just focus on a few keywords and concepts that may be helpful to get you up and running.

    Concept 1: Space is Important
    For people who have written code or scripts in other languages, this is one of the most unusual concepts when transitioning to Python. Python uses indentation to define "blocks" of code. The script is ...

    Updated 04-07-2010 at 08:22 PM by Steve Baer

    Categories
    Uncategorized
  12. Getting Started: 1 - "Hello Rhino"

    So you want to start playing with Python and see how you can use it to automate all of your Rhino tasks.

    First off you are going to need either the latest Rhino 5 for Windows WIP or the latest Rhino for OSX WIP. These can be found at:
    Windows http://download.rhino3d.com/rhino/5.0/wip
    Mac http://wiki.mcneel.com/rhino/mac/python

    Once you’ve got everything installed Rhino will have some new commands:
    EditPythonScript - This is currently only available ...

    Updated 04-07-2010 at 08:19 PM by Steve Baer

    Categories
    Uncategorized
  13. def Welcome( tries=2 ):

    If you are coming here from our Ning site, thanks for transferring over and sorry about the switch. Ning was having problems dealing with formatted code in forum and blog posts which is somewhat bad for a site devoted to scripting
    You’ve probably already figured out that this site is all about using the Python scripting language inside of Rhino (hopefully it wasn’t too difficult to figure out.) Python embedded in Rhino is a new feature that we are actively working on in both our Windows ...
    Categories
    Uncategorized