All Projects → moethu → SketchUpNET

moethu / SketchUpNET

Licence: MIT license
SketchUp C# API - A C++/CLI API Wrapper for the Trimble(R) SketchUp(R) C API

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
C#
18002 projects
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to SketchUpNET

thesaurus
TT Hackathon 2018 - Autocomplete for Visual Programming Nodes
Stars: ✭ 23 (-72.29%)
Mutual labels:  dynamo
ruby-api-stubs
Auto-generated stubs for the SketchUp Ruby API. Useful for IDE intellisense and auto-complete.
Stars: ✭ 19 (-77.11%)
Mutual labels:  sketchup
TuneUp
A profiler for Dynamo graphs
Stars: ✭ 27 (-67.47%)
Mutual labels:  dynamo
GeniusLociForDynamo
Genius Loci is a package of 300+ custom nodes for Dynamo in Revit.
Stars: ✭ 17 (-79.52%)
Mutual labels:  dynamo
VisualDiff
A Dynamo view extension to visually compare the differences between two Dynamo Graphs
Stars: ✭ 13 (-84.34%)
Mutual labels:  dynamo
sketchup-ruby-debugger
Ruby API debugger for SketchUp 2014 and later.
Stars: ✭ 62 (-25.3%)
Mutual labels:  sketchup
dynamo-node
DynamoDB mapper
Stars: ✭ 12 (-85.54%)
Mutual labels:  dynamo
sketchup-bridge
A bidirectional communication system between WebDialogs and the SketchUp Ruby environment
Stars: ✭ 16 (-80.72%)
Mutual labels:  sketchup
speckle-sharp
.NET SDK, Schema and Connectors: Revit, Rhino, Grasshopper, Dynamo, ETABS, AutoCAD, Civil3D & more.
Stars: ✭ 214 (+157.83%)
Mutual labels:  dynamo
SketchAR
SketchUp model into ARKit. Use SketchUp home remodel and Apple's ARKit (beta) for augmented reality. Goal: import a model (in this case, a remodel) to overlay onto existing real world that you can walk around and 'experience' and compare.
Stars: ✭ 41 (-50.6%)
Mutual labels:  sketchup
OrchidForDynamo
This repository contains the content of the Orchid package for Dynamo
Stars: ✭ 81 (-2.41%)
Mutual labels:  dynamo
ruby-c-extension-examples
Ruby C extension examples
Stars: ✭ 44 (-46.99%)
Mutual labels:  sketchup
aws-dynamodb
⚡ Easily provision AWS DynamoDB tables using Serverless Components.
Stars: ✭ 59 (-28.92%)
Mutual labels:  dynamo
sucredb
Distributed KV database with causality tracking
Stars: ✭ 51 (-38.55%)
Mutual labels:  dynamo
Artifact
An in-memory distributed database
Stars: ✭ 63 (-24.1%)
Mutual labels:  dynamo
DynFreeCAD
Dynamo nodes for FreeCAD
Stars: ✭ 41 (-50.6%)
Mutual labels:  dynamo
testup-2
TestUp 2 for SketchUp - A GUI wrapper for running Minitest in SketchUp
Stars: ✭ 21 (-74.7%)
Mutual labels:  sketchup
sketchup-shapes
Shapes adds new tools for drawing more shapes and primitives in SketchUp.
Stars: ✭ 19 (-77.11%)
Mutual labels:  sketchup
sketchup-console-plus
A better Ruby Console and IDE for integrated development in SketchUp.
Stars: ✭ 31 (-62.65%)
Mutual labels:  sketchup

SketchUpNET

C++/CLI API Wrapper for the Trimble(R) SketchUp(R) C API. http://www.sketchup.com/intl/en/developer/api-terms-of-service.pdf

This library adds .NET support to the existing SketchUp C-API. It makes most SketchUp C-API features available in .NET and therefore accessible in C# or VB applications. You can download a pre-built release of the library or build it yourself from scratch.

Code-Examples

This Repo contains three sample projects using SketchUpNET in C#.NET:

  • SketchUpForDynamo: An Autodesk's(R) Dynamo Node Package allowing you to read/write SketchUp files from Dynamo.
  • SketchUpForGrasshopper: A Set of Components for McNeel's(R) Grasshopper(R) allowing you to read/write SketchUp files from GH.
  • SketchUpNETConsole: A sample C# console application using SketchUpNET.

If you want to build your own application using the SketchUp API take the following steps:

Loading a Model

SketchUpNET.SketchUp skp = new SketchUp();
skp.LoadModel("myfile.skp", true);
foreach (var srf in skp.Surfaces) {
  // do something with your surfaces
}

Saving a Model

skp.WriteNewModel("filename.skp");

Converting a Model

SketchUpNET.SketchUp skp = new SketchUp();
skp.SaveAs("old-file.skp", SKPVersion.V2020, "new-file.skp");

Writing a Surface to a File

SketchUpNET.SketchUp skp = new SketchUpNET.SketchUp();
skp.Layers = new List<Layer>() { new Layer("Layer0") };
skp.Surfaces = new List<Surface>();
skp.Curves = new List<Curve>();
skp.Edges = new List<Edge>();
List<SketchUpNET.Vertex> Verticies = new List<SketchUpNET.Vertex>();

SketchUpNET.Loop OuterEdges = new SketchUpNET.Loop();
OuterEdges.Edges = new List<Edge>();
{
  OuterEdges.Edges.Add(new SketchUpNET.Edge(new Vertex(0, 0, 0), new Vertex(500, 0, 0), "Layer0"));
  OuterEdges.Edges.Add(new SketchUpNET.Edge(new Vertex(500, 0, 0), new Vertex(500, 500, 0), "Layer0"));
  OuterEdges.Edges.Add(new SketchUpNET.Edge(new Vertex(500, 500, 0), new Vertex(0, 500, 0), "Layer0"));
  OuterEdges.Edges.Add(new SketchUpNET.Edge(new Vertex(0, 500, 0), new Vertex(0, 0, 0), "Layer0"));
}

List<Loop> InnerLoops = new List<Loop>();
{
  SketchUpNET.Loop InnerEdges = new SketchUpNET.Loop();
  InnerEdges.Edges = new List<Edge>();
  InnerEdges.Edges.Add(new SketchUpNET.Edge(new Vertex(100, 100, 0), new Vertex(400, 100, 0), "Layer0"));
  InnerEdges.Edges.Add(new SketchUpNET.Edge(new Vertex(400, 100, 0), new Vertex(400, 400, 0), "Layer0"));
  InnerEdges.Edges.Add(new SketchUpNET.Edge(new Vertex(400, 400, 0), new Vertex(100, 400, 0), "Layer0"));
  InnerEdges.Edges.Add(new SketchUpNET.Edge(new Vertex(100, 400, 0), new Vertex(100, 100, 0), "Layer0"));
  InnerLoops.Add(InnerEdges);
}

SketchUpNET.Surface s = new SketchUpNET.Surface(OuterEdges, InnerLoops);
skp.Surfaces.Add(s);

skp.WriteNewModel(@"TempModel.skp");

Requirements

If not installed you might requires Visual C++ Redistributable Packages for Visual Studio https://www.microsoft.com/en-sg/download/details.aspx?id=40784

The library requires the SketchUp C API which is part of the package.

nuget Binaries

SketchUpNET is available as a precompiled binary on nuget: https://www.nuget.org/packages/SketchUpNET/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].