4

Sketchup/eQuest polygon coordinate exchange

I have a number of very old eQuest models (5+ yrs) that need to be updated for the final architectural design. Typical practice would dictate going back into wizard mode for geometry editing, but I’ve become inspired by EnergyPlus Python/Sketchup workflows and have decided to instead try and use some combination of the two.

In many cases, I can accomplish this without adding any spaces or adding any vertices, so I’m not concerned with adjacencies/boundary errors or the general eQuest/DOE-2 side, and I already have a module that imports polygons from an input file into a usable array of coordinates within Python.

My goal is to import this array into Sketchup (or similar), change the location of selected vertices within it, and then reimport the new vertices into the model.

My question is: Are there any commonly-used tools/modules for importing coordinate pairs into Sketchup, changing the coordinates within it, and then exporting the same coordinates back into a text-based format? I’m thinking some kind of JSON or GBXML interface, but I’d trying to avoid too much wheel-reinvention.

mikesweeney's avatar
493
mikesweeney
asked 2018-07-19 09:40:03 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2020-01-20 11:37:46 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

2

Sketchup's API is exposed in Ruby, so you can indeed import your geometry, do stuff to it (normal Sketchup work), and spit it back to something you can then reimport into python.

I suggest looking at how @David Goldwasser's osm2su which is a lightweight version of the OpenStudio sketchup plugin does it, as well as Euclid (previously called "legacy-openstudio").

Julien Marrec's avatar
29.7k
Julien Marrec
answered 2018-07-20 06:47:31 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments