This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" The movement commands I use the most, besides h,j,k,l | |
{ or } " move forward or backward by paragraphs | |
( or ) " move forward or backward by sentences | |
W, w, B, b, E, e "These all move by words, if capitalized, it only uses whitespace to divide words. | |
"W/w moves to the beginning of the next word, B/b moves to the beginning of the | |
"previous word, and E/e moves to the end of the current/next word | |
_, $ " move to beginning(_) and end($) of line | |
gg "go to the top of the file | |
G " go to the end of the file | |
<number>G " go to line <number> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Rhino | |
# for accesssing GH classes | |
import clr | |
clr.AddReference("Grasshopper") | |
from Grasshopper.Kernel.Data import GH_Path | |
from Grasshopper import DataTree | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Rhino | |
import scriptcontext | |
import System.Collections.Generic as SCG | |
# for accesssing GH classes | |
import clr | |
clr.AddReference("Grasshopper") | |
from Grasshopper.Kernel.Data import GH_Path | |
from Grasshopper import DataTree |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System | |
import System.Collections.Generic as SCG | |
import Rhino | |
import scriptcontext | |
import rhinoscriptsyntax as rs | |
from Rhino.FileIO import FileWriteOptions, FileReadOptions | |
def addRhinoLayer(layerName, layerColor=System.Drawing.Color.Black): | |
"""Creates a Layer in Rhino using a name and optional color. Returns the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System | |
import Rhino | |
from scriptcontext import doc | |
tol = 0.001 | |
class Brick(object): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Rhino | |
class DrainBoid(object): | |
def __init__(self, point3d, surface, stepsize=0.5, maxsteps=None, tolerance=0.001): | |
self.start = point3d | |
self.pos = self.start | |
result, self.u, self.v = surface.ClosestPoint(self.pos) | |
self.surface = surface | |
self.stepsize = stepsize | |
self.points = [self.start] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import xlrd | |
''' | |
Look at the data format for d3.js here: | |
https://gist.github.com/1049893 | |
''' | |
class Node(object): | |
def __init__(self, name, index): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"nodes":[ | |
{"name":"Steel","index":0}, | |
{"name":"Critical Studs, Heads of Wall","index":1}, | |
{"name":"Kickers & Soffits","index":2}, | |
{"name":"Ceilings","index":3}, | |
{"name":"Ceiling Compression Posts","index":4}, | |
{"name":"HVAC","index":5}, | |
{"name":"Fire Sprinkler Mains","index":6}, | |
{"name":"Waste & Vent","index":7}, | |
{"name":"Fuel Oil","index":8}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import the sys and os libraries for adding modules | |
import sys | |
import os | |
# import the Rhino library | |
import Rhino | |
# manually write out the path to the folder | |
# where networkx is stored, as a list of strings | |
pathbits = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cache": { | |
"name": "Disk", | |
"path": "/tmp/stache", | |
"umask": "0000", | |
"dirs": "portable" | |
}, | |
"layers": { | |
"lots": { | |
"provider": { |
OlderNewer