Where the SketchUp Plugin is currently at

631 views
Skip to first unread message

Alastair Parvin

unread,
Mar 6, 2013, 12:34:31 PM3/6/13
to wikihouse...@googlegroups.com

Developing the WikiHouse Plugin for SketchUp

The initial versions of the first plugin (download it from GitHub here) are an amazing project, the core author was the brilliant @Tav, along with @thruflo. But we know it's very basic, there are still bugs and most importantly... it's super incomplete. It's an area where a bit of coding skill is probably going to go a heck of a long way!

Currently it:

1. Seeks groups or components that are 18mm thick and has two identical faces. 

2. Extracts one of those faces.

3. 'Nests' the parts onto standard 2400x1200mm sheets (very badly!)

4. Takes the component name and labels it onto each part (again,badly!)

5. Generates an svg (meant to be dxf too but doesn't work often!)

Then manually / using separate software one has to:

6. Lay them out properly onto sheets! (Often it is ironically easier to do it manually anyway!)

7. Rotate the labels, centre them and put them into, (we use) ISOCPEUR font (because it's easy for CNC machine to engrave).

8. Offset the edges inwards (and the holes outwards) by a set parameter (usually .1mm, but this ultimately depends on material / climate etc.)

9. Generate proper complete dxfs, with lines on appropriate layers like this one.

10. Covert into g-code for CNC in another separate proprietary software. (Again, it is possible that there is now a ruby script which does this direct?)

So one of the key dev challenges is to get the script working and automate as many of these steps as possible. In the case of, for example, nesting parts onto sheets efficiently, we know there are proprietary industrial scripts out there that do this (eg http://www.optinest.com/definition_of_what_is_cnc_nesting_software.asp ), so you can imagine the impact of developing that capability in the public domain - Not just for Wikihouse but for all kinds of CNC, laser manufacturing hardware projects...

Have I missed anything?


Chris Musselle

unread,
Mar 9, 2013, 5:24:19 PM3/9/13
to wikihouse...@googlegroups.com
Hi everyone, I'm keen to start contributing to this, and am currently bringing myself up to speed on Ruby programming, the SketchUp API and the plugin code. 

Once I feel I know things well enough to not break them, I am planning on looking into the nesting problem. I've come across a lot of similarly posed problems in the past, though havent studied them in detail myself. It is also referred to as the '2D bin packing problem'. A quick search revealed quite a lot of literature on the topic, ranging from using simple heuristics to more complicated genetic algorithms.  

Although I'm not yet familiar with the current strategy to nest the parts, my intuition is that implementing one of these heuristic algorithms should be fairly straight forward. I think the tricky bit will be extending it to deal with arbitrary shapes like corner fins, as the most commonly solved 2D bin packing problem only deals with nesting rectangles.  

If someone could summarise the current strategy/method for nesting the parts that would be very helpful to me as a baseline to work with. 

Alastair

unread,
Mar 10, 2013, 10:47:25 AM3/10/13
to wikihouse...@googlegroups.com
Amazing. I've dropped @Tav (the brilliant guy who wrote the initial version of the plugin) a quick message, asked if he might drop a quick explanation in here of the current nesting strategy.

Danny Squires

unread,
Mar 10, 2013, 7:01:41 PM3/10/13
to wikihouse...@googlegroups.com
Hi everyone,

Great to see this group up and running. I'm just dumping some raw thoughts in here for discussion based on our experience so far.

Critical thing for us in NZ is that we have a different standard ply thickness to work depending on timber species (pine with namely 17mm or 19mm thinckness). This introduces all sorts of problems when modelling & sharing models (we have only used 18mm so far)  so we are thinking of looking at some sort of (Rhino) parametrics based around absolute slot locations (centres) and variable slot dimensions to accommodate this.

The first thing that would be really handy for the Sketchup plugin to accommodate is the ability to define a custom thickness to detect for profile generation depending on specific requirements. The ability to define multiple thicknesses for the plugin to extract would also be fantastic. I'm hoping these two would only involve minor tweaks (wishful thinking) but as I haven't done much programming since my C64 days its a bit beyond me at the moment.

With regard to nesting the first obstacle to overcome is to be able to distinguish the rectangle defined by the extents of a component into positive & negative space.

I've been nesting manually for four years and have developed a manual procedure that starts with the largest parts first on blank sheets, ie. the biggest rectangles should be nested first - then determine what remaining large parts can fit within/ overlap the negative space that remains, then add in smaller parts until the maximum sheet space is utilised. The ability to rotate and try various permutations quickly is where an algorithm pays off but efficient nesting software has been a bit of a holy grail for CAM programs so I imagine its way more complex? and the proprietary stuff that's been developed so far seems pretty costly. Rhino Nest is meant to be one of the better ones with a lower entry cost than many but still a substantial cost for the lay person.

Generating the component profiles as a dxf is obviously broken in the plugin at present from our experience - the ability to keep individual compononets as blocks in dxf would be handy as the potetnitl for error incereases dramatically when manually nesting.

Currently we have found that editing nesting sheets in CorelDraw4 is best for us as reads svg and can easily move all component geometry with single selection so eliminates potential errors from not select all geometry. From there we export to dxf and had been using autocad/ draftsight but now switching to Rhino (would be great if Rhino imported svg)

that's all I can think of for now hope it makes sense. :-)

John Bacus

unread,
Mar 13, 2013, 2:01:34 AM3/13/13
to wikihouse...@googlegroups.com
Hi Danny,

I hear what you're saying about the complexity of automatically adjusting a design to accomodate differences in material thickness. Have you tried using SketchUp's Dynamic Components to solve this problem? I'm up (too) late tonight fiddling around with that, but thought you might have already worked through the same problem.


john
.

Chris Musselle

unread,
Apr 30, 2013, 7:52:23 AM4/30/13
to wikihouse...@googlegroups.com

Ok, so its been a bit of a steep learning curve for the last month or so, with lots of learning of new languages and such, but I am now in a position to report on the progress I have made with the Wikihouse extension. A full list of changes can be found here, though in summary their are two new features added that I thought would help the most first:

  1. The plugin is now a SketchUp Extension, meaning it appears in the Preferences-->Extensions list, and can be turned off and on if required. 
  2. I have added a Wikihouse Settings web dialogue window, which will serve as a way for users to alter previously hard coded parameters. You can now edit the height, width and depth of the plywood sheets used, as well as the margin and padding parameter. (see notes bellow on plywood depth usage).

At current, as Tav has to pull in all these changes before they are made available for download via the web site, I think it would be good to have a link to my branch of the code on GitHub on this groups welcome page, so that everyone can have access to the latest development version and hopefully try it out and get back to me with any bugs :). Specifically I would be grateful if people could test this out on a Windows platforms for me, as I have only tested it on Mac so far. To install, simply download my development branch on Github: https://github.com/MrKriss/wikihouse-plugin/archive/Dev.zip and follow README instructions. 

There is still much that can be done with the extension, so if anyone would like to lend a hand with the coding that would be great. It has only taken me about 2 months to bring myself up to speed on everything (Ruby, SketchUp API, Javascript and HTML) and I am planning on making a post with pointers to resources I found useful on getting started with all of them. If you are interested in getting involved please email me, as I have collated quite an extensive list of things that need doing on my Kanban board at https://kanbanflow.com/, and can easily share it with you to avoid any work duplication. The site provides a good (and free) platform to work collaboratively on a project and visualise its progress easily. I'd also be happy to add anyone if they are interested in the finer details of the progress being made (sharing individual boards is by invite only at current, so drop me an email if you would like one).  

Plywood sheet depth issues 

There is an ongoing issue with side faces of panels being erroneously included in the cutting template if the thickness of the panels modeled is bellow or above the set thickness thresholds (previously hardcoded at 17mm and 19mm). This issue is still present, but now these thresholds are variable according to the user set thickness (+ 1mm and - 1mm). The end result is that if your model contains panels of different thicknesses, cutting templates cannot all be generated at once, but they can be done in groups by setting the sheet depth parameter and then just selecting all parts of that thickness before running the 'make cutting templates' command. However at current I think the file names of the SVG files would override each other, so after generating one set, rename it to something meaningful before generating the next. I know this is not ideal, but it will have to do till I have time to look at the specific methods of extracting pannel faces in more detail.   

Nick Ierodiaconou

unread,
Apr 30, 2013, 8:31:30 AM4/30/13
to wikihouse...@googlegroups.com
Chris awesome work, thanks for this... Brilliant to have someone actively working on the plugin. It has obvious applications in a whole range of CNC projects if we can get it right!

Alastair and I met with one of the SketchUp team a few weeks back and they offered some support (a little further down the line) from their dev team, and suggested we start posting results to www.sketchucation.com. I'll look to do this at some point. In the mean time I will ask Tav to look at merging your pull-request and very happy to include a link to your branch in the group welcome here (I'll do this later today/tomorrow as currently travelling).

Thanks again and keep up the great work!

Martin Luff

unread,
May 2, 2013, 8:31:42 AM5/2/13
to wikihouse...@googlegroups.com
Hi Chris - great work and much appreciated... will test on PC as soon as I get a moment or two. 

I have to say the whole NZ team are still struggling a lot with SketchUp - so also pursuing a few other avenues including a very cool fully parametric tool in development by a NZ company here which could potentially not only solve our collaborative working on CAD files but also provide both high end and low-level interfaces plus produce realtime costings and materials feedouts (amongst other things). Will post something here soon on this group.

Kind regards

Martin

nick godfrey

unread,
Jul 3, 2013, 11:25:57 PM7/3/13
to wikihouse...@googlegroups.com
Has anyone here worked with Sketchup 2013? I have tried to install the plugin and it appears as though it wants to work but ulimately cause the program to crash. I am very new to Sketchup in general.

Nicholas

Chris Musselle

unread,
Jul 4, 2013, 8:32:25 AM7/4/13
to nick godfrey, wikihouse...@googlegroups.com
Hi nick, thanks for the feedback, I'll have a look into this. 

Last I checked the latest development version im working on (available here) worked fine on Sketchup 2013 on Mac, but I have yet to test it on windows, and I have just noticed there has since been another update to the Sketchup 2013 version.  I'll have a look at this in more depth over the weekend.

Could you let me know a) the operating system your using b) the version of wikihouse plugin (the original or latest version) and c) the error message (if any) that is displayed either as a popup or on the ruby console. 

Cheers

Chris
   

---------------------
Dr. C. J. Musselle
Post-doctoral Researcher
81/83 Woodland Road
University of Bristol
Email: chris.j....@gmail.com
Mob: 07507 037003

nick godfrey

unread,
Jul 5, 2013, 11:56:01 AM7/5/13
to wikihouse...@googlegroups.com, nick godfrey
Chris,

I used the latest master from the github pulled and built.   Running windows 7 Pro service pak 1.  I have been able to get it to show up and open now, however, I am not able to access the wikihouse library to download/upload anything. 

Nicholas

Chris Musselle

unread,
Jul 8, 2013, 1:50:29 PM7/8/13
to wikihouse...@googlegroups.com, nick godfrey
Hi Nick, 

I've had a look into this and can reproduce the freeze/crash, though I am not sure whats behind it at current. I think it might be down to some incompatibility between Sketchup 2013 and the lastest version of internet explorer. I'm going to investigate to see if I can force SU to use a previous version of IE, but for now, you will have to download the sketchup files manually via a browser and then load them in. 

On the plus side, the generation of svg cutting templates seems to be working fine, which is good. These can be visualised on a windows machine by opening them in any internet browser.  

Chris 

nick godfrey

unread,
Jul 8, 2013, 10:22:55 PM7/8/13
to wikihouse...@googlegroups.com, nick godfrey
Thanks for the update Chris. Currently, I use the plugin with SU 8 to download and then open them in 2013. As far as I know, once I modify them with 2013 there is no going back through version 8 for an upload.  I guess that wouldn't be relevant anyway.

Nicholas

Brad Jensen

unread,
Aug 17, 2013, 10:10:08 AM8/17/13
to wikihouse...@googlegroups.com

I am also having problems with Windows 7 64 bit running Sketchup 8  The plugin loads fine a I can download/ upload as well.  However, when I try to "Make this House"  I get the following error below.  If I just hit "ok" it generates an empty file.  What am I doing wrong?


Brad Jensen

unread,
Aug 25, 2013, 11:39:03 AM8/25/13
to wikihouse...@googlegroups.com
Answering my own question:  I downgraded Sketch-up from 8.0.16846 to 8.0.0.  and now it is working (somewhat) the error that I had gotten before is the same but that is trying to make the dxf file.  Before there was neither a workable DXF file nor a SVG file.  Now I get the SVG file at least.  To find older versions of Sketchup, go here: http://www.oldversion.com/windows/google-sketchup/

I noticed that the file also creates a bunch of extraneous edges which have to be manually deleted and doesn't recognize any of the 12mm parts from 3.1.3.  I tried setting the plug in to only recognize the 12 mm parts, but not successfully.  

This is what I changed: 

 # Setup the min/max heights for the depth edge/faces.
    min_height = 10.mm
    max_height = 13.mm

My goal was to create cutting sheets for the thicker parts, then change the settings and create a second set for the 12mm parts.  This did not work.  I got the identical cutting sheet again.  Not sure if I have to "reload" the plug-in with the new settings.  I tried a restart but that didn't work.  Oh, well, there aren't too many 12 mm parts, so I guess I can attempt to do it manually.  
Reply all
Reply to author
Forward
Message has been deleted
0 new messages