Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
4

Sketchup/eQuest polygon coordinate exchange

asked 2018-07-19 09:40:03 -0600

mikesweeney's avatar

updated 2020-01-20 11:37:46 -0600

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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2018-07-20 06:47:31 -0600

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").

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

2 followers

Stats

Asked: 2018-07-19 09:40:03 -0600

Seen: 345 times

Last updated: Jul 20 '18