Skip to content

Instantly share code, notes, and snippets.

View izzylys's full-sized avatar
🌱
chillin

izzy lyseggen izzylys

🌱
chillin
View GitHub Profile
@izzylys
izzylys / stick_analysis.py
Created April 29, 2022 11:01
members / joints analysis for cita-dash-starter
import streamlit as st
from typing import List
import pandas as pd
import plotly.express as px
from specklepy.objects import Base
def simplify_joints(joints: List[Base]) -> dict:
"""Takes a list of joint objects and returns a list of dicts that can be used to construct dataframe rows"""
return [
@izzylys
izzylys / c4d_to_speckle.py
Created April 29, 2022 14:10
Cinema4D One-Click Send to Speckle
import os
import c4d
import requests
import c4d.documents as doc
from specklepy.api.wrapper import StreamWrapper
from specklepy.logging.exceptions import SpeckleException
# the url to the stream or branch you want to send to (if not a branch url, it will default to the main branch)
STREAM_URL = "https://speckle.xyz/streams/<STREAM_ID>/branches/<BRANCH_NAME>"
@izzylys
izzylys / copy_speckle_object.py
Last active July 28, 2022 08:36
cherry pick speckle commits
from specklepy.objects import Base
from specklepy.api import operations
from specklepy.api.wrapper import StreamWrapper
from specklepy.transports.memory import MemoryTransport
def copy_object_to_stream(
obj_url: str,
target_stream_url: str = None,
commit_msg: str = None,