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
#SingleInstance Force | |
;DetectHiddenWindows, On | |
ToolbarRow1 = | |
( | |
Fuzzy Finder | |
Shape Bender | |
Keyframe | |
Solid | |
Extension |
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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
;SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
Versions := {} | |
Versions[17] := "C:\Program Files\SketchUp\SketchUp 2017\Sketchup.exe" | |
Versions[16] := "C:\Program Files\SketchUp\SketchUp 2016\Sketchup.exe" |
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
require 'webrick' | |
require 'fileutils' | |
if ARGV.length != 0 | |
root = ARGV.first.gsub('\\', '/') | |
else | |
root = '.' | |
end | |
BACKUP_DIR = 'bak' |
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
#include <SketchUpAPI/SketchUp.h> | |
#include <iostream> | |
#include <assimp/Importer.hpp> | |
#include <assimp/scene.h> | |
#include <assimp/postprocess.h> | |
#include <assimp/DefaultLogger.hpp> | |
#include "output_sketchup_error.h" |
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
require "awesome_print" | |
exp = "1 + 2 * 3" | |
exp = "9 + 24 / (7 - 3)" | |
exp = "3 * atan(2/3)" | |
exp = "(12.3mm - 1')*52 - 473 mm/(4 + 2^3)" | |
def prec(op) | |
case op |
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
# Replaces references to a parent Coponent in a DC | |
# with the "Parent!" reference. | |
module JF | |
module Parentize | |
private | |
DICT = "dynamic_attributes".freeze |
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
UI.menu("Extensions").add_item("Print Model Size") { | |
JF::ModelSize.main | |
} | |
module JF | |
module ModelSize | |
def self.main | |
bb = Sketchup.active_model.bounds | |
# 8.times {|c| |
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
# make dc door | |
# Right-click a Instance, select Make DC Door | |
UI.add_context_menu_handler do |menu| | |
if ((sel = Sketchup.active_model.selection).length == 1) | |
if sel[0].class == Sketchup::ComponentInstance | |
menu.add_item("Make DC Door") do | |
ret = UI.inputbox( ["From", "To"], [0, 90], "Degrees") | |
if ret | |
entity = sel[0] |
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
# Limit the scale handles for Groups and Instances | |
UI.add_context_menu_handler do |menu| | |
model = Sketchup.active_model | |
selection = model.selection | |
if selection.nitems == 1 and selection[0].is_a? Sketchup::Group or selection[0].is_a?(Sketchup::ComponentInstance) | |
menu.add_item("Limit Scale") do | |
JF::LimitScale.do(selection[0]) | |
end | |
end |
NewerOlder