Skip to content

oguzhankoral/speckle-sketchup

 
 

Repository files navigation


Speckle | SketchUp

Connector for SketchUp

Speckle is the data infrastructure for the AEC industry.


Twitter Follow Community forum users website docs

Speckle-Next

About Speckle

What is Speckle? Check our YouTube Video Views

Features

  • Object-based: say goodbye to files! Speckle is the first object based platform for the AEC industry
  • Version control: Speckle is the Git & Hub for geometry and BIM data
  • Collaboration: share your designs collaborate with others
  • 3D Viewer: see your CAD and BIM models online, share and embed them anywhere
  • Interoperability: get your CAD and BIM models into other software without exporting or importing
  • Real time: get real time updates and notifications and changes
  • GraphQL API: get what you need anywhere you want it
  • Webhooks: the base for a automation and next-gen pipelines
  • Built for developers: we are building Speckle with developers in mind and got tools for every stack
  • Built for the AEC industry: Speckle connectors are plugins for the most common software used in the industry such as Revit, Rhino, Grasshopper, AutoCAD, Civil 3D, Excel, Unreal Engine, Unity, QGIS, Blender and more!

Try Speckle now!

Give Speckle a try in no time by:

  • speckle XYZ ⇒ creating an account at our public server
  • create a droplet ⇒ deploying an instance in 1 click

Resources

  • Community forum users for help, feature requests or just to hang with other speckle enthusiasts, check out our community forum!
  • website our tutorials portal is full of resources to get you started using Speckle
  • docs reference on almost any end-user and developer functionality

Repo structure

This is the beginning of the Speckle SketchUp Connector. It is still in very early development and is not ready for general use.

This repo is split into two parts: speckle_connector which is the Ruby SketchUp plugin and ui which is the Vue frontend.

Usage

NOTE: this connector is still in early development and isn't ready for general use.

Copy the whole speckle_connector folder to you SketchUp Plugins folder. You will likely find this at:

C:\Users\{YOU}\AppData\Roaming\SketchUp\SketchUp 2021\SketchUp\Plugins

You'll need to serve the ui before launching the connector:

cd ui
npm install
npm run serve

Development

The following instructions are for development in Windows (not WSL) using Visual Studio Code. If you would like to contribute instructions for other development environments, feel free to submit a PR.

Environment Setup

Ruby can be installed on Windows using the installer here. Install it with the DevKit and complete the full installation as per instructions.

This should have also have set up the package installer gem and interactive ruby irb. Double check that everything has been installed correctly.

ruby -v
gem -v
irb -v

Let's also install our first gem bundler which is a package manager that will help us with development.

gem install bundler

Editor Setup

Clone this repo and run:

bundler install

This will install all the necessary packages for the connector.

Next, install the Sketchup Ruby Debugger. You can find installation instructions here. This will involve downloading the dll and copying it into the SketchUp installation directory:

C:\Program Files\SketchUp\SketchUp 2021\

You can now open up the repo in VS Code.

Make sure you've installed the Ruby extension for VS Code.

Loading the Plugin

To tell SketchUp to load the plugin from wherever you happen to be developing, you'll need to create a ruby file with the following contents:

$LOAD_PATH << 'C:\YOUR\PATH\TO\THE\sketchup_connector'
require 'speckle_connector.rb'

Drop this Ruby file into your SketchUp Plugins directory. You will likely find this at:

C:\Users\{YOU}\AppData\Roaming\SketchUp\SketchUp 2021\SketchUp\Plugins 

To reload the plugin while SketchUp is running, open up the Ruby console and run the following:

SpeckleSystems::SpeckleConnector.reload

To run the ui, create a .env based on .env-example and paste in your Speckle token. Then:

cd ui
npm run serve

Debugging

To run SketchUp in debug mode, you will run the task specified in tasks.json. Before you do this, make sure your integrated shell for tasks is using powershell. You can specify this by adding the following option to your workspace's settings.json

"terminal.integrated.automationShell.windows": "powershell.exe",

To start the task, use the keyboard shortcut ctrl + shift + p to open up the Command Palette. Search for Tasks: Run Task and select it:

command palette

Then choose the Debug Sketchup 2021 task to run it:

debug sketchup task

Once Sketchup has launched, start the Listen for rdebug-ide debug configuration. Once the debugger has connected, you'll be able to debug the connector normally.

Make sure you run the ui before starting the SketchUp Connector

cd ui
npm run serve

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 40.2%
  • Vue 35.9%
  • JavaScript 17.4%
  • CSS 3.4%
  • Python 1.7%
  • HTML 1.3%
  • Shell 0.1%