• Login
sketchucation logo sketchucation
  • Login
🔌 Quick Selection | Try Didier Bur's reworked classic extension that supercharges selections in SketchUp Download

Terrain elevation calculator

Scheduled Pinned Locked Moved Plugins
10 Posts 4 Posters 855 Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    tspco
    last edited by 6 Dec 2011, 01:14

    I recently have a need for a quick way to indicate the highest, and lowest points, using the origin as a fixed reference. I currently use Chris Fullmer's on screen display to do this, but it is difficult to judge the terrain to find the highest, and lowest points, while looking at it, especially when the difference is less than 20 feet.
    Any suggestions?

    SU make 2017, /Twilight Render Hobby
    Windows 10,64 bit,16GB ram, quad core Athlon 3.6 gHz proc. Anything else you want to know, ask me.

    1 Reply Last reply Reply Quote 0
    • S Offline
      sdmitch
      last edited by 6 Dec 2011, 17:51

      To find the location of the highest and lowest points, you would need to look at every edge making up the terrain mesh. The only way to do this efficiently would be a plugin such as

      
      def label_high_low
      mod = Sketchup.active_model
      ent = mod.active_entities
      sel = mod.selection
      hi_pt=nil;lo_pt=nil;hi=-1e9;lo=1e9
      hi_vec=[0,0,2400];lo_vec=[0,0,-2400]
      grp=sel.first;#select the GE 3D terrain 
      grp.entities.each{|e|
        if e.class==Sketchup;;Edge
          (hi=e.start.position.z;hi_pt=e.start) if e.start.position.z>hi
          (lo=e.start.position.z;lo_pt=e.end) if e.start.position.z<lo
          (hi=e.end.position.z;hi_pt=e.end) if e.end.position.z>hi
          (lo=e.end.position.z;lo_pt=e.end) if e.end.position.z<lo
        end
      }
      ent.add_text(hi.to_s,hi_pt.position,hi_vec)#label the high point
      ent.add_text(lo.to_s,lo_pt.position,lo_vec)#label the low point
      end
      
      

      Nothing is worthless, it can always be used as a bad example.

      http://sdmitch.blogspot.com/

      1 Reply Last reply Reply Quote 0
      • T Offline
        tspco
        last edited by 7 Dec 2011, 01:02

        So it is do-able, how hard would it be to make it work?
        This is my first look inside a "plugin" but I wouldn't have a clue what everything means.

        SU make 2017, /Twilight Render Hobby
        Windows 10,64 bit,16GB ram, quad core Athlon 3.6 gHz proc. Anything else you want to know, ask me.

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdmitch
          last edited by 7 Dec 2011, 01:22

          Not hard at all. I will make it into a normal plugin that you can access from the Plugins Menu.

          Check for PM.

          Nothing is worthless, it can always be used as a bad example.

          http://sdmitch.blogspot.com/

          1 Reply Last reply Reply Quote 0
          • X Offline
            xrok1
            last edited by 7 Dec 2011, 23:03

            why not just make a plane at 0 copy it up with the spacing you require (say 10') then do an intersection and hide the planes. You will then see rings like a make shift topo map. You can put the edges on a seperate layer and hide/show as you please.
            site.jpg
            SITEplanoverview.jpg

            “There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

            http://www.Twilightrender.com try it!

            1 Reply Last reply Reply Quote 0
            • T Offline
              tspco
              last edited by 8 Dec 2011, 00:10

              With a plugin that was made for this purpose, and a projected texture this what I get, good enough for me for now.


              jeffery1a.jpg

              SU make 2017, /Twilight Render Hobby
              Windows 10,64 bit,16GB ram, quad core Athlon 3.6 gHz proc. Anything else you want to know, ask me.

              1 Reply Last reply Reply Quote 0
              • T Offline
                tspco
                last edited by 8 Dec 2011, 02:45

                Here is another view, I forgot to erase some items, sorry.


                jeffery1.jpg

                SU make 2017, /Twilight Render Hobby
                Windows 10,64 bit,16GB ram, quad core Athlon 3.6 gHz proc. Anything else you want to know, ask me.

                1 Reply Last reply Reply Quote 0
                • X Offline
                  xrok1
                  last edited by 8 Dec 2011, 23:45

                  I guess i did miss the point. 😳
                  Didn't Chris make a plugin alone these lines? (min,max)

                  “There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

                  http://www.Twilightrender.com try it!

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    tspco
                    last edited by 9 Dec 2011, 04:05

                    Don't know about Chris's version, sdmitch did one the other day, works as I needed it to.

                    SU make 2017, /Twilight Render Hobby
                    Windows 10,64 bit,16GB ram, quad core Athlon 3.6 gHz proc. Anything else you want to know, ask me.

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      aile009
                      last edited by 13 Mar 2012, 16:50

                      @sdmitch said:

                      To find the location of the highest and lowest points, you would need to look at every edge making up the terrain mesh. The only way to do this efficiently would be a plugin such as

                      
                      > def label_high_low
                      > mod = Sketchup.active_model
                      > ent = mod.active_entities
                      > sel = mod.selection
                      > hi_pt=nil;lo_pt=nil;hi=-1e9;lo=1e9
                      > hi_vec=[0,0,2400];lo_vec=[0,0,-2400]
                      > grp=sel.first;#select the GE 3D terrain 
                      > grp.entities.each{|e|
                      >   if e.class==Sketchup;;Edge
                      >     (hi=e.start.position.z;hi_pt=e.start) if e.start.position.z>hi
                      >     (lo=e.start.position.z;lo_pt=e.end) if e.start.position.z<lo
                      >     (hi=e.end.position.z;hi_pt=e.end) if e.end.position.z>hi
                      >     (lo=e.end.position.z;lo_pt=e.end) if e.end.position.z<lo
                      >   end
                      > }
                      > ent.add_text(hi.to_s,hi_pt.position,hi_vec)#label the high point
                      > ent.add_text(lo.to_s,lo_pt.position,lo_vec)#label the low point
                      > end
                      > 
                      

                      This episode code is the right thing i'm looking for. It provides an addititonal option
                      for Mesh2Heightmap. because the mesh2heightmap generate a greate heightmap but not provide
                      the minimum and maximum elevation values without which i can not use this map to generate
                      an accurate terrain.

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      Buy SketchPlus
                      Buy SUbD
                      Buy WrapR
                      Buy eBook
                      Buy Modelur
                      Buy Vertex Tools
                      Buy SketchCuisine
                      Buy FormFonts

                      Advertisement