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
module.exports = { | |
root: true, | |
env: { | |
node: true, | |
commonjs: true, | |
}, | |
extends: [ | |
'eslint:recommended', | |
'plugin:vue/vue3-essential', | |
'@vue/typescript/recommended', |
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
(defn point-outside-circle [c r p] | |
(if (< (vec2/dist c p) r) | |
(vec2/scale (vec2/normalize (vec2/- p c)) r) | |
p)) | |
(defn circle-tangent-point [c r b dir] | |
(let [B (point-outside-circle c r b) | |
cB (vec2/dist c B) | |
S (vec2/scale (vec2/normalize (vec2/- B c)) r) |
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, sys, subprocess | |
import shutil | |
import hou | |
import toolutils | |
import itertools | |
import tempfile | |
import datetime | |
#---------------------------------------- |
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
(defvar a -36.4821) | |
(defvar b -5.7589) | |
(defvar c 13) | |
(defvar d [-196 24.3125]) | |
(style (stroke "crimson" 5) | |
(path/subtract | |
(circle [0 0] 100) | |
(rect [(.x d) (+ -200 (.y d)) 400 200] ) | |
) |
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
(defvar c "#B2E6A0FF") | |
(style (fill c) | |
(ngon [100 0] 76 4)) | |
(style (fill (color/invert c)) | |
(circle [-100 0] 76)) |
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
#@{:expanded true}(def text-paths | |
[(text "Foo\nBar Buz" [163.6896 -286.8947] :size 120) | |
(text "waaa\nsd\nerwer" [-387.6719 -332.4019] :size 72) | |
(text "@@@\n@@@@\n@@@" [244.4186 26.8916] :size 63.2)]) | |
:start-sketch | |
(background "#EFF0EB") | |
(style (fill "#6E8492") |
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
(defn on-same-line? [A B C] | |
(< .999 (abs(vec2/dot (vec2/normalize (vec2/- B A)) | |
(vec2/normalize (vec2/- C A)))))) | |
(defn circumcenter [A B C] | |
(let [a (vec2/dist B C) | |
b (vec2/dist C A) | |
c (vec2/dist A B) | |
a2 (* a a) b2 (* b b) c2 (* c c) | |
a-len (* a2 (+ (- a2) b2 c2)) |
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
# Houdini | |
import hou | |
def main(): | |
# find any pane tab that is a Channel Editor | |
channel_editor = hou.ui.paneTabOfType(hou.paneTabType.ChannelEditor) | |
if not channel_editor: | |
hou.ui.displayMessage("No channel editor pane is displayed") |
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
(defn round-rect | |
{:doc "Draw a round rect" | |
:handles | |
{:draw (fn [e] | |
(let [params (get e :params) | |
[pos rect r] params | |
top-left (rect2d/point rect) | |
rect2d-e {:params [rect]}] | |
`[~{:type "path" :guide true | |
:class "dashed" |
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
(defn round-rect | |
{:doc "Draw a round rect" | |
:handles | |
{:draw (fn [e] | |
(let [params (get e :params) | |
[pos rect r] params | |
top-left (rect2d/point rect) | |
rect2d-e {:params [rect]}] | |
`[~{:type "path" :guide true | |
:class "dashed" |