sketchucation logo sketchucation
    • Login
    1. Home
    2. kubark42
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    K
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 5
    • Groups 1

    kubark42

    @kubark42

    10
    Reputation
    1
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    kubark42 Unfollow Follow
    registered-users

    Latest posts made by kubark42

    • RE: [Plugin] KML Tools (2.0.0-beta) — updated 31.05.2013

      Hi, Aerilius--

      I found out why I was having altitude problems. I don't program in ruby, but it looks close enough to other languages iI do program that I was able to muddle through it and realize that Altitude is not an attribute in GeoReference, so get_attribute("GeoReference","Altitude") returns 0. By changing Altitude to ZValueCentered, I was able to get a negative value in inches that is seemingly correct for my elevation. I cannot find a definitive reference on this, and there is also ModelTranslationZ which has the identical value for me, so I'm unclear which is the appropriate way forward. However, both solve my problem. So in conclusion, I've replaced line 253 by @ground = -@model.get_attribute("GeoReference","ZValueCentered").to_f.to_m and that solved my problem.

      Now I'm struggling with an odd error. For some reason when exporting a group to multigeometry the KML is missing the opening <MultiGeometry> tag, but it has the closing one. This causes an import error in KML until I manually add the XML tag.

      EDIT: terrain_alt([0,0,0]).to_m doesn't seem to return any sensible values. I'm interested if you have an idea about this, too.

      posted in Plugins
      K
      kubark42
    • RE: [Plugin] KML Tools (2.0.0-beta) — updated 31.05.2013

      Okay, figured out the second bug, and why I wasn't seeing it before:

      
          if facecolor
            @out.puts "  <Style>"
            @out.puts "    <LineStyle>"
            @out.puts "      <color>#{linecolor}</color>"
            @out.puts "      <colorMode>normal</colorMode>"
            @out.puts "      <width>1</width>"
            @out.puts "    </LineStyle>"
            @out.puts "    <PolyStyle>"
            @out.puts "      <color>#{facecolor}</color>"
            @out.puts "      <colorMode>normal</colorMode>"
            @out.puts "      <fill>1</fill>"
            @out.puts "      <outline>1</outline>"
            @out.puts "    </PolyStyle>"
            @out.puts "  </Style>"
            @out.puts "  <MultiGeometry>"
          end
      
      

      only places the <MultiGeometry> tag if there is a facecolor. So moving " @out.puts " <MultiGeometry>"
      " to right after the "end" solves the problem.

      posted in Plugins
      K
      kubark42
    • RE: [Plugin] KML Tools (2.0.0-beta) — updated 31.05.2013

      So this tool is really awesome, and almost exactly what I need. Thanks a million!

      Time for a tiny bug report: when setting the altitude mode to absolute altitude, instead of adjusting the Z values to the true altitudes, the script just sets the altitudeMode field to "absolute". The result is that a model that was drawn on the surface is buried in the ground in Google Earth.

      posted in Plugins
      K
      kubark42
    • RE: [Plugin] KML Tools (2.0.0-beta) — updated 31.05.2013

      Just tried the beta, but it made no file output, just an empty directory. 1.4 works fine for me with the same workflow, so I'm either doing something wrong or it's not working on my model.

      EDIT: Sorry, I should have included some info. This is OSX 10.8 running SU8. Model can be downloaded from https://www.dropbox.com/s/q5a1hzqvcwlc39u/Geo-fence.skp

      posted in Plugins
      K
      kubark42
    • Create and export closed polyhedron on Earth's surfaces

      Using posts on these forums, as well as plugins such as TriangulateFaces, I have been able to generate simple polyhedra and visualize them in Google Earth.

      Screen Shot 2013-06-07 at 11.42.57 AM.png

      This is almost what I need. I have two remaining steps for which I'm hoping to find convenient answers:

      1. I would like to be able to set the base of my polygon to follow terrain contour, so that the base is a constant height about the ground.
      2. I want to export the model model as a group of faces with vertex coordinates in lat-lon-alt tuples, ideally as a KML file. Currently, the model that is exported to Google Earth is a KML file containing only a placemark anchor, with the faces and vertices being placed into a secondary DAE file using machine coordinates.

      Anyone have tips for accomplishing (1) and (2)?

      EDIT: http://sketchucation.com/forums/viewtopic.php?f=323&t=38009 seems to solve #2.

      posted in SketchUp Discussions sketchup
      K
      kubark42