Reading Google Sketchup (.skp) or Google Earth (.kmz)

This is a discussion on Reading Google Sketchup (.skp) or Google Earth (.kmz) within the Game Programming forums, part of the General Programming Boards category; Hi, I need to write a simple c++ application the reads sketchup (skp) or google earth file (kmz) and get ...

  1. #1
    Registered User Zeeshan's Avatar
    Join Date
    Oct 2001
    Location
    Munich, Germany
    Posts
    224

    Reading Google Sketchup (.skp) or Google Earth (.kmz)

    Hi,

    I need to write a simple c++ application the reads sketchup (skp) or google earth file (kmz) and get out of them the mesh information. Can somebody provide me with suitable links?

    Is there any C library available for doing this?

    Thanks a lot in advance.

  2. #2
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Katy, Texas
    Posts
    2,309
    There is a C++ SDK you can get from Google for SketchUp (Pro only) by signing a non-disclosure agreement.

    Also, there is a Ruby language API from which you can extract the mesh information. (Pro or Free)

    Not sure about KMZ, but I think it's just an XML file. Google documents it on their API website.

    Todd
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Todd Burch View Post
    Not sure about KMZ, but I think it's just an XML file. Google documents it on their API website.
    I'm fairly sure it's a compressed (zipped/gzipped) XML file.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  4. #4
    Registered User Zeeshan's Avatar
    Join Date
    Oct 2001
    Location
    Munich, Germany
    Posts
    224
    >> Also, there is a Ruby language API from which you can extract the mesh information. (Pro or Free)

    Can you please provide me with a link to this API?

  5. #5
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  6. #6
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Katy, Texas
    Posts
    2,309
    Quote Originally Posted by Zeeshan View Post
    >> Also, there is a Ruby language API from which you can extract the mesh information. (Pro or Free)

    Can you please provide me with a link to this API?
    After you download and install SketchUp, go to Help -> Ruby Help. It lists the class and the methods you need to know.

    Todd
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

  7. #7
    Registered User Zeeshan's Avatar
    Join Date
    Oct 2001
    Location
    Munich, Germany
    Posts
    224

    Reading Sketchup files in Linux

    Thanks a whole lot for your response.

    Is there any way to read Sketchup files, while in Linux...I want to develop my own C++ API to do this? (I don't have Sketchup Pro so no access to Google's C++ SDK).

    Any ideas as to where I should start?

    Thanks.

  8. #8
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Katy, Texas
    Posts
    2,309
    Sketchup doesn't officially run on Linux, but a group a avid Linux'ers have got it working under Whine. To read the file directly, you need the SDK. You can export from Sketchup to 3DS or FBX and probably work with those file formats under Linux, but, again, you need the Pro version to export to these formats, so again, you are hosed.

    If you NEED it, then you NEED it, then spring for the $495 and get it.

    Todd
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

  9. #9
    Registered User Zeeshan's Avatar
    Join Date
    Oct 2001
    Location
    Munich, Germany
    Posts
    224
    Thanks Todd for your reply.

    But how about Ruby...Do you think the Sketchup Ruby API can be used outside of Sketchup? I guess Ruby can be run under Linux, right???

    So, if I can access this API without sketchup...I should be able to extract the 3D mesh info. from Linux ...right?

  10. #10
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    I guess Ruby can be run under Linux, right???
    Yes.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 02-02-2009, 07:27 AM
  2. Nice vistas with the equivalent Google Earth version
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 08-14-2008, 07:58 AM
  3. Google Sketchup
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 11-13-2006, 05:18 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21