Archicad C++ API
About Archicad add-on development using the C++ API.

API Tool Development: Advice Request

I am currently working on a project with a local manufacturer to develop a wall panel configurator. Our team has built paneliztion routines in GDL previously, but this project has a new twist.

The wall panels comprised of steel studs and EPS foam formed on a proprietary cutting bed. What I'm looking for is the means of sending a file to the cutter that optimizes the foam blocks from which the panels are cut.

Am I right to think that there are existing routines in the public domain that analyze geomtric shapes and are able to collate and rotate them into a configuration that reduces the "white space" around them? And, if such algorithms exist that they can be adapted for use in an Archicad API based project?
Think Like a Spec Writer
AC4.55 through 27 / USA AC27-4060 USA
Rhino 8 Mac
MacOS 14.2.1
5 REPLIES 5
Karl Ottenstein
Moderator
Aaron wrote:
Am I right to think that there are existing routines in the public domain that analyze geomtric shapes and are able to collate and rotate them into a configuration that reduces the "white space" around them? And, if such algorithms exist that they can be adapted for use in an ArchiCAD API based project?
Hi Aaron,

You are looking at a 2-dimensional variant of the 'bin packing' problem, which is provably "difficult" (NP-complete). Here are a couple of quick links from Google so you don't have to go find a complexity theory textbook:

http://www.ams.org/new-in-math/cover/bins1.html

http://www2.toki.or.id/book/AlgDesignManual/BOOK/BOOK5/NODE192.HTM

Now, such problems have heuristic solutions that are 'pretty good'... it is just the optimal solution that is something that you don't want to try to implement in the general case and expect to live to see the result. Naturally, UPS/FedEx/etc have ways of fitting stuff into their trucks, etc.

If you aren't comfortable digging into all of this, I'd suggest contacting the University of Alberta at Edmonton's Computer Science Department. Whoever is teaching the complexity theory course(s), or the graduate students specializing in that field should be able to help.

Good luck!

Karl
One of the forum moderators
AC 27 USA and earlier   •   macOS Ventura 13.6.6, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
Karl

I dont know many architects knowing about NP complete or not problems!
I also dont know many architects with good computing skills, not to mention creating a compiler (yes.. i read your posts ).

By the way nice link ( the second one)
Karl Ottenstein
Moderator
oreopoulos wrote:
I dont know many architects knowing about NP complete or not problems!
I also dont know many architects with good computing skills, not to mention creating a compiler (yes.. i read your posts ).
I don't know any 😉 ... but perhaps you are one, or some of our friends in GS development are. I'm not an architect, but a computer scientist who has stumbled into the design field (and a few others) for fun:
http://archicad-talk.graphisoft.com/viewtopic.php?p=14472#14472

(In Idaho, at least, I can call myself a designer or whatever, but only licensed architects are allowed to use the word or imply that they are architects or practice architecture.)

Thanks. 😉

Karl
One of the forum moderators
AC 27 USA and earlier   •   macOS Ventura 13.6.6, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
I am not an architect too..

Mathematician and Civil Engineer
But a hobby programmer for lets sat 25 years? (my first program was an zx80 hack for a game.. )

I asked from GS a code for the apis.... I want to make a simple model checker. It will scan through some elements (walls slabs beams) and check for points that are too close (close would be user defined.) the api could fix those points by moving a selected edge....)

I will start as soon as i recieve the auth code..
Karl Ottenstein
Moderator
oreopoulos wrote:
I am not an architect too..

Mathematician and Civil Engineer
Wow. 😉

Good luck with the development once you get your auth code. 😉

Karl
One of the forum moderators
AC 27 USA and earlier   •   macOS Ventura 13.6.6, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB