Skip to content

Python scripts for various transformations of 2D and 3D objects in Rhinoceros.

License

Notifications You must be signed in to change notification settings

mikhaildubov/Rhinoceros-Python-Scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rhinoceros Python Scripts

This is a set of Python scripts for various transformations (flows) of 2D and 3D objects in Rhinoceros 5, a popular 3D modeler.

Repository structure

  • code/: The actual Rhino Python scripts.
    • curves/: Flow implementations for 2D curves.
    • meshes/: Flow implementations for 3D meshes.
    • utils/: Various helper methods.
  • shapes/: Simple shapes that can be used for testing.
    • curves/: 2D curves: a basic polyline, a rectangle etc.
    • meshes/: 3D meshes: a cube, a dipyramid, a sphere etc.

Usage

The code to be executed in Rhinoceros should go to code/launcher.py. To launch it:

  1. Load the shape you want to transform (curve/mesh) to Rhinoceros
  2. Type "EditPythonScript" in the command prompt of Rhinoceros
  3. Load & run the Python module code/launcher.py
  4. Click on the shape loaded to the Rhinoceros editor to apply the corresponding transformation to it.

Examples

Here is how harmonic flows and face flows of a cube, a dipyramid, and a sphere look like. The harmonic flows are presented on the left while face flows are on the right:

Harmonic flow Face flow
Harmonic flow of a cube Face flow of a cube
Harmonic flow of a dipyramid Face flow of a dipyramid
Harmonic flow of a sphere Face flow of a sphere

Dependencies

  • Pillow (PIL): required for the flow animation export to GIF in the flow_utils.iterate() function. In case this package is missing, the code will not fail but no GIF files will be produced.

Notes

This repository has been inspired by the course "Discrete Differential Geometry", taught by Pascal Romon at Université Paris-Est Marne-la-Vallée in the Fall 2015.

The scripts have been developed and tested on Rhinoceros 5 for Windows, so there may be some issues with running the same code on Rhinoceros 5 for Mac. You are welcome to report any of them here.

References

About

Python scripts for various transformations of 2D and 3D objects in Rhinoceros.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages