@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.