Skip to content

Instantly share code, notes, and snippets.

View fstwn's full-sized avatar
💯
keep it clean, keep it lean, work in a team & puff the green (u kno what i mean)

Max Eschenbach fstwn

💯
keep it clean, keep it lean, work in a team & puff the green (u kno what i mean)
View GitHub Profile
@fstwn
fstwn / LayerChildren.py
Last active January 19, 2021 16:22
GhPython script for getting the names of a children of a Layer
"""
Returns all child layers of a specified layer.
Inputs:
Layer: The layer to check for children.
{item, str}
Output:
Children: The child layers of the specified layer.
{item/list/tree, str}
Remarks:
Author: Max Eschenbach
@fstwn
fstwn / Kangaroo2AssemblySelector.py
Last active September 6, 2023 06:28
GhPython code for finding the KangarooSolver.dll that Rhino 6/7/8 ship with and importing it properly in most settings.
import Rhino
import clr
import os
if "KangarooSolver" in str(clr.References):
import KangarooSolver as ks
else:
try:
rhino_version = Rhino.RhinoApp.ExeVersion
if os.name == "nt":
@fstwn
fstwn / AbovePlane.cs
Last active June 23, 2020 18:31
Kangaroo2 AbovePlane Goal
using System;
using System.Collections;
using System.Collections.Generic;
using Rhino;
using Rhino.Geometry;
using Grasshopper;
using Grasshopper.Kernel;
using Grasshopper.Kernel.Data;